Commit b99023e7 authored by Robbert Krebbers's avatar Robbert Krebbers
Browse files

Derive monoid_right_id.

parent 7fd895dd
...@@ -23,10 +23,11 @@ Class Monoid {M : ofeT} (o : M → M → M) := { ...@@ -23,10 +23,11 @@ Class Monoid {M : ofeT} (o : M → M → M) := {
monoid_assoc : Assoc () o; monoid_assoc : Assoc () o;
monoid_comm : Comm () o; monoid_comm : Comm () o;
monoid_left_id : LeftId () monoid_unit o; monoid_left_id : LeftId () monoid_unit o;
monoid_right_id : RightId () monoid_unit o;
}. }.
Lemma monoid_proper `{Monoid M o} : Proper (() ==> () ==> ()) o. Lemma monoid_proper `{Monoid M o} : Proper (() ==> () ==> ()) o.
Proof. apply ne_proper_2, monoid_ne. Qed. Proof. apply ne_proper_2, monoid_ne. Qed.
Lemma monoid_right_id `{Monoid M o} : RightId () monoid_unit o.
Proof. intros x. etrans; [apply monoid_comm|apply monoid_left_id]. Qed.
(** The [Homomorphism] classes give rise to generic lemmas about big operators (** The [Homomorphism] classes give rise to generic lemmas about big operators
commuting with each other. *) commuting with each other. *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment