]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/library/algebra/semigroups.ma
An embryonic kernel of the algebraic library.
[helm.git] / helm / matita / library / algebra / semigroups.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 set "baseuri" "cic:/matita/algebra/semigroups".
16
17 include "higher_order_defs/functions.ma".
18
19 definition isSemiGroup ≝
20  λC:Type. λop: C → C → C.associative C op.
21
22 record SemiGroup : Type ≝
23  { carrier: Type;
24    op: carrier → carrier → carrier;
25    properties: isSemiGroup carrier op
26  }.
27  
28 coercion cic:/matita/algebra/semigroups/carrier.con.
29
30 definition is_left_unit ≝
31  λS:SemiGroup. λe:S. ∀x:S. op S e x = x.
32  
33 definition is_right_unit ≝
34  λS:SemiGroup. λe:S. ∀x:S. op S x e = x.
35
36 theorem is_left_unit_to_is_right_unit_to_eq:
37  ∀S:SemiGroup. ∀e1,e2:S.
38   is_left_unit ? e1 → is_right_unit ? e2 → e1=e2.
39  intros;
40  rewrite < (H e2);
41  rewrite < (H1 e1) in \vdash (? ? % ?);
42  reflexivity.
43 qed.