let i, j be Element of NAT ; :: thesis: for G being Go-board
for p being Point of (TOP-REAL 2) st 1 <= i & i + 1 <= len G & 1 <= j & j + 1 <= width G & p in Values G & p in cell G,i,j holds
p is_extremal_in cell G,i,j

let G be Go-board; :: thesis: for p being Point of (TOP-REAL 2) st 1 <= i & i + 1 <= len G & 1 <= j & j + 1 <= width G & p in Values G & p in cell G,i,j holds
p is_extremal_in cell G,i,j

let p be Point of (TOP-REAL 2); :: thesis: ( 1 <= i & i + 1 <= len G & 1 <= j & j + 1 <= width G & p in Values G & p in cell G,i,j implies p is_extremal_in cell G,i,j )
assume that
A1: ( 1 <= i & i + 1 <= len G & 1 <= j & j + 1 <= width G ) and
A2: p in Values G and
A3: p in cell G,i,j ; :: thesis: p is_extremal_in cell G,i,j
for a, b being Point of (TOP-REAL 2) st p in LSeg a,b & LSeg a,b c= cell G,i,j & not p = a holds
p = b
proof
let a, b be Point of (TOP-REAL 2); :: thesis: ( p in LSeg a,b & LSeg a,b c= cell G,i,j & not p = a implies p = b )
assume that
A4: p in LSeg a,b and
A5: LSeg a,b c= cell G,i,j ; :: thesis: ( p = a or p = b )
A6: a in LSeg a,b by RLTOPSP1:69;
A7: b in LSeg a,b by RLTOPSP1:69;
assume that
A8: a <> p and
A9: b <> p ; :: thesis: contradiction
per cases ( p = G * i,j or p = G * i,(j + 1) or p = G * (i + 1),(j + 1) or p = G * (i + 1),j ) by A1, A2, A3, Th21;
suppose A10: p = G * i,j ; :: thesis: contradiction
then A11: p `2 <= b `2 by A1, A5, A7, Th19;
A12: p `1 <= a `1 by A1, A5, A6, A10, Th19;
A13: p `1 <= b `1 by A1, A5, A7, A10, Th19;
A14: p `2 <= a `2 by A1, A5, A6, A10, Th19;
now
per cases ( ( a `1 <= b `1 & a `2 <= b `2 ) or ( a `1 <= b `1 & b `2 < a `2 ) or ( b `1 < a `1 & a `2 <= b `2 ) or ( b `1 < a `1 & b `2 < a `2 ) ) ;
end;
end;
hence contradiction ; :: thesis: verum
end;
suppose A27: p = G * i,(j + 1) ; :: thesis: contradiction
then A28: b `2 <= p `2 by A1, A5, A7, Th19;
A29: p `1 = (G * i,j) `1 by A1, A27, Th18;
then A30: p `1 <= a `1 by A1, A5, A6, Th19;
A31: p `1 <= b `1 by A1, A5, A7, A29, Th19;
A32: a `2 <= p `2 by A1, A5, A6, A27, Th19;
now
per cases ( ( a `1 <= b `1 & a `2 <= b `2 ) or ( a `1 <= b `1 & b `2 < a `2 ) or ( b `1 < a `1 & a `2 <= b `2 ) or ( b `1 < a `1 & b `2 < a `2 ) ) ;
end;
end;
hence contradiction ; :: thesis: verum
end;
suppose A45: p = G * (i + 1),(j + 1) ; :: thesis: contradiction
then A46: p `1 = (G * (i + 1),j) `1 by A1, Th18;
then A47: a `1 <= p `1 by A1, A5, A6, Th19;
A48: p `2 = (G * i,(j + 1)) `2 by A1, A45, Th18;
then A49: b `2 <= p `2 by A1, A5, A7, Th19;
A50: b `1 <= p `1 by A1, A5, A7, A46, Th19;
A51: a `2 <= p `2 by A1, A5, A6, A48, Th19;
now
per cases ( ( a `1 <= b `1 & a `2 <= b `2 ) or ( a `1 <= b `1 & b `2 < a `2 ) or ( b `1 < a `1 & a `2 <= b `2 ) or ( b `1 < a `1 & b `2 < a `2 ) ) ;
end;
end;
hence contradiction ; :: thesis: verum
end;
suppose A64: p = G * (i + 1),j ; :: thesis: contradiction
then A65: p `2 = (G * i,j) `2 by A1, Th18;
then A66: p `2 <= b `2 by A1, A5, A7, Th19;
A67: a `1 <= p `1 by A1, A5, A6, A64, Th19;
A68: b `1 <= p `1 by A1, A5, A7, A64, Th19;
A69: p `2 <= a `2 by A1, A5, A6, A65, Th19;
now
per cases ( ( a `1 <= b `1 & a `2 <= b `2 ) or ( a `1 <= b `1 & b `2 < a `2 ) or ( b `1 < a `1 & a `2 <= b `2 ) or ( b `1 < a `1 & b `2 < a `2 ) ) ;
end;
end;
hence contradiction ; :: thesis: verum
end;
end;
end;
hence p is_extremal_in cell G,i,j by A3, SPPOL_1:def 1; :: thesis: verum