let f be V22() standard clockwise_oriented special_circular_sequence; :: thesis: for G being Go-board
for k being Nat st f is_sequence_on G & 1 <= k & k + 1 <= len f & f /. k = S-max (L~ f) holds
ex i, j being Nat st
( [(i + 1),j] in Indices G & [i,j] in Indices G & f /. k = G * ((i + 1),j) & f /. (k + 1) = G * (i,j) )

let G be Go-board; :: thesis: for k being Nat st f is_sequence_on G & 1 <= k & k + 1 <= len f & f /. k = S-max (L~ f) holds
ex i, j being Nat st
( [(i + 1),j] in Indices G & [i,j] in Indices G & f /. k = G * ((i + 1),j) & f /. (k + 1) = G * (i,j) )

let k be Nat; :: thesis: ( f is_sequence_on G & 1 <= k & k + 1 <= len f & f /. k = S-max (L~ f) implies ex i, j being Nat st
( [(i + 1),j] in Indices G & [i,j] in Indices G & f /. k = G * ((i + 1),j) & f /. (k + 1) = G * (i,j) ) )

assume that
A1: f is_sequence_on G and
A2: 1 <= k and
A3: k + 1 <= len f and
A4: f /. k = S-max (L~ f) ; :: thesis: ex i, j being Nat st
( [(i + 1),j] in Indices G & [i,j] in Indices G & f /. k = G * ((i + 1),j) & f /. (k + 1) = G * (i,j) )

