:: GR_CY_1 semantic presentation

definition
let c1 be natural number ;
assume E1: c1 > 0 ;
func Segm c1 -> non empty Subset of NAT equals :Def1: :: GR_CY_1:def 1
{ b1 where B is Nat : b1 < a1 } ;
coherence
{ b1 where B is Nat : b1 < c1 } is non empty Subset of NAT
proof end;
end;

:: deftheorem Def1 defines Segm GR_CY_1:def 1 :
for b1 being natural number st b1 > 0 holds
Segm b1 = { b2 where B is Nat : b2 < b1 } ;

Lemma2: for b1 being set
for b2 being Nat st b2 > 0 & b1 in Segm b2 holds
b1 is Nat
;

theorem Th1: :: GR_CY_1:1
canceled;

theorem Th2: :: GR_CY_1:2
canceled;

theorem Th3: :: GR_CY_1:3
canceled;

theorem Th4: :: GR_CY_1:4
canceled;

theorem Th5: :: GR_CY_1:5
canceled;

theorem Th6: :: GR_CY_1:6
canceled;

theorem Th7: :: GR_CY_1:7
canceled;

theorem Th8: :: GR_CY_1:8
canceled;

theorem Th9: :: GR_CY_1:9
canceled;

theorem Th10: :: GR_CY_1:10
for b1, b2 being natural number st b1 > 0 holds
( b2 in Segm b1 iff b2 < b1 )
proof end;

theorem Th11: :: GR_CY_1:11
canceled;

theorem Th12: :: GR_CY_1:12
for b1 being natural number st b1 > 0 holds
0 in Segm b1 by Th10;

theorem Th13: :: GR_CY_1:13
Segm 1 = {0}
proof end;

definition
redefine func addint -> M6([:INT ,INT :], INT ) means :: GR_CY_1:def 2
for b1, b2 being Element of INT holds a1 . b1,b2 = addreal . b1,b2;
compatibility
for b1 being M6([:INT ,INT :], INT ) holds
( b1 = addint iff for b2, b3 being Element of INT holds b1 . b2,b3 = addreal . b2,b3 )
proof end;
end;

:: deftheorem Def2 defines addint GR_CY_1:def 2 :
for b1 being M6([:INT ,INT :], INT ) holds
( b1 = addint iff for b2, b3 being Element of INT holds b1 . b2,b3 = addreal . b2,b3 );

theorem Th14: :: GR_CY_1:14
for b1, b2 being Integer holds addint . b1,b2 = b1 + b2
proof end;

theorem Th15: :: GR_CY_1:15
for b1 being Element of INT st b1 = 0 holds
b1 is_a_unity_wrt addint by BINOP_2:4, SETWISEO:22;

definition
let c1 be FinSequence of INT ;
func Sum c1 -> Integer equals :: GR_CY_1:def 3
addint $$ a1;
coherence
addint $$ c1 is Integer
;
end;

:: deftheorem Def3 defines Sum GR_CY_1:def 3 :
for b1 being FinSequence of INT holds Sum b1 = addint $$ b1;

theorem Th16: :: GR_CY_1:16
canceled;

theorem Th17: :: GR_CY_1:17
canceled;

theorem Th18: :: GR_CY_1:18
canceled;

theorem Th19: :: GR_CY_1:19
canceled;

theorem Th20: :: GR_CY_1:20
for b1 being Element of INT
for b2 being FinSequence of INT holds Sum (b2 ^ <*b1*>) = (Sum b2) + (@ b1)
proof end;

theorem Th21: :: GR_CY_1:21
for b1 being Element of INT holds Sum <*b1*> = b1 by FINSOP_1:12;

theorem Th22: :: GR_CY_1:22
Sum (<*> INT ) = 0 by BINOP_2:4, FINSOP_1:11;

Lemma8: for b1 being Group
for b2 being Element of b1 holds Product (((len (<*> INT )) |-> b2) |^ (<*> INT )) = b2 |^ (Sum (<*> INT ))
proof end;

Lemma9: for b1 being Group
for b2 being Element of b1
for b3 being FinSequence of INT
for b4 being Element of INT st Product (((len b3) |-> b2) |^ b3) = b2 |^ (Sum b3) holds
Product (((len (b3 ^ <*b4*>)) |-> b2) |^ (b3 ^ <*b4*>)) = b2 |^ (Sum (b3 ^ <*b4*>))
proof end;

