:: REVROT_1 semantic presentation

registration
let c1 be non trivial 1-sorted ;
cluster the carrier of a1 -> non trivial ;
coherence
not the carrier of c1 is trivial
by REALSET2:def 5;
end;

definition
let c1 be non empty set ;
let c2 be FinSequence of c1;
redefine attr constant as a2 is constant means :Def1: :: REVROT_1:def 1
for b1, b2 being Nat holds
( b1 in dom a2 & b2 in dom a2 implies a2 /. b1 = a2 /. b2 );
compatibility
( c2 is constant iff for b1, b2 being Nat holds
( b1 in dom c2 & b2 in dom c2 implies c2 /. b1 = c2 /. b2 ) )
proof end;
end;

:: deftheorem Def1 defines constant REVROT_1:def 1 :
for b1 being non empty set
for b2 being FinSequence of b1 holds
( b2 is constant iff for b3, b4 being Nat holds
( b3 in dom b2 & b4 in dom b2 implies b2 /. b3 = b2 /. b4 ) );

theorem Th1: :: REVROT_1:1
for b1 being non empty set
for b2 being FinSequence of b1 holds
( b2 just_once_values b2 /. (len b2) implies (b2 /. (len b2)) .. b2 = len b2 )
proof end;

theorem Th2: :: REVROT_1:2
for b1 being non empty set
for b2 being FinSequence of b1 holds b2 /^ (len b2) = {}
proof end;

theorem Th3: :: REVROT_1:3
for b1 being non empty set
for b2 being non empty FinSequence of b1 holds b2 /. (len b2) in rng b2
proof end;

definition
let c1 be non empty set ;
let c2 be FinSequence of c1;
let c3 be set ;
redefine pred just_once_values as c2 just_once_values c3 means :: REVROT_1:def 2
ex b1 being set st
( b1 in dom a2 & a3 = a2 /. b1 & ( for b2 being set holds
not ( b2 in dom a2 & b2 <> b1 & not a2 /. b2 <> a3 ) ) );
compatibility
( c2 just_once_values c3 iff ex b1 being set st
( b1 in dom c2 & c3 = c2 /. b1 & ( for b2 being set holds
not ( b2 in dom c2 & b2 <> b1 & not c2 /. b2 <> c3 ) ) ) )
proof end;
end;

:: deftheorem Def2 defines just_once_values REVROT_1:def 2 :
for b1 being non empty set
for b2 being FinSequence of b1
for b3 being set holds
( b2 just_once_values b3 iff ex b4 being set st
( b4 in dom b2 & b3 = b2 /. b4 & ( for b5 being set holds
not ( b5 in dom b2 & b5 <> b4 & not b2 /. b5 <> b3 ) ) ) );

theorem Th4: :: REVROT_1:4
for b1 being non empty set
for b2 being FinSequence of b1 holds
( b2 just_once_values b2 /. (len b2) implies b2 -: (b2 /. (len b2)) = b2 )
proof end;

theorem Th5: :: REVROT_1:5
for b1 being non empty set
for b2 being FinSequence of b1 holds
( b2 just_once_values b2 /. (len b2) implies b2 :- (b2 /. (len b2)) = <*(b2 /. (len b2))*> )
proof end;

theorem Th6: :: REVROT_1:6
for b1 being non empty set
for b2 being Element of b1
for b3 being FinSequence of b1 holds 1 <= len (b3 :- b2)
proof end;

theorem Th7: :: REVROT_1:7
for b1 being non empty set
for b2 being Element of b1
for b3 being FinSequence of b1 holds
( b2 in rng b3 implies len (b3 :- b2) <= len b3 )
proof end;

theorem Th8: :: REVROT_1:8
for b1 being non empty set
for b2 being non empty circular FinSequence of b1 holds Rev b2 is circular
proof end;

