algebra.ring.piMathlib.Algebra.Ring.Pi

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)

(last sync)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -4,8 +4,8 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot
 -/
 import Tactic.PiInstances
-import Algebra.Group.Pi
-import Algebra.Hom.Ring
+import Algebra.Group.Pi.Lemmas
+import Algebra.Ring.Hom.Defs
 
 #align_import algebra.ring.pi from "leanprover-community/mathlib"@"c3291da49cfa65f0d43b094750541c0731edc932"
 
Diff
@@ -3,9 +3,9 @@ Copyright (c) 2018 Simon Hudon. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot
 -/
-import Mathbin.Tactic.PiInstances
-import Mathbin.Algebra.Group.Pi
-import Mathbin.Algebra.Hom.Ring
+import Tactic.PiInstances
+import Algebra.Group.Pi
+import Algebra.Hom.Ring
 
 #align_import algebra.ring.pi from "leanprover-community/mathlib"@"c3291da49cfa65f0d43b094750541c0731edc932"
 
Diff
@@ -2,16 +2,13 @@
 Copyright (c) 2018 Simon Hudon. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot
-
-! This file was ported from Lean 3 source module algebra.ring.pi
-! leanprover-community/mathlib commit c3291da49cfa65f0d43b094750541c0731edc932
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Tactic.PiInstances
 import Mathbin.Algebra.Group.Pi
 import Mathbin.Algebra.Hom.Ring
 
+#align_import algebra.ring.pi from "leanprover-community/mathlib"@"c3291da49cfa65f0d43b094750541c0731edc932"
+
 /-!
 # Pi instances for ring
 
Diff
@@ -208,11 +208,13 @@ protected def nonUnitalRingHom {γ : Type w} [∀ i, NonUnitalNonAssocSemiring (
 #align pi.non_unital_ring_hom Pi.nonUnitalRingHom
 -/
 
+#print Pi.nonUnitalRingHom_injective /-
 theorem nonUnitalRingHom_injective {γ : Type w} [Nonempty I] [∀ i, NonUnitalNonAssocSemiring (f i)]
     [NonUnitalNonAssocSemiring γ] (g : ∀ i, γ →ₙ+* f i) (hg : ∀ i, Function.Injective (g i)) :
     Function.Injective (Pi.nonUnitalRingHom g) :=
   mulHom_injective (fun i => (g i).toMulHom) hg
 #align pi.non_unital_ring_hom_injective Pi.nonUnitalRingHom_injective
+-/
 
 #print Pi.ringHom /-
 /-- A family of ring homomorphisms `f a : γ →+* β a` defines a ring homomorphism
@@ -225,11 +227,13 @@ protected def ringHom {γ : Type w} [∀ i, NonAssocSemiring (f i)] [NonAssocSem
 #align pi.ring_hom Pi.ringHom
 -/
 
+#print Pi.ringHom_injective /-
 theorem ringHom_injective {γ : Type w} [Nonempty I] [∀ i, NonAssocSemiring (f i)]
     [NonAssocSemiring γ] (g : ∀ i, γ →+* f i) (hg : ∀ i, Function.Injective (g i)) :
     Function.Injective (Pi.ringHom g) :=
   monoidHom_injective (fun i => (g i).toMonoidHom) hg
 #align pi.ring_hom_injective Pi.ringHom_injective
+-/
 
 end Pi
 
Diff
@@ -38,7 +38,7 @@ variable (x y : ∀ i, f i) (i : I)
 instance distrib [∀ i, Distrib <| f i] : Distrib (∀ i : I, f i) := by
   refine_struct
       { add := (· + ·)
-        mul := (· * ·).. } <;>
+        mul := (· * ·) .. } <;>
     pi_instance_derive_field
 #align pi.distrib Pi.distrib
 -/
@@ -49,7 +49,7 @@ instance nonUnitalNonAssocSemiring [∀ i, NonUnitalNonAssocSemiring <| f i] :
   refine_struct
       { zero := (0 : ∀ i, f i)
         add := (· + ·)
-        mul := (· * ·).. } <;>
+        mul := (· * ·) .. } <;>
     pi_instance_derive_field
 #align pi.non_unital_non_assoc_semiring Pi.nonUnitalNonAssocSemiring
 -/
@@ -59,7 +59,7 @@ instance nonUnitalSemiring [∀ i, NonUnitalSemiring <| f i] : NonUnitalSemiring
   refine_struct
       { zero := (0 : ∀ i, f i)
         add := (· + ·)
-        mul := (· * ·).. } <;>
+        mul := (· * ·) .. } <;>
     pi_instance_derive_field
 #align pi.non_unital_semiring Pi.nonUnitalSemiring
 -/
@@ -70,7 +70,7 @@ instance nonAssocSemiring [∀ i, NonAssocSemiring <| f i] : NonAssocSemiring (
       { zero := (0 : ∀ i, f i)
         one := 1
         add := (· + ·)
-        mul := (· * ·).. } <;>
+        mul := (· * ·) .. } <;>
     pi_instance_derive_field
 #align pi.non_assoc_semiring Pi.nonAssocSemiring
 -/
