:: MONOID_0 semantic presentation

deffunc H1( 1-sorted ) -> set = the carrier of a1;

deffunc H2( HGrStr ) -> Relation of [:the carrier of a1,the carrier of a1:],the carrier of a1 = the mult of a1;

definition
let c1 be 1-sorted ;
mode BinOp of a1 is BinOp of the carrier of a1;
end;

definition
let c1 be 1-sorted ;
attr a1 is constituted-Functions means :Def1: :: MONOID_0:def 1
for b1 being Element of a1 holds b1 is Function;
attr a1 is constituted-FinSeqs means :Def2: :: MONOID_0:def 2
for b1 being Element of a1 holds b1 is FinSequence;
end;

:: deftheorem Def1 defines constituted-Functions MONOID_0:def 1 :
for b1 being 1-sorted holds
( b1 is constituted-Functions iff for b2 being Element of b1 holds b2 is Function );

:: deftheorem Def2 defines constituted-FinSeqs MONOID_0:def 2 :
for b1 being 1-sorted holds
( b1 is constituted-FinSeqs iff for b2 being Element of b1 holds b2 is FinSequence );

registration
cluster constituted-Functions 1-sorted ;
existence
ex b1 being 1-sorted st b1 is constituted-Functions
proof end;
cluster constituted-FinSeqs 1-sorted ;
existence
ex b1 being 1-sorted st b1 is constituted-FinSeqs
proof end;
end;

registration
let c1 be constituted-Functions 1-sorted ;
cluster -> Relation-like Function-like Element of the carrier of a1;
coherence
for b1 being Element of c1 holds
( b1 is Function-like & b1 is Relation-like )
by Def1;
end;

registration
cluster constituted-FinSeqs -> constituted-Functions 1-sorted ;
coherence
for b1 being 1-sorted st b1 is constituted-FinSeqs holds
b1 is constituted-Functions
proof end;
end;

registration
cluster constituted-FinSeqs -> constituted-Functions HGrStr ;
coherence
for b1 being HGrStr st b1 is constituted-FinSeqs holds
b1 is constituted-Functions
proof end;
end;

registration
let c1 be constituted-FinSeqs 1-sorted ;
cluster -> Relation-like Function-like FinSequence-like Element of the carrier of a1;
coherence
for b1 being Element of c1 holds b1 is FinSequence-like
by Def2;
end;

definition
let c1 be set ;
let c2, c3 be FinSequence of c1;
redefine func ^ as c2 ^ c3 -> Element of a1 * ;
coherence
c2 ^ c3 is Element of c1 *
proof end;
end;

Lemma3: ( ( for b1 being set
for b2, b3 being Function of b1,b1 holds b2 * b3 is Function of b1,b1 ) & ( for b1 being set
for b2, b3 being Permutation of b1 holds b2 * b3 is Permutation of b1 ) & ( for b1, b2, b3 being set
for b4 being PartFunc of b1,b2
for b5 being PartFunc of b2,b3 holds b5 * b4 is PartFunc of b1,b3 ) & ( for b1 being set
for b2, b3 being non empty set
for b4 being Function of b1,b2
for b5 being Function of b2,b3 holds b5 * b4 is Function of b1,b3 ) )
;

notation
let c1, c2 be Function;
synonym c2 (*) c1 for c2 * c1;
end;

definition
let c1 be set ;
let c2, c3 be Function of c1,c1;
redefine func (*) as c3 * c2 -> Function of a1,a1;
coherence
c3 (*) c2 is Function of c1,c1
by Lemma3;
end;

definition
let c1 be set ;
let c2, c3 be Permutation of c1;
redefine func (*) as c3 * c2 -> Permutation of a1;
coherence
c3 (*) c2 is Permutation of c1
by Lemma3;
end;

definition
let c1 be non empty set ;
let c2 be BinOp of c1;
attr a2 is left-invertible means :: MONOID_0:def 3
for b1, b2 being Element of a1 ex b3 being Element of a1 st a2 . b3,b1 = b2;
attr a2 is right-invertible means :: MONOID_0:def 4
for b1, b2 being Element of a1 ex b3 being Element of a1 st a2 . b1,b3 = b2;
attr a2 is invertible means :Def5: :: MONOID_0:def 5
for b1, b2 being Element of a1 ex b3, b4 being Element of a1 st
( a2 . b1,b3 = b2 & a2 . b4,b1 = b2 );
attr a2 is left-cancelable means :: MONOID_0:def 6
for b1, b2, b3 being Element of a1 st a2 . b1,b2 = a2 . b1,b3 holds
b2 = b3;
attr a2 is right-cancelable means :: MONOID_0:def 7
for b1, b2, b3 being Element of a1 st a2 . b2,b1 = a2 . b3,b1 holds
b2 = b3;
attr a2 is cancelable means :: MONOID_0:def 8
for b1, b2, b3 being Element of a1 st ( a2 . b1,b2 = a2 . b1,b3 or a2 . b2,b1 = a2 . b3,b1 ) holds
b2 = b3;
attr a2 is uniquely-decomposable means :: MONOID_0:def 9
( a2 has_a_unity & ( for b1, b2 being Element of a1 st a2 . b1,b2 = the_unity_wrt a2 holds
( b1 = b2 & b2 = the_unity_wrt a2 ) ) );
end;

:: deftheorem Def3 defines left-invertible MONOID_0:def 3 :
for b1 being non empty set
for b2 being BinOp of b1 holds
( b2 is left-invertible iff for b3, b4 being Element of b1 ex b5 being Element of b1 st b2 . b5,b3 = b4 );

:: deftheorem Def4 defines right-invertible MONOID_0:def 4 :
for b1 being non empty set
for b2 being BinOp of b1 holds
( b2 is right-invertible iff for b3, b4 being Element of b1 ex b5 being Element of b1 st b2 . b3,b5 = b4 );

:: deftheorem Def5 defines invertible MONOID_0:def 5 :
for b1 being non empty set
for b2 being BinOp of b1 holds
( b2 is invertible iff for b3, b4 being Element of b1 ex b5, b6 being Element of b1 st
( b2 . b3,b5 = b4 & b2 . b6,b3 = b4 ) );

:: deftheorem Def6 defines left-cancelable MONOID_0:def 6 :
for b1 being non empty set
for b2 being BinOp of b1 holds
( b2 is left-cancelable iff for b3, b4, b5 being Element of b1 st b2 . b3,b4 = b2 . b3,b5 holds
b4 = b5 );

:: deftheorem Def7 defines right-cancelable MONOID_0:def 7 :
for b1 being non empty set
for b2 being BinOp of b1 holds
( b2 is right-cancelable iff for b3, b4, b5 being Element of b1 st b2 . b4,b3 = b2 . b5,b3 holds
b4 = b5 );

:: deftheorem Def8 defines cancelable MONOID_0:def 8 :
for b1 being non empty set
for b2 being BinOp of b1 holds
( b2 is cancelable iff for b3, b4, b5 being Element of b1 st ( b2 . b3,b4 = b2 . b3,b5 or b2 . b4,b3 = b2 . b5,b3 ) holds
b4 = b5 );

:: deftheorem Def9 defines uniquely-decomposable MONOID_0:def 9 :
for b1 being non empty set
for b2 being BinOp of b1 holds
( b2 is uniquely-decomposable iff ( b2 has_a_unity & ( for b3, b4 being Element of b1 st b2 . b3,b4 = the_unity_wrt b2 holds
( b3 = b4 & b4 = the_unity_wrt b2 ) ) ) );