theorem Th23: :: GR_CY_1:23
canceled;

theorem Th24: :: GR_CY_1:24
for b1 being Group
for b2 being Element of b1
for b3 being FinSequence of INT holds Product (((len b3) |-> b2) |^ b3) = b2 |^ (Sum b3)
proof end;

theorem Th25: :: GR_CY_1:25
for b1 being Group
for b2, b3 being Element of b1 holds
( b2 in gr {b3} iff ex b4 being Integer st b2 = b3 |^ b4 )
proof end;

theorem Th26: :: GR_CY_1:26
for b1 being Group
for b2 being Element of b1 st b1 is finite holds
b2 is_not_of_order_0
proof end;

theorem Th27: :: GR_CY_1:27
for b1 being Group
for b2 being Element of b1 st b1 is finite holds
ord b2 = ord (gr {b2})
proof end;

theorem Th28: :: GR_CY_1:28
for b1 being Group
for b2 being Element of b1 st b1 is finite holds
ord b2 divides ord b1
proof end;

theorem Th29: :: GR_CY_1:29
for b1 being Group
for b2 being Element of b1 st b1 is finite holds
b2 |^ (ord b1) = 1. b1
proof end;

theorem Th30: :: GR_CY_1:30
for b1 being Nat
for b2 being Group
for b3 being Element of b2 st b2 is finite holds
(b3 |^ b1) " = b3 |^ ((ord b2) - (b1 mod (ord b2)))
proof end;

theorem Th31: :: GR_CY_1:31
for b1 being strict Group st ord b1 > 1 holds
ex b2 being Element of b1 st b2 <> 1. b1
proof end;

theorem Th32: :: GR_CY_1:32
for b1 being Nat
for b2 being strict Group st b2 is finite & ord b2 = b1 & b1 is prime holds
for b3 being strict Subgroup of b2 holds
( b3 = (1). b2 or b3 = b2 )
proof end;