theorem Th9: :: REVROT_1:9
for b1 being Nat
for b2 being non empty set
for b3 being Element of b2
for b4 being FinSequence of b2 holds
( b3 in rng b4 & 1 <= b1 & b1 <= len (b4 :- b3) implies (Rotate b4,b3) /. b1 = b4 /. ((b1 -' 1) + (b3 .. b4)) )
proof end;

theorem Th10: :: REVROT_1:10
for b1 being Nat
for b2 being non empty set
for b3 being Element of b2
for b4 being FinSequence of b2 holds
( b3 in rng b4 & b3 .. b4 <= b1 & b1 <= len b4 implies b4 /. b1 = (Rotate b4,b3) /. ((b1 + 1) -' (b3 .. b4)) )
proof end;

theorem Th11: :: REVROT_1:11
for b1 being non empty set
for b2 being Element of b1
for b3 being FinSequence of b1 holds
( b2 in rng b3 implies (Rotate b3,b2) /. (len (b3 :- b2)) = b3 /. (len b3) )
proof end;

theorem Th12: :: REVROT_1:12
for b1 being Nat
for b2 being non empty set
for b3 being Element of b2
for b4 being FinSequence of b2 holds
( b3 in rng b4 & len (b4 :- b3) < b1 & b1 <= len b4 implies (Rotate b4,b3) /. b1 = b4 /. ((b1 + (b3 .. b4)) -' (len b4)) )
proof end;

theorem Th13: :: REVROT_1:13
for b1 being Nat
for b2 being non empty set
for b3 being Element of b2
for b4 being FinSequence of b2 holds
( b3 in rng b4 & 1 < b1 & b1 <= b3 .. b4 implies b4 /. b1 = (Rotate b4,b3) /. ((b1 + (len b4)) -' (b3 .. b4)) )
proof end;

theorem Th14: :: REVROT_1:14
for b1 being non empty set
for b2 being Element of b1
for b3 being FinSequence of b1 holds len (Rotate b3,b2) = len b3
proof end;

theorem Th15: :: REVROT_1:15
for b1 being non empty set
for b2 being Element of b1
for b3 being FinSequence of b1 holds dom (Rotate b3,b2) = dom b3
proof end;

theorem Th16: :: REVROT_1:16
for b1 being non empty set
for b2 being circular FinSequence of b1
for b3 being Element of b1 holds
( ( for b4 being Nat holds
not ( 1 < b4 & b4 < len b2 & not b2 /. b4 <> b2 /. 1 ) ) implies Rotate (Rotate b2,b3),(b2 /. 1) = b2 )
proof end;

theorem Th17: :: REVROT_1:17
for b1 being Nat
for b2 being non empty set
for b3 being Element of b2
for b4 being circular FinSequence of b2 holds
( b3 in rng b4 & len (b4 :- b3) <= b1 & b1 <= len b4 implies (Rotate b4,b3) /. b1 = b4 /. ((b1 + (b3 .. b4)) -' (len b4)) )
proof end;

theorem Th18: :: REVROT_1:18
for b1 being Nat
for b2 being non empty set
for b3 being Element of b2
for b4 being circular FinSequence of b2 holds
( b3 in rng b4 & 1 <= b1 & b1 <= b3 .. b4 implies b4 /. b1 = (Rotate b4,b3) /. ((b1 + (len b4)) -' (b3 .. b4)) )
proof end;

registration
let c1 be non trivial set ;
cluster V7 circular FinSequence of a1;
existence
ex b1 being FinSequence of c1 st
( not b1 is constant & b1 is circular )
proof end;
end;

registration
let c1 be non trivial set ;
let c2 be Element of c1;
let c3 be V7 circular FinSequence of c1;
cluster Rotate a3,a2 -> V7 ;
coherence
not Rotate c3,c2 is constant
proof end;
end;

theorem Th19: :: REVROT_1:19
for b1 being non empty Nat holds
0.REAL b1 <> 1.REAL b1
proof end;

registration
let c1 be non empty Nat;
cluster TOP-REAL a1 -> non trivial ;
coherence
not TOP-REAL c1 is trivial
proof end;
end;

theorem Th20: :: REVROT_1:20
for b1, b2 being FinSequence of (TOP-REAL 2) holds
( rng b1 c= rng b2 implies rng (X_axis b1) c= rng (X_axis b2) )
proof end;

theorem Th21: :: REVROT_1:21
for b1, b2 being FinSequence of (TOP-REAL 2) holds
( rng b1 = rng b2 implies rng (X_axis b1) = rng (X_axis b2) )
proof end;

theorem Th22: :: REVROT_1:22
for b1, b2 being FinSequence of (TOP-REAL 2) holds
( rng b1 c= rng b2 implies rng (Y_axis b1) c= rng (Y_axis b2) )
proof end;

theorem Th23: :: REVROT_1:23
for b1, b2 being FinSequence of (TOP-REAL 2) holds
( rng b1 = rng b2 implies rng (Y_axis b1) = rng (Y_axis b2) )
proof end;

registration
let c1 be Point of (TOP-REAL 2);
let c2 be circular special FinSequence of (TOP-REAL 2);
cluster Rotate a2,a1 -> special ;
coherence
Rotate c2,c1 is special
proof end;
end;

theorem Th24: :: REVROT_1:24
for b1 being Nat
for b2 being Point of (TOP-REAL 2)
for b3 being FinSequence of (TOP-REAL 2) holds
( b2 in rng b3 & 1 <= b1 & b1 < len (b3 :- b2) implies LSeg (Rotate b3,b2),b1 = LSeg b3,((b1 -' 1) + (b2 .. b3)) )
proof end;

theorem Th25: :: REVROT_1:25
for b1 being Nat
for b2 being Point of (TOP-REAL 2)
for b3 being FinSequence of (TOP-REAL 2) holds
( b2 in rng b3 & b2 .. b3 <= b1 & b1 < len b3 implies LSeg b3,b1 = LSeg (Rotate b3,b2),((b1 -' (b2 .. b3)) + 1) )
proof end;

theorem Th26: :: REVROT_1:26
for b1 being Point of (TOP-REAL 2)
for b2 being circular FinSequence of (TOP-REAL 2) holds Incr (X_axis b2) = Incr (X_axis (Rotate b2,b1))
proof end;

theorem Th27: :: REVROT_1:27
for b1 being Point of (TOP-REAL 2)
for b2 being circular FinSequence of (TOP-REAL 2) holds Incr (Y_axis b2) = Incr (Y_axis (Rotate b2,b1))
proof end;

theorem Th28: :: REVROT_1:28
for b1 being Point of (TOP-REAL 2)
for b2 being non empty circular FinSequence of (TOP-REAL 2) holds GoB (Rotate b2,b1) = GoB b2
proof end;

theorem Th29: :: REVROT_1:29
for b1 being Point of (TOP-REAL 2)
for b2 being V7 standard special_circular_sequence holds Rev (Rotate b2,b1) = Rotate (Rev b2),b1
proof end;

theorem Th30: :: REVROT_1:30
for b1 being circular s.c.c. FinSequence of (TOP-REAL 2) holds
( len b1 > 4 implies (LSeg b1,((len b1) -' 1)) /\ (LSeg b1,1) = {(b1 /. 1)} )
proof end;

theorem Th31: :: REVROT_1:31
for b1 being Nat
for b2 being Point of (TOP-REAL 2)
for b3 being circular FinSequence of (TOP-REAL 2) holds
( b2 in rng b3 & len (b3 :- b2) <= b1 & b1 < len b3 implies LSeg (Rotate b3,b2),b1 = LSeg b3,((b1 + (b2 .. b3)) -' (len b3)) )
proof end;

registration
let c1 be Point of (TOP-REAL 2);
let c2 be circular s.c.c. FinSequence of (TOP-REAL 2);
cluster Rotate a2,a1 -> s.c.c. ;
coherence
Rotate c2,c1 is s.c.c.
proof end;
end;

registration
let c1 be Point of (TOP-REAL 2);
let c2 be V7 standard special_circular_sequence;
cluster Rotate a2,a1 -> V7 special unfolded s.c.c. ;
coherence
Rotate c2,c1 is unfolded
proof end;
end;

theorem Th32: :: REVROT_1:32
for b1 being Nat
for b2 being Point of (TOP-REAL 2)
for b3 being circular FinSequence of (TOP-REAL 2) holds
( b2 in rng b3 & 1 <= b1 & b1 < b2 .. b3 implies LSeg b3,b1 = LSeg (Rotate b3,b2),((b1 + (len b3)) -' (b2 .. b3)) )
proof end;

theorem Th33: :: REVROT_1:33
for b1 being Point of (TOP-REAL 2)
for b2 being circular FinSequence of (TOP-REAL 2) holds L~ (Rotate b2,b1) = L~ b2
proof end;

theorem Th34: :: REVROT_1:34
for b1 being Point of (TOP-REAL 2)
for b2 being circular FinSequence of (TOP-REAL 2)
for b3 being Go-board holds
( b2 is_sequence_on b3 iff Rotate b2,b1 is_sequence_on b3 )
proof end;

registration
let c1 be Point of (TOP-REAL 2);
let c2 be non empty circular standard FinSequence of (TOP-REAL 2);
cluster Rotate a2,a1 -> standard ;
coherence
Rotate c2,c1 is standard
proof end;
end;

theorem Th35: :: REVROT_1:35
for b1 being V7 standard special_circular_sequence
for b2 being Point of (TOP-REAL 2)
for b3 being Nat holds
( b2 in rng b1 & 1 <= b3 & b3 < b2 .. b1 implies left_cell b1,b3 = left_cell (Rotate b1,b2),((b3 + (len b1)) -' (b2 .. b1)) )
proof end;

theorem Th36: :: REVROT_1:36
for b1 being Point of (TOP-REAL 2)
for b2 being V7 standard special_circular_sequence holds LeftComp (Rotate b2,b1) = LeftComp b2
proof end;

theorem Th37: :: REVROT_1:37
for b1 being Point of (TOP-REAL 2)
for b2 being V7 standard special_circular_sequence holds RightComp (Rotate b2,b1) = RightComp b2
proof end;

Lemma35: for b1 being V7 standard special_circular_sequence holds
not ( b1 /. 1 = N-min (L~ b1) & not b1 is clockwise_oriented & not Rev b1 is clockwise_oriented )
proof end;

registration
let c1 be Point of (TOP-REAL 2);
let c2 be V7 standard clockwise_oriented special_circular_sequence;
cluster Rotate a2,a1 -> V7 special unfolded s.c.c. standard clockwise_oriented ;
coherence
Rotate c2,c1 is clockwise_oriented
proof end;
end;

theorem Th38: :: REVROT_1:38
for b1 being V7 standard special_circular_sequence holds
( b1 is clockwise_oriented or Rev b1 is clockwise_oriented )
proof end;