Diff
@@ -208,12 +208,6 @@ protected def nonUnitalRingHom {γ : Type w} [∀ i, NonUnitalNonAssocSemiring (
 #align pi.non_unital_ring_hom Pi.nonUnitalRingHom
 -/
 
-/- warning: pi.non_unital_ring_hom_injective -> Pi.nonUnitalRingHom_injective is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (fun (_x : NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) => γ -> (f i)) (NonUnitalRingHom.hasCoeToFun.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), (fun (i : I) => f i) i) (coeFn.{max (succ u3) (succ (max u1 u2)), max (succ u3) (succ (max u1 u2))} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (fun (_x : NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) => γ -> (forall (i : I), (fun (i : I) => f i) i)) (NonUnitalRingHom.hasCoeToFun.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
-but is expected to have type
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (_inst_2 i)) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
-Case conversion may be inaccurate. Consider using '#align pi.non_unital_ring_hom_injective Pi.nonUnitalRingHom_injectiveₓ'. -/
 theorem nonUnitalRingHom_injective {γ : Type w} [Nonempty I] [∀ i, NonUnitalNonAssocSemiring (f i)]
     [NonUnitalNonAssocSemiring γ] (g : ∀ i, γ →ₙ+* f i) (hg : ∀ i, Function.Injective (g i)) :
     Function.Injective (Pi.nonUnitalRingHom g) :=
@@ -231,12 +225,6 @@ protected def ringHom {γ : Type w} [∀ i, NonAssocSemiring (f i)] [NonAssocSem
 #align pi.ring_hom Pi.ringHom
 -/
 
-/- warning: pi.ring_hom_injective -> Pi.ringHom_injective is a dubious translation:
-lean 3 declaration is
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (fun (_x : RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) => γ -> (f i)) (RingHom.hasCoeToFun.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), (fun (i : I) => f i) i) (coeFn.{max (succ u3) (succ (max u1 u2)), max (succ u3) (succ (max u1 u2))} (RingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (fun (_x : RingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) => γ -> (forall (i : I), (fun (i : I) => f i) i)) (RingHom.hasCoeToFun.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
-but is expected to have type
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (RingHom.instRingHomClassRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i))))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (RingHomClass.toNonUnitalRingHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (RingHom.instRingHomClassRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
-Case conversion may be inaccurate. Consider using '#align pi.ring_hom_injective Pi.ringHom_injectiveₓ'. -/
 theorem ringHom_injective {γ : Type w} [Nonempty I] [∀ i, NonAssocSemiring (f i)]
     [NonAssocSemiring γ] (g : ∀ i, γ →+* f i) (hg : ∀ i, Function.Injective (g i)) :
     Function.Injective (Pi.ringHom g) :=
Diff
@@ -212,7 +212,7 @@ protected def nonUnitalRingHom {γ : Type w} [∀ i, NonUnitalNonAssocSemiring (
 lean 3 declaration is
   forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (fun (_x : NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) => γ -> (f i)) (NonUnitalRingHom.hasCoeToFun.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), (fun (i : I) => f i) i) (coeFn.{max (succ u3) (succ (max u1 u2)), max (succ u3) (succ (max u1 u2))} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (fun (_x : NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) => γ -> (forall (i : I), (fun (i : I) => f i) i)) (NonUnitalRingHom.hasCoeToFun.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 but is expected to have type
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (_inst_2 i)) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
+  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (_inst_2 i)) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 Case conversion may be inaccurate. Consider using '#align pi.non_unital_ring_hom_injective Pi.nonUnitalRingHom_injectiveₓ'. -/
 theorem nonUnitalRingHom_injective {γ : Type w} [Nonempty I] [∀ i, NonUnitalNonAssocSemiring (f i)]
     [NonUnitalNonAssocSemiring γ] (g : ∀ i, γ →ₙ+* f i) (hg : ∀ i, Function.Injective (g i)) :
@@ -235,7 +235,7 @@ protected def ringHom {γ : Type w} [∀ i, NonAssocSemiring (f i)] [NonAssocSem
 lean 3 declaration is
   forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (fun (_x : RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) => γ -> (f i)) (RingHom.hasCoeToFun.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), (fun (i : I) => f i) i) (coeFn.{max (succ u3) (succ (max u1 u2)), max (succ u3) (succ (max u1 u2))} (RingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (fun (_x : RingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) => γ -> (forall (i : I), (fun (i : I) => f i) i)) (RingHom.hasCoeToFun.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 but is expected to have type
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (RingHom.instRingHomClassRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i))))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (RingHomClass.toNonUnitalRingHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (RingHom.instRingHomClassRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
+  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (RingHom.instRingHomClassRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i))))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (RingHomClass.toNonUnitalRingHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (RingHom.instRingHomClassRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 Case conversion may be inaccurate. Consider using '#align pi.ring_hom_injective Pi.ringHom_injectiveₓ'. -/
 theorem ringHom_injective {γ : Type w} [Nonempty I] [∀ i, NonAssocSemiring (f i)]
     [NonAssocSemiring γ] (g : ∀ i, γ →+* f i) (hg : ∀ i, Function.Injective (g i)) :
Diff
@@ -212,7 +212,7 @@ protected def nonUnitalRingHom {γ : Type w} [∀ i, NonUnitalNonAssocSemiring (
 lean 3 declaration is
   forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (fun (_x : NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) => γ -> (f i)) (NonUnitalRingHom.hasCoeToFun.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), (fun (i : I) => f i) i) (coeFn.{max (succ u3) (succ (max u1 u2)), max (succ u3) (succ (max u1 u2))} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (fun (_x : NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) => γ -> (forall (i : I), (fun (i : I) => f i) i)) (NonUnitalRingHom.hasCoeToFun.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 but is expected to have type
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (_inst_2 i)) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
+  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (_inst_2 i)) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 Case conversion may be inaccurate. Consider using '#align pi.non_unital_ring_hom_injective Pi.nonUnitalRingHom_injectiveₓ'. -/
 theorem nonUnitalRingHom_injective {γ : Type w} [Nonempty I] [∀ i, NonUnitalNonAssocSemiring (f i)]
     [NonUnitalNonAssocSemiring γ] (g : ∀ i, γ →ₙ+* f i) (hg : ∀ i, Function.Injective (g i)) :
@@ -235,7 +235,7 @@ protected def ringHom {γ : Type w} [∀ i, NonAssocSemiring (f i)] [NonAssocSem
 lean 3 declaration is
   forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (fun (_x : RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) => γ -> (f i)) (RingHom.hasCoeToFun.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), (fun (i : I) => f i) i) (coeFn.{max (succ u3) (succ (max u1 u2)), max (succ u3) (succ (max u1 u2))} (RingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (fun (_x : RingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) => γ -> (forall (i : I), (fun (i : I) => f i) i)) (RingHom.hasCoeToFun.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 but is expected to have type
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (RingHom.instRingHomClassRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i))))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (RingHomClass.toNonUnitalRingHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (RingHom.instRingHomClassRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
+  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (RingHom.instRingHomClassRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i))))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (RingHomClass.toNonUnitalRingHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (RingHom.instRingHomClassRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 Case conversion may be inaccurate. Consider using '#align pi.ring_hom_injective Pi.ringHom_injectiveₓ'. -/
 theorem ringHom_injective {γ : Type w} [Nonempty I] [∀ i, NonAssocSemiring (f i)]
     [NonAssocSemiring γ] (g : ∀ i, γ →+* f i) (hg : ∀ i, Function.Injective (g i)) :
Diff
@@ -212,7 +212,7 @@ protected def nonUnitalRingHom {γ : Type w} [∀ i, NonUnitalNonAssocSemiring (
 lean 3 declaration is
   forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (fun (_x : NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) => γ -> (f i)) (NonUnitalRingHom.hasCoeToFun.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), (fun (i : I) => f i) i) (coeFn.{max (succ u3) (succ (max u1 u2)), max (succ u3) (succ (max u1 u2))} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (fun (_x : NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) => γ -> (forall (i : I), (fun (i : I) => f i) i)) (NonUnitalRingHom.hasCoeToFun.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 but is expected to have type
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (_inst_2 i)) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
+  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonUnitalNonAssocSemiring.{u2} (f i)] [_inst_3 : NonUnitalNonAssocSemiring.{u3} γ] (g : forall (i : I), NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (_inst_2 i)) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (NonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ _inst_3) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (NonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (NonUnitalRingHom.instNonUnitalRingHomClassNonUnitalRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonUnitalNonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))))) (Pi.nonUnitalRingHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 Case conversion may be inaccurate. Consider using '#align pi.non_unital_ring_hom_injective Pi.nonUnitalRingHom_injectiveₓ'. -/
 theorem nonUnitalRingHom_injective {γ : Type w} [Nonempty I] [∀ i, NonUnitalNonAssocSemiring (f i)]
     [NonUnitalNonAssocSemiring γ] (g : ∀ i, γ →ₙ+* f i) (hg : ∀ i, Function.Injective (g i)) :
@@ -235,7 +235,7 @@ protected def ringHom {γ : Type w} [∀ i, NonAssocSemiring (f i)] [NonAssocSem
 lean 3 declaration is
   forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (coeFn.{max (succ u3) (succ u2), max (succ u3) (succ u2)} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (fun (_x : RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) => γ -> (f i)) (RingHom.hasCoeToFun.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), (fun (i : I) => f i) i) (coeFn.{max (succ u3) (succ (max u1 u2)), max (succ u3) (succ (max u1 u2))} (RingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (fun (_x : RingHom.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) => γ -> (forall (i : I), (fun (i : I) => f i) i)) (RingHom.hasCoeToFun.{u3, max u1 u2} γ (forall (i : I), (fun (i : I) => f i) i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => (fun (i : I) => f i) i) (fun (i : I) => (fun (i : I) => _inst_2 i) i))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 but is expected to have type
-  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (RingHom.instRingHomClassRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i))))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (RingHomClass.toNonUnitalRingHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (RingHom.instRingHomClassRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
+  forall {I : Type.{u1}} {f : I -> Type.{u2}} {γ : Type.{u3}} [_inst_1 : Nonempty.{succ u1} I] [_inst_2 : forall (i : I), NonAssocSemiring.{u2} (f i)] [_inst_3 : NonAssocSemiring.{u3} γ] (g : forall (i : I), RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)), (forall (i : I), Function.Injective.{succ u3, succ u2} γ (f i) (FunLike.coe.{max (succ u2) (succ u3), succ u3, succ u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : γ) => f i) _x) (MulHomClass.toFunLike.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{u2} (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} (f i) (_inst_2 i)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u3, u3, u2} (RingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i)) γ (f i) _inst_3 (_inst_2 i) (RingHom.instRingHomClassRingHom.{u3, u2} γ (f i) _inst_3 (_inst_2 i))))) (g i))) -> (Function.Injective.{succ u3, max (succ u1) (succ u2)} γ (forall (i : I), f i) (FunLike.coe.{max (max (succ u1) (succ u2)) (succ u3), succ u3, max (succ u1) (succ u2)} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (fun (_x : γ) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : γ) => forall (i : I), f i) _x) (MulHomClass.toFunLike.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonUnitalNonAssocSemiring.toMul.{u3} γ (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3)) (NonUnitalNonAssocSemiring.toMul.{max u1 u2} (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))) (NonUnitalRingHomClass.toMulHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} γ _inst_3) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{max u1 u2} (forall (i : I), f i) (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) (RingHomClass.toNonUnitalRingHomClass.{max (max u1 u2) u3, u3, max u1 u2} (RingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i))) γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)) (RingHom.instRingHomClassRingHom.{u3, max u1 u2} γ (forall (i : I), f i) _inst_3 (Pi.nonAssocSemiring.{u1, u2} I (fun (i : I) => f i) (fun (i : I) => _inst_2 i)))))) (Pi.ringHom.{u1, u2, u3} I (fun (i : I) => f i) γ (fun (i : I) => _inst_2 i) _inst_3 g)))
 Case conversion may be inaccurate. Consider using '#align pi.ring_hom_injective Pi.ringHom_injectiveₓ'. -/
 theorem ringHom_injective {γ : Type w} [Nonempty I] [∀ i, NonAssocSemiring (f i)]
     [NonAssocSemiring γ] (g : ∀ i, γ →+* f i) (hg : ∀ i, Function.Injective (g i)) :

