:: Decomposing a Go Board into Cells
:: by Yatsuka Nakamura and Andrzej Trybulec
::
:: Copyright (c) 1995-2021 Association of Mizar Users

definition
let G be Matrix of ();
let i be Nat;
func v_strip (G,i) -> Subset of () equals :Def1: :: GOBOARD5:def 1
{ |[r,s]| where r, s is Real : ( (G * (i,1)) 1 <= r & r <= (G * ((i + 1),1)) 1 ) } if ( 1 <= i & i < len G )
{ |[r,s]| where r, s is Real : (G * (i,1)) 1 <= r } if i >= len G
otherwise { |[r,s]| where r, s is Real : r <= (G * ((i + 1),1)) 1 } ;
coherence
( ( 1 <= i & i < len G implies { |[r,s]| where r, s is Real : ( (G * (i,1)) 1 <= r & r <= (G * ((i + 1),1)) 1 ) } is Subset of () ) & ( i >= len G implies { |[r,s]| where r, s is Real : (G * (i,1)) 1 <= r } is Subset of () ) & ( ( not 1 <= i or not i < len G ) & not i >= len G implies { |[r,s]| where r, s is Real : r <= (G * ((i + 1),1)) 1 } is Subset of () ) )
proof end;
correctness
consistency
for b1 being Subset of () st 1 <= i & i < len G & i >= len G holds
( b1 = { |[r,s]| where r, s is Real : ( (G * (i,1)) 1 <= r & r <= (G * ((i + 1),1)) 1 ) } iff b1 = { |[r,s]| where r, s is Real : (G * (i,1)) 1 <= r } )
;
;
func h_strip (G,i) -> Subset of () equals :Def2: :: GOBOARD5:def 2
{ |[r,s]| where r, s is Real : ( (G * (1,i)) 2 <= s & s <= (G * (1,(i + 1))) 2 ) } if ( 1 <= i & i < width G )
{ |[r,s]| where r, s is Real : (G * (1,i)) 2 <= s } if i >= width G
otherwise { |[r,s]| where r, s is Real : s <= (G * (1,(i + 1))) 2 } ;
coherence
( ( 1 <= i & i < width G implies { |[r,s]| where r, s is Real : ( (G * (1,i)) 2 <= s & s <= (G * (1,(i + 1))) 2 ) } is Subset of () ) & ( i >= width G implies { |[r,s]| where r, s is Real : (G * (1,i)) 2 <= s } is Subset of () ) & ( ( not 1 <= i or not i < width G ) & not i >= width G implies { |[r,s]| where r, s is Real : s <= (G * (1,(i + 1))) 2 } is Subset of () ) )
proof end;
correctness
consistency
for b1 being Subset of () st 1 <= i & i < width G & i >= width G holds
( b1 = { |[r,s]| where r, s is Real : ( (G * (1,i)) 2 <= s & s <= (G * (1,(i + 1))) 2 ) } iff b1 = { |[r,s]| where r, s is Real : (G * (1,i)) 2 <= s } )
;
;
end;

:: deftheorem Def1 defines v_strip GOBOARD5:def 1 :
for G being Matrix of ()
for i being Nat holds
( ( 1 <= i & i < len G implies v_strip (G,i) = { |[r,s]| where r, s is Real : ( (G * (i,1)) 1 <= r & r <= (G * ((i + 1),1)) 1 ) } ) & ( i >= len G implies v_strip (G,i) = { |[r,s]| where r, s is Real : (G * (i,1)) 1 <= r } ) & ( ( not 1 <= i or not i < len G ) & not i >= len G implies v_strip (G,i) = { |[r,s]| where r, s is Real : r <= (G * ((i + 1),1)) 1 } ) );

