record Monoid : Type ≝
{ semigroup: SemiGroup;
e: semigroup;
- properties: isMonoid ? e
+ monoid_properties: isMonoid ? e
}.
coercion cic:/matita/algebra/monoids/semigroup.con.
-notation "hvbox(! \sub S)"
+(* too ugly
+notation "hvbox(1 \sub S)" with precedence 89
for @{ 'munit $S }.
interpretation "Monoid unit" 'munit S =
- (cic:/matita/algebra/monoids/e.con S).
-
+ (cic:/matita/algebra/monoids/e.con S). *)
+
+notation "1" with precedence 89
+for @{ 'munit }.
+
+interpretation "Monoid unit" 'munit =
+ (cic:/matita/algebra/monoids/e.con _).
+
notation < "M"
for @{ 'semigroup $M }.
definition is_left_inverse ≝
λM:Monoid.
λopp: M → M.
- ∀x:M. op M (opp x) x = ! \sub M.
-
+ ∀x:M. op M (opp x) x = 1.
+
definition is_right_inverse ≝
λM:Monoid.
λopp: M → M.
- ∀x:M. op M x (opp x) = ! \sub M.
+ ∀x:M. op M x (opp x) = 1.
theorem is_left_inverse_to_is_right_inverse_to_eq:
- ∀M:Monoid. ∀oppL,oppR.
- is_left_inverse M oppL → is_right_inverse M oppR →
- ∀x:M. oppL x = oppR x.
+ ∀M:Monoid. ∀l,r.
+ is_left_inverse M l → is_right_inverse M r →
+ ∀x:M. l x = r x.
intros;
generalize in match (H x); intro;
- generalize in match (eq_f ? ? (λy. op M y (oppR x)) ? ? H2);
+ generalize in match (eq_f ? ? (λy. op M y (r x)) ? ? H2);
simplify; fold simplify (op M);
intro; clear H2;
- generalize in match (properties (semigroup M));
+ generalize in match (semigroup_properties M);
fold simplify (Type_of_Monoid M);
intro;
unfold isSemiGroup in H2; unfold associative in H2;
rewrite > H2 in H3; clear H2;
rewrite > H1 in H3;
- rewrite > (e_is_left_unit ? ? (properties M)) in H3;
- rewrite > (e_is_right_unit ? ? (properties M)) in H3;
+ rewrite > (e_is_left_unit ? ? (monoid_properties M)) in H3;
+ rewrite > (e_is_right_unit ? ? (monoid_properties M)) in H3;
assumption.
qed.
-