algebra.ring.inj_surjMathlib.Algebra.Ring.InjSurj

This file has been ported!

Changes since the initial port

The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2014 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Yury Kudryashov, Neil Strickland
 -/
-import Mathbin.Algebra.Ring.Defs
-import Mathbin.Algebra.Opposites
-import Mathbin.Algebra.GroupWithZero.InjSurj
+import Algebra.Ring.Defs
+import Algebra.Opposites
+import Algebra.GroupWithZero.InjSurj
 
 #align_import algebra.ring.inj_surj from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
 
Diff
@@ -248,8 +248,8 @@ protected def Function.Injective.hasDistribNeg [Neg β] [Mul β] (f : β → α)
     (neg : ∀ a, f (-a) = -f a) (mul : ∀ a b, f (a * b) = f a * f b) : HasDistribNeg β :=
   { hf.InvolutiveNeg _ neg,
     ‹Mul β› with
-    neg_mul := fun x y => hf <| by erw [neg, mul, neg, neg_mul, mul]
-    mul_neg := fun x y => hf <| by erw [neg, mul, neg, mul_neg, mul] }
+    neg_hMul := fun x y => hf <| by erw [neg, mul, neg, neg_mul, mul]
+    hMul_neg := fun x y => hf <| by erw [neg, mul, neg, mul_neg, mul] }
 #align function.injective.has_distrib_neg Function.Injective.hasDistribNeg
 -/
 
@@ -263,8 +263,8 @@ protected def Function.Surjective.hasDistribNeg [Neg β] [Mul β] (f : α → β
   { hf.InvolutiveNeg _ neg,
     ‹Mul
         β› with
-    neg_mul := hf.Forall₂.2 fun x y => by erw [← neg, ← mul, neg_mul, neg, mul]; rfl
-    mul_neg := hf.Forall₂.2 fun x y => by erw [← neg, ← mul, mul_neg, neg, mul]; rfl }
+    neg_hMul := hf.Forall₂.2 fun x y => by erw [← neg, ← mul, neg_mul, neg, mul]; rfl
+    hMul_neg := hf.Forall₂.2 fun x y => by erw [← neg, ← mul, mul_neg, neg, mul]; rfl }
 #align function.surjective.has_distrib_neg Function.Surjective.hasDistribNeg
 -/
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2014 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Yury Kudryashov, Neil Strickland
-
-! This file was ported from Lean 3 source module algebra.ring.inj_surj
-! leanprover-community/mathlib commit 448144f7ae193a8990cb7473c9e9a01990f64ac7
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.Ring.Defs
 import Mathbin.Algebra.Opposites
 import Mathbin.Algebra.GroupWithZero.InjSurj
 
+#align_import algebra.ring.inj_surj from "leanprover-community/mathlib"@"448144f7ae193a8990cb7473c9e9a01990f64ac7"
+
 /-!
 # Pulling back rings along injective maps, and pushing them forward along surjective maps.
 
Diff
@@ -31,6 +31,7 @@ open Function
 -/
 
 
+#print Function.Injective.distrib /-
 /-- Pullback a `distrib` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -42,7 +43,9 @@ protected def Function.Injective.distrib {S} [Mul R] [Add R] [Distrib S] (f : R
   left_distrib x y z := hf <| by simp only [*, left_distrib]
   right_distrib x y z := hf <| by simp only [*, right_distrib]
 #align function.injective.distrib Function.Injective.distrib
+-/
 
+#print Function.Surjective.distrib /-
 /-- Pushforward a `distrib` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -54,6 +57,7 @@ protected def Function.Surjective.distrib {S} [Distrib R] [Add S] [Mul S] (f : R
   left_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, left_distrib]
   right_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, right_distrib]
 #align function.surjective.distrib Function.Surjective.distrib
+-/
 
 section InjectiveSurjectiveMaps
 
@@ -64,6 +68,7 @@ section InjectiveSurjectiveMaps
 
 variable [Zero β] [Add β] [Mul β] [SMul ℕ β]
 
+#print Function.Injective.nonUnitalNonAssocSemiring /-
 /-- Pullback a `non_unital_non_assoc_semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -73,7 +78,9 @@ protected def Function.Injective.nonUnitalNonAssocSemiring {α : Type u}
     (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β :=
   { hf.MulZeroClass f zero mul, hf.AddCommMonoid f zero add nsmul, hf.Distrib f add mul with }
 #align function.injective.non_unital_non_assoc_semiring Function.Injective.nonUnitalNonAssocSemiring
+-/
 
+#print Function.Injective.nonUnitalSemiring /-
 /-- Pullback a `non_unital_semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -83,7 +90,9 @@ protected def Function.Injective.nonUnitalSemiring {α : Type u} [NonUnitalSemir
     NonUnitalSemiring β :=
   { hf.NonUnitalNonAssocSemiring f zero add mul nsmul, hf.SemigroupWithZero f zero mul with }
 #align function.injective.non_unital_semiring Function.Injective.nonUnitalSemiring
+-/
 
+#print Function.Injective.nonAssocSemiring /-
 /-- Pullback a `non_assoc_semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -95,7 +104,9 @@ protected def Function.Injective.nonAssocSemiring {α : Type u} [NonAssocSemirin
   { hf.AddMonoidWithOne f zero one add nsmul nat_cast,
     hf.NonUnitalNonAssocSemiring f zero add mul nsmul, hf.MulOneClass f one mul with }
 #align function.injective.non_assoc_semiring Function.Injective.nonAssocSemiring
+-/
 
+#print Function.Injective.semiring /-
 /-- Pullback a `semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -107,7 +118,9 @@ protected def Function.Injective.semiring {α : Type u} [Semiring α] {β : Type
   { hf.NonAssocSemiring f zero one add mul nsmul nat_cast, hf.MonoidWithZero f zero one mul npow,
     hf.Distrib f add mul with }
 #align function.injective.semiring Function.Injective.semiring
+-/
 
+#print Function.Surjective.nonUnitalNonAssocSemiring /-
 /-- Pushforward a `non_unital_non_assoc_semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -117,7 +130,9 @@ protected def Function.Surjective.nonUnitalNonAssocSemiring {α : Type u}
     (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β :=
   { hf.MulZeroClass f zero mul, hf.AddCommMonoid f zero add nsmul, hf.Distrib f add mul with }
 #align function.surjective.non_unital_non_assoc_semiring Function.Surjective.nonUnitalNonAssocSemiring
+-/
 
+#print Function.Surjective.nonUnitalSemiring /-
 /-- Pushforward a `non_unital_semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -127,7 +142,9 @@ protected def Function.Surjective.nonUnitalSemiring {α : Type u} [NonUnitalSemi
     NonUnitalSemiring β :=
   { hf.NonUnitalNonAssocSemiring f zero add mul nsmul, hf.SemigroupWithZero f zero mul with }
 #align function.surjective.non_unital_semiring Function.Surjective.nonUnitalSemiring
+-/
 
+#print Function.Surjective.nonAssocSemiring /-
 /-- Pushforward a `non_assoc_semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -139,7 +156,9 @@ protected def Function.Surjective.nonAssocSemiring {α : Type u} [NonAssocSemiri
   { hf.AddMonoidWithOne f zero one add nsmul nat_cast,
     hf.NonUnitalNonAssocSemiring f zero add mul nsmul, hf.MulOneClass f one mul with }
 #align function.surjective.non_assoc_semiring Function.Surjective.nonAssocSemiring
+-/
 
+#print Function.Surjective.semiring /-
 /-- Pushforward a `semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -151,6 +170,7 @@ protected def Function.Surjective.semiring {α : Type u} [Semiring α] {β : Typ
   { hf.NonAssocSemiring f zero one add mul nsmul nat_cast, hf.MonoidWithZero f zero one mul npow,
     hf.AddCommMonoid f zero add nsmul, hf.Distrib f add mul with }
 #align function.surjective.semiring Function.Surjective.semiring
+-/
 
 end InjectiveSurjectiveMaps
 
@@ -158,6 +178,7 @@ section NonUnitalCommSemiring
 
 variable [NonUnitalCommSemiring α] [NonUnitalCommSemiring β] {a b c : α}
 
+#print Function.Injective.nonUnitalCommSemiring /-
 /-- Pullback a `non_unital_semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -167,7 +188,9 @@ protected def Function.Injective.nonUnitalCommSemiring [Zero γ] [Add γ] [Mul 
     NonUnitalCommSemiring γ :=
   { hf.NonUnitalSemiring f zero add mul nsmul, hf.CommSemigroup f mul with }
 #align function.injective.non_unital_comm_semiring Function.Injective.nonUnitalCommSemiring
+-/
 
+#print Function.Surjective.nonUnitalCommSemiring /-
 /-- Pushforward a `non_unital_semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -177,6 +200,7 @@ protected def Function.Surjective.nonUnitalCommSemiring [Zero γ] [Add γ] [Mul
     NonUnitalCommSemiring γ :=
   { hf.NonUnitalSemiring f zero add mul nsmul, hf.CommSemigroup f mul with }
 #align function.surjective.non_unital_comm_semiring Function.Surjective.nonUnitalCommSemiring
+-/
 
 end NonUnitalCommSemiring
 
@@ -184,6 +208,7 @@ section CommSemiring
 
 variable [CommSemiring α] [CommSemiring β] {a b c : α}
 
+#print Function.Injective.commSemiring /-
 /-- Pullback a `semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -194,7 +219,9 @@ protected def Function.Injective.commSemiring [Zero γ] [One γ] [Add γ] [Mul 
     (nat_cast : ∀ n : ℕ, f n = n) : CommSemiring γ :=
   { hf.Semiring f zero one add mul nsmul npow nat_cast, hf.CommSemigroup f mul with }
 #align function.injective.comm_semiring Function.Injective.commSemiring
+-/
 
+#print Function.Surjective.commSemiring /-
 /-- Pushforward a `semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -205,6 +232,7 @@ protected def Function.Surjective.commSemiring [Zero γ] [One γ] [Add γ] [Mul
     (nat_cast : ∀ n : ℕ, f n = n) : CommSemiring γ :=
   { hf.Semiring f zero one add mul nsmul npow nat_cast, hf.CommSemigroup f mul with }
 #align function.surjective.comm_semiring Function.Surjective.commSemiring
+-/
 
 end CommSemiring
 
@@ -214,6 +242,7 @@ section Mul
 
 variable [Mul α] [HasDistribNeg α]
 
+#print Function.Injective.hasDistribNeg /-
 -- See note [reducible non-instances]
 /-- A type endowed with `-` and `*` has distributive negation, if it admits an injective map that
 preserves `-` and `*` to a type which has distributive negation. -/
@@ -225,7 +254,9 @@ protected def Function.Injective.hasDistribNeg [Neg β] [Mul β] (f : β → α)
     neg_mul := fun x y => hf <| by erw [neg, mul, neg, neg_mul, mul]
     mul_neg := fun x y => hf <| by erw [neg, mul, neg, mul_neg, mul] }
 #align function.injective.has_distrib_neg Function.Injective.hasDistribNeg
+-/
 
+#print Function.Surjective.hasDistribNeg /-
 -- See note [reducible non-instances]
 /-- A type endowed with `-` and `*` has distributive negation, if it admits a surjective map that
 preserves `-` and `*` from a type which has distributive negation. -/
@@ -238,6 +269,7 @@ protected def Function.Surjective.hasDistribNeg [Neg β] [Mul β] (f : α → β
     neg_mul := hf.Forall₂.2 fun x y => by erw [← neg, ← mul, neg_mul, neg, mul]; rfl
     mul_neg := hf.Forall₂.2 fun x y => by erw [← neg, ← mul, mul_neg, neg, mul]; rfl }
 #align function.surjective.has_distrib_neg Function.Surjective.hasDistribNeg
+-/
 
 namespace AddOpposite
 
@@ -259,6 +291,7 @@ section NonUnitalNonAssocRing
 
 variable [NonUnitalNonAssocRing α]
 
+#print Function.Injective.nonUnitalNonAssocRing /-
 /-- Pullback a `non_unital_non_assoc_ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -271,7 +304,9 @@ protected def Function.Injective.nonUnitalNonAssocRing [Zero β] [Add β] [Mul 
   { hf.AddCommGroup f zero add neg sub nsmul zsmul, hf.MulZeroClass f zero mul,
     hf.Distrib f add mul with }
 #align function.injective.non_unital_non_assoc_ring Function.Injective.nonUnitalNonAssocRing
+-/
 
+#print Function.Surjective.nonUnitalNonAssocRing /-
 /-- Pushforward a `non_unital_non_assoc_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -284,6 +319,7 @@ protected def Function.Surjective.nonUnitalNonAssocRing [Zero β] [Add β] [Mul
   { hf.AddCommGroup f zero add neg sub nsmul zsmul, hf.MulZeroClass f zero mul,
     hf.Distrib f add mul with }
 #align function.surjective.non_unital_non_assoc_ring Function.Surjective.nonUnitalNonAssocRing
+-/
 
 end NonUnitalNonAssocRing
 
@@ -291,6 +327,7 @@ section NonUnitalRing
 
 variable [NonUnitalRing α]
 
+#print Function.Injective.nonUnitalRing /-
 /-- Pullback a `non_unital_ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -302,7 +339,9 @@ protected def Function.Injective.nonUnitalRing [Zero β] [Add β] [Mul β] [Neg
   { hf.AddCommGroup f zero add neg sub nsmul gsmul, hf.MulZeroClass f zero mul,
     hf.Distrib f add mul, hf.Semigroup f mul with }
 #align function.injective.non_unital_ring Function.Injective.nonUnitalRing
+-/
 
+#print Function.Surjective.nonUnitalRing /-
 /-- Pushforward a `non_unital_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -314,6 +353,7 @@ protected def Function.Surjective.nonUnitalRing [Zero β] [Add β] [Mul β] [Neg
   { hf.AddCommGroup f zero add neg sub nsmul gsmul, hf.MulZeroClass f zero mul,
     hf.Distrib f add mul, hf.Semigroup f mul with }
 #align function.surjective.non_unital_ring Function.Surjective.nonUnitalRing
+-/
 
 end NonUnitalRing
 
@@ -321,6 +361,7 @@ section NonAssocRing
 
 variable [NonAssocRing α]
 
+#print Function.Injective.nonAssocRing /-
 /-- Pullback a `non_assoc_ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -334,7 +375,9 @@ protected def Function.Injective.nonAssocRing [Zero β] [One β] [Add β] [Mul 
     hf.AddGroupWithOne f zero one add neg sub nsmul gsmul nat_cast int_cast,
     hf.MulZeroClass f zero mul, hf.Distrib f add mul, hf.MulOneClass f one mul with }
 #align function.injective.non_assoc_ring Function.Injective.nonAssocRing
+-/
 
+#print Function.Surjective.nonAssocRing /-
 /-- Pushforward a `non_unital_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -348,6 +391,7 @@ protected def Function.Surjective.nonAssocRing [Zero β] [One β] [Add β] [Mul
     hf.AddGroupWithOne f zero one add neg sub nsmul gsmul nat_cast int_cast, hf.Distrib f add mul,
     hf.MulOneClass f one mul with }
 #align function.surjective.non_assoc_ring Function.Surjective.nonAssocRing
+-/
 
 end NonAssocRing
 
@@ -355,6 +399,7 @@ section Ring
 
 variable [Ring α] {a b c d e : α}
 
+#print Function.Injective.ring /-
 /-- Pullback a `ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -369,7 +414,9 @@ protected def Function.Injective.ring [Zero β] [One β] [Add β] [Mul β] [Neg
     hf.AddCommGroup f zero add neg sub nsmul zsmul, hf.Monoid f one mul npow,
     hf.Distrib f add mul with }
 #align function.injective.ring Function.Injective.ring
+-/
 
+#print Function.Surjective.ring /-
 /-- Pushforward a `ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -384,6 +431,7 @@ protected def Function.Surjective.ring [Zero β] [One β] [Add β] [Mul β] [Neg
     hf.AddCommGroup f zero add neg sub nsmul zsmul, hf.Monoid f one mul npow,
     hf.Distrib f add mul with }
 #align function.surjective.ring Function.Surjective.ring
+-/
 
 end Ring
 
@@ -391,6 +439,7 @@ section NonUnitalCommRing
 
 variable [NonUnitalCommRing α] {a b c : α}
 
+#print Function.Injective.nonUnitalCommRing /-
 /-- Pullback a `comm_ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -402,7 +451,9 @@ protected def Function.Injective.nonUnitalCommRing [Zero β] [Add β] [Mul β] [
     NonUnitalCommRing β :=
   { hf.NonUnitalRing f zero add mul neg sub nsmul zsmul, hf.CommSemigroup f mul with }
 #align function.injective.non_unital_comm_ring Function.Injective.nonUnitalCommRing
+-/
 
+#print Function.Surjective.nonUnitalCommRing /-
 /-- Pushforward a `non_unital_comm_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -414,6 +465,7 @@ protected def Function.Surjective.nonUnitalCommRing [Zero β] [Add β] [Mul β]
     NonUnitalCommRing β :=
   { hf.NonUnitalRing f zero add mul neg sub nsmul zsmul, hf.CommSemigroup f mul with }
 #align function.surjective.non_unital_comm_ring Function.Surjective.nonUnitalCommRing
+-/
 
 end NonUnitalCommRing
 
@@ -421,6 +473,7 @@ section CommRing
 
 variable [CommRing α] {a b c : α}
 
+#print Function.Injective.commRing /-
 /-- Pullback a `comm_ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -434,7 +487,9 @@ protected def Function.Injective.commRing [Zero β] [One β] [Add β] [Mul β] [
   { hf.Ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast,
     hf.CommSemigroup f mul with }
 #align function.injective.comm_ring Function.Injective.commRing
+-/
 
+#print Function.Surjective.commRing /-
 /-- Pushforward a `comm_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -448,6 +503,7 @@ protected def Function.Surjective.commRing [Zero β] [One β] [Add β] [Mul β]
   { hf.Ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast,
     hf.CommSemigroup f mul with }
 #align function.surjective.comm_ring Function.Surjective.commRing
+-/
 
 end CommRing
 
Diff
@@ -31,12 +31,6 @@ open Function
 -/
 
 
-/- warning: function.injective.distrib -> Function.Injective.distrib is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : Mul.{u1} R] [_inst_2 : Add.{u1} R] [_inst_3 : Distrib.{u2} S] (f : R -> S), (Function.Injective.{succ u1, succ u2} R S f) -> (forall (x : R) (y : R), Eq.{succ u2} S (f (HAdd.hAdd.{u1, u1, u1} R R R (instHAdd.{u1} R _inst_2) x y)) (HAdd.hAdd.{u2, u2, u2} S S S (instHAdd.{u2} S (Distrib.toHasAdd.{u2} S _inst_3)) (f x) (f y))) -> (forall (x : R) (y : R), Eq.{succ u2} S (f (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R _inst_1) x y)) (HMul.hMul.{u2, u2, u2} S S S (instHMul.{u2} S (Distrib.toHasMul.{u2} S _inst_3)) (f x) (f y))) -> (Distrib.{u1} R)
-but is expected to have type
-  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : Mul.{u1} R] [_inst_2 : Add.{u1} R] [_inst_3 : Distrib.{u2} S] (f : R -> S), (Function.Injective.{succ u1, succ u2} R S f) -> (forall (x : R) (y : R), Eq.{succ u2} S (f (HAdd.hAdd.{u1, u1, u1} R R R (instHAdd.{u1} R _inst_2) x y)) (HAdd.hAdd.{u2, u2, u2} S S S (instHAdd.{u2} S (Distrib.toAdd.{u2} S _inst_3)) (f x) (f y))) -> (forall (x : R) (y : R), Eq.{succ u2} S (f (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R _inst_1) x y)) (HMul.hMul.{u2, u2, u2} S S S (instHMul.{u2} S (Distrib.toMul.{u2} S _inst_3)) (f x) (f y))) -> (Distrib.{u1} R)
-Case conversion may be inaccurate. Consider using '#align function.injective.distrib Function.Injective.distribₓ'. -/
 /-- Pullback a `distrib` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -49,12 +43,6 @@ protected def Function.Injective.distrib {S} [Mul R] [Add R] [Distrib S] (f : R
   right_distrib x y z := hf <| by simp only [*, right_distrib]
 #align function.injective.distrib Function.Injective.distrib
 
-/- warning: function.surjective.distrib -> Function.Surjective.distrib is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : Distrib.{u1} R] [_inst_2 : Add.{u2} S] [_inst_3 : Mul.{u2} S] (f : R -> S), (Function.Surjective.{succ u1, succ u2} R S f) -> (forall (x : R) (y : R), Eq.{succ u2} S (f (HAdd.hAdd.{u1, u1, u1} R R R (instHAdd.{u1} R (Distrib.toHasAdd.{u1} R _inst_1)) x y)) (HAdd.hAdd.{u2, u2, u2} S S S (instHAdd.{u2} S _inst_2) (f x) (f y))) -> (forall (x : R) (y : R), Eq.{succ u2} S (f (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Distrib.toHasMul.{u1} R _inst_1)) x y)) (HMul.hMul.{u2, u2, u2} S S S (instHMul.{u2} S _inst_3) (f x) (f y))) -> (Distrib.{u2} S)
-but is expected to have type
-  forall {R : Type.{u1}} {S : Type.{u2}} [_inst_1 : Distrib.{u1} R] [_inst_2 : Add.{u2} S] [_inst_3 : Mul.{u2} S] (f : R -> S), (Function.Surjective.{succ u1, succ u2} R S f) -> (forall (x : R) (y : R), Eq.{succ u2} S (f (HAdd.hAdd.{u1, u1, u1} R R R (instHAdd.{u1} R (Distrib.toAdd.{u1} R _inst_1)) x y)) (HAdd.hAdd.{u2, u2, u2} S S S (instHAdd.{u2} S _inst_2) (f x) (f y))) -> (forall (x : R) (y : R), Eq.{succ u2} S (f (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Distrib.toMul.{u1} R _inst_1)) x y)) (HMul.hMul.{u2, u2, u2} S S S (instHMul.{u2} S _inst_3) (f x) (f y))) -> (Distrib.{u2} S)
-Case conversion may be inaccurate. Consider using '#align function.surjective.distrib Function.Surjective.distribₓ'. -/
 /-- Pushforward a `distrib` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -76,12 +64,6 @@ section InjectiveSurjectiveMaps
 
 variable [Zero β] [Add β] [Mul β] [SMul ℕ β]
 
