:: GR_CY_1 semantic presentation

definition
let n be natural number ;
assume E42: n > 0 ;
func Segm c1 -> non empty Subset of NAT equals :Def1: :: GR_CY_1:def 1
{ p where p is Element of NAT : p < n } ;
coherence
{ p where p is Element of NAT : p < n } is non empty Subset of NAT
proof end;
end;

:: deftheorem Def1 defines Segm GR_CY_1:def 1 :
for n being natural number st n > 0 holds
Segm n = { p where p is Element of NAT : p < n } ;

Lemma45: for x being set
for n being Element of NAT st n > 0 & x in Segm n holds
x is Element of 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 n, s being natural number st n > 0 holds
( s in Segm n iff s < n )
proof end;

theorem Th11: :: GR_CY_1:11
canceled;

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

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 i1, i2 being Element of INT holds it . i1,i2 = addreal . i1,i2;
compatibility
for b1 being M6([:INT ,INT :], INT ) holds
( b1 = addint iff for i1, i2 being Element of INT holds b1 . i1,i2 = addreal . i1,i2 )
proof end;
end;

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

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

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

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

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

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 i1 being Element of INT
for I being FinSequence of INT holds Sum (I ^ <*i1*>) = (Sum I) + (@ i1)
proof end;

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

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

Lemma55: for G being Group
for a being Element of G holds Product (((len (<*> INT )) |-> a) |^ (<*> INT )) = a |^ (Sum (<*> INT ))
proof end;

Lemma56: for G being Group
for a being Element of G
for I being FinSequence of INT
for w being Element of INT st Product (((len I) |-> a) |^ I) = a |^ (Sum I) holds
Product (((len (I ^ <*w*>)) |-> a) |^ (I ^ <*w*>)) = a |^ (Sum (I ^ <*w*>))
proof end;

theorem Th23: :: GR_CY_1:23
canceled;

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

theorem Th25: :: GR_CY_1:25
for G being Group
for b, a being Element of G holds
( b in gr {a} iff ex j1 being Integer st b = a |^ j1 )
proof end;

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

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

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

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

theorem Th30: :: GR_CY_1:30
for n being Element of NAT
for G being Group
for a being Element of G st G is finite holds
(a |^ n) " = a |^ ((ord G) - (n mod (ord G)))
proof end;

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

theorem Th32: :: GR_CY_1:32
for p being Element of NAT
for G being strict Group st G is finite & ord G = p & p is prime holds
for H being strict Subgroup of G holds
( H = (1). G or H = G )
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 ;
end;

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

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

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

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

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

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

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

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

registration
cluster -> integer Element of the carrier of INT.Group ;
coherence
for b1 being Element of INT.Group holds b1 is integer
by INT_1:def 2;
end;

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

:: deftheorem Def7 GR_CY_1:def 7 :
canceled;

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

theorem Th37: :: GR_CY_1:37
for h being Element of INT.Group holds h " = - h
proof end;

Lemma172: for h, g being Element of INT.Group
for A, B being Integer st h = A & g = B holds
h * g = A + B
by ;

theorem Th38: :: GR_CY_1:38
for k being Element of NAT holds (@' 1) |^ k = k
proof end;

theorem Th39: :: GR_CY_1:39
for j1 being Integer holds j1 = (@' 1) |^ j1
proof end;

Lemma175: INT.Group = gr {(@' 1)}
proof end;

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

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

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 G being Group holds (1). G is cyclic
proof end;

registration
let G be Group;
cluster (1). a1 -> cyclic ;
coherence
(1). G is cyclic
by ;
end;

theorem Th41: :: GR_CY_1:41
for G being Group holds
( G is cyclic Group iff ex a being Element of G st
for b being Element of G ex j1 being Integer st b = a |^ j1 )
proof end;

theorem Th42: :: GR_CY_1:42
for G being Group st G is finite holds
( G is cyclic Group iff ex a being Element of G st
for b being Element of G ex n being Element of NAT st b = a |^ n )
proof end;

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

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

theorem Th45: :: GR_CY_1:45
for p being Element of NAT
for G being strict Group st G is finite & ord G = p & p is prime holds
G is cyclic Group
proof end;

theorem Th46: :: GR_CY_1:46
for n being Element of NAT st n > 0 holds
ex g being Element of (INT.Group n) st
for b being Element of (INT.Group n) ex j1 being Integer st b = g |^ j1
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
INT.Group = gr {(@' 1)} by ;

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

registration
cluster INT.Group -> strict commutative cyclic ;
coherence
INT.Group is cyclic
by ;
end;

theorem Th49: :: GR_CY_1:49
for n being Element of NAT st n > 0 holds
INT.Group n is cyclic
proof end;

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

theorem Th51: :: GR_CY_1:51
for m, n being Element of NAT st 0 < m & m <= n holds
Segm m c= Segm n
proof end;