Lean4
/-- A type endowed with `-` and `*` has distributive negation, if it admits a surjective map that
preserves `-` and `*` from a type which has distributive negation. -/
-- See note [reducible non-instances]
protected abbrev hasDistribNeg [Mul R] [HasDistribNeg R] (neg : ∀ a, f (-a) = -f a)
(mul : ∀ a b, f (a * b) = f a * f b) : HasDistribNeg S :=
{ hf.involutiveNeg _ neg,
‹Mul S› with
neg_mul := hf.forall₂.2 fun x y => by rw [← neg, ← mul, neg_mul, neg, mul]
mul_neg := hf.forall₂.2 fun x y => by rw [← neg, ← mul, mul_neg, neg, mul] }