reserve i,j,k,n for Nat;

theorem Th19:
  for f being clockwise_oriented non constant standard
special_circular_sequence for G being Go-board st f is_sequence_on G for i,j,k
being Nat st 1 <= k & k+1 <= len f & [i,j] in Indices G & [i+1,j] in
Indices G & f/.k = G*(i,j) & f/.(k+1) = G*(i+1,j) holds (f/.k)`2 <> S-bound L~f
proof
  let f be clockwise_oriented non constant standard special_circular_sequence;
  let G be Go-board;
  assume
A1: f is_sequence_on G;
  let i,j,k be Nat;
  assume that
A2: 1 <= k & k+1 <= len f and
A3: [i,j] in Indices G and
A4: [i+1,j] in Indices G and
A5: f/.k = G*(i,j) and
A6: f/.(k+1) = G*(i+1,j) and
A7: (f/.k)`2 = S-bound L~f;
A8: right_cell(f,k,G) = cell(G,i,j-'1) by A1,A2,A3,A4,A5,A6,GOBRD13:24;
A9: i <= len G by A3,MATRIX_0:32;
A10: j <= width G by A3,MATRIX_0:32;
A11: i+1 <= len G by A4,MATRIX_0:32;
  set p = 1/2*(G*(i,j-'1)+G*(i+1,j));
A12: 0+1 <= i by A3,MATRIX_0:32;
A13: 1 <= j by A3,MATRIX_0:32;
  then
A14: j-'1+1 = j by XREAL_1:235;
  per cases by A13,XXREAL_0:1;
  suppose
    j = 1;
    hence contradiction by A1,A2,A3,A4,A5,A6,Th15;
  end;
  suppose
    j > 1;
    then j >= 1+1 by NAT_1:13;
    then
A15: j-1 >= 1+1-1 by XREAL_1:9;
    j < width G + 1 by A10,NAT_1:13;
    then
A16: j-1 < width G+1-1 by XREAL_1:9;
    i < len G by A11,NAT_1:13;
    then
A17: Int cell(G,i,j-'1) = {|[r,s]| where r,s is Real:
G*(i,1)`1 < r & r <
G*(i+1,1)`1 & G*(1,j-'1)`2 < s & s < G*(1,j)`2 } by A12,A14,A15,A16,GOBOARD6:26
;
A18: p in Int right_cell(f,k,G) by A12,A10,A11,A8,A14,A15,GOBOARD6:31;
    then consider r,s be Real such that
A19: p = |[r,s]| and
    G*(i,1)`1 < r and
    r < G*(i+1,1)`1 and
    G*(1,j-'1)`2 < s and
A20: s < G*(1,j)`2 by A8,A17;
    p`2 = s by A19,EUCLID:52;
    then p`2 < S-bound L~f by A5,A7,A12,A9,A13,A10,A20,GOBOARD5:1;
    then
A21: p in LeftComp f by Th11;
    Int right_cell(f,k,G) c= RightComp f by A1,A2,JORDAN1H:25;
    then p in LeftComp f /\ RightComp f by A18,A21,XBOOLE_0:def 4;
    then LeftComp f meets RightComp f by XBOOLE_0:def 7;
    hence contradiction by GOBRD14:14;
  end;
end;