:: deftheorem Def2 defines h_strip GOBOARD5:def 2 :
for G being Matrix of ()
for i being Nat holds
( ( 1 <= i & i < width G implies h_strip (G,i) = { |[r,s]| where r, s is Real : ( (G * (1,i)) 2 <= s & s <= (G * (1,(i + 1))) 2 ) } ) & ( i >= width G implies h_strip (G,i) = { |[r,s]| where r, s is Real : (G * (1,i)) 2 <= s } ) & ( ( not 1 <= i or not i < width G ) & not i >= width G implies h_strip (G,i) = { |[r,s]| where r, s is Real : s <= (G * (1,(i + 1))) 2 } ) );

theorem Th1: :: GOBOARD5:1
for i, j being Nat
for G being Matrix of () st G is Y_equal-in-column & 1 <= j & j <= width G & 1 <= i & i <= len G holds
(G * (i,j)) 2 = (G * (1,j)) 2
proof end;

theorem Th2: :: GOBOARD5:2
for i, j being Nat
for G being Matrix of () st G is X_equal-in-line & 1 <= j & j <= width G & 1 <= i & i <= len G holds
(G * (i,j)) 1 = (G * (i,1)) 1
proof end;

theorem Th3: :: GOBOARD5:3
for i1, i2, j being Nat
for G being Matrix of () st G is X_increasing-in-column & 1 <= j & j <= width G & 1 <= i1 & i1 < i2 & i2 <= len G holds
(G * (i1,j)) 1 < (G * (i2,j)) 1
proof end;

theorem Th4: :: GOBOARD5:4
for i, j1, j2 being Nat
for G being Matrix of () st G is Y_increasing-in-line & 1 <= j1 & j1 < j2 & j2 <= width G & 1 <= i & i <= len G holds
(G * (i,j1)) 2 < (G * (i,j2)) 2
proof end;

theorem Th5: :: GOBOARD5:5
for i, j being Nat
for G being Matrix of () st G is Y_equal-in-column & 1 <= j & j < width G & 1 <= i & i <= len G holds
h_strip (G,j) = { |[r,s]| where r, s is Real : ( (G * (i,j)) 2 <= s & s <= (G * (i,(j + 1))) 2 ) }
proof end;

theorem Th6: :: GOBOARD5:6
for i being Nat
for G being Matrix of () st G is V3() & G is Y_equal-in-column & 1 <= i & i <= len G holds
h_strip (G,()) = { |[r,s]| where r, s is Real : (G * (i,())) 2 <= s }
proof end;

theorem Th7: :: GOBOARD5:7
for i being Nat
for G being Matrix of () st G is V3() & G is Y_equal-in-column & 1 <= i & i <= len G holds
h_strip (G,0) = { |[r,s]| where r, s is Real : s <= (G * (i,1)) 2 }
proof end;

theorem Th8: :: GOBOARD5:8
for i, j being Nat
for G being Matrix of () st G is X_equal-in-line & 1 <= i & i < len G & 1 <= j & j <= width G holds
v_strip (G,i) = { |[r,s]| where r, s is Real : ( (G * (i,j)) 1 <= r & r <= (G * ((i + 1),j)) 1 ) }
proof end;

theorem Th9: :: GOBOARD5:9
for j being Nat
for G being Matrix of () st G is V3() & G is X_equal-in-line & 1 <= j & j <= width G holds
v_strip (G,(len G)) = { |[r,s]| where r, s is Real : (G * ((len G),j)) 1 <= r }
proof end;

theorem Th10: :: GOBOARD5:10
for j being Nat
for G being Matrix of () st G is V3() & G is X_equal-in-line & 1 <= j & j <= width G holds
v_strip (G,0) = { |[r,s]| where r, s is Real : r <= (G * (1,j)) 1 }
proof end;

definition
let G be Matrix of ();
let i, j be Nat;
func cell (G,i,j) -> Subset of () equals :: GOBOARD5:def 3
(v_strip (G,i)) /\ (h_strip (G,j));
correctness
coherence
(v_strip (G,i)) /\ (h_strip (G,j)) is Subset of ()
;
;
end;

:: deftheorem defines cell GOBOARD5:def 3 :
for G being Matrix of ()
for i, j being Nat holds cell (G,i,j) = (v_strip (G,i)) /\ (h_strip (G,j));

