Lemma intdomlcan (X : intdom) : ∏ (a b c : X), c != 0 → c * a = c * b → a = b. Proof. intros a b c ne e. apply (@grtopathsxy X a b). change (a - b = 0). assert (e' := grfrompathsxy X e). change (c * a - c * b = 0) in e'. rewrite <- (ringrmultminus X _ _) in e'. rewrite <- (ringldistr X _ _ c) in e'. set (int := intdomax X _ _ e'). generalize ne. assert (int' : isaprop (c != 0 → a - b = 0)). { apply impred. intro. apply (setproperty X _ _). } generalize int. simpl. apply (@hinhuniv _ (make_hProp _ int')). intro ene. induction ene as [ e'' | ne' ]. - induction (ne e''). - intro. apply ne'. Qed.
Require Import UniMath.Algebra.Groups.