(* *)
(**************************************************************************)
-set "baseuri" "cic:/matita/algebra/semigroups".
-
include "higher_order_defs/functions.ma".
(* Magmas *)
-record Magma : Type ≝
+record Magma : 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 "magma operation" 'middot a b = (op _ a b).
(* Semigroups *)
-record isSemiGroup (M:Magma) : Prop ≝
+record isSemiGroup (M:Magma) : Prop≝
{ op_associative: associative ? (op M) }.
-record SemiGroup : Type ≝
+record SemiGroup : Type≝
{ magma:> Magma;
semigroup_properties:> isSemiGroup magma
}.
-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.
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.