consider i1, j1, i2, j2 being Nat such that
A5: [i1,j1] in Indices G and
A6: f /. k = G * (i1,j1) and
A7: [i2,j2] in Indices G and
A8: f /. (k + 1) = G * (i2,j2) and
A9: ( ( i1 = i2 & j1 + 1 = j2 ) or ( i1 + 1 = i2 & j1 = j2 ) or ( i1 = i2 + 1 & j1 = j2 ) or ( i1 = i2 & j1 = j2 + 1 ) ) by ;
A10: (G * (i1,j1)) `2 = S-bound (L~ f) by ;
A11: 1 <= j2 by ;
take i2 ; :: thesis: ex j being Nat st
( [(i2 + 1),j] in Indices G & [i2,j] in Indices G & f /. k = G * ((i2 + 1),j) & f /. (k + 1) = G * (i2,j) )

take j2 ; :: thesis: ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) & f /. (k + 1) = G * (i2,j2) )
A12: i1 <= len G by ;
A13: k + 1 >= 1 + 1 by ;
then A14: len f >= 2 by ;
k + 1 >= 1 by NAT_1:11;
then A15: k + 1 in dom f by ;
then f /. (k + 1) in L~ f by ;
then A16: (G * (i1,j1)) `2 <= (G * (i2,j2)) `2 by ;
A17: 1 <= j1 by ;
A18: k < len f by ;
then A19: k in dom f by ;
A20: i2 <= len G by ;
A21: ( 1 <= i1 & j1 <= width G ) by ;
A22: ( 1 <= i2 & j2 <= width G ) by ;
now :: thesis: ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) )
per cases ( ( i2 + 1 = i1 & j1 = j2 ) or ( i1 = i2 & j1 + 1 = j2 & k <> 1 ) or ( i1 = i2 & j1 + 1 = j2 & k = 1 ) or ( i1 = i2 & j1 = j2 + 1 ) or ( i2 = i1 + 1 & j1 = j2 ) ) by A9;
suppose ( i2 + 1 = i1 & j1 = j2 ) ; :: thesis: ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) )
hence ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) ) by A5, A6, A7; :: thesis: verum
end;
suppose A23: ( i1 = i2 & j1 + 1 = j2 & k <> 1 ) ; :: thesis: ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) )
reconsider k9 = k - 1 as Nat by ;
k > 1 by ;
then k >= 1 + 1 by NAT_1:13;
then A24: k9 >= (1 + 1) - 1 by XREAL_1:9;
then consider i3, j3, i4, j4 being Nat such that
A25: [i3,j3] in Indices G and
A26: f /. k9 = G * (i3,j3) and
A27: [i4,j4] in Indices G and
A28: f /. (k9 + 1) = G * (i4,j4) and
A29: ( ( i3 = i4 & j3 + 1 = j4 ) or ( i3 + 1 = i4 & j3 = j4 ) or ( i3 = i4 + 1 & j3 = j4 ) or ( i3 = i4 & j3 = j4 + 1 ) ) by ;
A30: i1 = i4 by ;
k9 + 1 < len f by ;
then k9 < len f by NAT_1:13;
then A31: k9 in dom f by ;
A32: i3 <= len G by ;
A33: 1 <= j3 by ;
A34: j1 = j4 by ;
A35: ( 1 <= i3 & j3 <= width G ) by ;
A36: i3 = i4
proof
assume A37: i3 <> i4 ; :: thesis: contradiction
per cases ( ( j3 = j4 & i4 = i3 + 1 ) or ( j3 = j4 & i4 + 1 = i3 ) ) by ;
suppose A38: ( j3 = j4 & i4 = i3 + 1 ) ; :: thesis: contradiction
then (G * (i3,j3)) `2 <> S-bound (L~ f) by A1, A18, A24, A25, A26, A27, A28, Th19;
then (G * (1,j3)) `2 <> S-bound (L~ f) by ;
then (S-max (L~ f)) `2 <> S-bound (L~ f) by ;
hence contradiction by EUCLID:52; :: thesis: verum
end;
suppose A39: ( j3 = j4 & i4 + 1 = i3 ) ; :: thesis: contradiction
(G * (i3,j3)) `2 = (G * (1,j3)) `2 by
.= (S-max (L~ f)) `2 by
.= S-bound (L~ f) by EUCLID:52 ;
then G * (i3,j3) in S-most (L~ f) by ;
then (G * (i4,j4)) `1 >= (G * (i3,j3)) `1 by ;
then i4 >= i4 + 1 by ;
hence contradiction by NAT_1:13; :: thesis: verum
end;
end;
end;
A40: k9 + 1 = k ;
f /. k9 in L~ f by ;
then A41: (G * (i1,j1)) `2 <= (G * (i3,j3)) `2 by ;
now :: thesis: contradiction
per cases ( j3 + 1 = j4 or j3 = j4 + 1 ) by ;
suppose A42: j3 = j4 + 1 ; :: thesis: contradiction
k9 + (1 + 1) <= len f by A3;
then A43: (LSeg (f,k9)) /\ (LSeg (f,k)) = {(f /. k)} by ;
( f /. k9 in LSeg (f,k9) & f /. (k + 1) in LSeg (f,k) ) by ;
then f /. (k + 1) in {(f /. k)} by ;
then A44: f /. (k + 1) = f /. k by TARSKI:def 1;
j1 <> j2 by A23;
hence contradiction by A5, A6, A7, A8, A44, GOBOARD1:5; :: thesis: verum
end;
end;
end;
hence ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) ) ; :: thesis: verum
end;
suppose A45: ( i1 = i2 & j1 + 1 = j2 & k = 1 ) ; :: thesis: ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) )
set k1 = len f;
k < len f by ;
then A46: len f > 1 + 0 by ;
then len f in dom f by FINSEQ_3:25;
then reconsider k9 = (len f) - 1 as Nat by FINSEQ_3:26;
k + 1 >= 1 + 1 by ;
then len f >= 1 + 1 by ;
then A47: k9 >= (1 + 1) - 1 by XREAL_1:9;
then consider i3, j3, i4, j4 being Nat such that
A48: [i3,j3] in Indices G and
A49: f /. k9 = G * (i3,j3) and
A50: [i4,j4] in Indices G and
A51: f /. (k9 + 1) = G * (i4,j4) and
A52: ( ( i3 = i4 & j3 + 1 = j4 ) or ( i3 + 1 = i4 & j3 = j4 ) or ( i3 = i4 + 1 & j3 = j4 ) or ( i3 = i4 & j3 = j4 + 1 ) ) by ;
A53: f /. (len f) = f /. 1 by FINSEQ_6:def 1;
then A54: i1 = i4 by ;
k9 + 1 <= len f ;
then k9 < len f by NAT_1:13;
then A55: k9 in dom f by ;
then f /. k9 in L~ f by ;
then A56: (G * (i1,j1)) `2 <= (G * (i3,j3)) `2 by ;
A57: i3 <= len G by ;
A58: j1 = j4 by ;
A59: 1 <= j3 by ;
A60: ( 1 <= i3 & j3 <= width G ) by ;
A61: i3 = i4
proof
assume A62: i3 <> i4 ; :: thesis: contradiction
per cases ( ( j3 = j4 & i4 = i3 + 1 ) or ( j3 = j4 & i4 + 1 = i3 ) ) by ;
suppose A63: ( j3 = j4 & i4 = i3 + 1 ) ; :: thesis: contradiction
then (G * (i3,j3)) `2 <> S-bound (L~ f) by A1, A47, A48, A49, A50, A51, Th19;
then (G * (1,j3)) `2 <> S-bound (L~ f) by ;
then (S-max (L~ f)) `2 <> S-bound (L~ f) by ;
hence contradiction by EUCLID:52; :: thesis: verum
end;
suppose A64: ( j3 = j4 & i4 + 1 = i3 ) ; :: thesis: contradiction
(G * (i3,j3)) `2 = (G * (1,j3)) `2 by
.= (S-max (L~ f)) `2 by
.= S-bound (L~ f) by EUCLID:52 ;
then G * (i3,j3) in S-most (L~ f) by ;
then (G * (i4,j4)) `1 >= (G * (i3,j3)) `1 by ;
then i4 >= i4 + 1 by ;
hence contradiction by NAT_1:13; :: thesis: verum
end;
end;
end;
A65: k9 + 1 = len f ;
now :: thesis: contradiction
per cases ( j3 + 1 = j4 or j3 = j4 + 1 ) by ;
suppose A66: j3 = j4 + 1 ; :: thesis: contradiction
(len f) - 1 >= 0 by ;
then (len f) -' 1 = (len f) - 1 by XREAL_0:def 2;
then A67: (LSeg (f,k)) /\ (LSeg (f,k9)) = {(f . k)} by
.= {(f /. k)} by ;
( f /. k9 in LSeg (f,k9) & f /. (k + 1) in LSeg (f,k) ) by ;
then f /. (k + 1) in {(f /. k)} by ;
then A68: f /. (k + 1) = f /. k by TARSKI:def 1;
j1 <> j2 by A45;
hence contradiction by A5, A6, A7, A8, A68, GOBOARD1:5; :: thesis: verum
end;
end;
end;
hence ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) ) ; :: thesis: verum
end;
suppose ( i1 = i2 & j1 = j2 + 1 ) ; :: thesis: ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) )
then j2 >= j2 + 1 by ;
hence ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) ) by NAT_1:13; :: thesis: verum
end;
suppose A69: ( i2 = i1 + 1 & j1 = j2 ) ; :: thesis: ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) )
(G * (i2,j2)) `2 = (G * (1,j2)) `2 by
.= S-bound (L~ f) by ;
then G * (i2,j2) in S-most (L~ f) by ;
then (G * (i1,j1)) `1 >= (G * (i2,j2)) `1 by ;
then i1 >= i1 + 1 by ;
hence ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) ) by NAT_1:13; :: thesis: verum
end;
end;
end;
hence ( [(i2 + 1),j2] in Indices G & [i2,j2] in Indices G & f /. k = G * ((i2 + 1),j2) ) ; :: thesis: f /. (k + 1) = G * (i2,j2)
thus f /. (k + 1) = G * (i2,j2) by A8; :: thesis: verum