X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Flibrary%2Falgebra%2Fsemigroups.ma;h=18d73b619402ecee81343ec6e9a9420181efa96f;hb=a79bf6edc13daaea8135ca71fdc92e02e229f030;hp=73099286ba7350a1148d6f46afa692c84c9e871c;hpb=35337934554027181913e87de11ff77745a77ebe;p=helm.git diff --git a/helm/software/matita/library/algebra/semigroups.ma b/helm/software/matita/library/algebra/semigroups.ma index 73099286b..18d73b619 100644 --- a/helm/software/matita/library/algebra/semigroups.ma +++ b/helm/software/matita/library/algebra/semigroups.ma @@ -12,53 +12,36 @@ (* *) (**************************************************************************) -set "baseuri" "cic:/matita/algebra/semigroups". - include "higher_order_defs/functions.ma". -(* Magmas *) +(* Semigroups *) -record Magma : Type ≝ +record PreSemiGroup : Type≝ { carrier:> Type; op: carrier → carrier → carrier }. -notation < "M" for @{ 'carrier $M }. -interpretation "carrier coercion" 'carrier S = - (cic:/matita/algebra/semigroups/carrier.con S). - -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). +interpretation "Semigroup operation" 'middot a b = (op ? a b). -(* Semigroups *) - -record isSemiGroup (M:Magma) : Prop ≝ - { op_associative: associative ? (op M) }. +record IsSemiGroup (S:PreSemiGroup) : Prop ≝ + { op_is_associative: associative ? (op S) }. -record SemiGroup : Type ≝ - { magma:> Magma; - semigroup_properties:> isSemiGroup magma +record SemiGroup : Type≝ + { pre_semi_group:> PreSemiGroup; + is_semi_group :> IsSemiGroup pre_semi_group }. - -notation < "S" for @{ 'magma $S }. -interpretation "magma coercion" 'magma S = - (cic:/matita/algebra/semigroups/magma.con S). - + definition is_left_unit ≝ - λS:SemiGroup. λe:S. ∀x:S. e·x = x. - + λS:PreSemiGroup. λe:S. ∀x:S. e·x = x. + definition is_right_unit ≝ - λS:SemiGroup. λe:S. ∀x:S. x·e = x. + λS:PreSemiGroup. λe:S. ∀x:S. x·e = x. theorem is_left_unit_to_is_right_unit_to_eq: - ∀S:SemiGroup. ∀e,e':S. + ∀S:PreSemiGroup. ∀e,e':S. is_left_unit ? e → is_right_unit ? e' → e=e'. intros; rewrite < (H e'); - rewrite < (H1 e) in \vdash (? ? % ?); + rewrite < (H1 e) in \vdash (? ? % ?). reflexivity. qed.