.Open Algebras . Conventional algebras .See http://www.csci.csusb.edu/dick/maths/notn_6_Algebra.html ALGEBRA::=Net{ An algebra is a set of objects (called $Set here) plus other documentation (named $DOC here) defining constants, operations and axioms. In Mathematics the lagebra is represented by an `n`-tple which lists the parameters defining the particular algebra. The Integers for example with the operations of addition and subtraction with unit 0 is said to be a group ( Integer, +, 0, -). Conventionally similar names are given to the set of ntples: ($GROUP(Set=>Integers, op=>(+), id=>(0), inv=>(-) ) and to the Set itself: ( Integers in Group ). This network of propositions ($ALGEBRA), formalizes the relationship between the documentation of an algebra, the name of the set of ntples, and the type of the objects that fit the algebra. DOC::name_of_documentation, |- Set in variables(DOC). Name::=$ $DOC, name::={ Set:Type(DOC).Set || DOC }, For X:modification, name(X) ::={ $(DOC(X)).Set || $(DOC(X)) in $ $DOC(X) } }=::ALGEBRA. . Examples of algebras $ALGEBRA($SEMIGROUP, Semigroup, semigroup). $ALGEBRA($MONOID, Monoid, monoid). $ALGEBRA($GROUP, Group, group). $ALGEBRA($SEMILATTICE, Semilattice, semilattice). For more information on the above family of algebras see .See http://www/dick/maths/math_31_One_Associative_Op.html with the formal definitions: SEMIGROUP::=http://www/dick/maths/math_31_One_Associative_Op.html#SEMIGROUP. MONOID::=http://www/dick/maths/math_31_One_Associative_Op.html#MONOID. GROUP::=http://www/dick/maths/math_31_One_Associative_Op.html#GROUP. SEMILATTICE::=http://www/dick/maths/math_31_One_Associative_Op.html#SEMILATTICE. . \Sigma Algebras .Hole . Signatures SIGNATURE::=Net{ Sorts::Sets. Operators::Sets. templates::=%Sorts>templates. For f:Operators, cod(f) ::Sorts=2nd(signature(f)), dom(f) ::Sorts=1st(signature(f)). }. . Example signature .Box \Xi:$ $SIGNATURE::=(Sorts=>{X}, Operators=>{a,b}, signature=>(a+>((X,X),X)|b+>((),X))). .Close.Box . Assignments For \Sigma:$ $SIGNATURE, \Sigma.ASSIGNMENT::=Net{Assigns types to the sorts and operators of \Sigma. A::\Sigma.Sorts->Types. F::\Sigma.Operators->Types. }=::\Sigma.ASSIGNMENT. . Universal Algebras .Hole UNIVERSAL_ALGEBRA::=Net{ \Sigma::$ $SIGNATURE. .See SIGNATURE s::=\Sigma.signature. \Sigma.ASSIGNMENT. .See \Sigma.ASSIGNMENT carriers::@Types=img(A). functions::@Types=img(F). ()|- A in \Sigma.Sorts>--carriers and F in \Sigma.Operators>--functions. |- For all f:\Sigma.Operators, F(f)=(A o \Sigma.dom(f))->A(\Sigma.cod(f)). ()|-For all f:F(\Sigma.Operators), dom(f) in carriers and for some c:%carriers(cod(f)= >\Sigma, A=>a.A, F=>a.F) }. . Example Algebra .See Example signature .Box ()|- \Xi=( Sorts=>{X}, Operators=>{a,b}, signature=> (a+>((X,X),X) |b+>((),X))) in $ $SIGNATURE. (A=>X+>2^Nat, F=>(a+>(*).Nat|b+>1.Nat)) and (A=>X+>Nat0, F=>(a+>(+).Nat0|b+>0.Nat0)) in \Xi.algebra. .Close.Box . Morphisms between Similar algebras For \Sigma:$ $SIGNATURE, a:Arrows, A1,A2:\Sigma.algebra, ((\Sigma.maps)A1 a A2) ::= |[s:\Sigma.Sorts](A1.A(s) a A2.A.(s)) ((\Sigma.algebra)A1 a A2) ::= {h:\Sigma.Sorts->\Sigma.maps(A1 a A2) | for all s:\Sigma.sorts(h(s) in A1.A(s) a A2.A(s)) and for all (d,c):\Sigma.signature(h(c)(F(A1)(d,c))=(F(A2)(d,c)) o (h o d)) }. . Example morphism .Box .See Example Algebra Let h:=map[n:Nat0](2^n) then ()|- h(0)=1 and h(a+b)=h(a)*f(b). So since ()|- \Xi=(Sorts=>{X}, Operators=>{a,b}, signature=>(a+>((X,X),X)|b+>((),X))). ()|- (X+>h) in (\Xi.algebra)(A=>Nat0, F=>(a+>(+).Nat0|b+>0.Nat0))-->(A=>Nat, F=>(a+>(*).Nat|b+>1.Nat)). .Close.Box ()|- For \Sigma, Category(Objects=>\Sigma.algebra, Arrows=>map[A,B]( (\Sigma.algebra)A->B). \Sigma.Initial_algebra::=Initial_object(\Sigma.algebra). . Example initial algebra .Box .See Example morphism ()|- \Xi.initial_algebra---(A=>X+>Lists, F=>(a+>cons|b+>null), cons::=map[x,y](x,y), null::=(). Lists::={(),((),()),((),((),())),...}. Grammar::=${a+>(), a+>(a,a)}. GENESYS(basis=>(), generator=>map[X]{(x,y) || x,y:X}). .Close.Box In general, the GENESYS with generator being the union of all operators of a \Sigma.algebra will be an \Sigma.initial_algebra iff it is a free GENESYS. . Category Theory .See http://www/dick/maths/math_25_Categories.html .Close Algebras