-/- warning: function.injective.non_unital_non_assoc_semiring -> Function.Injective.nonUnitalNonAssocSemiring is a dubious translation:
-lean 3 declaration is
-  forall {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Add.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : SMul.{0, u2} Nat β] {α : Type.{u1}} [_inst_5 : NonUnitalNonAssocSemiring.{u1} α] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_1)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α _inst_5)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_2) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α _inst_5))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α _inst_5))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_4 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α _inst_5))) n (f x))) -> (NonUnitalNonAssocSemiring.{u2} β)
-but is expected to have type
-  forall {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Add.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : SMul.{0, u2} Nat β] {α : Type.{u1}} [_inst_5 : NonUnitalNonAssocSemiring.{u1} α] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_1))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroClass.toZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α _inst_5))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_2) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α _inst_5))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α _inst_5)) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_4) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α _inst_5)))) n (f x))) -> (NonUnitalNonAssocSemiring.{u2} β)
-Case conversion may be inaccurate. Consider using '#align function.injective.non_unital_non_assoc_semiring Function.Injective.nonUnitalNonAssocSemiringₓ'. -/
 /-- Pullback a `non_unital_non_assoc_semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -92,12 +74,6 @@ protected def Function.Injective.nonUnitalNonAssocSemiring {α : Type u}
   { hf.MulZeroClass f zero mul, hf.AddCommMonoid f zero add nsmul, hf.Distrib f add mul with }
 #align function.injective.non_unital_non_assoc_semiring Function.Injective.nonUnitalNonAssocSemiring
 
-/- warning: function.injective.non_unital_semiring -> Function.Injective.nonUnitalSemiring is a dubious translation:
-lean 3 declaration is
-  forall {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Add.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : SMul.{0, u2} Nat β] {α : Type.{u1}} [_inst_5 : NonUnitalSemiring.{u1} α] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_1)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_2) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_4 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) n (f x))) -> (NonUnitalSemiring.{u2} β)
-but is expected to have type
-  forall {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Add.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : SMul.{0, u2} Nat β] {α : Type.{u1}} [_inst_5 : NonUnitalSemiring.{u1} α] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_1))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α _inst_5))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_2) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_4) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5))))) n (f x))) -> (NonUnitalSemiring.{u2} β)
-Case conversion may be inaccurate. Consider using '#align function.injective.non_unital_semiring Function.Injective.nonUnitalSemiringₓ'. -/
 /-- Pullback a `non_unital_semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -108,12 +84,6 @@ protected def Function.Injective.nonUnitalSemiring {α : Type u} [NonUnitalSemir
   { hf.NonUnitalNonAssocSemiring f zero add mul nsmul, hf.SemigroupWithZero f zero mul with }
 #align function.injective.non_unital_semiring Function.Injective.nonUnitalSemiring
 
-/- warning: function.injective.non_assoc_semiring -> Function.Injective.nonAssocSemiring is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_5 : NonAssocSemiring.{u1} α] {β : Type.{u2}} [_inst_6 : Zero.{u2} β] [_inst_7 : One.{u2} β] [_inst_8 : Mul.{u2} β] [_inst_9 : Add.{u2} β] [_inst_10 : SMul.{0, u2} Nat β] [_inst_11 : NatCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_6)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_7)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α _inst_5))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_9) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_8) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_10 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α _inst_5)))) n (f x))) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α _inst_5)))))) n)) -> (NonAssocSemiring.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_5 : NonAssocSemiring.{u1} α] {β : Type.{u2}} [_inst_6 : Zero.{u2} β] [_inst_7 : One.{u2} β] [_inst_8 : Mul.{u2} β] [_inst_9 : Add.{u2} β] [_inst_10 : SMul.{0, u2} Nat β] [_inst_11 : NatCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_6))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroOneClass.toZero.{u1} α (NonAssocSemiring.toMulZeroOneClass.{u1} α _inst_5))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_7))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocSemiring.toOne.{u1} α _inst_5)))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_9) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_8) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_10) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α _inst_5))))) n (f x))) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_11 n)) (Nat.cast.{u1} α (NonAssocSemiring.toNatCast.{u1} α _inst_5) n)) -> (NonAssocSemiring.{u2} β)
-Case conversion may be inaccurate. Consider using '#align function.injective.non_assoc_semiring Function.Injective.nonAssocSemiringₓ'. -/
 /-- Pullback a `non_assoc_semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -126,9 +96,6 @@ protected def Function.Injective.nonAssocSemiring {α : Type u} [NonAssocSemirin
     hf.NonUnitalNonAssocSemiring f zero add mul nsmul, hf.MulOneClass f one mul with }
 #align function.injective.non_assoc_semiring Function.Injective.nonAssocSemiring
 
-/- warning: function.injective.semiring -> Function.Injective.semiring is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.injective.semiring Function.Injective.semiringₓ'. -/
 /-- Pullback a `semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -141,12 +108,6 @@ protected def Function.Injective.semiring {α : Type u} [Semiring α] {β : Type
     hf.Distrib f add mul with }
 #align function.injective.semiring Function.Injective.semiring
 
-/- warning: function.surjective.non_unital_non_assoc_semiring -> Function.Surjective.nonUnitalNonAssocSemiring is a dubious translation:
-lean 3 declaration is
-  forall {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Add.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : SMul.{0, u2} Nat β] {α : Type.{u1}} [_inst_5 : NonUnitalNonAssocSemiring.{u1} α] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α _inst_5)))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_1)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α _inst_5))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_2) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α _inst_5))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α _inst_5))) n x)) (SMul.smul.{0, u2} Nat β _inst_4 n (f x))) -> (NonUnitalNonAssocSemiring.{u2} β)
-but is expected to have type
-  forall {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Add.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : SMul.{0, u2} Nat β] {α : Type.{u1}} [_inst_5 : NonUnitalNonAssocSemiring.{u1} α] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroClass.toZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α _inst_5))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_1))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α _inst_5))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_2) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α _inst_5)) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α _inst_5)))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_4) n (f x))) -> (NonUnitalNonAssocSemiring.{u2} β)
-Case conversion may be inaccurate. Consider using '#align function.surjective.non_unital_non_assoc_semiring Function.Surjective.nonUnitalNonAssocSemiringₓ'. -/
 /-- Pushforward a `non_unital_non_assoc_semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -157,12 +118,6 @@ protected def Function.Surjective.nonUnitalNonAssocSemiring {α : Type u}
   { hf.MulZeroClass f zero mul, hf.AddCommMonoid f zero add nsmul, hf.Distrib f add mul with }
 #align function.surjective.non_unital_non_assoc_semiring Function.Surjective.nonUnitalNonAssocSemiring
 
-/- warning: function.surjective.non_unital_semiring -> Function.Surjective.nonUnitalSemiring is a dubious translation:
-lean 3 declaration is
-  forall {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Add.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : SMul.{0, u2} Nat β] {α : Type.{u1}} [_inst_5 : NonUnitalSemiring.{u1} α] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_1)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_2) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) n x)) (SMul.smul.{0, u2} Nat β _inst_4 n (f x))) -> (NonUnitalSemiring.{u2} β)
-but is expected to have type
-  forall {β : Type.{u2}} [_inst_1 : Zero.{u2} β] [_inst_2 : Add.{u2} β] [_inst_3 : Mul.{u2} β] [_inst_4 : SMul.{0, u2} Nat β] {α : Type.{u1}} [_inst_5 : NonUnitalSemiring.{u1} α] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α _inst_5))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_1))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_2) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_4) n (f x))) -> (NonUnitalSemiring.{u2} β)
-Case conversion may be inaccurate. Consider using '#align function.surjective.non_unital_semiring Function.Surjective.nonUnitalSemiringₓ'. -/
 /-- Pushforward a `non_unital_semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -173,12 +128,6 @@ protected def Function.Surjective.nonUnitalSemiring {α : Type u} [NonUnitalSemi
   { hf.NonUnitalNonAssocSemiring f zero add mul nsmul, hf.SemigroupWithZero f zero mul with }
 #align function.surjective.non_unital_semiring Function.Surjective.nonUnitalSemiring
 
-/- warning: function.surjective.non_assoc_semiring -> Function.Surjective.nonAssocSemiring is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_5 : NonAssocSemiring.{u1} α] {β : Type.{u2}} [_inst_6 : Zero.{u2} β] [_inst_7 : One.{u2} β] [_inst_8 : Add.{u2} β] [_inst_9 : Mul.{u2} β] [_inst_10 : SMul.{0, u2} Nat β] [_inst_11 : NatCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_6)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α _inst_5))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_7)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_8) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_9) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α _inst_5)))) n x)) (SMul.smul.{0, u2} Nat β _inst_10 n (f x))) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α _inst_5)))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) -> (NonAssocSemiring.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_5 : NonAssocSemiring.{u1} α] {β : Type.{u2}} [_inst_6 : Zero.{u2} β] [_inst_7 : One.{u2} β] [_inst_8 : Add.{u2} β] [_inst_9 : Mul.{u2} β] [_inst_10 : SMul.{0, u2} Nat β] [_inst_11 : NatCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroOneClass.toZero.{u1} α (NonAssocSemiring.toMulZeroOneClass.{u1} α _inst_5))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_6))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocSemiring.toOne.{u1} α _inst_5)))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_7))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5)))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_8) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α _inst_5))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_9) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α _inst_5))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_10) n (f x))) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (NonAssocSemiring.toNatCast.{u1} α _inst_5) n)) (Nat.cast.{u2} β _inst_11 n)) -> (NonAssocSemiring.{u2} β)
-Case conversion may be inaccurate. Consider using '#align function.surjective.non_assoc_semiring Function.Surjective.nonAssocSemiringₓ'. -/
 /-- Pushforward a `non_assoc_semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -191,9 +140,6 @@ protected def Function.Surjective.nonAssocSemiring {α : Type u} [NonAssocSemiri
     hf.NonUnitalNonAssocSemiring f zero add mul nsmul, hf.MulOneClass f one mul with }
 #align function.surjective.non_assoc_semiring Function.Surjective.nonAssocSemiring
 
-/- warning: function.surjective.semiring -> Function.Surjective.semiring is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.surjective.semiring Function.Surjective.semiringₓ'. -/
 /-- Pushforward a `semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -212,12 +158,6 @@ section NonUnitalCommSemiring
 
 variable [NonUnitalCommSemiring α] [NonUnitalCommSemiring β] {a b c : α}
 
-/- warning: function.injective.non_unital_comm_semiring -> Function.Injective.nonUnitalCommSemiring is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {γ : Type.{u2}} [_inst_1 : NonUnitalCommSemiring.{u1} α] [_inst_3 : Zero.{u2} γ] [_inst_4 : Add.{u2} γ] [_inst_5 : Mul.{u2} γ] [_inst_6 : SMul.{0, u2} Nat γ] (f : γ -> α), (Function.Injective.{succ u2, succ u1} γ α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} γ 0 (OfNat.mk.{u2} γ 0 (Zero.zero.{u2} γ _inst_3)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1)))))))) -> (forall (x : γ) (y : γ), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} γ γ γ (instHAdd.{u2} γ _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : γ) (y : γ), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} γ γ γ (instHMul.{u2} γ _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : γ) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat γ _inst_6 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1))))) n (f x))) -> (NonUnitalCommSemiring.{u2} γ)
-but is expected to have type
-  forall {α : Type.{u1}} {γ : Type.{u2}} [_inst_1 : NonUnitalCommSemiring.{u1} α] [_inst_3 : Zero.{u2} γ] [_inst_4 : Add.{u2} γ] [_inst_5 : Mul.{u2} γ] [_inst_6 : SMul.{0, u2} Nat γ] (f : γ -> α), (Function.Injective.{succ u2, succ u1} γ α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} γ 0 (Zero.toOfNat0.{u2} γ _inst_3))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1)))))) -> (forall (x : γ) (y : γ), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} γ γ γ (instHAdd.{u2} γ _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : γ) (y : γ), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} γ γ γ (instHMul.{u2} γ _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : γ) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat γ γ (instHSMul.{0, u2} Nat γ _inst_6) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1)))))) n (f x))) -> (NonUnitalCommSemiring.{u2} γ)
-Case conversion may be inaccurate. Consider using '#align function.injective.non_unital_comm_semiring Function.Injective.nonUnitalCommSemiringₓ'. -/
 /-- Pullback a `non_unital_semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -228,12 +168,6 @@ protected def Function.Injective.nonUnitalCommSemiring [Zero γ] [Add γ] [Mul 
   { hf.NonUnitalSemiring f zero add mul nsmul, hf.CommSemigroup f mul with }
 #align function.injective.non_unital_comm_semiring Function.Injective.nonUnitalCommSemiring
 
-/- warning: function.surjective.non_unital_comm_semiring -> Function.Surjective.nonUnitalCommSemiring is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {γ : Type.{u2}} [_inst_1 : NonUnitalCommSemiring.{u1} α] [_inst_3 : Zero.{u2} γ] [_inst_4 : Add.{u2} γ] [_inst_5 : Mul.{u2} γ] [_inst_6 : SMul.{0, u2} Nat γ] (f : α -> γ), (Function.Surjective.{succ u1, succ u2} α γ f) -> (Eq.{succ u2} γ (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} γ 0 (OfNat.mk.{u2} γ 0 (Zero.zero.{u2} γ _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} γ (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} γ γ γ (instHAdd.{u2} γ _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} γ (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} γ γ γ (instHMul.{u2} γ _inst_5) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} γ (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Nat γ _inst_6 n (f x))) -> (NonUnitalCommSemiring.{u2} γ)
-but is expected to have type
-  forall {α : Type.{u1}} {γ : Type.{u2}} [_inst_1 : NonUnitalCommSemiring.{u1} α] [_inst_3 : Zero.{u2} γ] [_inst_4 : Add.{u2} γ] [_inst_5 : Mul.{u2} γ] [_inst_6 : SMul.{0, u2} Nat γ] (f : α -> γ), (Function.Surjective.{succ u1, succ u2} α γ f) -> (Eq.{succ u2} γ (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} γ 0 (Zero.toOfNat0.{u2} γ _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} γ (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} γ γ γ (instHAdd.{u2} γ _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} γ (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} γ γ γ (instHMul.{u2} γ _inst_5) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} γ (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddCommMonoid.toAddMonoid.{u1} α (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} α (NonUnitalSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat γ γ (instHSMul.{0, u2} Nat γ _inst_6) n (f x))) -> (NonUnitalCommSemiring.{u2} γ)
-Case conversion may be inaccurate. Consider using '#align function.surjective.non_unital_comm_semiring Function.Surjective.nonUnitalCommSemiringₓ'. -/
 /-- Pushforward a `non_unital_semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -250,9 +184,6 @@ section CommSemiring
 
 variable [CommSemiring α] [CommSemiring β] {a b c : α}
 
-/- warning: function.injective.comm_semiring -> Function.Injective.commSemiring is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.injective.comm_semiring Function.Injective.commSemiringₓ'. -/
 /-- Pullback a `semiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -264,9 +195,6 @@ protected def Function.Injective.commSemiring [Zero γ] [One γ] [Add γ] [Mul 
   { hf.Semiring f zero one add mul nsmul npow nat_cast, hf.CommSemigroup f mul with }
 #align function.injective.comm_semiring Function.Injective.commSemiring
 
-/- warning: function.surjective.comm_semiring -> Function.Surjective.commSemiring is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.surjective.comm_semiring Function.Surjective.commSemiringₓ'. -/
 /-- Pushforward a `semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -286,12 +214,6 @@ section Mul
 
 variable [Mul α] [HasDistribNeg α]
 
-/- warning: function.injective.has_distrib_neg -> Function.Injective.hasDistribNeg is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Mul.{u1} α] [_inst_2 : HasDistribNeg.{u1} α _inst_1] [_inst_3 : Neg.{u2} β] [_inst_4 : Mul.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (forall (a : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_3 a)) (Neg.neg.{u1} α (InvolutiveNeg.toHasNeg.{u1} α (HasDistribNeg.toHasInvolutiveNeg.{u1} α _inst_1 _inst_2)) (f a))) -> (forall (a : β) (b : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) a b)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1) (f a) (f b))) -> (HasDistribNeg.{u2} β _inst_4)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Mul.{u1} α] [_inst_2 : HasDistribNeg.{u1} α _inst_1] [_inst_3 : Neg.{u2} β] [_inst_4 : Mul.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (forall (a : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_3 a)) (Neg.neg.{u1} α (InvolutiveNeg.toNeg.{u1} α (HasDistribNeg.toInvolutiveNeg.{u1} α _inst_1 _inst_2)) (f a))) -> (forall (a : β) (b : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) a b)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1) (f a) (f b))) -> (HasDistribNeg.{u2} β _inst_4)
-Case conversion may be inaccurate. Consider using '#align function.injective.has_distrib_neg Function.Injective.hasDistribNegₓ'. -/
 -- See note [reducible non-instances]
 /-- A type endowed with `-` and `*` has distributive negation, if it admits an injective map that
 preserves `-` and `*` to a type which has distributive negation. -/