Changes in mathlib4

mathlib3
mathlib4
chore: Move monoid with zero instances on pi types (#12286)

Move everything that can't be additivised out of Algebra.Group.Pi.Lemmas:

Diff
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot
 -/
 import Mathlib.Algebra.Group.Pi.Lemmas
+import Mathlib.Algebra.GroupWithZero.Pi
 import Mathlib.Algebra.Ring.CompTypeclasses
 import Mathlib.Algebra.Ring.Hom.Defs
 
@@ -42,6 +43,18 @@ instance hasDistribNeg [∀ i, Mul (f i)] [∀ i, HasDistribNeg (f i)] : HasDist
   neg_mul _ _ := funext fun _ ↦ neg_mul _ _
   mul_neg _ _ := funext fun _ ↦ mul_neg _ _
 
+instance addMonoidWithOne [∀ i, AddMonoidWithOne (f i)] : AddMonoidWithOne (∀ i, f i) where
+  natCast n _ := n
+  natCast_zero := funext fun _ ↦ AddMonoidWithOne.natCast_zero
+  natCast_succ n := funext fun _ ↦ AddMonoidWithOne.natCast_succ n
+
+instance addGroupWithOne [∀ i, AddGroupWithOne (f i)] : AddGroupWithOne (∀ i, f i) where
+  __ := addGroup
+  __ := addMonoidWithOne
+  intCast n _ := n
+  intCast_ofNat n := funext fun _ ↦ AddGroupWithOne.intCast_ofNat n
+  intCast_negSucc n := funext fun _ ↦ AddGroupWithOne.intCast_negSucc n
+
 instance nonUnitalNonAssocSemiring [∀ i, NonUnitalNonAssocSemiring <| f i] :
     NonUnitalNonAssocSemiring (∀ i : I, f i) :=
   { Pi.distrib, Pi.addCommMonoid, Pi.mulZeroClass with }
feat: sum and product of commuting semisimple endomorphisms (#10808)
  • Prove isSemisimple_of_mem_adjoin: if two commuting endomorphisms of a finite-dimensional vector space over a perfect field are both semisimple, then every endomorphism in the algebra generated by them (in particular their product and sum) is semisimple.

  • In the same file LinearAlgebra/Semisimple.lean, eq_zero_of_isNilpotent_isSemisimple and isSemisimple_of_squarefree_aeval_eq_zero are golfed, and IsSemisimple.minpoly_squarefree is proved

RingTheory/SimpleModule.lean:

  • Define IsSemisimpleRing R to mean that R is a semisimple R-module. add properties of simple modules and a characterization (they are exactly the quotients of the ring by maximal left ideals).

  • The annihilator of a semisimple module is a radical ideal.

  • Any module over a semisimple ring is semisimple.

  • A finite product of semisimple rings is semisimple.

  • Any quotient of a semisimple ring is semisimple.

  • Add Artin--Wedderburn as a TODO (proof_wanted).

  • Order/Atoms.lean: add the instance from IsSimpleOrder to ComplementedLattice, so that IsSimpleModule → IsSemisimpleModule is automatically inferred.

Prerequisites for showing a product of semisimple rings is semisimple:

  • Algebra/Module/Submodule/Map.lean: generalize orderIsoMapComap so that it only requires RingHomSurjective rather than RingHomInvPair

  • Algebra/Ring/CompTypeclasses.lean, Mathlib/Algebra/Ring/Pi.lean, Algebra/Ring/Prod.lean: add RingHomSurjective instances

RingTheory/Artinian.lean:

  • quotNilradicalEquivPi: the quotient of a commutative Artinian ring R by its nilradical is isomorphic to the (finite) product of its quotients by maximal ideals (therefore a product of fields). equivPi: if the ring is moreover reduced, then the ring itself is a product of fields. Deduce that R is a semisimple ring and both R and R[X] are decomposition monoids. Requires RingEquiv.quotientBot in RingTheory/Ideal/QuotientOperations.lean.

  • Data/Polynomial/Eval.lean: the polynomial ring over a finite product of rings is isomorphic to the product of polynomial rings over individual rings. (Used to show R[X] is a decomposition monoid.)

Other necessary results:

  • FieldTheory/Minpoly/Field.lean: the minimal polynomial of an element in a reduced algebra over a field is radical.

  • RingTheory/PowerBasis.lean: generalize PowerBasis.finiteDimensional and rename it to .finite.

Annihilator stuff, some of which do not end up being used:

  • RingTheory/Ideal/Operations.lean: define Module.annihilator and redefine Submodule.annihilator in terms of it; add lemmas, including one that says an arbitrary intersection of radical ideals is radical. The new lemma Ideal.isRadical_iff_pow_one_lt depends on pow_imp_self_of_one_lt in Mathlib/Data/Nat/Interval.lean, which is also used to golf the proof of isRadical_iff_pow_one_lt.

  • Algebra/Module/Torsion.lean: add a lemma and an instance (unused)

  • Data/Polynomial/Module/Basic.lean: add a def (unused) and a lemma

  • LinearAlgebra/AnnihilatingPolynomial.lean: add lemma span_minpoly_eq_annihilator

Some results about idempotent linear maps (projections) and idempotent elements, used to show that any (left) ideal in a semisimple ring is spanned by an idempotent element (unused):

  • LinearAlgebra/Projection.lean: add def isIdempotentElemEquiv

  • LinearAlgebra/Span.lean: add two lemmas

Co-authored-by: Junyan Xu <junyanxu.math@gmail.com>

Diff
@@ -4,6 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot
 -/
 import Mathlib.Algebra.Group.Pi.Lemmas
+import Mathlib.Algebra.Ring.CompTypeclasses
 import Mathlib.Algebra.Ring.Hom.Defs
 
 #align_import algebra.ring.pi from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6"
@@ -170,6 +171,10 @@ def Pi.evalRingHom (f : I → Type v) [∀ i, NonAssocSemiring (f i)] (i : I) :
 #align pi.eval_ring_hom Pi.evalRingHom
 #align pi.eval_ring_hom_apply Pi.evalRingHom_apply
 
+instance (f : I → Type*) [∀ i, Semiring (f i)] (i) :
+    RingHomSurjective (Pi.evalRingHom f i) where
+  is_surjective x := ⟨by classical exact (if h : · = i then h ▸ x else 0), by simp⟩
+
 /-- `Function.const` as a `RingHom`. -/
 @[simps]
 def Pi.constRingHom (α β : Type*) [NonAssocSemiring β] : β →+* α → β :=
chore: change from plural to singular in porting notes (#10761)
Diff
@@ -14,7 +14,7 @@ import Mathlib.Algebra.Ring.Hom.Defs
 This file defines instances for ring, semiring and related structures on Pi Types
 -/
 
--- Porting notes: used to import `tactic.pi_instances`
+-- Porting note: used to import `tactic.pi_instances`
 
 namespace Pi
 
move: Algebraic pi instances (#10693)

Rename

  • Data.Pi.Algebra to Algebra.Group.Pi.Basic
  • Algebra.Group.Pi to Algebra.Group.Pi.Lemmas

Move a few instances from the latter to the former, the goal being that Algebra.Group.Pi.Basic is about all the pi instances of the classes defined in Algebra.Group.Defs. Algebra.Group.Pi.Lemmas will need further rearranging.

Diff
@@ -3,7 +3,7 @@ Copyright (c) 2018 Simon Hudon. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot
 -/
-import Mathlib.Algebra.Group.Pi
+import Mathlib.Algebra.Group.Pi.Lemmas
 import Mathlib.Algebra.Ring.Hom.Defs
 
 #align_import algebra.ring.pi from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6"
chore: move to v4.6.0-rc1, merging adaptations from bump/v4.6.0 (#10176)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>

Diff
@@ -134,7 +134,7 @@ variable {I : Type u}
 
 /-- Evaluation of functions into an indexed collection of non-unital rings at a point is a
 non-unital ring homomorphism. This is `Function.eval` as a `NonUnitalRingHom`. -/
-@[simps]
+@[simps!]
 def Pi.evalNonUnitalRingHom (f : I → Type v) [∀ i, NonUnitalNonAssocSemiring (f i)] (i : I) :
     (∀ i, f i) →ₙ+* f i :=
   { Pi.evalMulHom f i, Pi.evalAddMonoidHom f i with }
refactor(Algebra/Hom): transpose Hom and file name (#8095)

I believe the file defining a type of morphisms belongs alongside the file defining the structure this morphism works on. So I would like to reorganize the files in the Mathlib.Algebra.Hom folder so that e.g. Mathlib.Algebra.Hom.Ring becomes Mathlib.Algebra.Ring.Hom and Mathlib.Algebra.Hom.NonUnitalAlg becomes Mathlib.Algebra.Algebra.NonUnitalHom.

While fixing the imports I went ahead and sorted them for good luck.

The full list of changes is: renamed: Mathlib/Algebra/Hom/NonUnitalAlg.lean -> Mathlib/Algebra/Algebra/NonUnitalHom.lean renamed: Mathlib/Algebra/Hom/Aut.lean -> Mathlib/Algebra/Group/Aut.lean renamed: Mathlib/Algebra/Hom/Commute.lean -> Mathlib/Algebra/Group/Commute/Hom.lean renamed: Mathlib/Algebra/Hom/Embedding.lean -> Mathlib/Algebra/Group/Embedding.lean renamed: Mathlib/Algebra/Hom/Equiv/Basic.lean -> Mathlib/Algebra/Group/Equiv/Basic.lean renamed: Mathlib/Algebra/Hom/Equiv/TypeTags.lean -> Mathlib/Algebra/Group/Equiv/TypeTags.lean renamed: Mathlib/Algebra/Hom/Equiv/Units/Basic.lean -> Mathlib/Algebra/Group/Units/Equiv.lean renamed: Mathlib/Algebra/Hom/Equiv/Units/GroupWithZero.lean -> Mathlib/Algebra/GroupWithZero/Units/Equiv.lean renamed: Mathlib/Algebra/Hom/Freiman.lean -> Mathlib/Algebra/Group/Freiman.lean renamed: Mathlib/Algebra/Hom/Group/Basic.lean -> Mathlib/Algebra/Group/Hom/Basic.lean renamed: Mathlib/Algebra/Hom/Group/Defs.lean -> Mathlib/Algebra/Group/Hom/Defs.lean renamed: Mathlib/Algebra/Hom/GroupAction.lean -> Mathlib/GroupTheory/GroupAction/Hom.lean renamed: Mathlib/Algebra/Hom/GroupInstances.lean -> Mathlib/Algebra/Group/Hom/Instances.lean renamed: Mathlib/Algebra/Hom/Iterate.lean -> Mathlib/Algebra/GroupPower/IterateHom.lean renamed: Mathlib/Algebra/Hom/Centroid.lean -> Mathlib/Algebra/Ring/CentroidHom.lean renamed: Mathlib/Algebra/Hom/Ring/Basic.lean -> Mathlib/Algebra/Ring/Hom/Basic.lean renamed: Mathlib/Algebra/Hom/Ring/Defs.lean -> Mathlib/Algebra/Ring/Hom/Defs.lean renamed: Mathlib/Algebra/Hom/Units.lean -> Mathlib/Algebra/Group/Units/Hom.lean

Zulip thread: https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/Reorganizing.20.60Mathlib.2EAlgebra.2EHom.60

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot
 -/
 import Mathlib.Algebra.Group.Pi
-import Mathlib.Algebra.Hom.Ring.Defs
+import Mathlib.Algebra.Ring.Hom.Defs
 
 #align_import algebra.ring.pi from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6"
 
refactor: split Algebra.Hom.Group and Algebra.Hom.Ring (#7094)

Co-authored-by: Scott Morrison <scott.morrison@gmail.com>

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot
 -/
 import Mathlib.Algebra.Group.Pi
-import Mathlib.Algebra.Hom.Ring
+import Mathlib.Algebra.Hom.Ring.Defs
 
 #align_import algebra.ring.pi from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6"
 
chore: banish Type _ and Sort _ (#6499)

We remove all possible occurences of Type _ and Sort _ in favor of Type* and Sort*.

This has nice performance benefits.

Diff
@@ -142,15 +142,15 @@ def Pi.evalNonUnitalRingHom (f : I → Type v) [∀ i, NonUnitalNonAssocSemiring
 
 /-- `Function.const` as a `NonUnitalRingHom`. -/
 @[simps]
-def Pi.constNonUnitalRingHom (α β : Type _) [NonUnitalNonAssocSemiring β] : β →ₙ+* α → β :=
+def Pi.constNonUnitalRingHom (α β : Type*) [NonUnitalNonAssocSemiring β] : β →ₙ+* α → β :=
   { Pi.nonUnitalRingHom fun _ => NonUnitalRingHom.id β with toFun := Function.const _ }
 #align pi.const_non_unital_ring_hom Pi.constNonUnitalRingHom
 
 /-- Non-unital ring homomorphism between the function spaces `I → α` and `I → β`, induced by a
 non-unital ring homomorphism `f` between `α` and `β`. -/
 @[simps]
-protected def NonUnitalRingHom.compLeft {α β : Type _} [NonUnitalNonAssocSemiring α]
-    [NonUnitalNonAssocSemiring β] (f : α →ₙ+* β) (I : Type _) : (I → α) →ₙ+* I → β :=
+protected def NonUnitalRingHom.compLeft {α β : Type*} [NonUnitalNonAssocSemiring α]
+    [NonUnitalNonAssocSemiring β] (f : α →ₙ+* β) (I : Type*) : (I → α) →ₙ+* I → β :=
   { f.toMulHom.compLeft I, f.toAddMonoidHom.compLeft I with toFun := fun h => f ∘ h }
 #align non_unital_ring_hom.comp_left NonUnitalRingHom.compLeft
 
@@ -172,7 +172,7 @@ def Pi.evalRingHom (f : I → Type v) [∀ i, NonAssocSemiring (f i)] (i : I) :
 
 /-- `Function.const` as a `RingHom`. -/
 @[simps]
-def Pi.constRingHom (α β : Type _) [NonAssocSemiring β] : β →+* α → β :=
+def Pi.constRingHom (α β : Type*) [NonAssocSemiring β] : β →+* α → β :=
   { Pi.ringHom fun _ => RingHom.id β with toFun := Function.const _ }
 #align pi.const_ring_hom Pi.constRingHom
 #align pi.const_ring_hom_apply Pi.constRingHom_apply
@@ -180,8 +180,8 @@ def Pi.constRingHom (α β : Type _) [NonAssocSemiring β] : β →+* α → β
 /-- Ring homomorphism between the function spaces `I → α` and `I → β`, induced by a ring
 homomorphism `f` between `α` and `β`. -/
 @[simps]
-protected def RingHom.compLeft {α β : Type _} [NonAssocSemiring α] [NonAssocSemiring β]
-    (f : α →+* β) (I : Type _) : (I → α) →+* I → β :=
+protected def RingHom.compLeft {α β : Type*} [NonAssocSemiring α] [NonAssocSemiring β]
+    (f : α →+* β) (I : Type*) : (I → α) →+* I → β :=
   { f.toMonoidHom.compLeft I, f.toAddMonoidHom.compLeft I with toFun := fun h => f ∘ h }
 #align ring_hom.comp_left RingHom.compLeft
 #align ring_hom.comp_left_apply RingHom.compLeft_apply
feat(Filter/Germ): review algebraic instances (#6130)

Motivated by the Sphere Eversion Project.

Diff
@@ -37,6 +37,10 @@ instance distrib [∀ i, Distrib <| f i] : Distrib (∀ i : I, f i) :=
     right_distrib := by intros; ext; exact add_mul _ _ _}
 #align pi.distrib Pi.distrib
 
+instance hasDistribNeg [∀ i, Mul (f i)] [∀ i, HasDistribNeg (f i)] : HasDistribNeg (∀ i, f i) where
+  neg_mul _ _ := funext fun _ ↦ neg_mul _ _
+  mul_neg _ _ := funext fun _ ↦ mul_neg _ _
+
 instance nonUnitalNonAssocSemiring [∀ i, NonUnitalNonAssocSemiring <| f i] :
     NonUnitalNonAssocSemiring (∀ i : I, f i) :=
   { Pi.distrib, Pi.addCommMonoid, Pi.mulZeroClass with }
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,15 +2,12 @@
 Copyright (c) 2018 Simon Hudon. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Simon Hudon, Patrick Massot
-
-! This file was ported from Lean 3 source module algebra.ring.pi
-! leanprover-community/mathlib commit ba2245edf0c8bb155f1569fd9b9492a9b384cde6
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.Group.Pi
 import Mathlib.Algebra.Hom.Ring
 
+#align_import algebra.ring.pi from "leanprover-community/mathlib"@"ba2245edf0c8bb155f1569fd9b9492a9b384cde6"
+
 /-!
 # Pi instances for ring
 
feat: require @[simps!] if simps runs in expensive mode (#1885)
  • This does not change the behavior of simps, just raises a linter error if you run simps in a more expensive mode without writing !.
  • Fixed some incorrect occurrences of to_additive, simps. Will do that systematically in future PR.
  • Fix port of OmegaCompletePartialOrder.ContinuousHom.ofMono a bit

Co-authored-by: Yury G. Kudryashov <urkud@urkud.name>

Diff
@@ -163,7 +163,7 @@ variable {I : Type u}
 
 /-- Evaluation of functions into an indexed collection of rings at a point is a ring
 homomorphism. This is `Function.eval` as a `RingHom`. -/
-@[simps]
+@[simps!]
 def Pi.evalRingHom (f : I → Type v) [∀ i, NonAssocSemiring (f i)] (i : I) : (∀ i, f i) →+* f i :=
   { Pi.evalMonoidHom f i, Pi.evalAddMonoidHom f i with }
 #align pi.eval_ring_hom Pi.evalRingHom
chore: add missing #align statements (#1902)

This PR is the result of a slight variant on the following "algorithm"

  • take all mathlib 3 names, remove _ and make all uppercase letters into lowercase
  • take all mathlib 4 names, remove _ and make all uppercase letters into lowercase
  • look for matches, and create pairs (original_lean3_name, OriginalLean4Name)
  • for pairs that do not have an align statement:
    • use Lean 4 to lookup the file + position of the Lean 4 name
    • add an #align statement just before the next empty line
  • manually fix some tiny mistakes (e.g., empty lines in proofs might cause the #align statement to have been inserted too early)
Diff
@@ -115,6 +115,7 @@ protected def ringHom {γ : Type w} [∀ i, NonAssocSemiring (f i)] [NonAssocSem
   { Pi.monoidHom fun i => (g i).toMonoidHom, Pi.addMonoidHom fun i => (g i).toAddMonoidHom with
     toFun := fun x b => g b x }
 #align pi.ring_hom Pi.ringHom
+#align pi.ring_hom_apply Pi.ringHom_apply
 
 theorem ringHom_injective {γ : Type w} [Nonempty I] [∀ i, NonAssocSemiring (f i)]
     [NonAssocSemiring γ] (g : ∀ i, γ →+* f i) (hg : ∀ i, Function.Injective (g i)) :
@@ -166,12 +167,14 @@ homomorphism. This is `Function.eval` as a `RingHom`. -/
 def Pi.evalRingHom (f : I → Type v) [∀ i, NonAssocSemiring (f i)] (i : I) : (∀ i, f i) →+* f i :=
   { Pi.evalMonoidHom f i, Pi.evalAddMonoidHom f i with }
 #align pi.eval_ring_hom Pi.evalRingHom
+#align pi.eval_ring_hom_apply Pi.evalRingHom_apply
 
 /-- `Function.const` as a `RingHom`. -/
 @[simps]
 def Pi.constRingHom (α β : Type _) [NonAssocSemiring β] : β →+* α → β :=
   { Pi.ringHom fun _ => RingHom.id β with toFun := Function.const _ }
 #align pi.const_ring_hom Pi.constRingHom
+#align pi.const_ring_hom_apply Pi.constRingHom_apply
 
 /-- Ring homomorphism between the function spaces `I → α` and `I → β`, induced by a ring
 homomorphism `f` between `α` and `β`. -/
@@ -180,5 +183,6 @@ protected def RingHom.compLeft {α β : Type _} [NonAssocSemiring α] [NonAssocS
     (f : α →+* β) (I : Type _) : (I → α) →+* I → β :=
   { f.toMonoidHom.compLeft I, f.toAddMonoidHom.compLeft I with toFun := fun h => f ∘ h }
 #align ring_hom.comp_left RingHom.compLeft
+#align ring_hom.comp_left_apply RingHom.compLeft_apply
 
 end RingHom
fix: do not use the defaults for nat_cast and int_cast fields on pi instances (#1185)

This creates a diamond, since we populate these fields manually on other instances. This error was introduced in the port and was not present in mathlib3.

Diff
@@ -50,7 +50,7 @@ instance nonUnitalSemiring [∀ i, NonUnitalSemiring <| f i] : NonUnitalSemiring
 #align pi.non_unital_semiring Pi.nonUnitalSemiring
 
 instance nonAssocSemiring [∀ i, NonAssocSemiring <| f i] : NonAssocSemiring (∀ i : I, f i) :=
-  { Pi.nonUnitalNonAssocSemiring, Pi.mulZeroOneClass with }
+  { Pi.nonUnitalNonAssocSemiring, Pi.mulZeroOneClass, Pi.addMonoidWithOne with }
 #align pi.non_assoc_semiring Pi.nonAssocSemiring
 
 instance semiring [∀ i, Semiring <| f i] : Semiring (∀ i : I, f i) :=
@@ -76,7 +76,7 @@ instance nonUnitalRing [∀ i, NonUnitalRing <| f i] : NonUnitalRing (∀ i : I,
 #align pi.non_unital_ring Pi.nonUnitalRing
 
 instance nonAssocRing [∀ i, NonAssocRing <| f i] : NonAssocRing (∀ i : I, f i) :=
-  { Pi.nonUnitalNonAssocRing, Pi.nonAssocSemiring with }
+  { Pi.nonUnitalNonAssocRing, Pi.nonAssocSemiring, Pi.addGroupWithOne with }
 #align pi.non_assoc_ring Pi.nonAssocRing
 
 instance ring [∀ i, Ring <| f i] : Ring (∀ i : I, f i) :=
feat: port Algebra.Ring.Pi (#1151)

Co-authored-by: Moritz Doll <moritz.doll@googlemail.com>

Dependencies 65

66 files ported (100.0%)
32203 lines ported (100.0%)

All dependencies are ported!