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 include "higher_order_defs/functions.ma".
19 record PreSemiGroup : Type≝
21 op: carrier → carrier → carrier
24 interpretation "Semigroup operation" 'middot a b = (op ? a b).
26 record IsSemiGroup (S:PreSemiGroup) : Prop ≝
27 { op_is_associative: associative ? (op S) }.
29 record SemiGroup : Type≝
30 { pre_semi_group:> PreSemiGroup;
31 is_semi_group :> IsSemiGroup pre_semi_group
34 definition is_left_unit ≝
35 λS:PreSemiGroup. λe:S. ∀x:S. e·x = x.
37 definition is_right_unit ≝
38 λS:PreSemiGroup. λe:S. ∀x:S. x·e = x.
40 theorem is_left_unit_to_is_right_unit_to_eq:
41 ∀S:PreSemiGroup. ∀e,e':S.
42 is_left_unit ? e → is_right_unit ? e' → e=e'.
45 rewrite < (H1 e) in \vdash (? ? % ?).