@@ -304,12 +226,6 @@ protected def Function.Injective.hasDistribNeg [Neg β] [Mul β] (f : β → α)
     mul_neg := fun x y => hf <| by erw [neg, mul, neg, mul_neg, mul] }
 #align function.injective.has_distrib_neg Function.Injective.hasDistribNeg
 
-/- warning: function.surjective.has_distrib_neg -> Function.Surjective.hasDistribNeg is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Mul.{u1} α] [_inst_2 : HasDistribNeg.{u1} α _inst_1] [_inst_3 : Neg.{u2} β] [_inst_4 : Mul.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (forall (a : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (InvolutiveNeg.toHasNeg.{u1} α (HasDistribNeg.toHasInvolutiveNeg.{u1} α _inst_1 _inst_2)) a)) (Neg.neg.{u2} β _inst_3 (f a))) -> (forall (a : α) (b : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1) a b)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f a) (f b))) -> (HasDistribNeg.{u2} β _inst_4)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Mul.{u1} α] [_inst_2 : HasDistribNeg.{u1} α _inst_1] [_inst_3 : Neg.{u2} β] [_inst_4 : Mul.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (forall (a : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (InvolutiveNeg.toNeg.{u1} α (HasDistribNeg.toInvolutiveNeg.{u1} α _inst_1 _inst_2)) a)) (Neg.neg.{u2} β _inst_3 (f a))) -> (forall (a : α) (b : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α _inst_1) a b)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f a) (f b))) -> (HasDistribNeg.{u2} β _inst_4)
-Case conversion may be inaccurate. Consider using '#align function.surjective.has_distrib_neg Function.Surjective.hasDistribNegₓ'. -/
 -- See note [reducible non-instances]
 /-- A type endowed with `-` and `*` has distributive negation, if it admits a surjective map that
 preserves `-` and `*` from a type which has distributive negation. -/
@@ -343,9 +259,6 @@ section NonUnitalNonAssocRing
 
 variable [NonUnitalNonAssocRing α]
 
-/- warning: function.injective.non_unital_non_assoc_ring -> Function.Injective.nonUnitalNonAssocRing is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.injective.non_unital_non_assoc_ring Function.Injective.nonUnitalNonAssocRingₓ'. -/
 /-- Pullback a `non_unital_non_assoc_ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -359,9 +272,6 @@ protected def Function.Injective.nonUnitalNonAssocRing [Zero β] [Add β] [Mul 
     hf.Distrib f add mul with }
 #align function.injective.non_unital_non_assoc_ring Function.Injective.nonUnitalNonAssocRing
 
-/- warning: function.surjective.non_unital_non_assoc_ring -> Function.Surjective.nonUnitalNonAssocRing is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.surjective.non_unital_non_assoc_ring Function.Surjective.nonUnitalNonAssocRingₓ'. -/
 /-- Pushforward a `non_unital_non_assoc_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -381,9 +291,6 @@ section NonUnitalRing
 
 variable [NonUnitalRing α]
 
-/- warning: function.injective.non_unital_ring -> Function.Injective.nonUnitalRing is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.injective.non_unital_ring Function.Injective.nonUnitalRingₓ'. -/
 /-- Pullback a `non_unital_ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -396,9 +303,6 @@ protected def Function.Injective.nonUnitalRing [Zero β] [Add β] [Mul β] [Neg
     hf.Distrib f add mul, hf.Semigroup f mul with }
 #align function.injective.non_unital_ring Function.Injective.nonUnitalRing
 
-/- warning: function.surjective.non_unital_ring -> Function.Surjective.nonUnitalRing is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.surjective.non_unital_ring Function.Surjective.nonUnitalRingₓ'. -/
 /-- Pushforward a `non_unital_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -417,9 +321,6 @@ section NonAssocRing
 
 variable [NonAssocRing α]
 
-/- warning: function.injective.non_assoc_ring -> Function.Injective.nonAssocRing is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.injective.non_assoc_ring Function.Injective.nonAssocRingₓ'. -/
 /-- Pullback a `non_assoc_ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -434,9 +335,6 @@ protected def Function.Injective.nonAssocRing [Zero β] [One β] [Add β] [Mul 
     hf.MulZeroClass f zero mul, hf.Distrib f add mul, hf.MulOneClass f one mul with }
 #align function.injective.non_assoc_ring Function.Injective.nonAssocRing
 
-/- warning: function.surjective.non_assoc_ring -> Function.Surjective.nonAssocRing is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.surjective.non_assoc_ring Function.Surjective.nonAssocRingₓ'. -/
 /-- Pushforward a `non_unital_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -457,9 +355,6 @@ section Ring
 
 variable [Ring α] {a b c d e : α}
 
-/- warning: function.injective.ring -> Function.Injective.ring is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.injective.ring Function.Injective.ringₓ'. -/
 /-- Pullback a `ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -475,9 +370,6 @@ protected def Function.Injective.ring [Zero β] [One β] [Add β] [Mul β] [Neg
     hf.Distrib f add mul with }
 #align function.injective.ring Function.Injective.ring
 
-/- warning: function.surjective.ring -> Function.Surjective.ring is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.surjective.ring Function.Surjective.ringₓ'. -/
 /-- Pushforward a `ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -499,9 +391,6 @@ section NonUnitalCommRing
 
 variable [NonUnitalCommRing α] {a b c : α}
 
-/- warning: function.injective.non_unital_comm_ring -> Function.Injective.nonUnitalCommRing is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.injective.non_unital_comm_ring Function.Injective.nonUnitalCommRingₓ'. -/
 /-- Pullback a `comm_ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -514,9 +403,6 @@ protected def Function.Injective.nonUnitalCommRing [Zero β] [Add β] [Mul β] [
   { hf.NonUnitalRing f zero add mul neg sub nsmul zsmul, hf.CommSemigroup f mul with }
 #align function.injective.non_unital_comm_ring Function.Injective.nonUnitalCommRing
 
-/- warning: function.surjective.non_unital_comm_ring -> Function.Surjective.nonUnitalCommRing is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.surjective.non_unital_comm_ring Function.Surjective.nonUnitalCommRingₓ'. -/
 /-- Pushforward a `non_unital_comm_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -535,9 +421,6 @@ section CommRing
 
 variable [CommRing α] {a b c : α}
 
-/- warning: function.injective.comm_ring -> Function.Injective.commRing is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.injective.comm_ring Function.Injective.commRingₓ'. -/
 /-- Pullback a `comm_ring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
@@ -552,9 +435,6 @@ protected def Function.Injective.commRing [Zero β] [One β] [Add β] [Mul β] [
     hf.CommSemigroup f mul with }
 #align function.injective.comm_ring Function.Injective.commRing
 
-/- warning: function.surjective.comm_ring -> Function.Surjective.commRing is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align function.surjective.comm_ring Function.Surjective.commRingₓ'. -/
 /-- Pushforward a `comm_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
Diff
@@ -319,14 +319,8 @@ protected def Function.Surjective.hasDistribNeg [Neg β] [Mul β] (f : α → β
   { hf.InvolutiveNeg _ neg,
     ‹Mul
         β› with
-    neg_mul :=
-      hf.Forall₂.2 fun x y => by
-        erw [← neg, ← mul, neg_mul, neg, mul]
-        rfl
-    mul_neg :=
-      hf.Forall₂.2 fun x y => by
-        erw [← neg, ← mul, mul_neg, neg, mul]
-        rfl }
+    neg_mul := hf.Forall₂.2 fun x y => by erw [← neg, ← mul, neg_mul, neg, mul]; rfl
+    mul_neg := hf.Forall₂.2 fun x y => by erw [← neg, ← mul, mul_neg, neg, mul]; rfl }
 #align function.surjective.has_distrib_neg Function.Surjective.hasDistribNeg
 
 namespace AddOpposite
Diff
@@ -127,10 +127,7 @@ protected def Function.Injective.nonAssocSemiring {α : Type u} [NonAssocSemirin
 #align function.injective.non_assoc_semiring Function.Injective.nonAssocSemiring
 
 /- warning: function.injective.semiring -> Function.Injective.semiring is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_5 : Semiring.{u1} α] {β : Type.{u2}} [_inst_6 : Zero.{u2} β] [_inst_7 : One.{u2} β] [_inst_8 : Add.{u2} β] [_inst_9 : Mul.{u2} β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : SMul.{0, u2} Nat β] [_inst_12 : NatCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_6)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5)))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_7)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5)))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_8) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_9) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_11 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α _inst_5)))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_12))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5))))))) n)) -> (Semiring.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_5 : Semiring.{u1} α] {β : Type.{u2}} [_inst_6 : Zero.{u2} β] [_inst_7 : One.{u2} β] [_inst_8 : Add.{u2} β] [_inst_9 : Mul.{u2} β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : SMul.{0, u2} Nat β] [_inst_12 : NatCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_6))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α _inst_5))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_7))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α _inst_5)))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_8) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_9) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5)))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_11) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5)))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α _inst_5)))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_12 n)) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α _inst_5) n)) -> (Semiring.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.injective.semiring Function.Injective.semiringₓ'. -/
 /-- Pullback a `semiring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -195,10 +192,7 @@ protected def Function.Surjective.nonAssocSemiring {α : Type u} [NonAssocSemiri
 #align function.surjective.non_assoc_semiring Function.Surjective.nonAssocSemiring
 
 /- warning: function.surjective.semiring -> Function.Surjective.semiring is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_5 : Semiring.{u1} α] {β : Type.{u2}} [_inst_6 : Zero.{u2} β] [_inst_7 : One.{u2} β] [_inst_8 : Add.{u2} β] [_inst_9 : Mul.{u2} β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : SMul.{0, u2} Nat β] [_inst_12 : NatCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5)))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_6)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5)))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_7)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_8) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_9) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5))))) n x)) (SMul.smul.{0, u2} Nat β _inst_11 n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α _inst_5)))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_12))) n)) -> (Semiring.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_5 : Semiring.{u1} α] {β : Type.{u2}} [_inst_6 : Zero.{u2} β] [_inst_7 : One.{u2} β] [_inst_8 : Add.{u2} β] [_inst_9 : Mul.{u2} β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : SMul.{0, u2} Nat β] [_inst_12 : NatCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α _inst_5))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_6))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α _inst_5)))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_7))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_8) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_9) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α _inst_5)))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_11) n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α _inst_5)))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α _inst_5) n)) (Nat.cast.{u2} β _inst_12 n)) -> (Semiring.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.surjective.semiring Function.Surjective.semiringₓ'. -/
 /-- Pushforward a `semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
@@ -257,10 +251,7 @@ section CommSemiring
 variable [CommSemiring α] [CommSemiring β] {a b c : α}
 
 /- warning: function.injective.comm_semiring -> Function.Injective.commSemiring is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {γ : Type.{u2}} [_inst_1 : CommSemiring.{u1} α] [_inst_3 : Zero.{u2} γ] [_inst_4 : One.{u2} γ] [_inst_5 : Add.{u2} γ] [_inst_6 : Mul.{u2} γ] [_inst_7 : SMul.{0, u2} Nat γ] [_inst_8 : NatCast.{u2} γ] [_inst_9 : Pow.{u2, 0} γ Nat] (f : γ -> α), (Function.Injective.{succ u2, succ u1} γ α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} γ 0 (OfNat.mk.{u2} γ 0 (Zero.zero.{u2} γ _inst_3)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} γ 1 (OfNat.mk.{u2} γ 1 (One.one.{u2} γ _inst_4)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))))))) -> (forall (x : γ) (y : γ), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} γ γ γ (instHAdd.{u2} γ _inst_5) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : γ) (y : γ), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} γ γ γ (instHMul.{u2} γ _inst_6) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : γ) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat γ _inst_7 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)))))) n (f x))) -> (forall (x : γ) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} γ Nat γ (instHPow.{u2, 0} γ Nat _inst_9) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat γ (HasLiftT.mk.{1, succ u2} Nat γ (CoeTCₓ.coe.{1, succ u2} Nat γ (Nat.castCoe.{u2} γ _inst_8))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)))))))) n)) -> (CommSemiring.{u2} γ)
