Proof
fun x H y H0 H1
=> let H2
:  x + ({-} x H) = y + ({-} x H)
:= (proj2 (op_neg_def x H) : x + ({-} x H) = 0)
|| x + ({-} x H) = a     @a by proj2 (op_neg_def y H0)
|| x + ({-} x H) = y + a @a by H1 in
let H3
:  x = y
:= op_cancel_r x y ({-} x H)
(ex_intro
(op_is_inv_r ({-} x H))
x
(proj2 (proj1 (op_inv_sym x ({-} x H)) (op_neg_def x H))))
H2 in
H3.

(** Proves that double negation is equivalent to the identity function for all invertible values.  Note: the monoid negation operation requires a proof that the value passed to it is invertible. The form of this theorem explicitly asserts that double negation is equivalent to the identity operation for any proof that the negative has an inverse. *)
Theorem op_cancel_neg_gen
:  forall (x : M) (H : has_inv x) (H0 : has_inv ({-} x H)), {-} ({-} x H) H0 = x.