theorem Th33: :: GR_CY_1:33
( HGrStr(# INT ,addint #) is associative & HGrStr(# INT ,addint #) is Group-like )
proof end;

definition
func INT.Group -> strict Group equals :: GR_CY_1:def 4
HGrStr(# INT ,addint #);
coherence
HGrStr(# INT ,addint #) is strict Group
by Th33;
end;

:: deftheorem Def4 defines INT.Group GR_CY_1:def 4 :
INT.Group = HGrStr(# INT ,addint #);

definition
let c1 be natural number ;
assume E19: c1 > 0 ;
func addint c1 -> BinOp of Segm a1 means :Def5: :: GR_CY_1:def 5
for b1, b2 being Element of Segm a1 holds a2 . b1,b2 = (b1 + b2) mod a1;
existence
ex b1 being BinOp of Segm c1 st
for b2, b3 being Element of Segm c1 holds b1 . b2,b3 = (b2 + b3) mod c1
proof end;
uniqueness
for b1, b2 being BinOp of Segm c1 st ( for b3, b4 being Element of Segm c1 holds b1 . b3,b4 = (b3 + b4) mod c1 ) & ( for b3, b4 being Element of Segm c1 holds b2 . b3,b4 = (b3 + b4) mod c1 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def5 defines addint GR_CY_1:def 5 :
for b1 being natural number st b1 > 0 holds
for b2 being BinOp of Segm b1 holds
( b2 = addint b1 iff for b3, b4 being Element of Segm b1 holds b2 . b3,b4 = (b3 + b4) mod b1 );

theorem Th34: :: GR_CY_1:34
for b1 being natural number st b1 > 0 holds
( HGrStr(# (Segm b1),(addint b1) #) is associative & HGrStr(# (Segm b1),(addint b1) #) is Group-like )
proof end;

definition
let c1 be natural number ;
assume E21: c1 > 0 ;
func INT.Group c1 -> strict Group equals :Def6: :: GR_CY_1:def 6
HGrStr(# (Segm a1),(addint a1) #);
coherence
HGrStr(# (Segm c1),(addint c1) #) is strict Group
by E21, Th34;
end;

:: deftheorem Def6 defines INT.Group GR_CY_1:def 6 :
for b1 being natural number st b1 > 0 holds
INT.Group b1 = HGrStr(# (Segm b1),(addint b1) #);

theorem Th35: :: GR_CY_1:35
1. INT.Group = 0
proof end;

theorem Th36: :: GR_CY_1:36
for b1 being natural number st b1 > 0 holds
1. (INT.Group b1) = 0
proof end;

definition
let c1 be Element of INT.Group ;
func @' c1 -> Integer equals :: GR_CY_1:def 7
a1;
coherence
c1 is Integer
by INT_1:def 2;
end;

:: deftheorem Def7 defines @' GR_CY_1:def 7 :
for b1 being Element of INT.Group holds @' b1 = b1;

definition
let c1 be Integer;
func @' c1 -> Element of INT.Group equals :: GR_CY_1:def 8
a1;
coherence
c1 is Element of INT.Group
by INT_1:def 2;
end;

:: deftheorem Def8 defines @' GR_CY_1:def 8 :
for b1 being Integer holds @' b1 = b1;

theorem Th37: :: GR_CY_1:37
for b1 being Element of INT.Group holds b1 " = - (@' b1)
proof end;

Lemma25: for b1, b2 being Element of INT.Group
for b3, b4 being Integer st b1 = b3 & b2 = b4 holds
b1 * b2 = b3 + b4
by Th14;

theorem Th38: :: GR_CY_1:38
for b1 being Element of INT.Group st b1 = 1 holds
for b2 being Nat holds b1 |^ b2 = b2
proof end;

theorem Th39: :: GR_CY_1:39
for b1 being Element of INT.Group
for b2 being Integer st b1 = 1 holds
b2 = b1 |^ b2
proof end;

Lemma28: ex b1 being Element of INT.Group st HGrStr(# the carrier of INT.Group ,the mult of INT.Group #) = gr {b1}
proof end;

definition
let c1 be Group;
attr a1 is cyclic means :Def9: :: GR_CY_1:def 9
ex b1 being Element of a1 st HGrStr(# the carrier of a1,the mult of a1 #) = gr {b1};
end;

:: deftheorem Def9 defines cyclic GR_CY_1:def 9 :
for b1 being Group holds
( b1 is cyclic iff ex b2 being Element of b1 st HGrStr(# the carrier of b1,the mult of b1 #) = gr {b2} );

registration
cluster strict cyclic HGrStr ;
existence
ex b1 being Group st
( b1 is strict & b1 is cyclic )
proof end;
end;

theorem Th40: :: GR_CY_1:40
for b1 being Group holds (1). b1 is cyclic
proof end;

theorem Th41: :: GR_CY_1:41
for b1 being Group holds
( b1 is cyclic Group iff ex b2 being Element of b1 st
for b3 being Element of b1 ex b4 being Integer st b3 = b2 |^ b4 )
proof end;

theorem Th42: :: GR_CY_1:42
for b1 being Group st b1 is finite holds
( b1 is cyclic Group iff ex b2 being Element of b1 st
for b3 being Element of b1 ex b4 being Nat st b3 = b2 |^ b4 )
proof end;

theorem Th43: :: GR_CY_1:43
for b1 being strict Group st b1 is finite holds
( b1 is cyclic Group iff ex b2 being Element of b1 st ord b2 = ord b1 )
proof end;

theorem Th44: :: GR_CY_1:44
for b1 being Group
for b2 being strict Subgroup of b1 st b1 is finite & b1 is cyclic Group holds
b2 is cyclic Group
proof end;

theorem Th45: :: GR_CY_1:45
for b1 being Nat
for b2 being strict Group st b2 is finite & ord b2 = b1 & b1 is prime holds
b2 is cyclic Group
proof end;

theorem Th46: :: GR_CY_1:46
for b1 being Nat st b1 > 0 holds
ex b2 being Element of (INT.Group b1) st
for b3 being Element of (INT.Group b1) ex b4 being Integer st b3 = b2 |^ b4
proof end;

registration
cluster cyclic -> commutative HGrStr ;
coherence
for b1 being Group st b1 is cyclic holds
b1 is commutative
proof end;
end;

theorem Th47: :: GR_CY_1:47
canceled;

theorem Th48: :: GR_CY_1:48
INT.Group is cyclic
proof end;

theorem Th49: :: GR_CY_1:49
for b1 being Nat st b1 > 0 holds
INT.Group b1 is cyclic Group
proof end;

theorem Th50: :: GR_CY_1:50
INT.Group is commutative Group
proof end;

theorem Th51: :: GR_CY_1:51
for b1, b2 being Nat st 0 < b1 & b1 <= b2 holds
Segm b1 c= Segm b2
proof end;