definition
let IT be FinSequence of ();
attr IT is s.c.c. means :: GOBOARD5:def 4
for i, j being Nat st i + 1 < j & ( ( i > 1 & j < len IT ) or j + 1 < len IT ) holds
LSeg (IT,i) misses LSeg (IT,j);
end;

:: deftheorem defines s.c.c. GOBOARD5:def 4 :
for IT being FinSequence of () holds
( IT is s.c.c. iff for i, j being Nat st i + 1 < j & ( ( i > 1 & j < len IT ) or j + 1 < len IT ) holds
LSeg (IT,i) misses LSeg (IT,j) );

definition
let IT be non empty FinSequence of ();
attr IT is standard means :Def5: :: GOBOARD5:def 5
IT is_sequence_on GoB IT;
end;

:: deftheorem Def5 defines standard GOBOARD5:def 5 :
for IT being non empty FinSequence of () holds
( IT is standard iff IT is_sequence_on GoB IT );

reconsider jj = 1, zz = 0 as Element of REAL by XREAL_0:def 1;

registration
cluster V1() V4( NAT ) V5( the carrier of ()) Function-like V8() non empty V39() FinSequence-like FinSubsequence-like circular special unfolded s.c.c. standard for FinSequence of the carrier of ();
existence
ex b1 being non empty FinSequence of () st
( b1 is V8() & b1 is special & b1 is unfolded & b1 is circular & b1 is s.c.c. & b1 is standard )
proof end;
end;

Lm1: for f being FinSequence of () holds dom () = dom f
proof end;

Lm2: for f being FinSequence of () holds dom () = dom f
proof end;

theorem Th11: :: GOBOARD5:11
for f being non empty FinSequence of ()
for n being Nat st n in dom f holds
ex i, j being Nat st
( [i,j] in Indices (GoB f) & f /. n = (GoB f) * (i,j) )
proof end;

theorem Th12: :: GOBOARD5:12
for f being non empty standard FinSequence of ()
for n being Nat st n in dom f & n + 1 in dom f holds
for m, k, i, j being Nat st [m,k] in Indices (GoB f) & [i,j] in Indices (GoB f) & f /. n = (GoB f) * (m,k) & f /. (n + 1) = (GoB f) * (i,j) holds
|.(m - i).| + |.(k - j).| = 1
proof end;

definition end;

