:: POLYALG1 semantic presentation

definition
let c1 be 1-sorted ;
attr a2 is strict;
struct AlgebraStr of c1 -> doubleLoopStr , VectSpStr of a1;
aggr AlgebraStr(# carrier, add, mult, Zero, unity, lmult #) -> AlgebraStr of a1;
end;

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

definition
let c1 be non empty doubleLoopStr ;
let c2 be non empty AlgebraStr of c1;
attr a2 is mix-associative means :: POLYALG1:def 1
for b1 being Element of a1
for b2, b3 being Element of a2 holds b1 * (b2 * b3) = (b1 * b2) * b3;
end;

:: deftheorem Def1 defines mix-associative POLYALG1:def 1 :
for b1 being non empty doubleLoopStr
for b2 being non empty AlgebraStr of b1 holds
( b2 is mix-associative iff for b3 being Element of b1
for b4, b5 being Element of b2 holds b3 * (b4 * b5) = (b3 * b4) * b5 );

registration
let c1 be non empty doubleLoopStr ;
cluster non empty unital distributive VectSp-like mix-associative AlgebraStr of a1;
existence
ex b1 being non empty AlgebraStr of c1 st
( b1 is unital & b1 is distributive & b1 is VectSp-like & b1 is mix-associative )
proof end;
end;

definition
let c1 be non empty doubleLoopStr ;
mode Algebra of a1 is non empty unital distributive VectSp-like mix-associative AlgebraStr of a1;
end;

theorem Th1: :: POLYALG1:1
for b1, b2 being set
for b3 being Function of [:b1,b2:],b1 holds dom b3 = [:b1,b2:]
proof end;

theorem Th2: :: POLYALG1:2
for b1, b2 being set
for b3 being Function of [:b1,b2:],b2 holds dom b3 = [:b1,b2:]
proof end;

definition
let c1 be non empty doubleLoopStr ;
func Formal-Series c1 -> non empty strict AlgebraStr of a1 means :Def2: :: POLYALG1:def 2
( ( for b1 being set holds
( b1 in the carrier of a2 iff b1 is sequence of a1 ) ) & ( for b1, b2 being Element of a2
for b3, b4 being sequence of a1 st b1 = b3 & b2 = b4 holds
b1 + b2 = b3 + b4 ) & ( for b1, b2 being Element of a2
for b3, b4 being sequence of a1 st b1 = b3 & b2 = b4 holds
b1 * b2 = b3 *' b4 ) & ( for b1 being Element of a1
for b2 being Element of a2
for b3 being sequence of a1 st b2 = b3 holds
b1 * b2 = b1 * b3 ) & 0. a2 = 0_. a1 & 1_ a2 = 1_. a1 );
existence
ex b1 being non empty strict AlgebraStr of c1 st
( ( for b2 being set holds
( b2 in the carrier of b1 iff b2 is sequence of c1 ) ) & ( for b2, b3 being Element of b1
for b4, b5 being sequence of c1 st b2 = b4 & b3 = b5 holds
b2 + b3 = b4 + b5 ) & ( for b2, b3 being Element of b1
for b4, b5 being sequence of c1 st b2 = b4 & b3 = b5 holds
b2 * b3 = b4 *' b5 ) & ( for b2 being Element of c1
for b3 being Element of b1
for b4 being sequence of c1 st b3 = b4 holds
b2 * b3 = b2 * b4 ) & 0. b1 = 0_. c1 & 1_ b1 = 1_. c1 )
proof end;
uniqueness
for b1, b2 being non empty strict AlgebraStr of c1 st ( for b3 being set holds
( b3 in the carrier of b1 iff b3 is sequence of c1 ) ) & ( for b3, b4 being Element of b1
for b5, b6 being sequence of c1 st b3 = b5 & b4 = b6 holds
b3 + b4 = b5 + b6 ) & ( for b3, b4 being Element of b1
for b5, b6 being sequence of c1 st b3 = b5 & b4 = b6 holds
b3 * b4 = b5 *' b6 ) & ( for b3 being Element of c1
for b4 being Element of b1
for b5 being sequence of c1 st b4 = b5 holds
b3 * b4 = b3 * b5 ) & 0. b1 = 0_. c1 & 1_ b1 = 1_. c1 & ( for b3 being set holds
( b3 in the carrier of b2 iff b3 is sequence of c1 ) ) & ( for b3, b4 being Element of b2
for b5, b6 being sequence of c1 st b3 = b5 & b4 = b6 holds
b3 + b4 = b5 + b6 ) & ( for b3, b4 being Element of b2
for b5, b6 being sequence of c1 st b3 = b5 & b4 = b6 holds
b3 * b4 = b5 *' b6 ) & ( for b3 being Element of c1
for b4 being Element of b2
for b5 being sequence of c1 st b4 = b5 holds
b3 * b4 = b3 * b5 ) & 0. b2 = 0_. c1 & 1_ b2 = 1_. c1 holds
b1 = b2
proof end;
end;

:: deftheorem Def2 defines Formal-Series POLYALG1:def 2 :
for b1 being non empty doubleLoopStr
for b2 being non empty strict AlgebraStr of b1 holds
( b2 = Formal-Series b1 iff ( ( for b3 being set holds
( b3 in the carrier of b2 iff b3 is sequence of b1 ) ) & ( for b3, b4 being Element of b2
for b5, b6 being sequence of b1 st b3 = b5 & b4 = b6 holds
b3 + b4 = b5 + b6 ) & ( for b3, b4 being Element of b2
for b5, b6 being sequence of b1 st b3 = b5 & b4 = b6 holds
b3 * b4 = b5 *' b6 ) & ( for b3 being Element of b1
for b4 being Element of b2
for b5 being sequence of b1 st b4 = b5 holds
b3 * b4 = b3 * b5 ) & 0. b2 = 0_. b1 & 1_ b2 = 1_. b1 ) );

registration
let c1 be non empty Abelian doubleLoopStr ;
cluster Formal-Series a1 -> non empty Abelian strict ;
coherence
Formal-Series c1 is Abelian
proof end;
end;

registration
let c1 be non empty add-associative doubleLoopStr ;
cluster Formal-Series a1 -> non empty add-associative strict ;
coherence
Formal-Series c1 is add-associative
proof end;
end;

registration
let c1 be non empty right_zeroed doubleLoopStr ;
cluster Formal-Series a1 -> non empty right_zeroed strict ;
coherence
Formal-Series c1 is right_zeroed
proof end;
end;

registration
let c1 be non empty add-associative right_zeroed right_complementable doubleLoopStr ;
cluster Formal-Series a1 -> non empty add-associative right_zeroed right_complementable strict ;
coherence
Formal-Series c1 is right_complementable
proof end;
end;

registration
let c1 be non empty Abelian add-associative right_zeroed commutative doubleLoopStr ;
cluster Formal-Series a1 -> non empty Abelian add-associative right_zeroed commutative strict ;
coherence
Formal-Series c1 is commutative
proof end;
end;

registration
let c1 be non empty Abelian add-associative right_zeroed right_complementable unital associative distributive doubleLoopStr ;
cluster Formal-Series a1 -> non empty Abelian add-associative right_zeroed right_complementable associative strict ;
coherence
Formal-Series c1 is associative
proof end;
end;

registration
cluster non empty add-associative right_zeroed right_complementable associative right_unital distributive left_unital left_zeroed doubleLoopStr ;
existence
ex b1 being non empty doubleLoopStr st
( b1 is add-associative & b1 is associative & b1 is right_zeroed & b1 is left_zeroed & b1 is right_unital & b1 is left_unital & b1 is right_complementable & b1 is distributive )
proof end;
end;

theorem Th3: :: POLYALG1:3
for b1 being non empty set
for b2 being non empty FinSequence of b1 holds b2 /^ 1 = Del b2,1
proof end;

theorem Th4: :: POLYALG1:4
for b1 being non empty set
for b2 being non empty FinSequence of b1 holds b2 = <*(b2 . 1)*> ^ (Del b2,1)
proof end;

theorem Th5: :: POLYALG1:5
for b1 being non empty add-associative right_zeroed right_complementable left-distributive left_unital doubleLoopStr
for b2 being sequence of b1 holds (1_. b1) *' b2 = b2
proof end;

E7: now
let c1 be non empty add-associative right_zeroed right_complementable unital distributive doubleLoopStr ;
set c2 = Formal-Series c1;
let c3, c4 be Element of (Formal-Series c1);
assume E8: c4 = 1_. c1 ;
reconsider c5 = c3, c6 = c4 as sequence of c1 by Def2;
thus c3 * c4 = c5 *' c6 by Def2
.= c3 by E8, POLYNOM3:36 ;
thus c4 * c3 = c6 *' c5 by Def2
.= c3 by E8, Th5 ;
end;

registration
let c1 be non empty add-associative right_zeroed right_complementable unital distributive doubleLoopStr ;
cluster Formal-Series a1 -> non empty add-associative right_zeroed right_complementable unital strict ;
coherence
Formal-Series c1 is unital
proof end;
end;

E8: now
let c1 be non empty add-associative right_zeroed right_complementable unital distributive doubleLoopStr ;
set c2 = Formal-Series c1;
reconsider c3 = 1_. c1 as Element of (Formal-Series c1) by Def2;
for b1 being Element of (Formal-Series c1) holds
( b1 * c3 = b1 & c3 * b1 = b1 ) by Lemma7;
hence 1. (Formal-Series c1) = 1_. c1 by GROUP_1:def 5;
end;

registration
let c1 be non empty Abelian add-associative right_zeroed right_complementable distributive doubleLoopStr ;
cluster Formal-Series a1 -> non empty Abelian add-associative right_zeroed right_complementable right-distributive strict ;
coherence
Formal-Series c1 is right-distributive
proof end;
cluster Formal-Series a1 -> non empty Abelian add-associative right_zeroed right_complementable left-distributive strict ;
coherence
Formal-Series c1 is left-distributive
proof end;
end;

theorem Th6: :: POLYALG1:6
for b1 being non empty Abelian add-associative right_zeroed right_complementable distributive doubleLoopStr
for b2 being Element of b1
for b3, b4 being sequence of b1 holds b2 * (b3 + b4) = (b2 * b3) + (b2 * b4)
proof end;

theorem Th7: :: POLYALG1:7
for b1 being non empty Abelian add-associative right_zeroed right_complementable distributive doubleLoopStr
for b2, b3 being Element of b1
for b4 being sequence of b1 holds (b2 + b3) * b4 = (b2 * b4) + (b3 * b4)
proof end;

theorem Th8: :: POLYALG1:8
for b1 being non empty associative doubleLoopStr
for b2, b3 being Element of b1
for b4 being sequence of b1 holds (b2 * b3) * b4 = b2 * (b3 * b4)
proof end;

theorem Th9: :: POLYALG1:9
for b1 being non empty associative left_unital doubleLoopStr
for b2 being sequence of b1 holds (1. b1) * b2 = b2
proof end;

registration
let c1 be non empty Abelian add-associative right_zeroed right_complementable associative distributive left_unital doubleLoopStr ;
cluster Formal-Series a1 -> non empty Abelian add-associative right_zeroed right_complementable right-distributive left-distributive VectSp-like strict ;
coherence
Formal-Series c1 is VectSp-like
proof end;
end;

theorem Th10: :: POLYALG1:10
for b1 being non empty Abelian add-associative right_zeroed right_complementable associative distributive left_zeroed doubleLoopStr
for b2 being Element of b1
for b3, b4 being sequence of b1 holds b2 * (b3 *' b4) = (b2 * b3) *' b4
proof end;

registration
let c1 be non empty Abelian add-associative right_zeroed right_complementable associative distributive left_zeroed doubleLoopStr ;
cluster Formal-Series a1 -> non empty Abelian add-associative right_zeroed right_complementable right-distributive left-distributive strict mix-associative ;
coherence
Formal-Series c1 is mix-associative
proof end;
end;

E14: now
let c1 be 1-sorted ;
let c2 be AlgebraStr of c1;
dom the add of c2 = [:the carrier of c2,the carrier of c2:] by Th2;
hence the add of c2 = the add of c2 || the carrier of c2 by RELAT_1:98;
dom the mult of c2 = [:the carrier of c2,the carrier of c2:] by Th2;
hence the mult of c2 = the mult of c2 || the carrier of c2 by RELAT_1:98;
dom the lmult of c2 = [:the carrier of c1,the carrier of c2:] by Th2;
hence the lmult of c2 = the lmult of c2 | [:the carrier of c1,the carrier of c2:] by RELAT_1:98;
end;

definition
let c1 be 1-sorted ;
let c2 be AlgebraStr of c1;
mode Subalgebra of c2 -> AlgebraStr of a1 means :Def3: :: POLYALG1:def 3
( the carrier of a3 c= the carrier of a2 & 1_ a3 = 1_ a2 & 0. a3 = 0. a2 & the add of a3 = the add of a2 || the carrier of a3 & the mult of a3 = the mult of a2 || the carrier of a3 & the lmult of a3 = the lmult of a2 | [:the carrier of a1,the carrier of a3:] );
existence
ex b1 being AlgebraStr of c1 st
( the carrier of b1 c= the carrier of c2 & 1_ b1 = 1_ c2 & 0. b1 = 0. c2 & the add of b1 = the add of c2 || the carrier of b1 & the mult of b1 = the mult of c2 || the carrier of b1 & the lmult of b1 = the lmult of c2 | [:the carrier of c1,the carrier of b1:] )
proof end;
end;

:: deftheorem Def3 defines Subalgebra POLYALG1:def 3 :
for b1 being 1-sorted
for b2, b3 being AlgebraStr of b1 holds
( b3 is Subalgebra of b2 iff ( the carrier of b3 c= the carrier of b2 & 1_ b3 = 1_ b2 & 0. b3 = 0. b2 & the add of b3 = the add of b2 || the carrier of b3 & the mult of b3 = the mult of b2 || the carrier of b3 & the lmult of b3 = the lmult of b2 | [:the carrier of b1,the carrier of b3:] ) );

theorem Th11: :: POLYALG1:11
for b1 being 1-sorted
for b2 being AlgebraStr of b1 holds b2 is Subalgebra of b2
proof end;

theorem Th12: :: POLYALG1:12
for b1 being 1-sorted
for b2, b3, b4 being AlgebraStr of b1 st b2 is Subalgebra of b3 & b3 is Subalgebra of b4 holds
b2 is Subalgebra of b4
proof end;

theorem Th13: :: POLYALG1:13
for b1 being 1-sorted
for b2, b3 being AlgebraStr of b1 st b2 is Subalgebra of b3 & b3 is Subalgebra of b2 holds
AlgebraStr(# the carrier of b2,the add of b2,the mult of b2,the Zero of b2,the unity of b2,the lmult of b2 #) = AlgebraStr(# the carrier of b3,the add of b3,the mult of b3,the Zero of b3,the unity of b3,the lmult of b3 #)
proof end;

theorem Th14: :: POLYALG1:14
for b1 being 1-sorted
for b2, b3 being AlgebraStr of b1 st AlgebraStr(# the carrier of b2,the add of b2,the mult of b2,the Zero of b2,the unity of b2,the lmult of b2 #) = AlgebraStr(# the carrier of b3,the add of b3,the mult of b3,the Zero of b3,the unity of b3,the lmult of b3 #) holds
( b2 is Subalgebra of b3 & b3 is Subalgebra of b2 )
proof end;

registration
let c1 be non empty 1-sorted ;
cluster non empty strict AlgebraStr of a1;
existence
ex b1 being AlgebraStr of c1 st
( not b1 is empty & b1 is strict )
proof end;
end;

registration
let c1 be 1-sorted ;
let c2 be AlgebraStr of c1;
cluster strict Subalgebra of a2;
existence
ex b1 being Subalgebra of c2 st b1 is strict
proof end;
end;

registration
let c1 be non empty 1-sorted ;
let c2 be non empty AlgebraStr of c1;
cluster non empty strict Subalgebra of a2;
existence
ex b1 being Subalgebra of c2 st
( b1 is strict & not b1 is empty )
proof end;
end;

definition
let c1 be non empty HGrStr ;
let c2 be non empty AlgebraStr of c1;
let c3 be Subset of c2;
attr a3 is opers_closed means :Def4: :: POLYALG1:def 4
( a3 is lineary-closed & ( for b1, b2 being Element of a2 st b1 in a3 & b2 in a3 holds
b1 * b2 in a3 ) & 1_ a2 in a3 & 0. a2 in a3 );
end;

:: deftheorem Def4 defines opers_closed POLYALG1:def 4 :
for b1 being non empty HGrStr
for b2 being non empty AlgebraStr of b1
for b3 being Subset of b2 holds
( b3 is opers_closed iff ( b3 is lineary-closed & ( for b4, b5 being Element of b2 st b4 in b3 & b5 in b3 holds
b4 * b5 in b3 ) & 1_ b2 in b3 & 0. b2 in b3 ) );

theorem Th15: :: POLYALG1:15
for b1 being non empty HGrStr
for b2 being non empty AlgebraStr of b1
for b3 being non empty Subalgebra of b2
for b4, b5 being Element of b2
for b6, b7 being Element of b3 st b4 = b6 & b5 = b7 holds
b4 + b5 = b6 + b7
proof end;

theorem Th16: :: POLYALG1:16
for b1 being non empty HGrStr
for b2 being non empty AlgebraStr of b1
for b3 being non empty Subalgebra of b2
for b4, b5 being Element of b2
for b6, b7 being Element of b3 st b4 = b6 & b5 = b7 holds
b4 * b5 = b6 * b7
proof end;

theorem Th17: :: POLYALG1:17
for b1 being non empty HGrStr
for b2 being non empty AlgebraStr of b1
for b3 being non empty Subalgebra of b2
for b4 being Element of b1
for b5 being Element of b2
for b6 being Element of b3 st b5 = b6 holds
b4 * b5 = b4 * b6
proof end;

theorem Th18: :: POLYALG1:18
canceled;

theorem Th19: :: POLYALG1:19
for b1 being non empty HGrStr
for b2 being non empty AlgebraStr of b1
for b3 being non empty Subalgebra of b2 ex b4 being Subset of b2 st
( the carrier of b3 = b4 & b4 is opers_closed )
proof end;

theorem Th20: :: POLYALG1:20
for b1 being non empty HGrStr
for b2 being non empty AlgebraStr of b1
for b3 being Subset of b2 st b3 is opers_closed holds
ex b4 being strict Subalgebra of b2 st the carrier of b4 = b3
proof end;

theorem Th21: :: POLYALG1:21
for b1 being non empty HGrStr
for b2 being non empty AlgebraStr of b1
for b3 being non empty Subset of b2
for b4 being Subset-Family of b2 st ( for b5 being set holds
( b5 in b4 iff ( b5 c= the carrier of b2 & ex b6 being Subalgebra of b2 st
( b5 = the carrier of b6 & b3 c= b5 ) ) ) ) holds
meet b4 is opers_closed
proof end;

definition
let c1 be non empty HGrStr ;
let c2 be non empty AlgebraStr of c1;
let c3 be non empty Subset of c2;
func GenAlg c3 -> non empty strict Subalgebra of a2 means :Def5: :: POLYALG1:def 5
( a3 c= the carrier of a4 & ( for b1 being Subalgebra of a2 st a3 c= the carrier of b1 holds
the carrier of a4 c= the carrier of b1 ) );
existence
ex b1 being non empty strict Subalgebra of c2 st
( c3 c= the carrier of b1 & ( for b2 being Subalgebra of c2 st c3 c= the carrier of b2 holds
the carrier of b1 c= the carrier of b2 ) )
proof end;
uniqueness
for b1, b2 being non empty strict Subalgebra of c2 st c3 c= the carrier of b1 & ( for b3 being Subalgebra of c2 st c3 c= the carrier of b3 holds
the carrier of b1 c= the carrier of b3 ) & c3 c= the carrier of b2 & ( for b3 being Subalgebra of c2 st c3 c= the carrier of b3 holds
the carrier of b2 c= the carrier of b3 ) holds
b1 = b2
proof end;
end;

:: deftheorem Def5 defines GenAlg POLYALG1:def 5 :
for b1 being non empty HGrStr
for b2 being non empty AlgebraStr of b1
for b3 being non empty Subset of b2
for b4 being non empty strict Subalgebra of b2 holds
( b4 = GenAlg b3 iff ( b3 c= the carrier of b4 & ( for b5 being Subalgebra of b2 st b3 c= the carrier of b5 holds
the carrier of b4 c= the carrier of b5 ) ) );

theorem Th22: :: POLYALG1:22
for b1 being non empty HGrStr
for b2 being non empty AlgebraStr of b1
for b3 being non empty Subset of b2 st b3 is opers_closed holds
the carrier of (GenAlg b3) = b3
proof end;

definition
let c1 be non empty add-associative right_zeroed right_complementable distributive doubleLoopStr ;
func Polynom-Algebra c1 -> non empty strict AlgebraStr of a1 means :Def6: :: POLYALG1:def 6
ex b1 being non empty Subset of (Formal-Series a1) st
( b1 = the carrier of (Polynom-Ring a1) & a2 = GenAlg b1 );
existence
ex b1 being non empty strict AlgebraStr of c1ex b2 being non empty Subset of (Formal-Series c1) st
( b2 = the carrier of (Polynom-Ring c1) & b1 = GenAlg b2 )
proof end;
uniqueness
for b1, b2 being non empty strict AlgebraStr of c1 st ex b3 being non empty Subset of (Formal-Series c1) st
( b3 = the carrier of (Polynom-Ring c1) & b1 = GenAlg b3 ) & ex b3 being non empty Subset of (Formal-Series c1) st
( b3 = the carrier of (Polynom-Ring c1) & b2 = GenAlg b3 ) holds
b1 = b2
;
end;

:: deftheorem Def6 defines Polynom-Algebra POLYALG1:def 6 :
for b1 being non empty add-associative right_zeroed right_complementable distributive doubleLoopStr
for b2 being non empty strict AlgebraStr of b1 holds
( b2 = Polynom-Algebra b1 iff ex b3 being non empty Subset of (Formal-Series b1) st
( b3 = the carrier of (Polynom-Ring b1) & b2 = GenAlg b3 ) );

registration
let c1 be non empty add-associative right_zeroed right_complementable distributive doubleLoopStr ;
cluster Polynom-Ring a1 -> Loop-like ;
coherence
Polynom-Ring c1 is Loop-like
proof end;
end;

theorem Th23: :: POLYALG1:23
for b1 being non empty add-associative right_zeroed right_complementable distributive doubleLoopStr
for b2 being non empty Subset of (Formal-Series b1) st b2 = the carrier of (Polynom-Ring b1) holds
b2 is opers_closed
proof end;

theorem Th24: :: POLYALG1:24
for b1 being non empty add-associative right_zeroed right_complementable distributive doubleLoopStr holds doubleLoopStr(# the carrier of (Polynom-Algebra b1),the add of (Polynom-Algebra b1),the mult of (Polynom-Algebra b1),the unity of (Polynom-Algebra b1),the Zero of (Polynom-Algebra b1) #) = Polynom-Ring b1
proof end;

theorem Th25: :: POLYALG1:25
for b1 being non empty add-associative right_zeroed right_complementable unital distributive doubleLoopStr holds 1. (Formal-Series b1) = 1_. b1 by Lemma8;