theorem Th1: :: MONOID_0:1
for b1 being non empty set
for b2 being BinOp of b1 holds
( b2 is invertible iff ( b2 is left-invertible & b2 is right-invertible ) )
proof end;

theorem Th2: :: MONOID_0:2
for b1 being non empty set
for b2 being BinOp of b1 holds
( b2 is cancelable iff ( b2 is left-cancelable & b2 is right-cancelable ) )
proof end;

theorem Th3: :: MONOID_0:3
for b1 being set
for b2 being BinOp of {b1} holds
( b2 = {[b1,b1]} --> b1 & b2 has_a_unity & b2 is commutative & b2 is associative & b2 is idempotent & b2 is invertible & b2 is cancelable & b2 is uniquely-decomposable )
proof end;

definition
let c1 be non empty HGrStr ;
redefine attr a1 is unital means :Def10: :: MONOID_0:def 10
the mult of a1 has_a_unity ;
compatibility
( c1 is unital iff the mult of c1 has_a_unity )
proof end;
end;

:: deftheorem Def10 defines unital MONOID_0:def 10 :
for b1 being non empty HGrStr holds
( b1 is unital iff the mult of b1 has_a_unity );

definition
let c1 be non empty HGrStr ;
redefine attr a1 is commutative means :: MONOID_0:def 11
the mult of a1 is commutative;
compatibility
( c1 is commutative iff the mult of c1 is commutative )
proof end;
redefine attr a1 is associative means :Def12: :: MONOID_0:def 12
the mult of a1 is associative;
compatibility
( c1 is associative iff the mult of c1 is associative )
proof end;
end;

:: deftheorem Def11 defines commutative MONOID_0:def 11 :
for b1 being non empty HGrStr holds
( b1 is commutative iff the mult of b1 is commutative );

:: deftheorem Def12 defines associative MONOID_0:def 12 :
for b1 being non empty HGrStr holds
( b1 is associative iff the mult of b1 is associative );

definition
let c1 be non empty HGrStr ;
attr a1 is idempotent means :: MONOID_0:def 13
the mult of a1 is idempotent;
attr a1 is left-invertible means :: MONOID_0:def 14
the mult of a1 is left-invertible;
attr a1 is right-invertible means :: MONOID_0:def 15
the mult of a1 is right-invertible;
attr a1 is invertible means :Def16: :: MONOID_0:def 16
the mult of a1 is invertible;
attr a1 is left-cancelable means :: MONOID_0:def 17
the mult of a1 is left-cancelable;
attr a1 is right-cancelable means :: MONOID_0:def 18
the mult of a1 is right-cancelable;
attr a1 is cancelable means :: MONOID_0:def 19
the mult of a1 is cancelable;
attr a1 is uniquely-decomposable means :Def20: :: MONOID_0:def 20
the mult of a1 is uniquely-decomposable;
end;

:: deftheorem Def13 defines idempotent MONOID_0:def 13 :
for b1 being non empty HGrStr holds
( b1 is idempotent iff the mult of b1 is idempotent );

:: deftheorem Def14 defines left-invertible MONOID_0:def 14 :
for b1 being non empty HGrStr holds
( b1 is left-invertible iff the mult of b1 is left-invertible );

:: deftheorem Def15 defines right-invertible MONOID_0:def 15 :
for b1 being non empty HGrStr holds
( b1 is right-invertible iff the mult of b1 is right-invertible );

:: deftheorem Def16 defines invertible MONOID_0:def 16 :
for b1 being non empty HGrStr holds
( b1 is invertible iff the mult of b1 is invertible );

:: deftheorem Def17 defines left-cancelable MONOID_0:def 17 :
for b1 being non empty HGrStr holds
( b1 is left-cancelable iff the mult of b1 is left-cancelable );

:: deftheorem Def18 defines right-cancelable MONOID_0:def 18 :
for b1 being non empty HGrStr holds
( b1 is right-cancelable iff the mult of b1 is right-cancelable );

:: deftheorem Def19 defines cancelable MONOID_0:def 19 :
for b1 being non empty HGrStr holds
( b1 is cancelable iff the mult of b1 is cancelable );

:: deftheorem Def20 defines uniquely-decomposable MONOID_0:def 20 :
for b1 being non empty HGrStr holds
( b1 is uniquely-decomposable iff the mult of b1 is uniquely-decomposable );

registration
cluster non empty strict unital associative commutative constituted-Functions constituted-FinSeqs idempotent invertible cancelable uniquely-decomposable HGrStr ;
existence
ex b1 being non empty HGrStr st
( b1 is unital & b1 is commutative & b1 is associative & b1 is cancelable & b1 is idempotent & b1 is invertible & b1 is uniquely-decomposable & b1 is constituted-Functions & b1 is constituted-FinSeqs & b1 is strict )
proof end;
end;

theorem Th4: :: MONOID_0:4
for b1 being non empty HGrStr st b1 is unital holds
the_unity_wrt the mult of b1 is_a_unity_wrt the mult of b1
proof end;

theorem Th5: :: MONOID_0:5
for b1 being non empty HGrStr holds
( b1 is unital iff for b2 being Element of b1 holds
( (the_unity_wrt the mult of b1) * b2 = b2 & b2 * (the_unity_wrt the mult of b1) = b2 ) )
proof end;

theorem Th6: :: MONOID_0:6
for b1 being non empty HGrStr holds
( b1 is unital iff ex b2 being Element of b1 st
for b3 being Element of b1 holds
( b2 * b3 = b3 & b3 * b2 = b3 ) )
proof end;

Lemma14: for b1 being non empty HGrStr holds
( b1 is commutative iff for b2, b3 being Element of b1 holds b2 * b3 = b3 * b2 )
proof end;

Lemma15: for b1 being non empty HGrStr holds
( b1 is associative iff for b2, b3, b4 being Element of b1 holds (b2 * b3) * b4 = b2 * (b3 * b4) )
proof end;

theorem Th7: :: MONOID_0:7
canceled;

theorem Th8: :: MONOID_0:8
canceled;

theorem Th9: :: MONOID_0:9
for b1 being non empty HGrStr holds
( b1 is idempotent iff for b2 being Element of b1 holds b2 * b2 = b2 )
proof end;

theorem Th10: :: MONOID_0:10
for b1 being non empty HGrStr holds
( b1 is left-invertible iff for b2, b3 being Element of b1 ex b4 being Element of b1 st b4 * b2 = b3 )
proof end;

theorem Th11: :: MONOID_0:11
for b1 being non empty HGrStr holds
( b1 is right-invertible iff for b2, b3 being Element of b1 ex b4 being Element of b1 st b2 * b4 = b3 )
proof end;

theorem Th12: :: MONOID_0:12
for b1 being non empty HGrStr holds
( b1 is invertible iff for b2, b3 being Element of b1 ex b4, b5 being Element of b1 st
( b2 * b4 = b3 & b5 * b2 = b3 ) )
proof end;

theorem Th13: :: MONOID_0:13
for b1 being non empty HGrStr holds
( b1 is left-cancelable iff for b2, b3, b4 being Element of b1 st b2 * b3 = b2 * b4 holds
b3 = b4 )
proof end;

theorem Th14: :: MONOID_0:14
for b1 being non empty HGrStr holds
( b1 is right-cancelable iff for b2, b3, b4 being Element of b1 st b3 * b2 = b4 * b2 holds
b3 = b4 )
proof end;

