1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 set "baseuri" "cic:/matita/algebra/semigroups".
17 include "higher_order_defs/functions.ma".
23 op: carrier → carrier → carrier
26 notation < "M" for @{ 'carrier $M }.
27 interpretation "carrier coercion" 'carrier S =
28 (cic:/matita/algebra/semigroups/carrier.con S).
30 notation "hvbox(a break \middot b)"
31 left associative with precedence 55
32 for @{ 'magma_op $a $b }.
34 interpretation "magma operation" 'magma_op a b =
35 (cic:/matita/algebra/semigroups/op.con _ a b).
39 record isSemiGroup (M:Magma) : Prop ≝
40 { associative: associative ? (op M) }.
42 record SemiGroup : Type ≝
44 semigroup_properties:> isSemiGroup magma
47 notation < "S" for @{ 'magma $S }.
48 interpretation "magma coercion" 'magma S =
49 (cic:/matita/algebra/semigroups/magma.con S).
51 definition is_left_unit ≝
52 λS:SemiGroup. λe:S. ∀x:S. e·x = x.
54 definition is_right_unit ≝
55 λS:SemiGroup. λe:S. ∀x:S. x·e = x.
57 theorem is_left_unit_to_is_right_unit_to_eq:
58 ∀S:SemiGroup. ∀e,e':S.
59 is_left_unit ? e → is_right_unit ? e' → e=e'.
62 rewrite < (H1 e) in \vdash (? ? % ?);