proposition: Lemma intdomlcan (X : intdom) : ∏ (a b c : X), c != 0 -> paths (c * a) (c * b) -> a = b.
proof: Proof. intros a b c ne e. apply (@grtopathsxy X a b). change (paths (a - b) 0). assert (e' := grfrompathsxy X e). change (paths ((c * a) - (c * b)) 0) in e'. rewrite (pathsinv0 (ringrmultminus X _ _)) in e'. rewrite (pathsinv0 (ringldistr X _ _ c)) in e'. set (int := intdomax X _ _ e'). generalize ne. assert (int' : isaprop (c != 0 -> paths (a - b) 0)). { apply impred. intro. apply (setproperty X _ _). } generalize int. simpl. apply (@hinhuniv _ (make_hProp _ int')). intro ene. destruct ene as [ e'' | ne' ]. - destruct (ne e''). - intro. apply ne'. Defined.
imports: UniMath.Algebra.Groups UniMath.Algebra.RigsAndRings