-but is expected to have type
-  forall {α : Type.{u1}} {γ : Type.{u2}} [_inst_1 : CommSemiring.{u1} α] [_inst_3 : Zero.{u2} γ] [_inst_4 : One.{u2} γ] [_inst_5 : Add.{u2} γ] [_inst_6 : Mul.{u2} γ] [_inst_7 : SMul.{0, u2} Nat γ] [_inst_8 : NatCast.{u2} γ] [_inst_9 : Pow.{u2, 0} γ Nat] (f : γ -> α), (Function.Injective.{succ u2, succ u1} γ α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} γ 0 (Zero.toOfNat0.{u2} γ _inst_3))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (CommMonoidWithZero.toZero.{u1} α (CommSemiring.toCommMonoidWithZero.{u1} α _inst_1))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} γ 1 (One.toOfNat1.{u2} γ _inst_4))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))) -> (forall (x : γ) (y : γ), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} γ γ γ (instHAdd.{u2} γ _inst_5) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : γ) (y : γ), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} γ γ γ (instHMul.{u2} γ _inst_6) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : γ) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat γ γ (instHSMul.{0, u2} Nat γ _inst_7) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))))) n (f x))) -> (forall (x : γ) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} γ Nat γ (instHPow.{u2, 0} γ Nat _inst_9) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} γ _inst_8 n)) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)) n)) -> (CommSemiring.{u2} γ)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.injective.comm_semiring Function.Injective.commSemiringₓ'. -/
 /-- Pullback a `semiring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -274,10 +265,7 @@ protected def Function.Injective.commSemiring [Zero γ] [One γ] [Add γ] [Mul 
 #align function.injective.comm_semiring Function.Injective.commSemiring
 
 /- warning: function.surjective.comm_semiring -> Function.Surjective.commSemiring is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {γ : Type.{u2}} [_inst_1 : CommSemiring.{u1} α] [_inst_3 : Zero.{u2} γ] [_inst_4 : One.{u2} γ] [_inst_5 : Add.{u2} γ] [_inst_6 : Mul.{u2} γ] [_inst_7 : SMul.{0, u2} Nat γ] [_inst_8 : NatCast.{u2} γ] [_inst_9 : Pow.{u2, 0} γ Nat] (f : α -> γ), (Function.Surjective.{succ u1, succ u2} α γ f) -> (Eq.{succ u2} γ (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} γ 0 (OfNat.mk.{u2} γ 0 (Zero.zero.{u2} γ _inst_3)))) -> (Eq.{succ u2} γ (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} γ 1 (OfNat.mk.{u2} γ 1 (One.one.{u2} γ _inst_4)))) -> (forall (x : α) (y : α), Eq.{succ u2} γ (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} γ γ γ (instHAdd.{u2} γ _inst_5) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} γ (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)))))) x y)) (HMul.hMul.{u2, u2, u2} γ γ γ (instHMul.{u2} γ _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} γ (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Nat γ _inst_7 n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} γ (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))) x n)) (HPow.hPow.{u2, 0, u2} γ Nat γ (instHPow.{u2, 0} γ Nat _inst_9) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} γ (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat γ (HasLiftT.mk.{1, succ u2} Nat γ (CoeTCₓ.coe.{1, succ u2} Nat γ (Nat.castCoe.{u2} γ _inst_8))) n)) -> (CommSemiring.{u2} γ)
-but is expected to have type
-  forall {α : Type.{u1}} {γ : Type.{u2}} [_inst_1 : CommSemiring.{u1} α] [_inst_3 : Zero.{u2} γ] [_inst_4 : One.{u2} γ] [_inst_5 : Add.{u2} γ] [_inst_6 : Mul.{u2} γ] [_inst_7 : SMul.{0, u2} Nat γ] [_inst_8 : NatCast.{u2} γ] [_inst_9 : Pow.{u2, 0} γ Nat] (f : α -> γ), (Function.Surjective.{succ u1, succ u2} α γ f) -> (Eq.{succ u2} γ (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (CommMonoidWithZero.toZero.{u1} α (CommSemiring.toCommMonoidWithZero.{u1} α _inst_1))))) (OfNat.ofNat.{u2} γ 0 (Zero.toOfNat0.{u2} γ _inst_3))) -> (Eq.{succ u2} γ (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))) (OfNat.ofNat.{u2} γ 1 (One.toOfNat1.{u2} γ _inst_4))) -> (forall (x : α) (y : α), Eq.{succ u2} γ (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} γ γ γ (instHAdd.{u2} γ _inst_5) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} γ (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} γ γ γ (instHMul.{u2} γ _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} γ (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddCommMonoidWithOne.toAddMonoidWithOne.{u1} α (NonAssocSemiring.toAddCommMonoidWithOne.{u1} α (Semiring.toNonAssocSemiring.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat γ γ (instHSMul.{0, u2} Nat γ _inst_7) n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} γ (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1))))) x n)) (HPow.hPow.{u2, 0, u2} γ Nat γ (instHPow.{u2, 0} γ Nat _inst_9) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} γ (f (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (CommSemiring.toSemiring.{u1} α _inst_1)) n)) (Nat.cast.{u2} γ _inst_8 n)) -> (CommSemiring.{u2} γ)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.surjective.comm_semiring Function.Surjective.commSemiringₓ'. -/
 /-- Pushforward a `semiring` instance along a surjective function.
 See note [reducible non-instances]. -/
@@ -362,10 +350,7 @@ section NonUnitalNonAssocRing
 variable [NonUnitalNonAssocRing α]
 
 /- warning: function.injective.non_unital_non_assoc_ring -> Function.Injective.nonUnitalNonAssocRing is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalNonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α _inst_1))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_5 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1)))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_7 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_8 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1)))) n (f x))) -> (NonUnitalNonAssocRing.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalNonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroClass.toZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α _inst_1)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α _inst_1)) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_5 x)) (Neg.neg.{u1} α (NegZeroClass.toNeg.{u1} α (SubNegZeroMonoid.toNegZeroClass.{u1} α (SubtractionMonoid.toSubNegZeroMonoid.{u1} α (SubtractionCommMonoid.toSubtractionMonoid.{u1} α (AddCommGroup.toDivisionAddCommMonoid.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1)))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_7) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1))))) n (f x))) -> (NonUnitalNonAssocRing.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.injective.non_unital_non_assoc_ring Function.Injective.nonUnitalNonAssocRingₓ'. -/
 /-- Pullback a `non_unital_non_assoc_ring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -381,10 +366,7 @@ protected def Function.Injective.nonUnitalNonAssocRing [Zero β] [Add β] [Mul 
 #align function.injective.non_unital_non_assoc_ring Function.Injective.nonUnitalNonAssocRing
 
 /- warning: function.surjective.non_unital_non_assoc_ring -> Function.Surjective.nonUnitalNonAssocRing is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalNonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α _inst_1))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α _inst_1)))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1)))) x)) (Neg.neg.{u2} β _inst_5 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Nat β _inst_7 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1)))) n x)) (SMul.smul.{0, u2} Int β _inst_8 n (f x))) -> (NonUnitalNonAssocRing.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalNonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroClass.toZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α _inst_1)))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α _inst_1)) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (NegZeroClass.toNeg.{u1} α (SubNegZeroMonoid.toNegZeroClass.{u1} α (SubtractionMonoid.toSubNegZeroMonoid.{u1} α (SubtractionCommMonoid.toSubtractionMonoid.{u1} α (AddCommGroup.toDivisionAddCommMonoid.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1)))))) x)) (Neg.neg.{u2} β _inst_5 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_7) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_8) n (f x))) -> (NonUnitalNonAssocRing.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.surjective.non_unital_non_assoc_ring Function.Surjective.nonUnitalNonAssocRingₓ'. -/
 /-- Pushforward a `non_unital_non_assoc_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
@@ -406,10 +388,7 @@ section NonUnitalRing
 variable [NonUnitalRing α]
 
 /- warning: function.injective.non_unital_ring -> Function.Injective.nonUnitalRing is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_5 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_7 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_8 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) n (f x))) -> (NonUnitalRing.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α (NonUnitalRing.toNonUnitalSemiring.{u1} α _inst_1)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_5 x)) (Neg.neg.{u1} α (NegZeroClass.toNeg.{u1} α (SubNegZeroMonoid.toNegZeroClass.{u1} α (SubtractionMonoid.toSubNegZeroMonoid.{u1} α (SubtractionCommMonoid.toSubtractionMonoid.{u1} α (AddCommGroup.toDivisionAddCommMonoid.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_7) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))) n (f x))) -> (NonUnitalRing.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.injective.non_unital_ring Function.Injective.nonUnitalRingₓ'. -/
 /-- Pullback a `non_unital_ring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -424,10 +403,7 @@ protected def Function.Injective.nonUnitalRing [Zero β] [Add β] [Mul β] [Neg
 #align function.injective.non_unital_ring Function.Injective.nonUnitalRing
 
 /- warning: function.surjective.non_unital_ring -> Function.Surjective.nonUnitalRing is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x)) (Neg.neg.{u2} β _inst_5 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Nat β _inst_7 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Int β _inst_8 n (f x))) -> (NonUnitalRing.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α (NonUnitalRing.toNonUnitalSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (NegZeroClass.toNeg.{u1} α (SubNegZeroMonoid.toNegZeroClass.{u1} α (SubtractionMonoid.toSubNegZeroMonoid.{u1} α (SubtractionCommMonoid.toSubtractionMonoid.{u1} α (AddCommGroup.toDivisionAddCommMonoid.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))))) x)) (Neg.neg.{u2} β _inst_5 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_7) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_8) n (f x))) -> (NonUnitalRing.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.surjective.non_unital_ring Function.Surjective.nonUnitalRingₓ'. -/
 /-- Pushforward a `non_unital_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
@@ -448,10 +424,7 @@ section NonAssocRing
 variable [NonAssocRing α]
 
 /- warning: function.injective.non_assoc_ring -> Function.Injective.nonAssocRing is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_10))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n)) -> (NonAssocRing.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroOneClass.toZero.{u1} α (NonAssocSemiring.toMulZeroOneClass.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α _inst_1)))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (AddGroupWithOne.toNeg.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (AddGroupWithOne.toSub.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n (f x))) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_10 n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α _inst_1) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_11 n)) (Int.cast.{u1} α (NonAssocRing.toIntCast.{u1} α _inst_1) n)) -> (NonAssocRing.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.injective.non_assoc_ring Function.Injective.nonAssocRingₓ'. -/
 /-- Pullback a `non_assoc_ring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -468,10 +441,7 @@ protected def Function.Injective.nonAssocRing [Zero β] [One β] [Add β] [Mul 
 #align function.injective.non_assoc_ring Function.Injective.nonAssocRing
 
 /- warning: function.surjective.non_assoc_ring -> Function.Surjective.nonAssocRing is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_10))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_11))) n)) -> (NonAssocRing.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroOneClass.toZero.{u1} α (NonAssocSemiring.toMulZeroOneClass.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α _inst_1)))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (AddGroupWithOne.toNeg.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (AddGroupWithOne.toSub.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α _inst_1) n)) (Nat.cast.{u2} β _inst_10 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (NonAssocRing.toIntCast.{u1} α _inst_1) n)) (Int.cast.{u2} β _inst_11 n)) -> (NonAssocRing.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.surjective.non_assoc_ring Function.Surjective.nonAssocRingₓ'. -/
 /-- Pushforward a `non_unital_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
@@ -494,10 +464,7 @@ section Ring
 variable [Ring α] {a b c d e : α}
 
 /- warning: function.injective.ring -> Function.Injective.ring is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α _inst_1))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) n)) -> (Ring.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α _inst_1) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α _inst_1)) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_11 n)) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (Ring.toSemiring.{u1} α _inst_1)) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_12 n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α _inst_1) n)) -> (Ring.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.injective.ring Function.Injective.ringₓ'. -/
 /-- Pullback a `ring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -515,10 +482,7 @@ protected def Function.Injective.ring [Zero β] [One β] [Add β] [Mul β] [Neg
 #align function.injective.ring Function.Injective.ring
 
 /- warning: function.surjective.ring -> Function.Surjective.ring is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α _inst_1))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α _inst_1))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α _inst_1))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) -> (Ring.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (Ring.toNeg.{u1} α _inst_1) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α _inst_1)) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (Ring.toSemiring.{u1} α _inst_1)) n)) (Nat.cast.{u2} β _inst_11 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (Ring.toIntCast.{u1} α _inst_1) n)) (Int.cast.{u2} β _inst_12 n)) -> (Ring.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.surjective.ring Function.Surjective.ringₓ'. -/
 /-- Pushforward a `ring` instance along a surjective function.
 See note [reducible non-instances]. -/
@@ -542,10 +506,7 @@ section NonUnitalCommRing
 variable [NonUnitalCommRing α] {a b c : α}
 
 /- warning: function.injective.non_unital_comm_ring -> Function.Injective.nonUnitalCommRing is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalCommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_5 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_7 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_8 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) n (f x))) -> (NonUnitalCommRing.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalCommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α (NonUnitalCommRing.toNonUnitalCommSemiring.{u1} α _inst_1))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_5 x)) (Neg.neg.{u1} α (NegZeroClass.toNeg.{u1} α (SubNegZeroMonoid.toNegZeroClass.{u1} α (SubtractionMonoid.toSubNegZeroMonoid.{u1} α (SubtractionCommMonoid.toSubtractionMonoid.{u1} α (AddCommGroup.toDivisionAddCommMonoid.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_7) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) n (f x))) -> (NonUnitalCommRing.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.injective.non_unital_comm_ring Function.Injective.nonUnitalCommRingₓ'. -/
 /-- Pullback a `comm_ring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -560,10 +521,7 @@ protected def Function.Injective.nonUnitalCommRing [Zero β] [Add β] [Mul β] [
 #align function.injective.non_unital_comm_ring Function.Injective.nonUnitalCommRing
 
 /- warning: function.surjective.non_unital_comm_ring -> Function.Surjective.nonUnitalCommRing is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalCommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) x)) (Neg.neg.{u2} β _inst_5 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) n x)) (SMul.smul.{0, u2} Nat β _inst_7 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Int β _inst_8 n (f x))) -> (NonUnitalCommRing.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalCommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α (NonUnitalCommRing.toNonUnitalCommSemiring.{u1} α _inst_1))))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (NegZeroClass.toNeg.{u1} α (SubNegZeroMonoid.toNegZeroClass.{u1} α (SubtractionMonoid.toSubNegZeroMonoid.{u1} α (SubtractionCommMonoid.toSubtractionMonoid.{u1} α (AddCommGroup.toDivisionAddCommMonoid.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) x)) (Neg.neg.{u2} β _inst_5 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_7) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_8) n (f x))) -> (NonUnitalCommRing.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.surjective.non_unital_comm_ring Function.Surjective.nonUnitalCommRingₓ'. -/
 /-- Pushforward a `non_unital_comm_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
@@ -584,10 +542,7 @@ section CommRing
 variable [CommRing α] {a b c : α}
 
 /- warning: function.injective.comm_ring -> Function.Injective.commRing is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) n)) -> (CommRing.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (CommMonoidWithZero.toZero.{u1} α (CommSemiring.toCommMonoidWithZero.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α (CommRing.toRing.{u1} α _inst_1)) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (CommRing.toRing.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_11 n)) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1))) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_12 n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (CommRing.toRing.{u1} α _inst_1)) n)) -> (CommRing.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.injective.comm_ring Function.Injective.commRingₓ'. -/
 /-- Pullback a `comm_ring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -604,10 +559,7 @@ protected def Function.Injective.commRing [Zero β] [One β] [Add β] [Mul β] [
 #align function.injective.comm_ring Function.Injective.commRing
 
 /- warning: function.surjective.comm_ring -> Function.Surjective.commRing is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) -> (CommRing.{u2} β)
-but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (CommMonoidWithZero.toZero.{u1} α (CommSemiring.toCommMonoidWithZero.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (Ring.toNeg.{u1} α (CommRing.toRing.{u1} α _inst_1)) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (CommRing.toRing.{u1} α _inst_1))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1))) n)) (Nat.cast.{u2} β _inst_11 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (Ring.toIntCast.{u1} α (CommRing.toRing.{u1} α _inst_1)) n)) (Int.cast.{u2} β _inst_12 n)) -> (CommRing.{u2} β)
+<too large>
 Case conversion may be inaccurate. Consider using '#align function.surjective.comm_ring Function.Surjective.commRingₓ'. -/
 /-- Pushforward a `comm_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
Diff
@@ -497,7 +497,7 @@ variable [Ring α] {a b c d e : α}
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α _inst_1))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) n)) -> (Ring.{u2} β)
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α _inst_1) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α _inst_1)) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_11 n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_12 n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α _inst_1) n)) -> (Ring.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α _inst_1) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α _inst_1)) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_11 n)) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (Ring.toSemiring.{u1} α _inst_1)) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_12 n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α _inst_1) n)) -> (Ring.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.injective.ring Function.Injective.ringₓ'. -/
 /-- Pullback a `ring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -518,7 +518,7 @@ protected def Function.Injective.ring [Zero β] [One β] [Add β] [Mul β] [Neg
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α _inst_1))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α _inst_1))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α _inst_1))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) -> (Ring.{u2} β)
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (Ring.toNeg.{u1} α _inst_1) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α _inst_1)) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)) n)) (Nat.cast.{u2} β _inst_11 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (Ring.toIntCast.{u1} α _inst_1) n)) (Int.cast.{u2} β _inst_12 n)) -> (Ring.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (Ring.toNeg.{u1} α _inst_1) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α _inst_1)) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (Ring.toSemiring.{u1} α _inst_1)) n)) (Nat.cast.{u2} β _inst_11 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (Ring.toIntCast.{u1} α _inst_1) n)) (Int.cast.{u2} β _inst_12 n)) -> (Ring.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.surjective.ring Function.Surjective.ringₓ'. -/
 /-- Pushforward a `ring` instance along a surjective function.
 See note [reducible non-instances]. -/
@@ -545,7 +545,7 @@ variable [NonUnitalCommRing α] {a b c : α}
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalCommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_5 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_7 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_8 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) n (f x))) -> (NonUnitalCommRing.{u2} β)
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalCommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α (NonUnitalRing.toNonUnitalSemiring.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_5 x)) (Neg.neg.{u1} α (NegZeroClass.toNeg.{u1} α (SubNegZeroMonoid.toNegZeroClass.{u1} α (SubtractionMonoid.toSubNegZeroMonoid.{u1} α (SubtractionCommMonoid.toSubtractionMonoid.{u1} α (AddCommGroup.toDivisionAddCommMonoid.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_7) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) n (f x))) -> (NonUnitalCommRing.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalCommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α (NonUnitalCommRing.toNonUnitalCommSemiring.{u1} α _inst_1))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_5 x)) (Neg.neg.{u1} α (NegZeroClass.toNeg.{u1} α (SubNegZeroMonoid.toNegZeroClass.{u1} α (SubtractionMonoid.toSubNegZeroMonoid.{u1} α (SubtractionCommMonoid.toSubtractionMonoid.{u1} α (AddCommGroup.toDivisionAddCommMonoid.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_7) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) n (f x))) -> (NonUnitalCommRing.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.injective.non_unital_comm_ring Function.Injective.nonUnitalCommRingₓ'. -/
 /-- Pullback a `comm_ring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -563,7 +563,7 @@ protected def Function.Injective.nonUnitalCommRing [Zero β] [Add β] [Mul β] [
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalCommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) x)) (Neg.neg.{u2} β _inst_5 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) n x)) (SMul.smul.{0, u2} Nat β _inst_7 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Int β _inst_8 n (f x))) -> (NonUnitalCommRing.{u2} β)
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalCommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α (NonUnitalRing.toNonUnitalSemiring.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (NegZeroClass.toNeg.{u1} α (SubNegZeroMonoid.toNegZeroClass.{u1} α (SubtractionMonoid.toSubNegZeroMonoid.{u1} α (SubtractionCommMonoid.toSubtractionMonoid.{u1} α (AddCommGroup.toDivisionAddCommMonoid.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) x)) (Neg.neg.{u2} β _inst_5 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_7) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_8) n (f x))) -> (NonUnitalCommRing.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonUnitalCommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : Add.{u2} β] [_inst_4 : Mul.{u2} β] [_inst_5 : Neg.{u2} β] [_inst_6 : Sub.{u2} β] [_inst_7 : SMul.{0, u2} Nat β] [_inst_8 : SMul.{0, u2} Int β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (SemigroupWithZero.toZero.{u1} α (NonUnitalSemiring.toSemigroupWithZero.{u1} α (NonUnitalCommSemiring.toNonUnitalSemiring.{u1} α (NonUnitalCommRing.toNonUnitalCommSemiring.{u1} α _inst_1))))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_3) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (NegZeroClass.toNeg.{u1} α (SubNegZeroMonoid.toNegZeroClass.{u1} α (SubtractionMonoid.toSubNegZeroMonoid.{u1} α (SubtractionCommMonoid.toSubtractionMonoid.{u1} α (AddCommGroup.toDivisionAddCommMonoid.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) x)) (Neg.neg.{u2} β _inst_5 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_6) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (SubNegMonoid.toAddMonoid.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1)))))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_7) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddCommGroup.toAddGroup.{u1} α (NonUnitalNonAssocRing.toAddCommGroup.{u1} α (NonUnitalRing.toNonUnitalNonAssocRing.{u1} α (NonUnitalCommRing.toNonUnitalRing.{u1} α _inst_1))))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_8) n (f x))) -> (NonUnitalCommRing.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.surjective.non_unital_comm_ring Function.Surjective.nonUnitalCommRingₓ'. -/
 /-- Pushforward a `non_unital_comm_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
@@ -587,7 +587,7 @@ variable [CommRing α] {a b c : α}
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) n)) -> (CommRing.{u2} β)
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (CommMonoidWithZero.toZero.{u1} α (CommSemiring.toCommMonoidWithZero.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α (CommRing.toRing.{u1} α _inst_1)) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (CommRing.toRing.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_11 n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_12 n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (CommRing.toRing.{u1} α _inst_1)) n)) -> (CommRing.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (CommMonoidWithZero.toZero.{u1} α (CommSemiring.toCommMonoidWithZero.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α (CommRing.toRing.{u1} α _inst_1)) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (CommRing.toRing.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_11 n)) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1))) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_12 n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (CommRing.toRing.{u1} α _inst_1)) n)) -> (CommRing.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.injective.comm_ring Function.Injective.commRingₓ'. -/
 /-- Pullback a `comm_ring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -607,7 +607,7 @@ protected def Function.Injective.commRing [Zero β] [One β] [Add β] [Mul β] [
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) -> (CommRing.{u2} β)
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (CommMonoidWithZero.toZero.{u1} α (CommSemiring.toCommMonoidWithZero.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (Ring.toNeg.{u1} α (CommRing.toRing.{u1} α _inst_1)) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (CommRing.toRing.{u1} α _inst_1))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))) n)) (Nat.cast.{u2} β _inst_11 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (Ring.toIntCast.{u1} α (CommRing.toRing.{u1} α _inst_1)) n)) (Int.cast.{u2} β _inst_12 n)) -> (CommRing.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (CommMonoidWithZero.toZero.{u1} α (CommSemiring.toCommMonoidWithZero.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (Ring.toNeg.{u1} α (CommRing.toRing.{u1} α _inst_1)) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (CommRing.toRing.{u1} α _inst_1))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (CommSemiring.toSemiring.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1))) n)) (Nat.cast.{u2} β _inst_11 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (Ring.toIntCast.{u1} α (CommRing.toRing.{u1} α _inst_1)) n)) (Int.cast.{u2} β _inst_12 n)) -> (CommRing.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.surjective.comm_ring Function.Surjective.commRingₓ'. -/
 /-- Pushforward a `comm_ring` instance along a surjective function.
 See note [reducible non-instances]. -/
Diff
@@ -449,7 +449,7 @@ variable [NonAssocRing α]
 
 /- warning: function.injective.non_assoc_ring -> Function.Injective.nonAssocRing is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) n (f x))) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_10))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) n)) -> (NonAssocRing.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_10))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n)) -> (NonAssocRing.{u2} β)
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroOneClass.toZero.{u1} α (NonAssocSemiring.toMulZeroOneClass.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α _inst_1)))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (AddGroupWithOne.toNeg.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (AddGroupWithOne.toSub.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n (f x))) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_10 n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α _inst_1) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_11 n)) (Int.cast.{u1} α (NonAssocRing.toIntCast.{u1} α _inst_1) n)) -> (NonAssocRing.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.injective.non_assoc_ring Function.Injective.nonAssocRingₓ'. -/
@@ -469,7 +469,7 @@ protected def Function.Injective.nonAssocRing [Zero β] [One β] [Add β] [Mul 
 
 /- warning: function.surjective.non_assoc_ring -> Function.Surjective.nonAssocRing is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_10))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_11))) n)) -> (NonAssocRing.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_10))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_11))) n)) -> (NonAssocRing.{u2} β)
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroOneClass.toZero.{u1} α (NonAssocSemiring.toMulZeroOneClass.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α _inst_1)))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (AddGroupWithOne.toNeg.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (AddGroupWithOne.toSub.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α _inst_1) n)) (Nat.cast.{u2} β _inst_10 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (NonAssocRing.toIntCast.{u1} α _inst_1) n)) (Int.cast.{u2} β _inst_11 n)) -> (NonAssocRing.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.surjective.non_assoc_ring Function.Surjective.nonAssocRingₓ'. -/
@@ -495,7 +495,7 @@ variable [Ring α] {a b c d e : α}
 
 /- warning: function.injective.ring -> Function.Injective.ring is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α _inst_1))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) n)) -> (Ring.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α _inst_1))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) n)) -> (Ring.{u2} β)
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α _inst_1) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α _inst_1)) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_11 n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_12 n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α _inst_1) n)) -> (Ring.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.injective.ring Function.Injective.ringₓ'. -/
@@ -516,7 +516,7 @@ protected def Function.Injective.ring [Zero β] [One β] [Add β] [Mul β] [Neg
 
 /- warning: function.surjective.ring -> Function.Surjective.ring is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α _inst_1))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α _inst_1))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α _inst_1))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) -> (Ring.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α _inst_1))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α _inst_1))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α _inst_1))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α _inst_1)))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) -> (Ring.{u2} β)
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : Ring.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1))))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (Ring.toNeg.{u1} α _inst_1) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α _inst_1)) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α _inst_1))))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α _inst_1)) n)) (Nat.cast.{u2} β _inst_11 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (Ring.toIntCast.{u1} α _inst_1) n)) (Int.cast.{u2} β _inst_12 n)) -> (Ring.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.surjective.ring Function.Surjective.ringₓ'. -/
@@ -585,7 +585,7 @@ variable [CommRing α] {a b c : α}
 
 /- warning: function.injective.comm_ring -> Function.Injective.commRing is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) n)) -> (CommRing.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (CommRing.toRing.{u1} α _inst_1)))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) n)) -> (CommRing.{u2} β)
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (CommMonoidWithZero.toZero.{u1} α (CommSemiring.toCommMonoidWithZero.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α (CommRing.toRing.{u1} α _inst_1)) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (CommRing.toRing.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) x n)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) (f x) n)) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_11 n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_12 n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (CommRing.toRing.{u1} α _inst_1)) n)) -> (CommRing.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.injective.comm_ring Function.Injective.commRingₓ'. -/
@@ -605,7 +605,7 @@ protected def Function.Injective.commRing [Zero β] [One β] [Add β] [Mul β] [
 
 /- warning: function.surjective.comm_ring -> Function.Surjective.commRing is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) -> (CommRing.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (CommRing.toRing.{u1} α _inst_1)))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_11))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_12))) n)) -> (CommRing.{u2} β)
 but is expected to have type
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : CommRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : Pow.{u2, 0} β Nat] [_inst_11 : NatCast.{u2} β] [_inst_12 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (CommMonoidWithZero.toZero.{u1} α (CommSemiring.toCommMonoidWithZero.{u1} α (CommRing.toCommSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (Ring.toNeg.{u1} α (CommRing.toRing.{u1} α _inst_1)) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (CommRing.toRing.{u1} α _inst_1))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (Ring.toAddGroupWithOne.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (Ring.toSemiring.{u1} α (CommRing.toRing.{u1} α _inst_1)))))) x n)) (HPow.hPow.{u2, 0, u2} β Nat β (instHPow.{u2, 0} β Nat _inst_10) (f x) n)) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (CommRing.toRing.{u1} α _inst_1))) n)) (Nat.cast.{u2} β _inst_11 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (Ring.toIntCast.{u1} α (CommRing.toRing.{u1} α _inst_1)) n)) (Int.cast.{u2} β _inst_12 n)) -> (CommRing.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.surjective.comm_ring Function.Surjective.commRingₓ'. -/
Diff
@@ -451,7 +451,7 @@ variable [NonAssocRing α]
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (SMul.smul.{0, u2} Nat β _inst_8 n x)) (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (SMul.smul.{0, u2} Int β _inst_9 n x)) (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) n (f x))) -> (forall (n : Nat), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_10))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))))) n)) -> (forall (n : Int), Eq.{succ u1} α (f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_11))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) n)) -> (NonAssocRing.{u2} β)
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroOneClass.toZero.{u1} α (NonAssocSemiring.toMulZeroOneClass.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α _inst_1)))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (AddGroupWithOne.toNeg.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (AddGroupWithOne.toSub.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) n (f x))) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_10 n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α _inst_1) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_11 n)) (Int.cast.{u1} α (NonAssocRing.toIntCast.{u1} α _inst_1) n)) -> (NonAssocRing.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : β -> α), (Function.Injective.{succ u2, succ u1} β α f) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroOneClass.toZero.{u1} α (NonAssocSemiring.toMulZeroOneClass.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α _inst_1)))))) -> (Eq.{succ u1} α (f (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α _inst_1)))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) x y)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) (f x) (f y))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) x y)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))) (f x) (f y))) -> (forall (x : β), Eq.{succ u1} α (f (Neg.neg.{u2} β _inst_6 x)) (Neg.neg.{u1} α (AddGroupWithOne.toNeg.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))) (f x))) -> (forall (x : β) (y : β), Eq.{succ u1} α (f (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) x y)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (AddGroupWithOne.toSub.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))) (f x) (f y))) -> (forall (x : β) (n : Nat), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n x)) (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n (f x))) -> (forall (x : β) (n : Int), Eq.{succ u1} α (f (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n x)) (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n (f x))) -> (forall (n : Nat), Eq.{succ u1} α (f (Nat.cast.{u2} β _inst_10 n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α _inst_1) n)) -> (forall (n : Int), Eq.{succ u1} α (f (Int.cast.{u2} β _inst_11 n)) (Int.cast.{u1} α (NonAssocRing.toIntCast.{u1} α _inst_1) n)) -> (NonAssocRing.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.injective.non_assoc_ring Function.Injective.nonAssocRingₓ'. -/
 /-- Pullback a `non_assoc_ring` instance along an injective function.
 See note [reducible non-instances]. -/
@@ -471,7 +471,7 @@ protected def Function.Injective.nonAssocRing [Zero β] [One β] [Add β] [Mul 
 lean 3 declaration is
   forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1)))))))) (OfNat.ofNat.{u2} β 0 (OfNat.mk.{u2} β 0 (Zero.zero.{u2} β _inst_2)))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β _inst_3)))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (SMul.smul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) n x)) (SMul.smul.{0, u2} Nat β _inst_8 n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (SMul.smul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))) n x)) (SMul.smul.{0, u2} Int β _inst_9 n (f x))) -> (forall (n : Nat), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Nat β (HasLiftT.mk.{1, succ u2} Nat β (CoeTCₓ.coe.{1, succ u2} Nat β (Nat.castCoe.{u2} β _inst_10))) n)) -> (forall (n : Int), Eq.{succ u2} β (f ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) n)) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Int β (HasLiftT.mk.{1, succ u2} Int β (CoeTCₓ.coe.{1, succ u2} Int β (Int.castCoe.{u2} β _inst_11))) n)) -> (NonAssocRing.{u2} β)
 but is expected to have type