theorem Th15: :: MONOID_0:15
for b1 being non empty HGrStr holds
( b1 is cancelable iff for b2, b3, b4 being Element of b1 st ( b2 * b3 = b2 * b4 or b3 * b2 = b4 * b2 ) holds
b3 = b4 )
proof end;

theorem Th16: :: MONOID_0:16
for b1 being non empty HGrStr holds
( b1 is uniquely-decomposable iff ( the mult of b1 has_a_unity & ( for b2, b3 being Element of b1 st b2 * b3 = the_unity_wrt the mult of b1 holds
( b2 = b3 & b3 = the_unity_wrt the mult of b1 ) ) ) )
proof end;

theorem Th17: :: MONOID_0:17
for b1 being non empty HGrStr st b1 is associative holds
( b1 is invertible iff ( b1 is unital & the mult of b1 has_an_inverseOp ) )
proof end;

Lemma21: for b1 being non empty HGrStr holds
( b1 is invertible iff ( b1 is left-invertible & b1 is right-invertible ) )
proof end;

Lemma22: for b1 being non empty HGrStr holds
( b1 is cancelable iff ( b1 is left-cancelable & b1 is right-cancelable ) )
proof end;

Lemma23: for b1 being non empty HGrStr st b1 is associative & b1 is invertible holds
b1 is Group-like
proof end;

registration
cluster non empty Group-like associative -> non empty invertible HGrStr ;
coherence
for b1 being non empty HGrStr st b1 is associative & b1 is Group-like holds
b1 is invertible
proof end;
cluster non empty associative invertible -> non empty Group-like HGrStr ;
coherence
for b1 being non empty HGrStr st b1 is associative & b1 is invertible holds
b1 is Group-like
by Lemma23;
end;

registration
cluster non empty invertible -> non empty left-invertible right-invertible HGrStr ;
coherence
for b1 being non empty HGrStr st b1 is invertible holds
( b1 is left-invertible & b1 is right-invertible )
by Lemma21;
cluster non empty left-invertible right-invertible -> non empty invertible HGrStr ;
coherence
for b1 being non empty HGrStr st b1 is left-invertible & b1 is right-invertible holds
b1 is invertible
by Lemma21;
cluster non empty cancelable -> non empty left-cancelable right-cancelable HGrStr ;
coherence
for b1 being non empty HGrStr st b1 is cancelable holds
( b1 is left-cancelable & b1 is right-cancelable )
by Lemma22;
cluster non empty left-cancelable right-cancelable -> non empty cancelable HGrStr ;
coherence
for b1 being non empty HGrStr st b1 is left-cancelable & b1 is right-cancelable holds
b1 is cancelable
by Lemma22;
cluster non empty associative invertible -> non empty unital cancelable HGrStr ;
coherence
for b1 being non empty HGrStr st b1 is associative & b1 is invertible holds
( b1 is unital & b1 is cancelable )
proof end;
end;

deffunc H3( multLoopStr ) -> Element of the carrier of a1 = the unity of a1;

definition
let c1 be non empty multLoopStr ;
redefine attr a1 is well-unital means :Def21: :: MONOID_0:def 21
the unity of a1 is_a_unity_wrt the mult of a1;
compatibility
( c1 is well-unital iff the unity of c1 is_a_unity_wrt the mult of c1 )
proof end;
end;

:: deftheorem Def21 defines well-unital MONOID_0:def 21 :
for b1 being non empty multLoopStr holds
( b1 is well-unital iff the unity of b1 is_a_unity_wrt the mult of b1 );

theorem Th18: :: MONOID_0:18
for b1 being non empty multLoopStr holds
( b1 is well-unital iff for b2 being Element of b1 holds
( the unity of b1 * b2 = b2 & b2 * the unity of b1 = b2 ) )
proof end;

Lemma26: for b1 being non empty multLoopStr st b1 is well-unital holds
b1 is unital
proof end;

registration
cluster non empty well-unital -> non empty unital multLoopStr ;
coherence
for b1 being non empty multLoopStr st b1 is well-unital holds
b1 is unital
by Lemma26;
end;

theorem Th19: :: MONOID_0:19
for b1 being non empty multLoopStr st b1 is well-unital holds
the unity of b1 = the_unity_wrt the mult of b1
proof end;

