let i, j be 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:68;
A7: b in LSeg (a,b) by RLTOPSP1:68;
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, Th19;
suppose A10: p = G * (i,j) ; :: thesis: contradiction
then A11: p `2 <= b `2 by A1, A5, A7, Th17;
A12: p `1 <= a `1 by A1, A5, A6, A10, Th17;
A13: p `1 <= b `1 by A1, A5, A7, A10, Th17;
A14: p `2 <= a `2 by A1, A5, A6, A10, Th17;
now :: thesis: contradiction
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, Th17;
A29: p `1 = (G * (i,j)) `1 by A1, A27, Th16;
then A30: p `1 <= a `1 by A1, A5, A6, Th17;
A31: p `1 <= b `1 by A1, A5, A7, A29, Th17;
A32: a `2 <= p `2 by A1, A5, A6, A27, Th17;
now :: thesis: contradiction
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, Th16;
then A47: a `1 <= p `1 by A1, A5, A6, Th17;
A48: p `2 = (G * (i,(j + 1))) `2 by A1, A45, Th16;
then A49: b `2 <= p `2 by A1, A5, A7, Th17;
A50: b `1 <= p `1 by A1, A5, A7, A46, Th17;
A51: a `2 <= p `2 by A1, A5, A6, A48, Th17;
now :: thesis: contradiction
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, Th16;
then A66: p `2 <= b `2 by A1, A5, A7, Th17;
A67: a `1 <= p `1 by A1, A5, A6, A64, Th17;
A68: b `1 <= p `1 by A1, A5, A7, A64, Th17;
A69: p `2 <= a `2 by A1, A5, A6, A65, Th17;
now :: thesis: contradiction
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