-  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroOneClass.toZero.{u1} α (NonAssocSemiring.toMulZeroOneClass.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α _inst_1)))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (AddGroupWithOne.toNeg.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1)) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (AddGroupWithOne.toSub.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α _inst_1))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α _inst_1) n)) (Nat.cast.{u2} β _inst_10 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (NonAssocRing.toIntCast.{u1} α _inst_1) n)) (Int.cast.{u2} β _inst_11 n)) -> (NonAssocRing.{u2} β)
+  forall {α : Type.{u1}} {β : Type.{u2}} [_inst_1 : NonAssocRing.{u1} α] [_inst_2 : Zero.{u2} β] [_inst_3 : One.{u2} β] [_inst_4 : Add.{u2} β] [_inst_5 : Mul.{u2} β] [_inst_6 : Neg.{u2} β] [_inst_7 : Sub.{u2} β] [_inst_8 : SMul.{0, u2} Nat β] [_inst_9 : SMul.{0, u2} Int β] [_inst_10 : NatCast.{u2} β] [_inst_11 : IntCast.{u2} β] (f : α -> β), (Function.Surjective.{succ u1, succ u2} α β f) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MulZeroOneClass.toZero.{u1} α (NonAssocSemiring.toMulZeroOneClass.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α _inst_1)))))) (OfNat.ofNat.{u2} β 0 (Zero.toOfNat0.{u2} β _inst_2))) -> (Eq.{succ u2} β (f (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α _inst_1)))) (OfNat.ofNat.{u2} β 1 (One.toOfNat1.{u2} β _inst_3))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))))) x y)) (HAdd.hAdd.{u2, u2, u2} β β β (instHAdd.{u2} β _inst_4) (f x) (f y))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α _inst_1))) x y)) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β _inst_5) (f x) (f y))) -> (forall (x : α), Eq.{succ u2} β (f (Neg.neg.{u1} α (AddGroupWithOne.toNeg.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1))) x)) (Neg.neg.{u2} β _inst_6 (f x))) -> (forall (x : α) (y : α), Eq.{succ u2} β (f (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (AddGroupWithOne.toSub.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))) x y)) (HSub.hSub.{u2, u2, u2} β β β (instHSub.{u2} β _inst_7) (f x) (f y))) -> (forall (x : α) (n : Nat), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Nat α α (instHSMul.{0, u1} Nat α (AddMonoid.SMul.{u1} α (AddMonoidWithOne.toAddMonoid.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Nat β β (instHSMul.{0, u2} Nat β _inst_8) n (f x))) -> (forall (x : α) (n : Int), Eq.{succ u2} β (f (HSMul.hSMul.{0, u1, u1} Int α α (instHSMul.{0, u1} Int α (SubNegMonoid.SMulInt.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (NonAssocRing.toAddCommGroupWithOne.{u1} α _inst_1)))))) n x)) (HSMul.hSMul.{0, u2, u2} Int β β (instHSMul.{0, u2} Int β _inst_9) n (f x))) -> (forall (n : Nat), Eq.{succ u2} β (f (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α _inst_1) n)) (Nat.cast.{u2} β _inst_10 n)) -> (forall (n : Int), Eq.{succ u2} β (f (Int.cast.{u1} α (NonAssocRing.toIntCast.{u1} α _inst_1) n)) (Int.cast.{u2} β _inst_11 n)) -> (NonAssocRing.{u2} β)
 Case conversion may be inaccurate. Consider using '#align function.surjective.non_assoc_ring Function.Surjective.nonAssocRingₓ'. -/
 /-- Pushforward a `non_unital_ring` instance along a surjective function.
 See note [reducible non-instances]. -/

Changes in mathlib4

mathlib3
mathlib4
feat(Ring/InjSurj): add missing lemmas (#12328)

Add Function.(Inj|Surj)ective.(left|right)DistribClass.

Diff
@@ -19,12 +19,22 @@ variable {α β : Type*} [Zero β] [One β] [Add β] [Mul β] [Neg β] [Sub β]
 namespace Function.Injective
 variable (f : β → α) (hf : Injective f)
 
+/-- Pullback a `LeftDistribClass` instance along an injective function. -/
+theorem leftDistribClass [Mul α] [Add α] [LeftDistribClass α] (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) : LeftDistribClass β where
+  left_distrib x y z := hf <| by simp only [*, left_distrib]
+
+/-- Pullback a `RightDistribClass` instance along an injective function. -/
+theorem rightDistribClass [Mul α] [Add α] [RightDistribClass α] (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) : RightDistribClass β where
+  right_distrib x y z := hf <| by simp only [*, right_distrib]
+
 /-- Pullback a `Distrib` instance along an injective function. -/
 @[reducible] -- See note [reducible non-instances]
 protected def distrib [Distrib α] (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) : Distrib β where
-  left_distrib x y z := hf <| by simp only [*, left_distrib]
-  right_distrib x y z := hf <| by simp only [*, right_distrib]
+  __ := hf.leftDistribClass f add mul
+  __ := hf.rightDistribClass f add mul
 #align function.injective.distrib Function.Injective.distrib
 
 /-- A type endowed with `-` and `*` has distributive negation, if it admits an injective map that
@@ -197,12 +207,22 @@ end Function.Injective
 namespace Function.Surjective
 variable (f : α → β) (hf : Surjective f)
 
+/-- Pushforward a `LeftDistribClass` instance along a surjective function. -/
+theorem leftDistribClass [Mul α] [Add α] [LeftDistribClass α] (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) : LeftDistribClass β where
+  left_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, left_distrib]
+
+/-- Pushforward a `RightDistribClass` instance along a surjective function. -/
+theorem rightDistribClass [Mul α] [Add α] [RightDistribClass α] (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) : RightDistribClass β where
+  right_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, right_distrib]
+
 /-- Pushforward a `Distrib` instance along a surjective function. -/
 @[reducible] -- See note [reducible non-instances]
 protected def distrib [Distrib α] (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) : Distrib β where
-  left_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, left_distrib]
-  right_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, right_distrib]
+  __ := hf.leftDistribClass f add mul
+  __ := hf.rightDistribClass f add mul
 #align function.surjective.distrib Function.Surjective.distrib
 
 /-- A type endowed with `-` and `*` has distributive negation, if it admits a surjective map that