registration
let c1 be non empty set ;
let c2 be BinOp of c1;
let c3 be Element of c1;
cluster multLoopStr(# a1,a2,a3 #) -> non empty ;
coherence
not multLoopStr(# c1,c2,c3 #) is empty
by STRUCT_0:def 1;
end;

registration
cluster non empty unital Group-like associative commutative strict well-unital constituted-Functions constituted-FinSeqs idempotent left-invertible right-invertible invertible left-cancelable right-cancelable cancelable uniquely-decomposable multLoopStr ;
existence
ex b1 being non empty multLoopStr st
( b1 is well-unital & b1 is commutative & b1 is associative & b1 is cancelable & b1 is idempotent & b1 is invertible & b1 is uniquely-decomposable & b1 is unital & b1 is constituted-Functions & b1 is constituted-FinSeqs & b1 is strict )
proof end;
end;

definition
mode Monoid is non empty associative well-unital multLoopStr ;
end;

definition
let c1 be HGrStr ;
mode MonoidalExtension of c1 -> multLoopStr means :Def22: :: MONOID_0:def 22
HGrStr(# the carrier of a2,the mult of a2 #) = HGrStr(# the carrier of a1,the mult of a1 #);
existence
ex b1 being multLoopStr st HGrStr(# the carrier of b1,the mult of b1 #) = HGrStr(# the carrier of c1,the mult of c1 #)
proof end;
end;

:: deftheorem Def22 defines MonoidalExtension MONOID_0:def 22 :
for b1 being HGrStr
for b2 being multLoopStr holds
( b2 is MonoidalExtension of b1 iff HGrStr(# the carrier of b2,the mult of b2 #) = HGrStr(# the carrier of b1,the mult of b1 #) );

registration
let c1 be non empty HGrStr ;
cluster -> non empty MonoidalExtension of a1;
coherence
for b1 being MonoidalExtension of c1 holds not b1 is empty
proof end;
end;

theorem Th20: :: MONOID_0:20
for b1 being non empty HGrStr
for b2 being MonoidalExtension of b1 holds
( the carrier of b2 = the carrier of b1 & the mult of b2 = the mult of b1 & ( for b3, b4 being Element of b2
for b5, b6 being Element of b1 st b3 = b5 & b4 = b6 holds
b3 * b4 = b5 * b6 ) )
proof end;

registration
let c1 be HGrStr ;
cluster strict MonoidalExtension of a1;
existence
ex b1 being MonoidalExtension of c1 st b1 is strict
proof end;
end;

theorem Th21: :: MONOID_0:21
for b1 being non empty HGrStr
for b2 being MonoidalExtension of b1 holds
( ( b1 is unital implies b2 is unital ) & ( b1 is commutative implies b2 is commutative ) & ( b1 is associative implies b2 is associative ) & ( b1 is invertible implies b2 is invertible ) & ( b1 is uniquely-decomposable implies b2 is uniquely-decomposable ) & ( b1 is cancelable implies b2 is cancelable ) )
proof end;

registration
let c1 be constituted-Functions HGrStr ;
cluster -> constituted-Functions MonoidalExtension of a1;
coherence
for b1 being MonoidalExtension of c1 holds b1 is constituted-Functions
proof end;
end;

registration
let c1 be constituted-FinSeqs HGrStr ;
cluster -> constituted-Functions constituted-FinSeqs MonoidalExtension of a1;
coherence
for b1 being MonoidalExtension of c1 holds b1 is constituted-FinSeqs
proof end;
end;

registration
let c1 be non empty unital HGrStr ;
cluster -> non empty unital MonoidalExtension of a1;
coherence
for b1 being MonoidalExtension of c1 holds b1 is unital
by Th21;
end;

registration
let c1 be non empty associative HGrStr ;
cluster -> non empty associative MonoidalExtension of a1;
coherence
for b1 being MonoidalExtension of c1 holds b1 is associative
by Th21;
end;

registration
let c1 be non empty commutative HGrStr ;
cluster -> non empty commutative MonoidalExtension of a1;
coherence
for b1 being MonoidalExtension of c1 holds b1 is commutative
by Th21;
end;

registration
let c1 be non empty invertible HGrStr ;
cluster -> non empty left-invertible right-invertible invertible MonoidalExtension of a1;
coherence
for b1 being MonoidalExtension of c1 holds b1 is invertible
by Th21;
end;

registration
let c1 be non empty cancelable HGrStr ;
cluster -> non empty left-cancelable right-cancelable cancelable MonoidalExtension of a1;
coherence
for b1 being MonoidalExtension of c1 holds b1 is cancelable
by Th21;
end;

registration
let c1 be non empty uniquely-decomposable HGrStr ;
cluster -> non empty uniquely-decomposable MonoidalExtension of a1;
coherence
for b1 being MonoidalExtension of c1 holds b1 is uniquely-decomposable
by Th21;
end;

registration
let c1 be non empty unital HGrStr ;
cluster non empty unital strict well-unital MonoidalExtension of a1;
existence
ex b1 being MonoidalExtension of c1 st
( b1 is well-unital & b1 is strict )
proof end;
end;

theorem Th22: :: MONOID_0:22
for b1 being non empty unital HGrStr
for b2, b3 being strict well-unital MonoidalExtension of b1 holds b2 = b3
proof end;

definition
let c1 be HGrStr ;
mode SubStr of c1 -> HGrStr means :Def23: :: MONOID_0:def 23
the mult of a2 <= the mult of a1;
existence
ex b1 being HGrStr st the mult of b1 <= the mult of c1
;
end;

:: deftheorem Def23 defines SubStr MONOID_0:def 23 :
for b1, b2 being HGrStr holds
( b2 is SubStr of b1 iff the mult of b2 <= the mult of b1 );

registration
let c1 be HGrStr ;
cluster strict SubStr of a1;
existence
ex b1 being SubStr of c1 st b1 is strict
proof end;
end;

registration
let c1 be non empty HGrStr ;
cluster non empty strict SubStr of a1;
existence
ex b1 being SubStr of c1 st
( b1 is strict & not b1 is empty )
proof end;
end;

registration
let c1 be non empty unital HGrStr ;
cluster non empty strict unital Group-like associative commutative idempotent left-invertible right-invertible invertible left-cancelable right-cancelable cancelable uniquely-decomposable SubStr of a1;
existence
ex b1 being non empty SubStr of c1 st
( b1 is unital & b1 is associative & b1 is commutative & b1 is cancelable & b1 is idempotent & b1 is invertible & b1 is uniquely-decomposable & b1 is strict )
proof end;
end;

definition
let c1 be HGrStr ;
mode MonoidalSubStr of c1 -> multLoopStr means :Def24: :: MONOID_0:def 24
( the mult of a2 <= the mult of a1 & ( for b1 being multLoopStr st a1 = b1 holds
the unity of a2 = the unity of b1 ) );
existence
ex b1 being multLoopStr st
( the mult of b1 <= the mult of c1 & ( for b2 being multLoopStr st c1 = b2 holds
the unity of b1 = the unity of b2 ) )
proof end;
end;

:: deftheorem Def24 defines MonoidalSubStr MONOID_0:def 24 :
for b1 being HGrStr
for b2 being multLoopStr holds
( b2 is MonoidalSubStr of b1 iff ( the mult of b2 <= the mult of b1 & ( for b3 being multLoopStr st b1 = b3 holds
the unity of b2 = the unity of b3 ) ) );

registration
let c1 be HGrStr ;
cluster strict MonoidalSubStr of a1;
existence
ex b1 being MonoidalSubStr of c1 st b1 is strict
proof end;
end;

registration
let c1 be non empty HGrStr ;
cluster non empty strict MonoidalSubStr of a1;
existence
ex b1 being MonoidalSubStr of c1 st
( b1 is strict & not b1 is empty )
proof end;
end;

definition
let c1 be multLoopStr ;
redefine mode MonoidalSubStr of c1 -> multLoopStr means :Def25: :: MONOID_0:def 25
( the mult of a2 <= the mult of a1 & the unity of a2 = the unity of a1 );
compatibility
for b1 being multLoopStr holds
( b1 is MonoidalSubStr of c1 iff ( the mult of b1 <= the mult of c1 & the unity of b1 = the unity of c1 ) )
proof end;
end;

:: deftheorem Def25 defines MonoidalSubStr MONOID_0:def 25 :
for b1, b2 being multLoopStr holds
( b2 is MonoidalSubStr of b1 iff ( the mult of b2 <= the mult of b1 & the unity of b2 = the unity of b1 ) );

registration
let c1 be non empty well-unital multLoopStr ;
cluster non empty unital Group-like associative commutative strict well-unital idempotent left-invertible right-invertible invertible left-cancelable right-cancelable cancelable uniquely-decomposable MonoidalSubStr of a1;
existence
ex b1 being non empty MonoidalSubStr of c1 st
( b1 is well-unital & b1 is associative & b1 is commutative & b1 is cancelable & b1 is idempotent & b1 is invertible & b1 is uniquely-decomposable & b1 is strict )
proof end;
end;

theorem Th23: :: MONOID_0:23
for b1 being HGrStr
for b2 being MonoidalSubStr of b1 holds b2 is SubStr of b1
proof end;

definition
let c1 be HGrStr ;
let c2 be MonoidalExtension of c1;
redefine mode SubStr as SubStr of c2 -> SubStr of a1;
coherence
for b1 being SubStr of c2 holds b1 is SubStr of c1
proof end;
end;

definition
let c1 be HGrStr ;
let c2 be SubStr of c1;
redefine mode SubStr as SubStr of c2 -> SubStr of a1;
coherence
for b1 being SubStr of c2 holds b1 is SubStr of c1
proof end;
end;

definition
let c1 be HGrStr ;
let c2 be MonoidalSubStr of c1;
redefine mode SubStr as SubStr of c2 -> SubStr of a1;
coherence
for b1 being SubStr of c2 holds b1 is SubStr of c1
proof end;
end;

definition
let c1 be HGrStr ;
let c2 be MonoidalSubStr of c1;
redefine mode MonoidalSubStr as MonoidalSubStr of c2 -> MonoidalSubStr of a1;
coherence
for b1 being MonoidalSubStr of c2 holds b1 is MonoidalSubStr of c1
proof end;
end;

theorem Th24: :: MONOID_0:24
for b1 being non empty HGrStr
for b2 being non empty multLoopStr holds
( b1 is SubStr of b1 & b2 is MonoidalSubStr of b2 )
proof end;

theorem Th25: :: MONOID_0:25
for b1 being non empty HGrStr
for b2 being non empty SubStr of b1
for b3 being non empty MonoidalSubStr of b1 holds
( the carrier of b2 c= the carrier of b1 & the carrier of b3 c= the carrier of b1 )
proof end;

theorem Th26: :: MONOID_0:26
for b1 being non empty HGrStr
for b2 being non empty SubStr of b1 holds the mult of b2 = the mult of b1 || the carrier of b2
proof end;

theorem Th27: :: MONOID_0:27
for b1 being non empty HGrStr
for b2 being non empty SubStr of b1
for b3, b4 being Element of b2
for b5, b6 being Element of b1 st b3 = b5 & b4 = b6 holds
b3 * b4 = b5 * b6
proof end;

theorem Th28: :: MONOID_0:28
for b1 being non empty HGrStr
for b2, b3 being non empty SubStr of b1 st the carrier of b2 = the carrier of b3 holds
HGrStr(# the carrier of b2,the mult of b2 #) = HGrStr(# the carrier of b3,the mult of b3 #)
proof end;

theorem Th29: :: MONOID_0:29
for b1 being non empty multLoopStr
for b2, b3 being non empty MonoidalSubStr of b1 st the carrier of b2 = the carrier of b3 holds
multLoopStr(# the carrier of b2,the mult of b2,the unity of b2 #) = multLoopStr(# the carrier of b3,the mult of b3,the unity of b3 #)
proof end;

theorem Th30: :: MONOID_0:30
for b1 being non empty HGrStr
for b2, b3 being non empty SubStr of b1 st the carrier of b2 c= the carrier of b3 holds
b2 is SubStr of b3
proof end;

theorem Th31: :: MONOID_0:31
for b1 being non empty multLoopStr
for b2, b3 being non empty MonoidalSubStr of b1 st the carrier of b2 c= the carrier of b3 holds
b2 is MonoidalSubStr of b3
proof end;

theorem Th32: :: MONOID_0:32
for b1 being non empty HGrStr
for b2 being non empty SubStr of b1 st b1 is unital & the_unity_wrt the mult of b1 in the carrier of b2 holds
( b2 is unital & the_unity_wrt the mult of b1 = the_unity_wrt the mult of b2 )
proof end;

theorem Th33: :: MONOID_0:33
for b1 being non empty well-unital multLoopStr
for b2 being non empty MonoidalSubStr of b1 holds b2 is well-unital
proof end;

theorem Th34: :: MONOID_0:34
for b1 being non empty HGrStr
for b2 being non empty SubStr of b1 st b1 is commutative holds
b2 is commutative
proof end;

theorem Th35: :: MONOID_0:35
for b1 being non empty HGrStr
for b2 being non empty SubStr of b1 st b1 is associative holds
b2 is associative
proof end;

theorem Th36: :: MONOID_0:36
for b1 being non empty HGrStr
for b2 being non empty SubStr of b1 st b1 is idempotent holds
b2 is idempotent
proof end;

theorem Th37: :: MONOID_0:37
for b1 being non empty HGrStr
for b2 being non empty SubStr of b1 st b1 is cancelable holds
b2 is cancelable
proof end;

theorem Th38: :: MONOID_0:38
for b1 being non empty HGrStr
for b2 being non empty SubStr of b1 st the_unity_wrt the mult of b1 in the carrier of b2 & b1 is uniquely-decomposable holds
b2 is uniquely-decomposable
proof end;

theorem Th39: :: MONOID_0:39
for b1 being non empty well-unital uniquely-decomposable multLoopStr
for b2 being non empty MonoidalSubStr of b1 holds b2 is uniquely-decomposable
proof end;

registration
let c1 be non empty constituted-Functions HGrStr ;
cluster non empty -> non empty constituted-Functions SubStr of a1;
coherence
for b1 being non empty SubStr of c1 holds b1 is constituted-Functions
proof end;
cluster non empty -> non empty constituted-Functions MonoidalSubStr of a1;
coherence
for b1 being non empty MonoidalSubStr of c1 holds b1 is constituted-Functions
proof end;
end;

registration
let c1 be non empty constituted-FinSeqs HGrStr ;
cluster non empty -> non empty constituted-Functions constituted-FinSeqs SubStr of a1;
coherence
for b1 being non empty SubStr of c1 holds b1 is constituted-FinSeqs
proof end;
cluster non empty -> non empty constituted-Functions constituted-FinSeqs MonoidalSubStr of a1;
coherence
for b1 being non empty MonoidalSubStr of c1 holds b1 is constituted-FinSeqs
proof end;
end;

registration
let c1 be non empty well-unital multLoopStr ;
cluster non empty -> non empty unital well-unital MonoidalSubStr of a1;
coherence
for b1 being non empty MonoidalSubStr of c1 holds b1 is well-unital
by Th33;
end;

registration
let c1 be non empty commutative HGrStr ;
cluster non empty -> non empty commutative SubStr of a1;
coherence
for b1 being non empty SubStr of c1 holds b1 is commutative
by Th34;
cluster non empty -> non empty commutative MonoidalSubStr of a1;
coherence
for b1 being non empty MonoidalSubStr of c1 holds b1 is commutative
proof end;
end;

registration
let c1 be non empty associative HGrStr ;
cluster non empty -> non empty associative SubStr of a1;
coherence
for b1 being non empty SubStr of c1 holds b1 is associative
by Th35;
cluster non empty -> non empty associative MonoidalSubStr of a1;
coherence
for b1 being non empty MonoidalSubStr of c1 holds b1 is associative
proof end;
end;

registration
let c1 be non empty idempotent HGrStr ;
cluster non empty -> non empty idempotent SubStr of a1;
coherence
for b1 being non empty SubStr of c1 holds b1 is idempotent
by Th36;
cluster non empty -> non empty idempotent MonoidalSubStr of a1;
coherence
for b1 being non empty MonoidalSubStr of c1 holds b1 is idempotent
proof end;
end;

registration
let c1 be non empty cancelable HGrStr ;
cluster non empty -> non empty left-cancelable right-cancelable cancelable SubStr of a1;
coherence
for b1 being non empty SubStr of c1 holds b1 is cancelable
by Th37;
cluster non empty -> non empty left-cancelable right-cancelable cancelable MonoidalSubStr of a1;
coherence
for b1 being non empty MonoidalSubStr of c1 holds b1 is cancelable
proof end;
end;

registration
let c1 be non empty well-unital uniquely-decomposable multLoopStr ;
cluster non empty -> non empty unital well-unital uniquely-decomposable MonoidalSubStr of a1;
coherence
for b1 being non empty MonoidalSubStr of c1 holds b1 is uniquely-decomposable
by Th39;
end;

scheme :: MONOID_0:sch 1
s1{ F1() -> non empty HGrStr , F2() -> non empty Subset of F1() } :
ex b1 being non empty strict SubStr of F1() st the carrier of b1 = F2()
provided
E49: for b1, b2 being Element of F2() holds b1 * b2 in F2()
proof end;

scheme :: MONOID_0:sch 2
s2{ F1() -> non empty HGrStr , P1[ set ] } :
ex b1 being non empty strict SubStr of F1() st
for b2 being Element of F1() holds
( b2 in the carrier of b1 iff P1[b2] )
provided
E49: for b1, b2 being Element of F1() st P1[b1] & P1[b2] holds
P1[b1 * b2] and
E50: ex b1 being Element of F1() st P1[b1]
proof end;

scheme :: MONOID_0:sch 3
s3{ F1() -> non empty multLoopStr , F2() -> non empty Subset of F1() } :
ex b1 being non empty strict MonoidalSubStr of F1() st the carrier of b1 = F2()
provided
E49: for b1, b2 being Element of F2() holds b1 * b2 in F2() and
E50: the unity of F1() in F2()
proof end;

scheme :: MONOID_0:sch 4
s4{ F1() -> non empty multLoopStr , P1[ set ] } :
ex b1 being non empty strict MonoidalSubStr of F1() st
for b2 being Element of F1() holds
( b2 in the carrier of b1 iff P1[b2] )
provided
E49: for b1, b2 being Element of F1() st P1[b1] & P1[b2] holds
P1[b1 * b2] and
E50: P1[the unity of F1()]
proof end;

notation
let c1 be non empty HGrStr ;
let c2, c3 be Element of c1;
synonym c2 [*] c3 for c2 * c3;
end;

definition
let c1 be non empty HGrStr ;
let c2, c3 be Element of c1;
redefine func [*] as c2 [*] c3 -> Element of a1;
coherence
c2 [*] c3 is Element of c1
;
end;

definition
func <REAL,+> -> non empty strict unital associative commutative invertible cancelable HGrStr equals :: MONOID_0:def 26
HGrStr(# REAL ,addreal #);
coherence
HGrStr(# REAL ,addreal #) is non empty strict unital associative commutative invertible cancelable HGrStr
proof end;
end;

:: deftheorem Def26 defines <REAL,+> MONOID_0:def 26 :
<REAL,+> = HGrStr(# REAL ,addreal #);

theorem Th40: :: MONOID_0:40
( the carrier of <REAL,+> = REAL & the mult of <REAL,+> = addreal & ( for b1, b2 being Element of <REAL,+>
for b3, b4 being Real st b1 = b3 & b2 = b4 holds
b1 * b2 = b3 + b4 ) ) by BINOP_2:def 9;

theorem Th41: :: MONOID_0:41
for b1 being set holds
( b1 is Element of <REAL,+> iff b1 is Real ) ;

theorem Th42: :: MONOID_0:42
the_unity_wrt the mult of <REAL,+> = 0 by BINOP_2:2;

theorem Th43: :: MONOID_0:43
for b1 being non empty SubStr of <REAL,+>
for b2, b3 being Element of b1
for b4, b5 being Real st b2 = b4 & b3 = b5 holds
b2 * b3 = b4 + b5
proof end;

theorem Th44: :: MONOID_0:44
for b1 being non empty unital SubStr of <REAL,+> holds the_unity_wrt the mult of b1 = 0
proof end;

registration
let c1 be non empty unital HGrStr ;
cluster non empty associative invertible -> non empty unital Group-like left-cancelable right-cancelable cancelable SubStr of a1;
coherence
for b1 being non empty SubStr of c1 st b1 is associative & b1 is invertible holds
( b1 is unital & b1 is cancelable & b1 is Group-like )
proof end;
end;

definition
redefine func INT.Group as INT.Group -> non empty strict unital invertible SubStr of <REAL,+> ;
coherence
INT.Group is non empty strict unital invertible SubStr of <REAL,+>
proof end;
end;

theorem Th45: :: MONOID_0:45
canceled;

theorem Th46: :: MONOID_0:46
for b1 being non empty strict SubStr of <REAL,+> holds
( b1 = INT.Group iff the carrier of b1 = INT ) by Th28, GR_CY_1:def 4;

theorem Th47: :: MONOID_0:47
for b1 being set holds
( b1 is Element of INT.Group iff b1 is Integer ) by GR_CY_1:def 4, INT_1:def 2;

definition
func <NAT,+> -> non empty strict unital uniquely-decomposable SubStr of INT.Group means :Def27: :: MONOID_0:def 27
the carrier of a1 = NAT ;
existence
ex b1 being non empty strict unital uniquely-decomposable SubStr of INT.Group st the carrier of b1 = NAT
proof end;
uniqueness
for b1, b2 being non empty strict unital uniquely-decomposable SubStr of INT.Group st the carrier of b1 = NAT & the carrier of b2 = NAT holds
b1 = b2
by Th28;
end;

:: deftheorem Def27 defines <NAT,+> MONOID_0:def 27 :
for b1 being non empty strict unital uniquely-decomposable SubStr of INT.Group holds
( b1 = <NAT,+> iff the carrier of b1 = NAT );

definition
func <NAT,+,0> -> non empty strict well-unital MonoidalExtension of <NAT,+> means :: MONOID_0:def 28
verum;
existence
ex b1 being non empty strict well-unital MonoidalExtension of <NAT,+> st verum
;
uniqueness
for b1, b2 being non empty strict well-unital MonoidalExtension of <NAT,+> holds b1 = b2
by Th22;
end;

:: deftheorem Def28 defines <NAT,+,0> MONOID_0:def 28 :
for b1 being non empty strict well-unital MonoidalExtension of <NAT,+> holds
( b1 = <NAT,+,0> iff verum );

definition
redefine func addnat -> Relation of [:NAT ,NAT :], NAT equals :Def29: :: MONOID_0:def 29
the mult of <NAT,+> ;
compatibility
for b1 being Relation of [:NAT ,NAT :], NAT holds
( b1 = addnat iff b1 = the mult of <NAT,+> )
proof end;
end;

:: deftheorem Def29 defines addnat MONOID_0:def 29 :
addnat = the mult of <NAT,+> ;

theorem Th48: :: MONOID_0:48
canceled;

theorem Th49: :: MONOID_0:49
<NAT,+> = HGrStr(# NAT ,addnat #) by Def27, Def29;

theorem Th50: :: MONOID_0:50
for b1 being set holds
( b1 is Element of <NAT,+,0> iff b1 is Nat )
proof end;

theorem Th51: :: MONOID_0:51
for b1, b2 being Nat
for b3, b4 being Element of <NAT,+,0> st b1 = b3 & b2 = b4 holds
b3 * b4 = b1 + b2
proof end;

theorem Th52: :: MONOID_0:52
<NAT,+,0> = multLoopStr(# NAT ,addnat ,0 #)
proof end;

theorem Th53: :: MONOID_0:53
( addnat = addreal || NAT & addnat = addint || NAT )
proof end;

theorem Th54: :: MONOID_0:54
( 0 is_a_unity_wrt addnat & addnat is uniquely-decomposable )
proof end;

definition
func <REAL,*> -> non empty strict unital associative commutative HGrStr equals :: MONOID_0:def 30
HGrStr(# REAL ,multreal #);
coherence
HGrStr(# REAL ,multreal #) is non empty strict unital associative commutative HGrStr
proof end;
end;

:: deftheorem Def30 defines <REAL,*> MONOID_0:def 30 :
<REAL,*> = HGrStr(# REAL ,multreal #);

theorem Th55: :: MONOID_0:55
( the carrier of <REAL,*> = REAL & the mult of <REAL,*> = multreal & ( for b1, b2 being Element of <REAL,*>
for b3, b4 being Real st b1 = b3 & b2 = b4 holds
b1 * b2 = b3 * b4 ) ) by BINOP_2:def 11;

theorem Th56: :: MONOID_0:56
for b1 being set holds
( b1 is Element of <REAL,*> iff b1 is Real ) ;

theorem Th57: :: MONOID_0:57
the_unity_wrt the mult of <REAL,*> = 1 by BINOP_2:7;

theorem Th58: :: MONOID_0:58
for b1 being non empty SubStr of <REAL,*>
for b2, b3 being Element of b1
for b4, b5 being Real st b2 = b4 & b3 = b5 holds
b2 * b3 = b4 * b5
proof end;

theorem Th59: :: MONOID_0:59
canceled;

theorem Th60: :: MONOID_0:60
for b1 being non empty unital SubStr of <REAL,*> holds
( the_unity_wrt the mult of b1 = 0 or the_unity_wrt the mult of b1 = 1 )
proof end;

definition
func <NAT,*> -> non empty strict unital uniquely-decomposable SubStr of <REAL,*> means :Def31: :: MONOID_0:def 31
the carrier of a1 = NAT ;
existence
ex b1 being non empty strict unital uniquely-decomposable SubStr of <REAL,*> st the carrier of b1 = NAT
proof end;
uniqueness
for b1, b2 being non empty strict unital uniquely-decomposable SubStr of <REAL,*> st the carrier of b1 = NAT & the carrier of b2 = NAT holds
b1 = b2
by Th28;
end;

:: deftheorem Def31 defines <NAT,*> MONOID_0:def 31 :
for b1 being non empty strict unital uniquely-decomposable SubStr of <REAL,*> holds
( b1 = <NAT,*> iff the carrier of b1 = NAT );

definition
func <NAT,*,1> -> non empty strict well-unital MonoidalExtension of <NAT,*> means :: MONOID_0:def 32
verum;
uniqueness
for b1, b2 being non empty strict well-unital MonoidalExtension of <NAT,*> holds b1 = b2
by Th22;
existence
ex b1 being non empty strict well-unital MonoidalExtension of <NAT,*> st verum
;
end;

:: deftheorem Def32 defines <NAT,*,1> MONOID_0:def 32 :
for b1 being non empty strict well-unital MonoidalExtension of <NAT,*> holds
( b1 = <NAT,*,1> iff verum );

definition
redefine func multnat -> Relation of [:NAT ,NAT :], NAT equals :Def33: :: MONOID_0:def 33
the mult of <NAT,*> ;
compatibility
for b1 being Relation of [:NAT ,NAT :], NAT holds
( b1 = multnat iff b1 = the mult of <NAT,*> )
proof end;
end;

:: deftheorem Def33 defines multnat MONOID_0:def 33 :
multnat = the mult of <NAT,*> ;

theorem Th61: :: MONOID_0:61
<NAT,*> = HGrStr(# NAT ,multnat #) by Def31, Def33;

theorem Th62: :: MONOID_0:62
for b1, b2 being Nat
for b3, b4 being Element of <NAT,*> st b1 = b3 & b2 = b4 holds
b3 * b4 = b1 * b2 by Th58;

theorem Th63: :: MONOID_0:63
the_unity_wrt the mult of <NAT,*> = 1
proof end;

theorem Th64: :: MONOID_0:64
for b1, b2 being Nat
for b3, b4 being Element of <NAT,*,1> st b1 = b3 & b2 = b4 holds
b3 * b4 = b1 * b2
proof end;

theorem Th65: :: MONOID_0:65
<NAT,*,1> = multLoopStr(# NAT ,multnat ,1 #)
proof end;

theorem Th66: :: MONOID_0:66
multnat = multreal || NAT by Th26, Th61;

theorem Th67: :: MONOID_0:67
( 1 is_a_unity_wrt multnat & multnat is uniquely-decomposable )
proof end;

definition
let c1 be non empty set ;
func c1 *+^ -> non empty strict unital associative constituted-FinSeqs cancelable uniquely-decomposable HGrStr means :Def34: :: MONOID_0:def 34
( the carrier of a2 = a1 * & ( for b1, b2 being Element of a2 holds b1 [*] b2 = b1 ^ b2 ) );
existence
ex b1 being non empty strict unital associative constituted-FinSeqs cancelable uniquely-decomposable HGrStr st
( the carrier of b1 = c1 * & ( for b2, b3 being Element of b1 holds b2 [*] b3 = b2 ^ b3 ) )
proof end;
uniqueness
for b1, b2 being non empty strict unital associative constituted-FinSeqs cancelable uniquely-decomposable HGrStr st the carrier of b1 = c1 * & ( for b3, b4 being Element of b1 holds b3 [*] b4 = b3 ^ b4 ) & the carrier of b2 = c1 * & ( for b3, b4 being Element of b2 holds b3 [*] b4 = b3 ^ b4 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def34 defines *+^ MONOID_0:def 34 :
for b1 being non empty set
for b2 being non empty strict unital associative constituted-FinSeqs cancelable uniquely-decomposable HGrStr holds
( b2 = b1 *+^ iff ( the carrier of b2 = b1 * & ( for b3, b4 being Element of b2 holds b3 [*] b4 = b3 ^ b4 ) ) );

definition
let c1 be non empty set ;
func c1 *+^+<0> -> non empty strict well-unital MonoidalExtension of a1 *+^ means :: MONOID_0:def 35
verum;
correctness
existence
ex b1 being non empty strict well-unital MonoidalExtension of c1 *+^ st verum
;
uniqueness
for b1, b2 being non empty strict well-unital MonoidalExtension of c1 *+^ holds b1 = b2
;
by Th22;
func c1 -concatenation -> BinOp of a1 * equals :: MONOID_0:def 36
the mult of (a1 *+^ );
correctness
coherence
the mult of (c1 *+^ ) is BinOp of c1 *
;
proof end;
end;

:: deftheorem Def35 defines *+^+<0> MONOID_0:def 35 :
for b1 being non empty set
for b2 being non empty strict well-unital MonoidalExtension of b1 *+^ holds
( b2 = b1 *+^+<0> iff verum );

:: deftheorem Def36 defines -concatenation MONOID_0:def 36 :
for b1 being non empty set holds b1 -concatenation = the mult of (b1 *+^ );

theorem Th68: :: MONOID_0:68
for b1 being non empty set holds b1 *+^ = HGrStr(# (b1 * ),(b1 -concatenation ) #) by Def34;

theorem Th69: :: MONOID_0:69
for b1 being non empty set holds the_unity_wrt the mult of (b1 *+^ ) = {}
proof end;

theorem Th70: :: MONOID_0:70
for b1 being non empty set holds
( the carrier of (b1 *+^+<0> ) = b1 * & the mult of (b1 *+^+<0> ) = b1 -concatenation & the unity of (b1 *+^+<0> ) = {} )
proof end;

theorem Th71: :: MONOID_0:71
for b1 being non empty set
for b2, b3 being Element of (b1 *+^+<0> ) holds b2 [*] b3 = b2 ^ b3
proof end;

theorem Th72: :: MONOID_0:72
for b1 being non empty set
for b2 being non empty SubStr of b1 *+^
for b3, b4 being Element of b2 holds b3 [*] b4 = b3 ^ b4
proof end;

theorem Th73: :: MONOID_0:73
for b1 being non empty set
for b2 being non empty unital SubStr of b1 *+^ holds the_unity_wrt the mult of b2 = {}
proof end;

theorem Th74: :: MONOID_0:74
for b1 being non empty set
for b2 being non empty SubStr of b1 *+^ st {} is Element of b2 holds
( b2 is unital & the_unity_wrt the mult of b2 = {} )
proof end;

theorem Th75: :: MONOID_0:75
for b1, b2 being non empty set st b1 c= b2 holds
b1 *+^ is SubStr of b2 *+^
proof end;

theorem Th76: :: MONOID_0:76
for b1 being non empty set holds
( b1 -concatenation has_a_unity & the_unity_wrt (b1 -concatenation ) = {} & b1 -concatenation is associative )
proof end;

definition
let c1 be set ;
func GPFuncs c1 -> non empty strict unital associative constituted-Functions HGrStr means :Def37: :: MONOID_0:def 37
( the carrier of a2 = PFuncs a1,a1 & ( for b1, b2 being Element of a2 holds b1 [*] b2 = b1 (*) b2 ) );
existence
ex b1 being non empty strict unital associative constituted-Functions HGrStr st
( the carrier of b1 = PFuncs c1,c1 & ( for b2, b3 being Element of b1 holds b2 [*] b3 = b2 (*) b3 ) )
proof end;
uniqueness
for b1, b2 being non empty strict unital associative constituted-Functions HGrStr st the carrier of b1 = PFuncs c1,c1 & ( for b3, b4 being Element of b1 holds b3 [*] b4 = b3 (*) b4 ) & the carrier of b2 = PFuncs c1,c1 & ( for b3, b4 being Element of b2 holds b3 [*] b4 = b3 (*) b4 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def37 defines GPFuncs MONOID_0:def 37 :
for b1 being set
for b2 being non empty strict unital associative constituted-Functions HGrStr holds
( b2 = GPFuncs b1 iff ( the carrier of b2 = PFuncs b1,b1 & ( for b3, b4 being Element of b2 holds b3 [*] b4 = b3 (*) b4 ) ) );

definition
let c1 be set ;
func MPFuncs c1 -> non empty strict well-unital MonoidalExtension of GPFuncs a1 means :: MONOID_0:def 38
verum;
existence
ex b1 being non empty strict well-unital MonoidalExtension of GPFuncs c1 st verum
;
uniqueness
for b1, b2 being non empty strict well-unital MonoidalExtension of GPFuncs c1 holds b1 = b2
by Th22;
func c1 -composition -> BinOp of PFuncs a1,a1 equals :: MONOID_0:def 39
the mult of (GPFuncs a1);
correctness
coherence
the mult of (GPFuncs c1) is BinOp of PFuncs c1,c1
;
proof end;
end;

:: deftheorem Def38 defines MPFuncs MONOID_0:def 38 :
for b1 being set
for b2 being non empty strict well-unital MonoidalExtension of GPFuncs b1 holds
( b2 = MPFuncs b1 iff verum );

:: deftheorem Def39 defines -composition MONOID_0:def 39 :
for b1 being set holds b1 -composition = the mult of (GPFuncs b1);

theorem Th77: :: MONOID_0:77
for b1, b2 being set holds
( b1 is Element of (GPFuncs b2) iff b1 is PartFunc of b2,b2 )
proof end;

theorem Th78: :: MONOID_0:78
for b1 being set holds the_unity_wrt the mult of (GPFuncs b1) = id b1
proof end;

theorem Th79: :: MONOID_0:79
for b1 being set
for b2 being non empty SubStr of GPFuncs b1
for b3, b4 being Element of b2 holds b3 [*] b4 = b3 (*) b4
proof end;

theorem Th80: :: MONOID_0:80
for b1 being set
for b2 being non empty SubStr of GPFuncs b1 st id b1 is Element of b2 holds
( b2 is unital & the_unity_wrt the mult of b2 = id b1 )
proof end;

theorem Th81: :: MONOID_0:81
for b1, b2 being set st b1 c= b2 holds
GPFuncs b1 is SubStr of GPFuncs b2
proof end;

Lemma69: for b1, b2 being set st b1 in Funcs b2,b2 holds
b1 is Function of b2,b2
proof end;

definition
let c1 be set ;
func GFuncs c1 -> non empty strict unital SubStr of GPFuncs a1 means :Def40: :: MONOID_0:def 40
the carrier of a2 = Funcs a1,a1;
existence
ex b1 being non empty strict unital SubStr of GPFuncs c1 st the carrier of b1 = Funcs c1,c1
proof end;
uniqueness
for b1, b2 being non empty strict unital SubStr of GPFuncs c1 st the carrier of b1 = Funcs c1,c1 & the carrier of b2 = Funcs c1,c1 holds
b1 = b2
by Th28;
end;

:: deftheorem Def40 defines GFuncs MONOID_0:def 40 :
for b1 being set
for b2 being non empty strict unital SubStr of GPFuncs b1 holds
( b2 = GFuncs b1 iff the carrier of b2 = Funcs b1,b1 );

definition
let c1 be set ;
func MFuncs c1 -> strict well-unital MonoidalExtension of GFuncs a1 means :: MONOID_0:def 41
verum;
correctness
existence
ex b1 being strict well-unital MonoidalExtension of GFuncs c1 st verum
;
uniqueness
for b1, b2 being strict well-unital MonoidalExtension of GFuncs c1 holds b1 = b2
;
by Th22;
end;

:: deftheorem Def41 defines MFuncs MONOID_0:def 41 :
for b1 being set
for b2 being strict well-unital MonoidalExtension of GFuncs b1 holds
( b2 = MFuncs b1 iff verum );

theorem Th82: :: MONOID_0:82
for b1, b2 being set holds
( b1 is Element of (GFuncs b2) iff b1 is Function of b2,b2 )
proof end;

theorem Th83: :: MONOID_0:83
for b1 being set holds the mult of (GFuncs b1) = (b1 -composition ) || (Funcs b1,b1)
proof end;

theorem Th84: :: MONOID_0:84
for b1 being set holds the_unity_wrt the mult of (GFuncs b1) = id b1
proof end;

theorem Th85: :: MONOID_0:85
for b1 being set holds
( the carrier of (MFuncs b1) = Funcs b1,b1 & the mult of (MFuncs b1) = (b1 -composition ) || (Funcs b1,b1) & the unity of (MFuncs b1) = id b1 )
proof end;

definition
let c1 be set ;
func GPerms c1 -> non empty strict unital invertible SubStr of GFuncs a1 means :Def42: :: MONOID_0:def 42
for b1 being Element of (GFuncs a1) holds
( b1 in the carrier of a2 iff b1 is Permutation of a1 );
existence
ex b1 being non empty strict unital invertible SubStr of GFuncs c1 st
for b2 being Element of (GFuncs c1) holds
( b2 in the carrier of b1 iff b2 is Permutation of c1 )
proof end;
uniqueness
for b1, b2 being non empty strict unital invertible SubStr of GFuncs c1 st ( for b3 being Element of (GFuncs c1) holds
( b3 in the carrier of b1 iff b3 is Permutation of c1 ) ) & ( for b3 being Element of (GFuncs c1) holds
( b3 in the carrier of b2 iff b3 is Permutation of c1 ) ) holds
b1 = b2
proof end;
end;

:: deftheorem Def42 defines GPerms MONOID_0:def 42 :
for b1 being set
for b2 being non empty strict unital invertible SubStr of GFuncs b1 holds
( b2 = GPerms b1 iff for b3 being Element of (GFuncs b1) holds
( b3 in the carrier of b2 iff b3 is Permutation of b1 ) );

theorem Th86: :: MONOID_0:86
for b1, b2 being set holds
( b1 is Element of (GPerms b2) iff b1 is Permutation of b2 )
proof end;

theorem Th87: :: MONOID_0:87
for b1 being set holds
( the_unity_wrt the mult of (GPerms b1) = id b1 & 1. (GPerms b1) = id b1 )
proof end;

theorem Th88: :: MONOID_0:88
for b1 being set
for b2 being Element of (GPerms b1) holds b2 " = b2 "
proof end;

theorem Th89: :: MONOID_0:89
for b1 being 1-sorted st the carrier of b1 is functional holds
b1 is constituted-Functions
proof end;