X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2Flibrary%2Falgebra%2Fsemigroups.ma;fp=matita%2Flibrary%2Falgebra%2Fsemigroups.ma;h=539228c8cdef6d600e5741397ce5d3a4020d4275;hb=f61af501fb4608cc4fb062a0864c774e677f0d76;hp=0000000000000000000000000000000000000000;hpb=58ae1809c352e71e7b5530dc41e2bfc834e1aef1;p=helm.git diff --git a/matita/library/algebra/semigroups.ma b/matita/library/algebra/semigroups.ma new file mode 100644 index 000000000..539228c8c --- /dev/null +++ b/matita/library/algebra/semigroups.ma @@ -0,0 +1,56 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/algebra/semigroups". + +include "higher_order_defs/functions.ma". + +(* Magmas *) + +record Magma : Type≝ + { carrier:> Type; + op: carrier → carrier → carrier + }. + +notation "hvbox(a break \middot b)" + left associative with precedence 55 +for @{ 'magma_op $a $b }. + +interpretation "magma operation" 'magma_op a b = + (cic:/matita/algebra/semigroups/op.con _ a b). + +(* Semigroups *) + +record isSemiGroup (M:Magma) : Prop≝ + { op_associative: associative ? (op M) }. + +record SemiGroup : Type≝ + { magma:> Magma; + semigroup_properties:> isSemiGroup magma + }. + +definition is_left_unit ≝ + λS:SemiGroup. λe:S. ∀x:S. e·x = x. + +definition is_right_unit ≝ + λS:SemiGroup. λe:S. ∀x:S. x·e = x. + +theorem is_left_unit_to_is_right_unit_to_eq: + ∀S:SemiGroup. ∀e,e':S. + is_left_unit ? e → is_right_unit ? e' → e=e'. + intros; + rewrite < (H e'); + rewrite < (H1 e) in \vdash (? ? % ?). + reflexivity. +qed.