chore: Rename nat_cast/int_cast/rat_cast to natCast/intCast/ratCast (#11486)

Now that I am defining NNRat.cast, I want a definitive answer to this naming issue. Plenty of lemmas in mathlib already use natCast/intCast/ratCast over nat_cast/int_cast/rat_cast, and this matches with the general expectation that underscore-separated name parts correspond to a single declaration.

Diff
@@ -62,10 +62,10 @@ protected def nonUnitalSemiring [NonUnitalSemiring α]
 protected def nonAssocSemiring [NonAssocSemiring α]
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
-    (nat_cast : ∀ n : ℕ, f n = n) : NonAssocSemiring β where
+    (natCast : ∀ n : ℕ, f n = n) : NonAssocSemiring β where
   toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
   __ := hf.mulZeroOneClass f zero one mul
-  __ := hf.addMonoidWithOne f zero one add nsmul nat_cast
+  __ := hf.addMonoidWithOne f zero one add nsmul natCast
 #align function.injective.non_assoc_semiring Function.Injective.nonAssocSemiring
 
 /-- Pullback a `Semiring` instance along an injective function. -/
@@ -73,9 +73,9 @@ protected def nonAssocSemiring [NonAssocSemiring α]
 protected def semiring [Semiring α] (zero : f 0 = 0) (one : f 1 = 1)
     (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (nat_cast : ∀ n : ℕ, f n = n) : Semiring β where
+    (natCast : ∀ n : ℕ, f n = n) : Semiring β where
   toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
-  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
+  __ := hf.nonAssocSemiring f zero one add mul nsmul natCast
   __ := hf.monoidWithZero f zero one mul npow
 #align function.injective.semiring Function.Injective.semiring
 
@@ -107,11 +107,11 @@ protected def nonAssocRing [NonAssocRing α]
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
     (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
-    (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) (nat_cast : ∀ n : ℕ, f n = n)
-    (int_cast : ∀ n : ℤ, f n = n) : NonAssocRing β where
+    (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) (natCast : ∀ n : ℕ, f n = n)
+    (intCast : ∀ n : ℤ, f n = n) : NonAssocRing β where
   toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
-  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
-  __ := hf.addCommGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
+  __ := hf.nonAssocSemiring f zero one add mul nsmul natCast
+  __ := hf.addCommGroupWithOne f zero one add neg sub nsmul zsmul natCast intCast
 #align function.injective.non_assoc_ring Function.Injective.nonAssocRing
 
 /-- Pullback a `Ring` instance along an injective function. -/
@@ -120,10 +120,10 @@ protected def ring [Ring α] (zero : f 0 = 0)
     (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
     (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
-    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n)
-    (int_cast : ∀ n : ℤ, f n = n) : Ring β where
-  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
-  __ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (natCast : ∀ n : ℕ, f n = n)
+    (intCast : ∀ n : ℤ, f n = n) : Ring β where
+  toSemiring := hf.semiring f zero one add mul nsmul npow natCast
+  __ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul natCast intCast
   __ := hf.addCommGroup f zero add neg sub (swap nsmul) (swap zsmul)
 #align function.injective.ring Function.Injective.ring
 
@@ -153,9 +153,9 @@ protected def nonUnitalCommSemiring [NonUnitalCommSemiring α] (f : β → α)
 protected def commSemiring [CommSemiring α]
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
-    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n) :
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (natCast : ∀ n : ℕ, f n = n) :
     CommSemiring β where
-  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
+  toSemiring := hf.semiring f zero one add mul nsmul npow natCast
   __ := hf.commSemigroup f mul
 #align function.injective.comm_semiring Function.Injective.commSemiring
 
@@ -187,8 +187,8 @@ protected def commRing [CommRing α]
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
     (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
     (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : CommRing β where
-  toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast
+    (natCast : ∀ n : ℕ, f n = n) (intCast : ∀ n : ℤ, f n = n) : CommRing β where
+  toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow natCast intCast
   __ := hf.commMonoid f one mul npow
 #align function.injective.comm_ring Function.Injective.commRing
 
@@ -240,10 +240,10 @@ protected def nonUnitalSemiring [NonUnitalSemiring α] (zero : f 0 = 0)
 protected def nonAssocSemiring [NonAssocSemiring α] (zero : f 0 = 0) (one : f 1 = 1)
     (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
-    (nat_cast : ∀ n : ℕ, f n = n) : NonAssocSemiring β where
+    (natCast : ∀ n : ℕ, f n = n) : NonAssocSemiring β where
   toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
   __ := hf.mulZeroOneClass f zero one mul
-  __ := hf.addMonoidWithOne f zero one add nsmul nat_cast
+  __ := hf.addMonoidWithOne f zero one add nsmul natCast
 #align function.surjective.non_assoc_semiring Function.Surjective.nonAssocSemiring
 
 /-- Pushforward a `Semiring` instance along a surjective function. -/
@@ -251,9 +251,9 @@ protected def nonAssocSemiring [NonAssocSemiring α] (zero : f 0 = 0) (one : f 1
 protected def semiring [Semiring α] (zero : f 0 = 0) (one : f 1 = 1)
     (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
-    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n) : Semiring β where
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (natCast : ∀ n : ℕ, f n = n) : Semiring β where
   toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
-  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
+  __ := hf.nonAssocSemiring f zero one add mul nsmul natCast
   __ := hf.monoidWithZero f zero one mul npow
 #align function.surjective.semiring Function.Surjective.semiring
 
@@ -285,10 +285,10 @@ protected def nonAssocRing [NonAssocRing α] (zero : f 0 = 0) (one : f 1 = 1)
     (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
     (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
-    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : NonAssocRing β where
+    (natCast : ∀ n : ℕ, f n = n) (intCast : ∀ n : ℤ, f n = n) : NonAssocRing β where
   toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
-  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
-  __ := hf.addCommGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
+  __ := hf.nonAssocSemiring f zero one add mul nsmul natCast
+  __ := hf.addCommGroupWithOne f zero one add neg sub nsmul zsmul natCast intCast
 #align function.surjective.non_assoc_ring Function.Surjective.nonAssocRing
 
 /-- Pushforward a `Ring` instance along a surjective function. -/
@@ -297,10 +297,10 @@ protected def ring [Ring α] (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f
     (mul : ∀ x y, f (x * y) = f x * f y)
     (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
     (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
-    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n)
-    (int_cast : ∀ n : ℤ, f n = n) : Ring β where
-  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
-  __ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (natCast : ∀ n : ℕ, f n = n)
+    (intCast : ∀ n : ℤ, f n = n) : Ring β where
+  toSemiring := hf.semiring f zero one add mul nsmul npow natCast
+  __ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul natCast intCast
   __ := hf.addCommGroup f zero add neg sub (swap nsmul) (swap zsmul)
 #align function.surjective.ring Function.Surjective.ring
 
@@ -326,8 +326,8 @@ protected def nonUnitalCommSemiring [NonUnitalCommSemiring α] (zero : f 0 = 0)
 protected def commSemiring [CommSemiring α] (zero : f 0 = 0) (one : f 1 = 1)
     (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (nat_cast : ∀ n : ℕ, f n = n) : CommSemiring β where
-  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
+    (natCast : ∀ n : ℕ, f n = n) : CommSemiring β where
+  toSemiring := hf.semiring f zero one add mul nsmul npow natCast
   __ := hf.commSemigroup f mul
 #align function.surjective.comm_semiring Function.Surjective.commSemiring
 
@@ -359,8 +359,8 @@ protected def commRing [CommRing α] (zero : f 0 = 0) (one : f 1 = 1)
     (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
     (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
     (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : CommRing β where
-  toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast
+    (natCast : ∀ n : ℕ, f n = n) (intCast : ∀ n : ℤ, f n = n) : CommRing β where
+  toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow natCast intCast
   __ := hf.commMonoid f one mul npow
 #align function.surjective.comm_ring Function.Surjective.commRing
 
chore(Field/InjSurj): Tidy (#11480)

Among other things, change the nsmul, zsmul, qsmul fields to have n/q come before x, because this matches the lemmas we want to write about them. It would be preferrable to perform the same changes to the AddMonoid/AddGroup-like typeclasses, but this is impossible with the current to_additive framework, so instead I have inserted some Function.swap at the interface between AddMonoid/AddGroup and Ring/Field.

Reduce the diff of #11203

Diff
@@ -10,409 +10,363 @@ import Mathlib.Algebra.GroupWithZero.InjSurj
 #align_import algebra.ring.inj_surj from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64"
 
 /-!
-# Pulling back rings along injective maps, and pushing them forward along surjective maps.
-
+# Pulling back rings along injective maps, and pushing them forward along surjective maps
 -/
 
+variable {α β : Type*} [Zero β] [One β] [Add β] [Mul β] [Neg β] [Sub β] [SMul ℕ β] [SMul ℤ β]
+  [Pow β ℕ] [NatCast β] [IntCast β]
 
-universe u v w x
-
-variable {α : Type u} {β : Type v} {γ : Type w} {R : Type x}
-
-open Function
+namespace Function.Injective
+variable (f : β → α) (hf : Injective f)
 
-/-!
-### `Distrib` class
--/
-
-
-/-- Pullback a `Distrib` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.distrib {S} [Mul R] [Add R] [Distrib S] (f : R → S)
-    (hf : Injective f) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y) :
-    Distrib R where
-  mul := (· * ·)
-  add := (· + ·)
+/-- Pullback a `Distrib` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def distrib [Distrib α] (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) : Distrib β where
   left_distrib x y z := hf <| by simp only [*, left_distrib]
   right_distrib x y z := hf <| by simp only [*, right_distrib]
 #align function.injective.distrib Function.Injective.distrib
 
-/-- Pushforward a `Distrib` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.distrib {S} [Distrib R] [Add S] [Mul S] (f : R → S)
-    (hf : Surjective f) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y) :
-    Distrib S where
-  mul := (· * ·)
-  add := (· + ·)
-  left_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, left_distrib]
-  right_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, right_distrib]
-#align function.surjective.distrib Function.Surjective.distrib
-
-section InjectiveSurjectiveMaps
-
-/-!
-### Semirings
--/
-
-variable [Zero β] [One β] [Add β] [Mul β] [Neg β] [Sub β] [SMul ℕ β] [SMul ℤ β] [Pow β ℕ]
-  [NatCast β] [IntCast β]
+/-- A type endowed with `-` and `*` has distributive negation, if it admits an injective map that
+preserves `-` and `*` to a type which has distributive negation. -/
+@[reducible] -- -- See note [reducible non-instances]
+protected def hasDistribNeg [Mul α] [HasDistribNeg α] (neg : ∀ a, f (-a) = -f a)
+    (mul : ∀ a b, f (a * b) = f a * f b) : HasDistribNeg β :=
+  { hf.involutiveNeg _ neg, ‹Mul β› with
+    neg_mul := fun x y => hf <| by erw [neg, mul, neg, neg_mul, mul],
+    mul_neg := fun x y => hf <| by erw [neg, mul, neg, mul_neg, mul] }
+#align function.injective.has_distrib_neg Function.Injective.hasDistribNeg
 
-/-- Pullback a `NonUnitalNonAssocSemiring` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.nonUnitalNonAssocSemiring {α : Type u}
-    [NonUnitalNonAssocSemiring α] (f : β → α) (hf : Injective f) (zero : f 0 = 0)
+/-- Pullback a `NonUnitalNonAssocSemiring` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonUnitalNonAssocSemiring [NonUnitalNonAssocSemiring α] (zero : f 0 = 0)
     (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β where
-  toAddCommMonoid := hf.addCommMonoid f zero add nsmul
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β where
+  toAddCommMonoid := hf.addCommMonoid f zero add (swap nsmul)
   __ := hf.distrib f add mul
   __ := hf.mulZeroClass f zero mul
 #align function.injective.non_unital_non_assoc_semiring Function.Injective.nonUnitalNonAssocSemiring
 
-/-- Pullback a `NonUnitalSemiring` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.nonUnitalSemiring {α : Type u} [NonUnitalSemiring α] (f : β → α)
-    (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
+/-- Pullback a `NonUnitalSemiring` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonUnitalSemiring [NonUnitalSemiring α]
+    (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) :
     NonUnitalSemiring β where
   toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
   __ := hf.semigroupWithZero f zero mul
 #align function.injective.non_unital_semiring Function.Injective.nonUnitalSemiring
 
-/-- Pullback a `NonAssocSemiring` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.nonAssocSemiring {α : Type u} [NonAssocSemiring α] {β : Type v}
-    [Zero β] [One β] [Mul β] [Add β] [SMul ℕ β] [NatCast β] (f : β → α) (hf : Injective f)
+/-- Pullback a `NonAssocSemiring` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonAssocSemiring [NonAssocSemiring α]
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
     (nat_cast : ∀ n : ℕ, f n = n) : NonAssocSemiring β where
   toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
   __ := hf.mulZeroOneClass f zero one mul
   __ := hf.addMonoidWithOne f zero one add nsmul nat_cast
 #align function.injective.non_assoc_semiring Function.Injective.nonAssocSemiring
 
-/-- Pullback a `Semiring` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.semiring {α : Type u} [Semiring α] {β : Type v} [Zero β] [One β]
-    [Add β] [Mul β] [Pow β ℕ] [SMul ℕ β] [NatCast β] (f : β → α) (hf : Injective f) (zero : f 0 = 0)
-    (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
+/-- Pullback a `Semiring` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def semiring [Semiring α] (zero : f 0 = 0) (one : f 1 = 1)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
     (nat_cast : ∀ n : ℕ, f n = n) : Semiring β where
   toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
   __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
   __ := hf.monoidWithZero f zero one mul npow
 #align function.injective.semiring Function.Injective.semiring
 
-/-- Pushforward a `NonUnitalNonAssocSemiring` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.nonUnitalNonAssocSemiring {α : Type u}
-    [NonUnitalNonAssocSemiring α] (f : α → β) (hf : Surjective f) (zero : f 0 = 0)
-    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β where
-  toAddCommMonoid := hf.addCommMonoid f zero add nsmul
-  __ := hf.distrib f add mul
-  __ := hf.mulZeroClass f zero mul
-#align function.surjective.non_unital_non_assoc_semiring Function.Surjective.nonUnitalNonAssocSemiring
-
-/-- Pushforward a `NonUnitalSemiring` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.nonUnitalSemiring {α : Type u} [NonUnitalSemiring α] (f : α → β)
-    (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
-    NonUnitalSemiring β where
-  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
-  __ := hf.semigroupWithZero f zero mul
-#align function.surjective.non_unital_semiring Function.Surjective.nonUnitalSemiring
-
-/-- Pushforward a `NonAssocSemiring` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.nonAssocSemiring {α : Type u} [NonAssocSemiring α] {β : Type v}
-    [Zero β] [One β] [Add β] [Mul β] [SMul ℕ β] [NatCast β] (f : α → β) (hf : Surjective f)
-    (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (nat_cast : ∀ n : ℕ, f n = n) : NonAssocSemiring β where
-  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
-  __ := hf.mulZeroOneClass f zero one mul
-  __ := hf.addMonoidWithOne f zero one add nsmul nat_cast
-#align function.surjective.non_assoc_semiring Function.Surjective.nonAssocSemiring
-
-/-- Pushforward a `Semiring` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.semiring {α : Type u} [Semiring α] {β : Type v} [Zero β] [One β]
-    [Add β] [Mul β] [Pow β ℕ] [SMul ℕ β] [NatCast β] (f : α → β) (hf : Surjective f)
-    (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n) : Semiring β where
-  toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
-  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
-  __ := hf.monoidWithZero f zero one mul npow
-#align function.surjective.semiring Function.Surjective.semiring
-
 /-- Pullback a `NonUnitalNonAssocRing` instance along an injective function. -/
 @[reducible] -- See note [reducible non-instances]
-protected def Function.Injective.nonUnitalNonAssocRing [NonUnitalNonAssocRing α] (f : β → α)
+protected def nonUnitalNonAssocRing [NonUnitalNonAssocRing α] (f : β → α)
     (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
-    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalNonAssocRing β where
-  toAddCommGroup := hf.addCommGroup f zero add neg sub nsmul zsmul
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
+    (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) : NonUnitalNonAssocRing β where
+  toAddCommGroup := hf.addCommGroup f zero add neg sub (swap nsmul) (swap zsmul)
   __ := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
 #align function.injective.non_unital_non_assoc_ring Function.Injective.nonUnitalNonAssocRing
 
-/-- Pushforward a `NonUnitalNonAssocRing` instance along a surjective function. -/
-@[reducible] -- See note [reducible non-instances]
-protected def Function.Surjective.nonUnitalNonAssocRing [NonUnitalNonAssocRing α] (f : α → β)
-    (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
-    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalNonAssocRing β where
-  toAddCommGroup := hf.addCommGroup f zero add neg sub nsmul zsmul
-  __ := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
-#align function.surjective.non_unital_non_assoc_ring Function.Surjective.nonUnitalNonAssocRing
-
 /-- Pullback a `NonUnitalRing` instance along an injective function. -/
 @[reducible] -- See note [reducible non-instances]
-protected def Function.Injective.nonUnitalRing [NonUnitalRing α] (f : β → α) (hf : Injective f)
+protected def nonUnitalRing [NonUnitalRing α]
     (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) :
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) :
     NonUnitalRing β where
   toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
   __ := hf.nonUnitalSemiring f zero add mul nsmul
 #align function.injective.non_unital_ring Function.Injective.nonUnitalRing
 
-/-- Pushforward a `NonUnitalRing` instance along a surjective function. -/
-@[reducible] -- See note [reducible non-instances]
-protected def Function.Surjective.nonUnitalRing [NonUnitalRing α] (f : α → β) (hf : Surjective f)
-    (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) :
-    NonUnitalRing β where
-  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
-  __ := hf.nonUnitalSemiring f zero add mul nsmul
-#align function.surjective.non_unital_ring Function.Surjective.nonUnitalRing
-
 /-- Pullback a `NonAssocRing` instance along an injective function. -/
 @[reducible] -- See note [reducible non-instances]
-protected def Function.Injective.nonAssocRing [NonAssocRing α] (f : β → α) (hf : Injective f)
+protected def nonAssocRing [NonAssocRing α]
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
-    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) (nat_cast : ∀ n : ℕ, f n = n)
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
+    (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) (nat_cast : ∀ n : ℕ, f n = n)
     (int_cast : ∀ n : ℤ, f n = n) : NonAssocRing β where
   toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
   __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
   __ := hf.addCommGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
 #align function.injective.non_assoc_ring Function.Injective.nonAssocRing
 
-/-- Pushforward a `NonAssocRing` instance along a surjective function. -/
-@[reducible] -- See note [reducible non-instances]
-protected def Function.Surjective.nonAssocRing [NonAssocRing α] (f : α → β) (hf : Surjective f)
-    (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
-    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) (nat_cast : ∀ n : ℕ, f n = n)
-    (int_cast : ∀ n : ℤ, f n = n) : NonAssocRing β where
-  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
-  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
-  __ := hf.addCommGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
-#align function.surjective.non_assoc_ring Function.Surjective.nonAssocRing
-
 /-- Pullback a `Ring` instance along an injective function. -/
 @[reducible] -- See note [reducible non-instances]
-protected def Function.Injective.ring [Ring α] (f : β → α) (hf : Injective f) (zero : f 0 = 0)
+protected def ring [Ring α] (zero : f 0 = 0)
     (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
     (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n)
     (int_cast : ∀ n : ℤ, f n = n) : Ring β where
   toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
   __ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
-  __ := hf.addCommGroup f zero add neg sub nsmul zsmul
+  __ := hf.addCommGroup f zero add neg sub (swap nsmul) (swap zsmul)
 #align function.injective.ring Function.Injective.ring
 
-/-- Pushforward a `Ring` instance along a surjective function. -/
-@[reducible] -- See note [reducible non-instances]
-protected def Function.Surjective.ring [Ring α] (f : α → β) (hf : Surjective f) (zero : f 0 = 0)
-    (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x)
-    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n)
-    (int_cast : ∀ n : ℤ, f n = n) : Ring β where
-  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
-  __ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
-  __ := hf.addCommGroup f zero add neg sub nsmul zsmul
-#align function.surjective.ring Function.Surjective.ring
-
 /-- Pullback a `NonUnitalNonAssocCommSemiring` instance along an injective function. -/
 @[reducible] -- See note [reducible non-instances]
-protected def Function.Injective.nonUnitalNonAssocCommSemiring [NonUnitalNonAssocCommSemiring α]
-    (f : β → α) (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
-    NonUnitalNonAssocCommSemiring β where
-  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
-  __ := hf.commMagma f mul
-
-/-- Pushforward a `NonUnitalNonAssocCommSemiring` instance along a surjective function. -/
-@[reducible] -- See note [reducible non-instances]
-protected def Function.Surjective.nonUnitalNonAssocCommSemiring  [NonUnitalNonAssocCommSemiring α]
-    (f : α → β) (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
+protected def nonUnitalNonAssocCommSemiring [NonUnitalNonAssocCommSemiring α]
+    (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) :
     NonUnitalNonAssocCommSemiring β where
   toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
   __ := hf.commMagma f mul
 
 /-- Pullback a `NonUnitalCommSemiring` instance along an injective function. -/
 @[reducible] -- See note [reducible non-instances]
-protected def Function.Injective.nonUnitalCommSemiring [NonUnitalCommSemiring α] (f : β → α)
+protected def nonUnitalCommSemiring [NonUnitalCommSemiring α] (f : β → α)
     (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) :
     NonUnitalCommSemiring β where
   toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
   __ := hf.commSemigroup f mul
 #align function.injective.non_unital_comm_semiring Function.Injective.nonUnitalCommSemiring
 
-/-- Pushforward a `NonUnitalCommSemiring` instance along a surjective function. -/
-@[reducible] -- See note [reducible non-instances]
-protected def Function.Surjective.nonUnitalCommSemiring [NonUnitalCommSemiring α] (f : α → β)
-    (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
-    NonUnitalCommSemiring β where
-  toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
-  __ := hf.commSemigroup f mul
-#align function.surjective.non_unital_comm_semiring Function.Surjective.nonUnitalCommSemiring
-
 -- `NonAssocCommSemiring` currently doesn't exist
 
 /-- Pullback a `CommSemiring` instance along an injective function. -/
 @[reducible] -- See note [reducible non-instances]
-protected def Function.Injective.commSemiring [CommSemiring α] (f : β → α) (hf : Injective f)
+protected def commSemiring [CommSemiring α]
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
     (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n) :
     CommSemiring β where
   toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
   __ := hf.commSemigroup f mul
 #align function.injective.comm_semiring Function.Injective.commSemiring
 
-/-- Pushforward a `CommSemiring` instance along a surjective function. -/
-@[reducible] -- See note [reducible non-instances]
-protected def Function.Surjective.commSemiring [CommSemiring α] (f : α → β) (hf : Surjective f)
-    (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n) :
-    CommSemiring β where
-  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
-  __ := hf.commSemigroup f mul
-#align function.surjective.comm_semiring Function.Surjective.commSemiring
-
 /-- Pullback a `NonUnitalNonAssocCommRing` instance along an injective function. -/
 @[reducible] -- See note [reducible non-instances]
-protected def Function.Injective.nonUnitalNonAssocCommRing [NonUnitalNonAssocCommRing α] (f : β → α)
+protected def nonUnitalNonAssocCommRing [NonUnitalNonAssocCommRing α] (f : β → α)
     (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
-    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalNonAssocCommRing β where
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
+    (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) : NonUnitalNonAssocCommRing β where
   toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
   __ := hf.nonUnitalNonAssocCommSemiring f zero add mul nsmul
 
-/-- Pushforward a `NonUnitalNonAssocCommRing` instance along a surjective function. -/
-@[reducible] -- See note [reducible non-instances]
-protected def Function.Surjective.nonUnitalNonAssocCommRing [NonUnitalNonAssocCommRing α]
-    (f : α → β) (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
-    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalNonAssocCommRing β where
-  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
-  __ := hf.nonUnitalNonAssocCommSemiring f zero add mul nsmul
-
-/-- Pullback a `NonUnitalCommRing` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.nonUnitalCommRing [NonUnitalCommRing α] (f : β → α)
+/-- Pullback a `NonUnitalCommRing` instance along an injective function. -/
+@[reducible] -- -- See note [reducible non-instances]
+protected def nonUnitalCommRing [NonUnitalCommRing α] (f : β → α)
     (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
-    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalCommRing β where
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
+    (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) : NonUnitalCommRing β where
   toNonUnitalRing := hf.nonUnitalRing f zero add mul neg sub nsmul zsmul
   __ := hf.nonUnitalNonAssocCommRing f zero add mul neg sub nsmul zsmul
 #align function.injective.non_unital_comm_ring Function.Injective.nonUnitalCommRing
 
-/-- Pushforward a `NonUnitalCommRing` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.nonUnitalCommRing [NonUnitalCommRing α] (f : α → β)
-    (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
-    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalCommRing β where
-  toNonUnitalRing := hf.nonUnitalRing f zero add mul neg sub nsmul zsmul
-  __ := hf.nonUnitalNonAssocCommRing f zero add mul neg sub nsmul zsmul
-#align function.surjective.non_unital_comm_ring Function.Surjective.nonUnitalCommRing
-
-/-- Pullback a `CommRing` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.commRing [CommRing α] (f : β → α) (hf : Injective f)
+/-- Pullback a `CommRing` instance along an injective function. -/
+@[reducible] -- -- See note [reducible non-instances]
+protected def commRing [CommRing α]
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
-    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
+    (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
     (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : CommRing β where
   toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast
   __ := hf.commMonoid f one mul npow
 #align function.injective.comm_ring Function.Injective.commRing
 
-/-- Pushforward a `CommRing` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.commRing [CommRing α] (f : α → β) (hf : Surjective f)
-    (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
-    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : CommRing β where
-  toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast
-  __ := hf.commMonoid f one mul npow
-#align function.surjective.comm_ring Function.Surjective.commRing
-
-end InjectiveSurjectiveMaps
+end Function.Injective
 
-section HasDistribNeg
-variable [Mul α] [HasDistribNeg α]
+namespace Function.Surjective
+variable (f : α → β) (hf : Surjective f)
 
--- See note [reducible non-instances]
-/-- A type endowed with `-` and `*` has distributive negation, if it admits an injective map that
-preserves `-` and `*` to a type which has distributive negation. -/
-@[reducible]
-protected def Function.Injective.hasDistribNeg [Neg β] [Mul β] (f : β → α) (hf : Injective f)
-    (neg : ∀ a, f (-a) = -f a) (mul : ∀ a b, f (a * b) = f a * f b) : HasDistribNeg β :=
-  { hf.involutiveNeg _ neg, ‹Mul β› with
-    neg_mul := fun x y => hf <| by erw [neg, mul, neg, neg_mul, mul],
-    mul_neg := fun x y => hf <| by erw [neg, mul, neg, mul_neg, mul] }
-#align function.injective.has_distrib_neg Function.Injective.hasDistribNeg
+/-- Pushforward a `Distrib` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def distrib [Distrib α] (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) : Distrib β where
+  left_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, left_distrib]
+  right_distrib := hf.forall₃.2 fun x y z => by simp only [← add, ← mul, right_distrib]
+#align function.surjective.distrib Function.Surjective.distrib
 
--- See note [reducible non-instances]
 /-- A type endowed with `-` and `*` has distributive negation, if it admits a surjective map that
 preserves `-` and `*` from a type which has distributive negation. -/
-@[reducible]
-protected def Function.Surjective.hasDistribNeg [Neg β] [Mul β] (f : α → β) (hf : Surjective f)
+@[reducible] -- See note [reducible non-instances]
+protected def hasDistribNeg [Mul α] [HasDistribNeg α]
     (neg : ∀ a, f (-a) = -f a) (mul : ∀ a b, f (a * b) = f a * f b) : HasDistribNeg β :=
   { hf.involutiveNeg _ neg, ‹Mul β› with
     neg_mul := hf.forall₂.2 fun x y => by erw [← neg, ← mul, neg_mul, neg, mul]
     mul_neg := hf.forall₂.2 fun x y => by erw [← neg, ← mul, mul_neg, neg, mul] }
 #align function.surjective.has_distrib_neg Function.Surjective.hasDistribNeg
 
+/-- Pushforward a `NonUnitalNonAssocSemiring` instance along a surjective function.
+See note [reducible non-instances]. -/
+@[reducible]
+protected def nonUnitalNonAssocSemiring [NonUnitalNonAssocSemiring α] (zero : f 0 = 0)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β where
+  toAddCommMonoid := hf.addCommMonoid f zero add (swap nsmul)
+  __ := hf.distrib f add mul
+  __ := hf.mulZeroClass f zero mul
+#align function.surjective.non_unital_non_assoc_semiring Function.Surjective.nonUnitalNonAssocSemiring
+
+/-- Pushforward a `NonUnitalSemiring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonUnitalSemiring [NonUnitalSemiring α] (zero : f 0 = 0)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) : NonUnitalSemiring β where
+  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+  __ := hf.semigroupWithZero f zero mul
+#align function.surjective.non_unital_semiring Function.Surjective.nonUnitalSemiring
+
+/-- Pushforward a `NonAssocSemiring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonAssocSemiring [NonAssocSemiring α] (zero : f 0 = 0) (one : f 1 = 1)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
+    (nat_cast : ∀ n : ℕ, f n = n) : NonAssocSemiring β where
+  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+  __ := hf.mulZeroOneClass f zero one mul
+  __ := hf.addMonoidWithOne f zero one add nsmul nat_cast
+#align function.surjective.non_assoc_semiring Function.Surjective.nonAssocSemiring
+
+/-- Pushforward a `Semiring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def semiring [Semiring α] (zero : f 0 = 0) (one : f 1 = 1)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n) : Semiring β where
+  toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
+  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
+  __ := hf.monoidWithZero f zero one mul npow
+#align function.surjective.semiring Function.Surjective.semiring
+
+/-- Pushforward a `NonUnitalNonAssocRing` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonUnitalNonAssocRing [NonUnitalNonAssocRing α] (zero : f 0 = 0)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) :
+    NonUnitalNonAssocRing β where
+  toAddCommGroup := hf.addCommGroup f zero add neg sub (swap nsmul) (swap zsmul)
+  __ := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+#align function.surjective.non_unital_non_assoc_ring Function.Surjective.nonUnitalNonAssocRing
+
+/-- Pushforward a `NonUnitalRing` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonUnitalRing [NonUnitalRing α] (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y)
+    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) :
+    NonUnitalRing β where
+  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonUnitalSemiring f zero add mul nsmul
+#align function.surjective.non_unital_ring Function.Surjective.nonUnitalRing
+
+/-- Pushforward a `NonAssocRing` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonAssocRing [NonAssocRing α] (zero : f 0 = 0) (one : f 1 = 1)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
+    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : NonAssocRing β where
+  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
+  __ := hf.addCommGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
+#align function.surjective.non_assoc_ring Function.Surjective.nonAssocRing
+
+/-- Pushforward a `Ring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def ring [Ring α] (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y)
+    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n)
+    (int_cast : ∀ n : ℤ, f n = n) : Ring β where
+  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
+  __ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
+  __ := hf.addCommGroup f zero add neg sub (swap nsmul) (swap zsmul)
+#align function.surjective.ring Function.Surjective.ring
+
+/-- Pushforward a `NonUnitalNonAssocCommSemiring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonUnitalNonAssocCommSemiring  [NonUnitalNonAssocCommSemiring α] (zero : f 0 = 0)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) : NonUnitalNonAssocCommSemiring β where
+  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+  __ := hf.commMagma f mul
+
+/-- Pushforward a `NonUnitalCommSemiring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonUnitalCommSemiring [NonUnitalCommSemiring α] (zero : f 0 = 0)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) : NonUnitalCommSemiring β where
+  toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
+  __ := hf.commSemigroup f mul
+#align function.surjective.non_unital_comm_semiring Function.Surjective.nonUnitalCommSemiring
+
+/-- Pushforward a `CommSemiring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def commSemiring [CommSemiring α] (zero : f 0 = 0) (one : f 1 = 1)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
+    (nat_cast : ∀ n : ℕ, f n = n) : CommSemiring β where
+  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
+  __ := hf.commSemigroup f mul
+#align function.surjective.comm_semiring Function.Surjective.commSemiring
+
+/-- Pushforward a `NonUnitalNonAssocCommRing` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonUnitalNonAssocCommRing [NonUnitalNonAssocCommRing α]
+    (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x)
+    (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) : NonUnitalNonAssocCommRing β where
+  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonUnitalNonAssocCommSemiring f zero add mul nsmul
+
+/-- Pushforward a `NonUnitalCommRing` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def nonUnitalCommRing [NonUnitalCommRing α] (zero : f 0 = 0)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x) :
+    NonUnitalCommRing β where
+  toNonUnitalRing := hf.nonUnitalRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonUnitalNonAssocCommRing f zero add mul neg sub nsmul zsmul
+#align function.surjective.non_unital_comm_ring Function.Surjective.nonUnitalCommRing
+
+/-- Pushforward a `CommRing` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def commRing [CommRing α] (zero : f 0 = 0) (one : f 1 = 1)
+    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
+    (nsmul : ∀ (n : ℕ) (x), f (n • x) = n • f x) (zsmul : ∀ (n : ℤ) (x), f (n • x) = n • f x)
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
+    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : CommRing β where
+  toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast
+  __ := hf.commMonoid f one mul npow
+#align function.surjective.comm_ring Function.Surjective.commRing
+
+end Function.Surjective
+
+variable [Mul α] [HasDistribNeg α]
+
 instance AddOpposite.instHasDistribNeg : HasDistribNeg αᵃᵒᵖ :=
   unop_injective.hasDistribNeg _ unop_neg unop_mul
-
-end HasDistribNeg
chore: tidy various files (#11624)
Diff
@@ -304,7 +304,7 @@ protected def Function.Injective.commSemiring [CommSemiring α] (f : β → α)
   __ := hf.commSemigroup f mul
 #align function.injective.comm_semiring Function.Injective.commSemiring
 
-/-- Pushforward a `NonAssocSemiring` instance along a surjective function. -/
+/-- Pushforward a `CommSemiring` instance along a surjective function. -/
 @[reducible] -- See note [reducible non-instances]
 protected def Function.Surjective.commSemiring [CommSemiring α] (f : α → β) (hf : Surjective f)
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
perf: Use spread notation in ring transfer definitions (#10131)

Make sure that Function.Injective.somethingRing looks like

def ... : SomethingRing β where
  toA := hf.a f ...
  __ := hf.b f ...
  __ := hf.c f ...

if SomethingRing α extends A α, B α, C α.

This should hopefully give a performance boost in applications.

Incidentally, there were a few missing transfer definitions, so I added them as I needed them.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Johan Commelin <johan@commelin.net>

Diff
@@ -56,17 +56,19 @@ section InjectiveSurjectiveMaps
 ### Semirings
 -/
 
+variable [Zero β] [One β] [Add β] [Mul β] [Neg β] [Sub β] [SMul ℕ β] [SMul ℤ β] [Pow β ℕ]
+  [NatCast β] [IntCast β]
 
-variable [Zero β] [Add β] [Mul β] [SMul ℕ β]
-
-/-- Pullback a `NonUnitalNonAssocRing` instance along an injective function.
+/-- Pullback a `NonUnitalNonAssocSemiring` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
 protected def Function.Injective.nonUnitalNonAssocSemiring {α : Type u}
     [NonUnitalNonAssocSemiring α] (f : β → α) (hf : Injective f) (zero : f 0 = 0)
     (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β :=
-  { hf.mulZeroClass f zero mul, hf.addCommMonoid f zero add nsmul, hf.distrib f add mul with }
+    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β where
+  toAddCommMonoid := hf.addCommMonoid f zero add nsmul
+  __ := hf.distrib f add mul
+  __ := hf.mulZeroClass f zero mul
 #align function.injective.non_unital_non_assoc_semiring Function.Injective.nonUnitalNonAssocSemiring
 
 /-- Pullback a `NonUnitalSemiring` instance along an injective function.
@@ -75,8 +77,9 @@ See note [reducible non-instances]. -/
 protected def Function.Injective.nonUnitalSemiring {α : Type u} [NonUnitalSemiring α] (f : β → α)
     (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
-    NonUnitalSemiring β :=
-  { hf.nonUnitalNonAssocSemiring f zero add mul nsmul, hf.semigroupWithZero f zero mul with }
+    NonUnitalSemiring β where
+  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+  __ := hf.semigroupWithZero f zero mul
 #align function.injective.non_unital_semiring Function.Injective.nonUnitalSemiring
 
 /-- Pullback a `NonAssocSemiring` instance along an injective function.
@@ -86,10 +89,10 @@ protected def Function.Injective.nonAssocSemiring {α : Type u} [NonAssocSemirin
     [Zero β] [One β] [Mul β] [Add β] [SMul ℕ β] [NatCast β] (f : β → α) (hf : Injective f)
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (nat_cast : ∀ n : ℕ, f n = n) : NonAssocSemiring β :=
-  { hf.addMonoidWithOne f zero one add nsmul nat_cast,
-    hf.nonUnitalNonAssocSemiring f zero add mul nsmul,
-    hf.mulOneClass f one mul with }
+    (nat_cast : ∀ n : ℕ, f n = n) : NonAssocSemiring β where
+  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+  __ := hf.mulZeroOneClass f zero one mul
+  __ := hf.addMonoidWithOne f zero one add nsmul nat_cast
 #align function.injective.non_assoc_semiring Function.Injective.nonAssocSemiring
 
 /-- Pullback a `Semiring` instance along an injective function.
@@ -99,10 +102,10 @@ protected def Function.Injective.semiring {α : Type u} [Semiring α] {β : Type
     [Add β] [Mul β] [Pow β ℕ] [SMul ℕ β] [NatCast β] (f : β → α) (hf : Injective f) (zero : f 0 = 0)
     (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (nat_cast : ∀ n : ℕ, f n = n) : Semiring β :=
-  { hf.nonAssocSemiring f zero one add mul nsmul nat_cast,
-    hf.monoidWithZero f zero one mul npow,
-    hf.distrib f add mul with }
+    (nat_cast : ∀ n : ℕ, f n = n) : Semiring β where
+  toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
+  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
+  __ := hf.monoidWithZero f zero one mul npow
 #align function.injective.semiring Function.Injective.semiring
 
 /-- Pushforward a `NonUnitalNonAssocSemiring` instance along a surjective function.
@@ -111,8 +114,10 @@ See note [reducible non-instances]. -/
 protected def Function.Surjective.nonUnitalNonAssocSemiring {α : Type u}
     [NonUnitalNonAssocSemiring α] (f : α → β) (hf : Surjective f) (zero : f 0 = 0)
     (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β :=
-  { hf.mulZeroClass f zero mul, hf.addCommMonoid f zero add nsmul, hf.distrib f add mul with }
+    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β where
+  toAddCommMonoid := hf.addCommMonoid f zero add nsmul
+  __ := hf.distrib f add mul
+  __ := hf.mulZeroClass f zero mul
 #align function.surjective.non_unital_non_assoc_semiring Function.Surjective.nonUnitalNonAssocSemiring
 
 /-- Pushforward a `NonUnitalSemiring` instance along a surjective function.
@@ -121,8 +126,9 @@ See note [reducible non-instances]. -/
 protected def Function.Surjective.nonUnitalSemiring {α : Type u} [NonUnitalSemiring α] (f : α → β)
     (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
-    NonUnitalSemiring β :=
-  { hf.nonUnitalNonAssocSemiring f zero add mul nsmul, hf.semigroupWithZero f zero mul with }
+    NonUnitalSemiring β where
+  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+  __ := hf.semigroupWithZero f zero mul
 #align function.surjective.non_unital_semiring Function.Surjective.nonUnitalSemiring
 
 /-- Pushforward a `NonAssocSemiring` instance along a surjective function.
@@ -132,10 +138,10 @@ protected def Function.Surjective.nonAssocSemiring {α : Type u} [NonAssocSemiri
     [Zero β] [One β] [Add β] [Mul β] [SMul ℕ β] [NatCast β] (f : α → β) (hf : Surjective f)
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (nat_cast : ∀ n : ℕ, f n = n) : NonAssocSemiring β :=
-  { hf.addMonoidWithOne f zero one add nsmul nat_cast,
-    hf.nonUnitalNonAssocSemiring f zero add mul nsmul,
-    hf.mulOneClass f one mul with }
+    (nat_cast : ∀ n : ℕ, f n = n) : NonAssocSemiring β where
+  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+  __ := hf.mulZeroOneClass f zero one mul
+  __ := hf.addMonoidWithOne f zero one add nsmul nat_cast
 #align function.surjective.non_assoc_semiring Function.Surjective.nonAssocSemiring
 
 /-- Pushforward a `Semiring` instance along a surjective function.
@@ -145,323 +151,268 @@ protected def Function.Surjective.semiring {α : Type u} [Semiring α] {β : Typ
     [Add β] [Mul β] [Pow β ℕ] [SMul ℕ β] [NatCast β] (f : α → β) (hf : Surjective f)
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n) : Semiring β :=
-  { hf.nonAssocSemiring f zero one add mul nsmul nat_cast,
-    hf.monoidWithZero f zero one mul npow,
-    hf.addCommMonoid f zero add nsmul,
-    hf.distrib f add mul with }
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n) : Semiring β where
+  toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
+  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
+  __ := hf.monoidWithZero f zero one mul npow
 #align function.surjective.semiring Function.Surjective.semiring
 
-end InjectiveSurjectiveMaps
-
-section NonUnitalCommSemiring
-
-variable [NonUnitalCommSemiring α] [NonUnitalCommSemiring β] {a b c : α}
-
-/-- Pullback a `NonUnitalCommSemiring` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.nonUnitalCommSemiring [Zero γ] [Add γ] [Mul γ] [SMul ℕ γ]
-    (f : γ → α) (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
-    NonUnitalCommSemiring γ :=
-  { hf.nonUnitalSemiring f zero add mul nsmul, hf.commSemigroup f mul with }
-#align function.injective.non_unital_comm_semiring Function.Injective.nonUnitalCommSemiring
-
-/-- Pushforward a `NonUnitalCommSemiring` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.nonUnitalCommSemiring [Zero γ] [Add γ] [Mul γ] [SMul ℕ γ]
-    (f : α → γ) (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
-    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
-    NonUnitalCommSemiring γ :=
-  { hf.nonUnitalSemiring f zero add mul nsmul, hf.commSemigroup f mul with }
-#align function.surjective.non_unital_comm_semiring Function.Surjective.nonUnitalCommSemiring
-
-end NonUnitalCommSemiring
-
-section CommSemiring
-
-variable [CommSemiring α] [CommSemiring β] {a b c : α}
-
-/-- Pullback a `CommSemiring` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.commSemiring [Zero γ] [One γ] [Add γ] [Mul γ] [SMul ℕ γ]
-    [NatCast γ] [Pow γ ℕ] (f : γ → α) (hf : Injective f) (zero : f 0 = 0) (one : f 1 = 1)
-    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (nat_cast : ∀ n : ℕ, f n = n) : CommSemiring γ :=
-  { hf.semiring f zero one add mul nsmul npow nat_cast, hf.commSemigroup f mul with }
-#align function.injective.comm_semiring Function.Injective.commSemiring
-
-/-- Pushforward a `CommSemiring` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.commSemiring [Zero γ] [One γ] [Add γ] [Mul γ] [SMul ℕ γ]
-    [NatCast γ] [Pow γ ℕ] (f : α → γ) (hf : Surjective f) (zero : f 0 = 0) (one : f 1 = 1)
-    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (nat_cast : ∀ n : ℕ, f n = n) : CommSemiring γ :=
-  { hf.semiring f zero one add mul nsmul npow nat_cast, hf.commSemigroup f mul with }
-#align function.surjective.comm_semiring Function.Surjective.commSemiring
-
-end CommSemiring
-
-section HasDistribNeg
-
-section Mul
-
-variable [Mul α] [HasDistribNeg α]
-
--- See note [reducible non-instances]
-/-- A type endowed with `-` and `*` has distributive negation, if it admits an injective map that
-preserves `-` and `*` to a type which has distributive negation. -/
-@[reducible]
-protected def Function.Injective.hasDistribNeg [Neg β] [Mul β] (f : β → α) (hf : Injective f)
-    (neg : ∀ a, f (-a) = -f a) (mul : ∀ a b, f (a * b) = f a * f b) : HasDistribNeg β :=
-  { hf.involutiveNeg _ neg, ‹Mul β› with
-    neg_mul := fun x y => hf <| by erw [neg, mul, neg, neg_mul, mul],
-    mul_neg := fun x y => hf <| by erw [neg, mul, neg, mul_neg, mul] }
-#align function.injective.has_distrib_neg Function.Injective.hasDistribNeg
-
--- See note [reducible non-instances]
-/-- A type endowed with `-` and `*` has distributive negation, if it admits a surjective map that
-preserves `-` and `*` from a type which has distributive negation. -/
-@[reducible]
-protected def Function.Surjective.hasDistribNeg [Neg β] [Mul β] (f : α → β) (hf : Surjective f)
-    (neg : ∀ a, f (-a) = -f a) (mul : ∀ a b, f (a * b) = f a * f b) : HasDistribNeg β :=
-  { hf.involutiveNeg _ neg, ‹Mul β› with
-    neg_mul := hf.forall₂.2 fun x y => by erw [← neg, ← mul, neg_mul, neg, mul]
-    mul_neg := hf.forall₂.2 fun x y => by erw [← neg, ← mul, mul_neg, neg, mul] }
-#align function.surjective.has_distrib_neg Function.Surjective.hasDistribNeg
-
-namespace AddOpposite
-
-instance : HasDistribNeg αᵃᵒᵖ :=
-  unop_injective.hasDistribNeg _ unop_neg unop_mul
-
-end AddOpposite
-
-end Mul
-
-end HasDistribNeg
-
-/-!
-### Rings
--/
-
-
-section NonUnitalNonAssocRing
+/-- Pullback a `NonUnitalNonAssocRing` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Injective.nonUnitalNonAssocRing [NonUnitalNonAssocRing α] (f : β → α)
+    (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
+    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalNonAssocRing β where
+  toAddCommGroup := hf.addCommGroup f zero add neg sub nsmul zsmul
+  __ := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+#align function.injective.non_unital_non_assoc_ring Function.Injective.nonUnitalNonAssocRing
 
-variable [NonUnitalNonAssocRing α]
+/-- Pushforward a `NonUnitalNonAssocRing` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Surjective.nonUnitalNonAssocRing [NonUnitalNonAssocRing α] (f : α → β)
+    (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
+    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalNonAssocRing β where
+  toAddCommGroup := hf.addCommGroup f zero add neg sub nsmul zsmul
+  __ := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+#align function.surjective.non_unital_non_assoc_ring Function.Surjective.nonUnitalNonAssocRing
 
-/-- Pullback a `NonUnitalNonAssocRing` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.nonUnitalNonAssocRing [Zero β] [Add β] [Mul β] [Neg β] [Sub β]
-    [SMul ℕ β] [SMul ℤ β] (f : β → α) (hf : Injective f) (zero : f 0 = 0)
-    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+/-- Pullback a `NonUnitalRing` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Injective.nonUnitalRing [NonUnitalRing α] (f : β → α) (hf : Injective f)
+    (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
     (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) :
-    NonUnitalNonAssocRing β :=
-  { hf.addCommGroup f zero add neg sub nsmul zsmul,
-    hf.mulZeroClass f zero mul,
-    hf.distrib f add mul with }
-#align function.injective.non_unital_non_assoc_ring Function.Injective.nonUnitalNonAssocRing
+    NonUnitalRing β where
+  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonUnitalSemiring f zero add mul nsmul
+#align function.injective.non_unital_ring Function.Injective.nonUnitalRing
 
-/-- Pushforward a `NonUnitalNonAssocRing` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.nonUnitalNonAssocRing [Zero β] [Add β] [Mul β] [Neg β] [Sub β]
-    [SMul ℕ β] [SMul ℤ β] (f : α → β) (hf : Surjective f) (zero : f 0 = 0)
-    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
+/-- Pushforward a `NonUnitalRing` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Surjective.nonUnitalRing [NonUnitalRing α] (f : α → β) (hf : Surjective f)
+    (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
     (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) :
-    NonUnitalNonAssocRing β :=
-  { hf.addCommGroup f zero add neg sub nsmul zsmul,
-    hf.mulZeroClass f zero mul,
-    hf.distrib f add mul with }
-#align function.surjective.non_unital_non_assoc_ring Function.Surjective.nonUnitalNonAssocRing
-
-end NonUnitalNonAssocRing
-
-section NonUnitalRing
-
-variable [NonUnitalRing α]
+    NonUnitalRing β where
+  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonUnitalSemiring f zero add mul nsmul
+#align function.surjective.non_unital_ring Function.Surjective.nonUnitalRing
 
-/-- Pullback a `NonUnitalRing` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.nonUnitalRing [Zero β] [Add β] [Mul β] [Neg β] [Sub β] [SMul ℕ β]
-    [SMul ℤ β] (f : β → α) (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+/-- Pullback a `NonAssocRing` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Injective.nonAssocRing [NonAssocRing α] (f : β → α) (hf : Injective f)
+    (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
     (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (gsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalRing β :=
-  { hf.addCommGroup f zero add neg sub nsmul gsmul,
-    hf.mulZeroClass f zero mul,
-    hf.distrib f add mul,
-    hf.semigroup f mul with }
-#align function.injective.non_unital_ring Function.Injective.nonUnitalRing
+    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) (nat_cast : ∀ n : ℕ, f n = n)
+    (int_cast : ∀ n : ℤ, f n = n) : NonAssocRing β where
+  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
+  __ := hf.addCommGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
+#align function.injective.non_assoc_ring Function.Injective.nonAssocRing
 
-/-- Pushforward a `NonUnitalRing` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.nonUnitalRing [Zero β] [Add β] [Mul β] [Neg β] [Sub β] [SMul ℕ β]
-    [SMul ℤ β] (f : α → β) (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+/-- Pushforward a `NonAssocRing` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Surjective.nonAssocRing [NonAssocRing α] (f : α → β) (hf : Surjective f)
+    (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
     (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
-    (gsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalRing β :=
-  { hf.addCommGroup f zero add neg sub nsmul gsmul,
-    hf.mulZeroClass f zero mul,
-    hf.distrib f add mul,
-    hf.semigroup f mul with }
-#align function.surjective.non_unital_ring Function.Surjective.nonUnitalRing
-
-end NonUnitalRing
-
-section NonAssocRing
-
-variable [NonAssocRing α]
-
--- porting note: for some reason this declaration is very slow?
-/-- Pullback a `NonAssocRing` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.nonAssocRing [Zero β] [One β] [Add β] [Mul β] [Neg β] [Sub β]
-    [SMul ℕ β] [SMul ℤ β] [NatCast β] [IntCast β] (f : β → α) (hf : Injective f) (zero : f 0 = 0)
-    (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (gsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x)
-    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : NonAssocRing β :=
-  { hf.addCommGroup f zero add neg sub nsmul gsmul,
-    hf.addGroupWithOne f zero one add neg sub nsmul gsmul nat_cast int_cast,
-    hf.mulZeroClass f zero mul,
-    hf.distrib f add mul,
-    hf.mulOneClass f one mul with }
-#align function.injective.non_assoc_ring Function.Injective.nonAssocRing
-
-/-- Pushforward a `NonAssocRing` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.nonAssocRing [Zero β] [One β] [Add β] [Mul β] [Neg β] [Sub β]
-    [SMul ℕ β] [SMul ℤ β] [NatCast β] [IntCast β] (f : α → β) (hf : Surjective f) (zero : f 0 = 0)
-    (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (gsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x)
-    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) :
-    NonAssocRing β :=
-  { hf.addCommGroup f zero add neg sub nsmul gsmul,
-    hf.mulZeroClass f zero mul,
-    hf.addGroupWithOne f zero one add neg sub nsmul gsmul nat_cast int_cast,
-    hf.distrib f add mul,
-    hf.mulOneClass f one mul with }
+    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) (nat_cast : ∀ n : ℕ, f n = n)
+    (int_cast : ∀ n : ℤ, f n = n) : NonAssocRing β where
+  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonAssocSemiring f zero one add mul nsmul nat_cast
+  __ := hf.addCommGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
 #align function.surjective.non_assoc_ring Function.Surjective.nonAssocRing
 
-end NonAssocRing
-
-section Ring
-
-variable [Ring α] {a b c d e : α}
-
-/-- Pullback a `Ring` instance along an injective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Injective.ring [Zero β] [One β] [Add β] [Mul β] [Neg β] [Sub β] [SMul ℕ β]
-    [SMul ℤ β] [Pow β ℕ] [NatCast β] [IntCast β] (f : β → α) (hf : Injective f) (zero : f 0 = 0)
+/-- Pullback a `Ring` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Injective.ring [Ring α] (f : β → α) (hf : Injective f) (zero : f 0 = 0)
     (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
     (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x)
     (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n)
-    (int_cast : ∀ n : ℤ, f n = n) : Ring β :=
-  { hf.mulZeroClass f zero mul, -- porting note: had to add this explicitly?
-    hf.addGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast,
-    hf.addCommGroup f zero add neg sub nsmul zsmul,
-    hf.monoid f one mul npow,
-    hf.distrib f add mul with }
+    (int_cast : ∀ n : ℤ, f n = n) : Ring β where
+  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
+  __ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
+  __ := hf.addCommGroup f zero add neg sub nsmul zsmul
 #align function.injective.ring Function.Injective.ring
 
-/-- Pushforward a `Ring` instance along a surjective function.
-See note [reducible non-instances]. -/
-@[reducible]
-protected def Function.Surjective.ring [Zero β] [One β] [Add β] [Mul β] [Neg β] [Sub β] [SMul ℕ β]
-    [SMul ℤ β] [Pow β ℕ] [NatCast β] [IntCast β] (f : α → β) (hf : Surjective f) (zero : f 0 = 0)
+/-- Pushforward a `Ring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Surjective.ring [Ring α] (f : α → β) (hf : Surjective f) (zero : f 0 = 0)
     (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
     (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x)
     (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n)
-    (int_cast : ∀ n : ℤ, f n = n) : Ring β :=
-  { hf.mulZeroClass f zero mul, -- porting note: had to add this explicitly?
-    hf.addGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast,
-    hf.addCommGroup f zero add neg sub nsmul zsmul,
-    hf.monoid f one mul npow,
-    hf.distrib f add mul with }
+    (int_cast : ∀ n : ℤ, f n = n) : Ring β where
+  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
+  __ := hf.addGroupWithOne f zero one add neg sub nsmul zsmul nat_cast int_cast
+  __ := hf.addCommGroup f zero add neg sub nsmul zsmul
 #align function.surjective.ring Function.Surjective.ring
 
-end Ring
+/-- Pullback a `NonUnitalNonAssocCommSemiring` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Injective.nonUnitalNonAssocCommSemiring [NonUnitalNonAssocCommSemiring α]
+    (f : β → α) (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
+    NonUnitalNonAssocCommSemiring β where
+  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+  __ := hf.commMagma f mul
+
+/-- Pushforward a `NonUnitalNonAssocCommSemiring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Surjective.nonUnitalNonAssocCommSemiring  [NonUnitalNonAssocCommSemiring α]
+    (f : α → β) (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
+    NonUnitalNonAssocCommSemiring β where
+  toNonUnitalNonAssocSemiring := hf.nonUnitalNonAssocSemiring f zero add mul nsmul
+  __ := hf.commMagma f mul
+
+/-- Pullback a `NonUnitalCommSemiring` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Injective.nonUnitalCommSemiring [NonUnitalCommSemiring α] (f : β → α)
+    (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
+    NonUnitalCommSemiring β where
+  toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
+  __ := hf.commSemigroup f mul
+#align function.injective.non_unital_comm_semiring Function.Injective.nonUnitalCommSemiring
+
+/-- Pushforward a `NonUnitalCommSemiring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Surjective.nonUnitalCommSemiring [NonUnitalCommSemiring α] (f : α → β)
+    (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) :
+    NonUnitalCommSemiring β where
+  toNonUnitalSemiring := hf.nonUnitalSemiring f zero add mul nsmul
+  __ := hf.commSemigroup f mul
+#align function.surjective.non_unital_comm_semiring Function.Surjective.nonUnitalCommSemiring
 
-section NonUnitalCommRing
+-- `NonAssocCommSemiring` currently doesn't exist
 
-variable [NonUnitalCommRing α] {a b c : α}
+/-- Pullback a `CommSemiring` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Injective.commSemiring [CommSemiring α] (f : β → α) (hf : Injective f)
+    (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n) :
+    CommSemiring β where
+  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
+  __ := hf.commSemigroup f mul
+#align function.injective.comm_semiring Function.Injective.commSemiring
+
+/-- Pushforward a `NonAssocSemiring` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Surjective.commSemiring [CommSemiring α] (f : α → β) (hf : Surjective f)
+    (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
+    (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n) (nat_cast : ∀ n : ℕ, f n = n) :
+    CommSemiring β where
+  toSemiring := hf.semiring f zero one add mul nsmul npow nat_cast
+  __ := hf.commSemigroup f mul
+#align function.surjective.comm_semiring Function.Surjective.commSemiring
+
+/-- Pullback a `NonUnitalNonAssocCommRing` instance along an injective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Injective.nonUnitalNonAssocCommRing [NonUnitalNonAssocCommRing α] (f : β → α)
+    (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
+    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalNonAssocCommRing β where
+  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonUnitalNonAssocCommSemiring f zero add mul nsmul
+
+/-- Pushforward a `NonUnitalNonAssocCommRing` instance along a surjective function. -/
+@[reducible] -- See note [reducible non-instances]
+protected def Function.Surjective.nonUnitalNonAssocCommRing [NonUnitalNonAssocCommRing α]
+    (f : α → β) (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
+    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalNonAssocCommRing β where
+  toNonUnitalNonAssocRing := hf.nonUnitalNonAssocRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonUnitalNonAssocCommSemiring f zero add mul nsmul
 
 /-- Pullback a `NonUnitalCommRing` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
-protected def Function.Injective.nonUnitalCommRing [Zero β] [Add β] [Mul β] [Neg β] [Sub β]
-    [SMul ℕ β] [SMul ℤ β] (f : β → α) (hf : Injective f) (zero : f 0 = 0)
-    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) :
-    NonUnitalCommRing β :=
-  { hf.nonUnitalRing f zero add mul neg sub nsmul zsmul,
-    hf.commSemigroup f mul with }
+protected def Function.Injective.nonUnitalCommRing [NonUnitalCommRing α] (f : β → α)
+    (hf : Injective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
+    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalCommRing β where
+  toNonUnitalRing := hf.nonUnitalRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonUnitalNonAssocCommRing f zero add mul neg sub nsmul zsmul
 #align function.injective.non_unital_comm_ring Function.Injective.nonUnitalCommRing
 
 /-- Pushforward a `NonUnitalCommRing` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
-protected def Function.Surjective.nonUnitalCommRing [Zero β] [Add β] [Mul β] [Neg β] [Sub β]
-    [SMul ℕ β] [SMul ℤ β] (f : α → β) (hf : Surjective f) (zero : f 0 = 0)
-    (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
-    (neg : ∀ x, f (-x) = -f x) (sub : ∀ x y, f (x - y) = f x - f y)
-    (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) :
-    NonUnitalCommRing β :=
-  { hf.nonUnitalRing f zero add mul neg sub nsmul zsmul,
-    hf.commSemigroup f mul with }
+protected def Function.Surjective.nonUnitalCommRing [NonUnitalCommRing α] (f : α → β)
+    (hf : Surjective f) (zero : f 0 = 0) (add : ∀ x y, f (x + y) = f x + f y)
+    (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
+    (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
+    (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) : NonUnitalCommRing β where
+  toNonUnitalRing := hf.nonUnitalRing f zero add mul neg sub nsmul zsmul
+  __ := hf.nonUnitalNonAssocCommRing f zero add mul neg sub nsmul zsmul
 #align function.surjective.non_unital_comm_ring Function.Surjective.nonUnitalCommRing
 
-end NonUnitalCommRing
-
-section CommRing
-
-variable [CommRing α] {a b c : α}
-
 /-- Pullback a `CommRing` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
-protected def Function.Injective.commRing [Zero β] [One β] [Add β] [Mul β] [Neg β] [Sub β]
-    [SMul ℕ β] [SMul ℤ β] [Pow β ℕ] [NatCast β] [IntCast β] (f : β → α) (hf : Injective f)
+protected def Function.Injective.commRing [CommRing α] (f : β → α) (hf : Injective f)
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
     (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
     (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : CommRing β :=
-  { hf.ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast,
-    hf.commSemigroup f mul with }
+    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : CommRing β where
+  toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast
+  __ := hf.commMonoid f one mul npow
 #align function.injective.comm_ring Function.Injective.commRing
 
 /-- Pushforward a `CommRing` instance along a surjective function.
 See note [reducible non-instances]. -/
 @[reducible]
-protected def Function.Surjective.commRing [Zero β] [One β] [Add β] [Mul β] [Neg β] [Sub β]
-    [SMul ℕ β] [SMul ℤ β] [Pow β ℕ] [NatCast β] [IntCast β] (f : α → β) (hf : Surjective f)
+protected def Function.Surjective.commRing [CommRing α] (f : α → β) (hf : Surjective f)
     (zero : f 0 = 0) (one : f 1 = 1) (add : ∀ x y, f (x + y) = f x + f y)
     (mul : ∀ x y, f (x * y) = f x * f y) (neg : ∀ x, f (-x) = -f x)
     (sub : ∀ x y, f (x - y) = f x - f y) (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x)
     (zsmul : ∀ (x) (n : ℤ), f (n • x) = n • f x) (npow : ∀ (x) (n : ℕ), f (x ^ n) = f x ^ n)
-    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : CommRing β :=
-  { hf.ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast,
-    hf.commSemigroup f mul with }
+    (nat_cast : ∀ n : ℕ, f n = n) (int_cast : ∀ n : ℤ, f n = n) : CommRing β where
+  toRing := hf.ring f zero one add mul neg sub nsmul zsmul npow nat_cast int_cast
+  __ := hf.commMonoid f one mul npow
 #align function.surjective.comm_ring Function.Surjective.commRing
 
-end CommRing
+end InjectiveSurjectiveMaps
+
+section HasDistribNeg
+variable [Mul α] [HasDistribNeg α]
+
+-- See note [reducible non-instances]
+/-- A type endowed with `-` and `*` has distributive negation, if it admits an injective map that
+preserves `-` and `*` to a type which has distributive negation. -/
+@[reducible]
+protected def Function.Injective.hasDistribNeg [Neg β] [Mul β] (f : β → α) (hf : Injective f)
+    (neg : ∀ a, f (-a) = -f a) (mul : ∀ a b, f (a * b) = f a * f b) : HasDistribNeg β :=
+  { hf.involutiveNeg _ neg, ‹Mul β› with
+    neg_mul := fun x y => hf <| by erw [neg, mul, neg, neg_mul, mul],
+    mul_neg := fun x y => hf <| by erw [neg, mul, neg, mul_neg, mul] }
+#align function.injective.has_distrib_neg Function.Injective.hasDistribNeg
+
+-- See note [reducible non-instances]
+/-- A type endowed with `-` and `*` has distributive negation, if it admits a surjective map that
+preserves `-` and `*` from a type which has distributive negation. -/
+@[reducible]
+protected def Function.Surjective.hasDistribNeg [Neg β] [Mul β] (f : α → β) (hf : Surjective f)
+    (neg : ∀ a, f (-a) = -f a) (mul : ∀ a b, f (a * b) = f a * f b) : HasDistribNeg β :=
+  { hf.involutiveNeg _ neg, ‹Mul β› with
+    neg_mul := hf.forall₂.2 fun x y => by erw [← neg, ← mul, neg_mul, neg, mul]
+    mul_neg := hf.forall₂.2 fun x y => by erw [← neg, ← mul, mul_neg, neg, mul] }
+#align function.surjective.has_distrib_neg Function.Surjective.hasDistribNeg
+
+instance AddOpposite.instHasDistribNeg : HasDistribNeg αᵃᵒᵖ :=
+  unop_injective.hasDistribNeg _ unop_neg unop_mul
+
+end HasDistribNeg
chore: script to replace headers with #align_import statements (#5979)

Open in Gitpod

Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2014 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Yury Kudryashov, Neil Strickland
-
-! This file was ported from Lean 3 source module algebra.ring.inj_surj
-! leanprover-community/mathlib commit a148d797a1094ab554ad4183a4ad6f130358ef64
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Ring.Defs
 import Mathlib.Algebra.Opposites
 import Mathlib.Algebra.GroupWithZero.InjSurj
 
+#align_import algebra.ring.inj_surj from "leanprover-community/mathlib"@"a148d797a1094ab554ad4183a4ad6f130358ef64"
+
 /-!
 # Pulling back rings along injective maps, and pushing them forward along surjective maps.
 
chore: fix many typos (#4967)

These are all doc fixes

Diff
@@ -327,7 +327,7 @@ section NonAssocRing
 
 variable [NonAssocRing α]
 
--- porting note: for some reaso this declaration is very slow?
+-- porting note: for some reason this declaration is very slow?
 /-- Pullback a `NonAssocRing` instance along an injective function.
 See note [reducible non-instances]. -/
 @[reducible]
chore: the style linter shouldn't complain about long #align lines (#1643)
Diff
@@ -116,8 +116,7 @@ protected def Function.Surjective.nonUnitalNonAssocSemiring {α : Type u}
     (add : ∀ x y, f (x + y) = f x + f y) (mul : ∀ x y, f (x * y) = f x * f y)
     (nsmul : ∀ (x) (n : ℕ), f (n • x) = n • f x) : NonUnitalNonAssocSemiring β :=
   { hf.mulZeroClass f zero mul, hf.addCommMonoid f zero add nsmul, hf.distrib f add mul with }
-#align function.surjective.non_unital_non_assoc_semiring
-  Function.Surjective.nonUnitalNonAssocSemiring
+#align function.surjective.non_unital_non_assoc_semiring Function.Surjective.nonUnitalNonAssocSemiring
 
 /-- Pushforward a `NonUnitalSemiring` instance along a surjective function.
 See note [reducible non-instances]. -/
chore: add source headers to ported theory files (#1094)

The script used to do this is included. The yaml file was obtained from https://raw.githubusercontent.com/wiki/leanprover-community/mathlib/mathlib4-port-status.md

Diff
@@ -2,6 +2,11 @@
 Copyright (c) 2014 Jeremy Avigad. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Jeremy Avigad, Leonardo de Moura, Floris van Doorn, Yury Kudryashov, Neil Strickland
+
+! This file was ported from Lean 3 source module algebra.ring.inj_surj
+! leanprover-community/mathlib commit a148d797a1094ab554ad4183a4ad6f130358ef64
+! Please do not edit these lines, except to modify the commit id
+! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Ring.Defs
 import Mathlib.Algebra.Opposites

Dependencies 24

25 files ported (100.0%)
9507 lines ported (100.0%)

All dependencies are ported!