definition
let f be standard special_circular_sequence;
let k be Nat;
assume that
A1: 1 <= k and
A2: k + 1 <= len f ;
k <= k + 1 by NAT_1:11;
then k <= len f by ;
then A3: k in dom f by ;
then consider i1, j1 being Nat such that
A4: [i1,j1] in Indices (GoB f) and
A5: f /. k = (GoB f) * (i1,j1) by Th11;
A6: k + 1 in dom f by ;
then consider i2, j2 being Nat such that
A7: [i2,j2] in Indices (GoB f) and
A8: f /. (k + 1) = (GoB f) * (i2,j2) by Th11;
A9: |.(i1 - i2).| + |.(j1 - j2).| = 1 by A3, A4, A5, A6, A7, A8, Th12;
A10: now :: thesis: ( ( |.(i1 - i2).| = 1 & j1 = j2 & ( i1 = i2 + 1 or i1 + 1 = i2 ) & j1 = j2 ) or ( i1 = i2 & |.(j1 - j2).| = 1 & ( j1 = j2 + 1 or j1 + 1 = j2 ) & i1 = i2 ) )
per cases ( ( |.(i1 - i2).| = 1 & j1 = j2 ) or ( i1 = i2 & |.(j1 - j2).| = 1 ) ) by ;
case that A11: |.(i1 - i2).| = 1 and
A12: j1 = j2 ; :: thesis: ( ( i1 = i2 + 1 or i1 + 1 = i2 ) & j1 = j2 )
( i1 - i2 = 1 or - (i1 - i2) = 1 ) by ;
hence ( i1 = i2 + 1 or i1 + 1 = i2 ) ; :: thesis: j1 = j2
thus j1 = j2 by A12; :: thesis: verum
end;
case that A13: i1 = i2 and
A14: |.(j1 - j2).| = 1 ; :: thesis: ( ( j1 = j2 + 1 or j1 + 1 = j2 ) & i1 = i2 )
( j1 - j2 = 1 or - (j1 - j2) = 1 ) by ;
hence ( j1 = j2 + 1 or j1 + 1 = j2 ) ; :: thesis: i1 = i2
thus i1 = i2 by A13; :: thesis: verum
end;
end;
end;
func right_cell (f,k) -> Subset of () means :Def6: :: GOBOARD5:def 6
for i1, j1, i2, j2 being Nat st [i1,j1] in Indices (GoB f) & [i2,j2] in Indices (GoB f) & f /. k = (GoB f) * (i1,j1) & f /. (k + 1) = (GoB f) * (i2,j2) & not ( i1 = i2 & j1 + 1 = j2 & it = cell ((GoB f),i1,j1) ) & not ( i1 + 1 = i2 & j1 = j2 & it = cell ((GoB f),i1,(j1 -' 1)) ) & not ( i1 = i2 + 1 & j1 = j2 & it = cell ((GoB f),i2,j2) ) holds
( i1 = i2 & j1 = j2 + 1 & it = cell ((GoB f),(i1 -' 1),j2) );
existence
ex b1 being Subset of () st
for i1, j1, i2, j2 being Nat st [i1,j1] in Indices (GoB f) & [i2,j2] in Indices (GoB f) & f /. k = (GoB f) * (i1,j1) & f /. (k + 1) = (GoB f) * (i2,j2) & not ( i1 = i2 & j1 + 1 = j2 & b1 = cell ((GoB f),i1,j1) ) & not ( i1 + 1 = i2 & j1 = j2 & b1 = cell ((GoB f),i1,(j1 -' 1)) ) & not ( i1 = i2 + 1 & j1 = j2 & b1 = cell ((GoB f),i2,j2) ) holds
( i1 = i2 & j1 = j2 + 1 & b1 = cell ((GoB f),(i1 -' 1),j2) )
proof end;
uniqueness
for b1, b2 being Subset of () st ( for i1, j1, i2, j2 being Nat st [i1,j1] in Indices (GoB f) & [i2,j2] in Indices (GoB f) & f /. k = (GoB f) * (i1,j1) & f /. (k + 1) = (GoB f) * (i2,j2) & not ( i1 = i2 & j1 + 1 = j2 & b1 = cell ((GoB f),i1,j1) ) & not ( i1 + 1 = i2 & j1 = j2 & b1 = cell ((GoB f),i1,(j1 -' 1)) ) & not ( i1 = i2 + 1 & j1 = j2 & b1 = cell ((GoB f),i2,j2) ) holds
( i1 = i2 & j1 = j2 + 1 & b1 = cell ((GoB f),(i1 -' 1),j2) ) ) & ( for i1, j1, i2, j2 being Nat st [i1,j1] in Indices (GoB f) & [i2,j2] in Indices (GoB f) & f /. k = (GoB f) * (i1,j1) & f /. (k + 1) = (GoB f) * (i2,j2) & not ( i1 = i2 & j1 + 1 = j2 & b2 = cell ((GoB f),i1,j1) ) & not ( i1 + 1 = i2 & j1 = j2 & b2 = cell ((GoB f),i1,(j1 -' 1)) ) & not ( i1 = i2 + 1 & j1 = j2 & b2 = cell ((GoB f),i2,j2) ) holds
( i1 = i2 & j1 = j2 + 1 & b2 = cell ((GoB f),(i1 -' 1),j2) ) ) holds
b1 = b2
proof end;
func left_cell (f,k) -> Subset of () means :Def7: :: GOBOARD5:def 7
for i1, j1, i2, j2 being Nat st [i1,j1] in Indices (GoB f) & [i2,j2] in Indices (GoB f) & f /. k = (GoB f) * (i1,j1) & f /. (k + 1) = (GoB f) * (i2,j2) & not ( i1 = i2 & j1 + 1 = j2 & it = cell ((GoB f),(i1 -' 1),j1) ) & not ( i1 + 1 = i2 & j1 = j2 & it = cell ((GoB f),i1,j1) ) & not ( i1 = i2 + 1 & j1 = j2 & it = cell ((GoB f),i2,(j2 -' 1)) ) holds
( i1 = i2 & j1 = j2 + 1 & it = cell ((GoB f),i1,j2) );
existence
ex b1 being Subset of () st
for i1, j1, i2, j2 being Nat st [i1,j1] in Indices (GoB f) & [i2,j2] in Indices (GoB f) & f /. k = (GoB f) * (i1,j1) & f /. (k + 1) = (GoB f) * (i2,j2) & not ( i1 = i2 & j1 + 1 = j2 & b1 = cell ((GoB f),(i1 -' 1),j1) ) & not ( i1 + 1 = i2 & j1 = j2 & b1 = cell ((GoB f),i1,j1) ) & not ( i1 = i2 + 1 & j1 = j2 & b1 = cell ((GoB f),i2,(j2 -' 1)) ) holds
( i1 = i2 & j1 = j2 + 1 & b1 = cell ((GoB f),i1,j2) )
proof end;
uniqueness
for b1, b2 being Subset of () st ( for i1, j1, i2, j2 being Nat st [i1,j1] in Indices (GoB f) & [i2,j2] in Indices (GoB f) & f /. k = (GoB f) * (i1,j1) & f /. (k + 1) = (GoB f) * (i2,j2) & not ( i1 = i2 & j1 + 1 = j2 & b1 = cell ((GoB f),(i1 -' 1),j1) ) & not ( i1 + 1 = i2 & j1 = j2 & b1 = cell ((GoB f),i1,j1) ) & not ( i1 = i2 + 1 & j1 = j2 & b1 = cell ((GoB f),i2,(j2 -' 1)) ) holds
( i1 = i2 & j1 = j2 + 1 & b1 = cell ((GoB f),i1,j2) ) ) & ( for i1, j1, i2, j2 being Nat st [i1,j1] in Indices (GoB f) & [i2,j2] in Indices (GoB f) & f /. k = (GoB f) * (i1,j1) & f /. (k + 1) = (GoB f) * (i2,j2) & not ( i1 = i2 & j1 + 1 = j2 & b2 = cell ((GoB f),(i1 -' 1),j1) ) & not ( i1 + 1 = i2 & j1 = j2 & b2 = cell ((GoB f),i1,j1) ) & not ( i1 = i2 + 1 & j1 = j2 & b2 = cell ((GoB f),i2,(j2 -' 1)) ) holds
( i1 = i2 & j1 = j2 + 1 & b2 = cell ((GoB f),i1,j2) ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def6 defines right_cell GOBOARD5:def 6 :
for f being standard special_circular_sequence
for k being Nat st 1 <= k & k + 1 <= len f holds
for b3 being Subset of () holds
( b3 = right_cell (f,k) iff for i1, j1, i2, j2 being Nat st [i1,j1] in Indices (GoB f) & [i2,j2] in Indices (GoB f) & f /. k = (GoB f) * (i1,j1) & f /. (k + 1) = (GoB f) * (i2,j2) & not ( i1 = i2 & j1 + 1 = j2 & b3 = cell ((GoB f),i1,j1) ) & not ( i1 + 1 = i2 & j1 = j2 & b3 = cell ((GoB f),i1,(j1 -' 1)) ) & not ( i1 = i2 + 1 & j1 = j2 & b3 = cell ((GoB f),i2,j2) ) holds
( i1 = i2 & j1 = j2 + 1 & b3 = cell ((GoB f),(i1 -' 1),j2) ) );

:: deftheorem Def7 defines left_cell GOBOARD5:def 7 :
for f being standard special_circular_sequence
for k being Nat st 1 <= k & k + 1 <= len f holds
for b3 being Subset of () holds
( b3 = left_cell (f,k) iff for i1, j1, i2, j2 being Nat st [i1,j1] in Indices (GoB f) & [i2,j2] in Indices (GoB f) & f /. k = (GoB f) * (i1,j1) & f /. (k + 1) = (GoB f) * (i2,j2) & not ( i1 = i2 & j1 + 1 = j2 & b3 = cell ((GoB f),(i1 -' 1),j1) ) & not ( i1 + 1 = i2 & j1 = j2 & b3 = cell ((GoB f),i1,j1) ) & not ( i1 = i2 + 1 & j1 = j2 & b3 = cell ((GoB f),i2,(j2 -' 1)) ) holds
( i1 = i2 & j1 = j2 + 1 & b3 = cell ((GoB f),i1,j2) ) );

theorem Th13: :: GOBOARD5:13
for i, j being Nat
for G being Matrix of () st G is V3() & G is X_equal-in-line & G is X_increasing-in-column & i < len G & 1 <= j & j < width G holds
LSeg ((G * ((i + 1),j)),(G * ((i + 1),(j + 1)))) c= v_strip (G,i)
proof end;

theorem Th14: :: GOBOARD5:14
for i, j being Nat
for G being Matrix of () st G is V3() & G is X_equal-in-line & G is X_increasing-in-column & 1 <= i & i <= len G & 1 <= j & j < width G holds
LSeg ((G * (i,j)),(G * (i,(j + 1)))) c= v_strip (G,i)
proof end;

theorem Th15: :: GOBOARD5:15
for i, j being Nat
for G being Matrix of () st G is V3() & G is Y_equal-in-column & G is Y_increasing-in-line & j < width G & 1 <= i & i < len G holds
LSeg ((G * (i,(j + 1))),(G * ((i + 1),(j + 1)))) c= h_strip (G,j)
proof end;

theorem Th16: :: GOBOARD5:16
for i, j being Nat
for G being Matrix of () st G is V3() & G is Y_equal-in-column & G is Y_increasing-in-line & 1 <= j & j <= width G & 1 <= i & i < len G holds
LSeg ((G * (i,j)),(G * ((i + 1),j))) c= h_strip (G,j)
proof end;

theorem Th17: :: GOBOARD5:17
for i, j being Nat
for G being Matrix of () st G is Y_equal-in-column & G is Y_increasing-in-line & 1 <= i & i <= len G & 1 <= j & j + 1 <= width G holds
LSeg ((G * (i,j)),(G * (i,(j + 1)))) c= h_strip (G,j)
proof end;

theorem Th18: :: GOBOARD5:18
for i, j being Nat
for G being Go-board st i < len G & 1 <= j & j < width G holds
LSeg ((G * ((i + 1),j)),(G * ((i + 1),(j + 1)))) c= cell (G,i,j)
proof end;

theorem Th19: :: GOBOARD5:19
for i, j being Nat
for G being Go-board st 1 <= i & i <= len G & 1 <= j & j < width G holds
LSeg ((G * (i,j)),(G * (i,(j + 1)))) c= cell (G,i,j)
proof end;

theorem Th20: :: GOBOARD5:20
for i, j being Nat
for G being Matrix of () st G is X_equal-in-line & G is X_increasing-in-column & 1 <= j & j <= width G & 1 <= i & i + 1 <= len G holds
LSeg ((G * (i,j)),(G * ((i + 1),j))) c= v_strip (G,i)
proof end;

theorem Th21: :: GOBOARD5:21
for i, j being Nat
for G being Go-board st j < width G & 1 <= i & i < len G holds
LSeg ((G * (i,(j + 1))),(G * ((i + 1),(j + 1)))) c= cell (G,i,j)
proof end;

theorem Th22: :: GOBOARD5:22
for i, j being Nat
for G being Go-board st 1 <= i & i < len G & 1 <= j & j <= width G holds
LSeg ((G * (i,j)),(G * ((i + 1),j))) c= cell (G,i,j)
proof end;

theorem Th23: :: GOBOARD5:23
for i being Nat
for G being Matrix of () st G is V3() & G is X_equal-in-line & G is X_increasing-in-column & i + 1 <= len G holds
(v_strip (G,i)) /\ (v_strip (G,(i + 1))) = { q where q is Point of () : q 1 = (G * ((i + 1),1)) 1 }
proof end;

theorem Th24: :: GOBOARD5:24
for j being Nat
for G being Matrix of () st G is V3() & G is Y_equal-in-column & G is Y_increasing-in-line & j + 1 <= width G holds
(h_strip (G,j)) /\ (h_strip (G,(j + 1))) = { q where q is Point of () : q 2 = (G * (1,(j + 1))) 2 }
proof end;

theorem Th25: :: GOBOARD5:25
for i, j being Nat
for G being Go-board st i < len G & 1 <= j & j < width G holds
(cell (G,i,j)) /\ (cell (G,(i + 1),j)) = LSeg ((G * ((i + 1),j)),(G * ((i + 1),(j + 1))))
proof end;

theorem Th26: :: GOBOARD5:26
for i, j being Nat
for G being Go-board st j < width G & 1 <= i & i < len G holds
(cell (G,i,j)) /\ (cell (G,i,(j + 1))) = LSeg ((G * (i,(j + 1))),(G * ((i + 1),(j + 1))))
proof end;

theorem Th27: :: GOBOARD5:27
for i, j, k being Nat
for f being standard special_circular_sequence st 1 <= k & k + 1 <= len f & [(i + 1),j] in Indices (GoB f) & [(i + 1),(j + 1)] in Indices (GoB f) & f /. k = (GoB f) * ((i + 1),j) & f /. (k + 1) = (GoB f) * ((i + 1),(j + 1)) holds
( left_cell (f,k) = cell ((GoB f),i,j) & right_cell (f,k) = cell ((GoB f),(i + 1),j) )
proof end;

theorem Th28: :: GOBOARD5:28
for i, j, k being Nat
for f being standard special_circular_sequence st 1 <= k & k + 1 <= len f & [i,(j + 1)] in Indices (GoB f) & [(i + 1),(j + 1)] in Indices (GoB f) & f /. k = (GoB f) * (i,(j + 1)) & f /. (k + 1) = (GoB f) * ((i + 1),(j + 1)) holds
( left_cell (f,k) = cell ((GoB f),i,(j + 1)) & right_cell (f,k) = cell ((GoB f),i,j) )
proof end;

theorem Th29: :: GOBOARD5:29
for i, j, k being Nat
for f being standard special_circular_sequence st 1 <= k & k + 1 <= len f & [i,(j + 1)] in Indices (GoB f) & [(i + 1),(j + 1)] in Indices (GoB f) & f /. k = (GoB f) * ((i + 1),(j + 1)) & f /. (k + 1) = (GoB f) * (i,(j + 1)) holds
( left_cell (f,k) = cell ((GoB f),i,j) & right_cell (f,k) = cell ((GoB f),i,(j + 1)) )
proof end;

theorem Th30: :: GOBOARD5:30
for i, j, k being Nat
for f being standard special_circular_sequence st 1 <= k & k + 1 <= len f & [(i + 1),(j + 1)] in Indices (GoB f) & [(i + 1),j] in Indices (GoB f) & f /. k = (GoB f) * ((i + 1),(j + 1)) & f /. (k + 1) = (GoB f) * ((i + 1),j) holds
( left_cell (f,k) = cell ((GoB f),(i + 1),j) & right_cell (f,k) = cell ((GoB f),i,j) )
proof end;

theorem :: GOBOARD5:31
for k being Nat
for f being standard special_circular_sequence st 1 <= k & k + 1 <= len f holds
(left_cell (f,k)) /\ (right_cell (f,k)) = LSeg (f,k)
proof end;