ring_theory.congruenceMathlib.RingTheory.Congruence

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)

(last sync)

chore(ring_theory/ideal/quotient): add missing smul compatibility instances (#18934)

The low priority is needed to avoid a timeout in what will be ring_theory/kaehler.lean.

These instances are more general cases of the instances implied by algebra α c.quotient and algebra α (R ⧸ I), which work for cases like α = units R.

Diff
@@ -247,6 +247,23 @@ function.surjective.comm_ring _ quotient.surjective_quotient_mk'
   rfl rfl (λ _ _, rfl) (λ _ _, rfl) (λ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl) (λ _ _, rfl)
   (λ _, rfl) (λ _, rfl)
 
+instance is_scalar_tower_right [has_add R] [mul_one_class R] [has_smul α R] [is_scalar_tower α R R]
+  (c : ring_con R) :
+  is_scalar_tower α c.quotient c.quotient :=
+{ smul_assoc := λ a, quotient.ind₂' $ by exact λ m₁ m₂,
+    congr_arg quotient.mk' $ smul_mul_assoc _ _ _ }
+
+instance smul_comm_class [has_add R] [mul_one_class R] [has_smul α R]
+  [is_scalar_tower α R R] [smul_comm_class α R R] (c : ring_con R) :
+  smul_comm_class α c.quotient c.quotient :=
+{ smul_comm := λ a, quotient.ind₂' $ by exact λ m₁ m₂,
+    congr_arg quotient.mk' $ (mul_smul_comm _ _ _).symm }
+
+instance smul_comm_class' [has_add R] [mul_one_class R] [has_smul α R]
+  [is_scalar_tower α R R] [smul_comm_class R α R] (c : ring_con R) :
+  smul_comm_class c.quotient α c.quotient :=
+by haveI := smul_comm_class.symm R α R; exact smul_comm_class.symm _ _ _
+
 instance [monoid α] [non_assoc_semiring R] [distrib_mul_action α R] [is_scalar_tower α R R]
   (c : ring_con R) :
   distrib_mul_action α c.quotient :=

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(first ported)

Changes in mathlib3port

mathlib3
mathlib3port
Diff
@@ -353,11 +353,11 @@ variable [AddMonoidWithOne R] [Mul R] (c : RingCon R)
 instance : NatCast c.Quotient :=
   ⟨fun n => ↑(n : R)⟩
 
-#print RingCon.coe_nat_cast /-
+#print RingCon.coe_natCast /-
 @[simp, norm_cast]
-theorem coe_nat_cast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
+theorem coe_natCast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
   rfl
-#align ring_con.coe_nat_cast RingCon.coe_nat_cast
+#align ring_con.coe_nat_cast RingCon.coe_natCast
 -/
 
 end NatCast
@@ -369,11 +369,11 @@ variable [AddGroupWithOne R] [Mul R] (c : RingCon R)
 instance : IntCast c.Quotient :=
   ⟨fun z => ↑(z : R)⟩
 
-#print RingCon.coe_int_cast /-
+#print RingCon.coe_intCast /-
 @[simp, norm_cast]
-theorem coe_int_cast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
+theorem coe_intCast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
   rfl
-#align ring_con.coe_int_cast RingCon.coe_int_cast
+#align ring_con.coe_int_cast RingCon.coe_intCast
 -/
 
 end IntCast
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 -/
 import Algebra.GroupRingAction.Basic
-import Algebra.Hom.Ring
+import Algebra.Ring.Hom.Defs
 import Algebra.Ring.InjSurj
 import GroupTheory.Congruence
 
Diff
@@ -296,10 +296,10 @@ theorem coe_sub (x y : R) : (↑(x - y) : c.Quotient) = x - y :=
 #align ring_con.coe_sub RingCon.coe_sub
 -/
 
-#print RingCon.hasZsmul /-
-instance hasZsmul : SMul ℤ c.Quotient :=
+#print RingCon.hasZSMul /-
+instance hasZSMul : SMul ℤ c.Quotient :=
   c.toAddCon.Quotient.zsmul
-#align ring_con.has_zsmul RingCon.hasZsmul
+#align ring_con.has_zsmul RingCon.hasZSMul
 -/
 
 #print RingCon.coe_zsmul /-
@@ -315,10 +315,10 @@ section Nsmul
 
 variable [AddMonoid R] [Mul R] (c : RingCon R)
 
-#print RingCon.hasNsmul /-
-instance hasNsmul : SMul ℕ c.Quotient :=
+#print RingCon.hasNSMul /-
+instance hasNSMul : SMul ℕ c.Quotient :=
   c.toAddCon.Quotient.nSMul
-#align ring_con.has_nsmul RingCon.hasNsmul
+#align ring_con.has_nsmul RingCon.hasNSMul
 -/
 
 #print RingCon.coe_nsmul /-
Diff
@@ -3,10 +3,10 @@ Copyright (c) 2022 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 -/
-import Mathbin.Algebra.GroupRingAction.Basic
-import Mathbin.Algebra.Hom.Ring
-import Mathbin.Algebra.Ring.InjSurj
-import Mathbin.GroupTheory.Congruence
+import Algebra.GroupRingAction.Basic
+import Algebra.Hom.Ring
+import Algebra.Ring.InjSurj
+import GroupTheory.Congruence
 
 #align_import ring_theory.congruence from "leanprover-community/mathlib"@"2f39bcbc98f8255490f8d4562762c9467694c809"
 
Diff
@@ -2,17 +2,14 @@
 Copyright (c) 2022 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module ring_theory.congruence
-! leanprover-community/mathlib commit 2f39bcbc98f8255490f8d4562762c9467694c809
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Algebra.GroupRingAction.Basic
 import Mathbin.Algebra.Hom.Ring
 import Mathbin.Algebra.Ring.InjSurj
 import Mathbin.GroupTheory.Congruence
 
+#align_import ring_theory.congruence from "leanprover-community/mathlib"@"2f39bcbc98f8255490f8d4562762c9467694c809"
+
 /-!
 # Congruence relations on rings
 
Diff
@@ -234,10 +234,12 @@ variable [AddZeroClass R] [Mul R] (c : RingCon R)
 instance : Zero c.Quotient :=
   c.toAddCon.Quotient.Zero
 
+#print RingCon.coe_zero /-
 @[simp, norm_cast]
 theorem coe_zero : (↑(0 : R) : c.Quotient) = 0 :=
   rfl
 #align ring_con.coe_zero RingCon.coe_zero
+-/
 
 end Zero
 
@@ -248,10 +250,12 @@ variable [Add R] [MulOneClass R] (c : RingCon R)
 instance : One c.Quotient :=
   c.toCon.Quotient.One
 
+#print RingCon.coe_one /-
 @[simp, norm_cast]
 theorem coe_one : (↑(1 : R) : c.Quotient) = 1 :=
   rfl
 #align ring_con.coe_one RingCon.coe_one
+-/
 
 end One
 
@@ -262,10 +266,12 @@ variable [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R] (c : RingCon
 instance : SMul α c.Quotient :=
   c.toCon.SMul
 
+#print RingCon.coe_smul /-
 @[simp, norm_cast]
 theorem coe_smul (a : α) (x : R) : (↑(a • x) : c.Quotient) = a • x :=
   rfl
 #align ring_con.coe_smul RingCon.coe_smul
+-/
 
 end Smul
 
@@ -276,27 +282,35 @@ variable [AddGroup R] [Mul R] (c : RingCon R)
 instance : Neg c.Quotient :=
   c.toAddCon.Neg
 
+#print RingCon.coe_neg /-
 @[simp, norm_cast]
 theorem coe_neg (x : R) : (↑(-x) : c.Quotient) = -x :=
   rfl
 #align ring_con.coe_neg RingCon.coe_neg
+-/
 
 instance : Sub c.Quotient :=
   c.toAddCon.Sub
 
+#print RingCon.coe_sub /-
 @[simp, norm_cast]
 theorem coe_sub (x y : R) : (↑(x - y) : c.Quotient) = x - y :=
   rfl
 #align ring_con.coe_sub RingCon.coe_sub
+-/
 
+#print RingCon.hasZsmul /-
 instance hasZsmul : SMul ℤ c.Quotient :=
   c.toAddCon.Quotient.zsmul
 #align ring_con.has_zsmul RingCon.hasZsmul
+-/
 
+#print RingCon.coe_zsmul /-
 @[simp, norm_cast]
 theorem coe_zsmul (z : ℤ) (x : R) : (↑(z • x) : c.Quotient) = z • x :=
   rfl
 #align ring_con.coe_zsmul RingCon.coe_zsmul
+-/
 
 end NegSubZsmul
 
@@ -304,14 +318,18 @@ section Nsmul
 
 variable [AddMonoid R] [Mul R] (c : RingCon R)
 
+#print RingCon.hasNsmul /-
 instance hasNsmul : SMul ℕ c.Quotient :=
   c.toAddCon.Quotient.nSMul
 #align ring_con.has_nsmul RingCon.hasNsmul
+-/
 
+#print RingCon.coe_nsmul /-
 @[simp, norm_cast]
 theorem coe_nsmul (n : ℕ) (x : R) : (↑(n • x) : c.Quotient) = n • x :=
   rfl
 #align ring_con.coe_nsmul RingCon.coe_nsmul
+-/
 
 end Nsmul
 
@@ -322,10 +340,12 @@ variable [Add R] [Monoid R] (c : RingCon R)
 instance : Pow c.Quotient ℕ :=
   c.toCon.Nat.Pow
 
+#print RingCon.coe_pow /-
 @[simp, norm_cast]
 theorem coe_pow (x : R) (n : ℕ) : (↑(x ^ n) : c.Quotient) = x ^ n :=
   rfl
 #align ring_con.coe_pow RingCon.coe_pow
+-/
 
 end Pow
 
@@ -336,10 +356,12 @@ variable [AddMonoidWithOne R] [Mul R] (c : RingCon R)
 instance : NatCast c.Quotient :=
   ⟨fun n => ↑(n : R)⟩
 
+#print RingCon.coe_nat_cast /-
 @[simp, norm_cast]
 theorem coe_nat_cast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
   rfl
 #align ring_con.coe_nat_cast RingCon.coe_nat_cast
+-/
 
 end NatCast
 
@@ -350,10 +372,12 @@ variable [AddGroupWithOne R] [Mul R] (c : RingCon R)
 instance : IntCast c.Quotient :=
   ⟨fun z => ↑(z : R)⟩
 
+#print RingCon.coe_int_cast /-
 @[simp, norm_cast]
 theorem coe_int_cast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
   rfl
 #align ring_con.coe_int_cast RingCon.coe_int_cast
+-/
 
 end IntCast
 
@@ -413,23 +437,29 @@ instance [CommRing R] (c : RingCon R) : CommRing c.Quotient :=
     (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl)
     (fun _ _ => rfl) (fun _ => rfl) fun _ => rfl
 
+#print RingCon.isScalarTower_right /-
 instance isScalarTower_right [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
     (c : RingCon R) : IsScalarTower α c.Quotient c.Quotient
     where smul_assoc a :=
     Quotient.ind₂' fun m₁ m₂ => congr_arg Quotient.mk'' <| smul_mul_assoc _ _ _
 #align ring_con.is_scalar_tower_right RingCon.isScalarTower_right
+-/
 
+#print RingCon.smulCommClass /-
 instance smulCommClass [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
     [SMulCommClass α R R] (c : RingCon R) : SMulCommClass α c.Quotient c.Quotient
     where smul_comm a :=
     Quotient.ind₂' fun m₁ m₂ => congr_arg Quotient.mk'' <| (mul_smul_comm _ _ _).symm
 #align ring_con.smul_comm_class RingCon.smulCommClass
+-/
 
+#print RingCon.smulCommClass' /-
 instance smulCommClass' [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
     [SMulCommClass R α R] (c : RingCon R) : SMulCommClass c.Quotient α c.Quotient :=
   haveI := SMulCommClass.symm R α R
   SMulCommClass.symm _ _ _
 #align ring_con.smul_comm_class' RingCon.smulCommClass'
+-/
 
 instance [Monoid α] [NonAssocSemiring R] [DistribMulAction α R] [IsScalarTower α R R]
     (c : RingCon R) : DistribMulAction α c.Quotient :=
@@ -444,6 +474,7 @@ instance [Monoid α] [Semiring R] [MulSemiringAction α R] [IsScalarTower α R R
 
 end Algebraic
 
+#print RingCon.mk' /-
 /-- The natural homomorphism from a ring to its quotient by a congruence relation. -/
 def mk' [NonAssocSemiring R] (c : RingCon R) : R →+* c.Quotient
     where
@@ -453,6 +484,7 @@ def mk' [NonAssocSemiring R] (c : RingCon R) : R →+* c.Quotient
   map_add' _ _ := rfl
   map_mul' _ _ := rfl
 #align ring_con.mk' RingCon.mk'
+-/
 
 end Quotient
 
Diff
@@ -234,12 +234,6 @@ variable [AddZeroClass R] [Mul R] (c : RingCon R)
 instance : Zero c.Quotient :=
   c.toAddCon.Quotient.Zero
 
-/- warning: ring_con.coe_zero -> RingCon.coe_zero is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : AddZeroClass.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toHasAdd.{u1} R _inst_1) _inst_2), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R _inst_1) _inst_2 c) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R _inst_1) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R _inst_1) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R _inst_1) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R _inst_1) _inst_2 c))) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (AddZeroClass.toHasZero.{u1} R _inst_1))))) (OfNat.ofNat.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R _inst_1) _inst_2 c) 0 (OfNat.mk.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R _inst_1) _inst_2 c) 0 (Zero.zero.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R _inst_1) _inst_2 c) (RingCon.Quotient.hasZero.{u1} R _inst_1 _inst_2 c))))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : AddZeroClass.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toAdd.{u1} R _inst_1) _inst_2), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R _inst_1) _inst_2 c) (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R _inst_1) _inst_2 c (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (AddZeroClass.toZero.{u1} R _inst_1)))) (OfNat.ofNat.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R _inst_1) _inst_2 c) 0 (Zero.toOfNat0.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R _inst_1) _inst_2 c) (RingCon.instZeroQuotientToAdd.{u1} R _inst_1 _inst_2 c)))
-Case conversion may be inaccurate. Consider using '#align ring_con.coe_zero RingCon.coe_zeroₓ'. -/
 @[simp, norm_cast]
 theorem coe_zero : (↑(0 : R) : c.Quotient) = 0 :=
   rfl
@@ -254,12 +248,6 @@ variable [Add R] [MulOneClass R] (c : RingCon R)
 instance : One c.Quotient :=
   c.toCon.Quotient.One
 
-/- warning: ring_con.coe_one -> RingCon.coe_one is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : Add.{u1} R] [_inst_2 : MulOneClass.{u1} R] (c : RingCon.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R _inst_2)), Eq.{succ u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R _inst_2) c) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R _inst_2) c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R _inst_2) c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R _inst_2) c) (RingCon.Quotient.hasCoeT.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R _inst_2) c))) (OfNat.ofNat.{u1} R 1 (OfNat.mk.{u1} R 1 (One.one.{u1} R (MulOneClass.toHasOne.{u1} R _inst_2))))) (OfNat.ofNat.{u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R _inst_2) c) 1 (OfNat.mk.{u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R _inst_2) c) 1 (One.one.{u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R _inst_2) c) (RingCon.Quotient.hasOne.{u1} R _inst_1 _inst_2 c))))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : Add.{u1} R] [_inst_2 : MulOneClass.{u1} R] (c : RingCon.{u1} R _inst_1 (MulOneClass.toMul.{u1} R _inst_2)), Eq.{succ u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toMul.{u1} R _inst_2) c) (RingCon.toQuotient.{u1} R _inst_1 (MulOneClass.toMul.{u1} R _inst_2) c (OfNat.ofNat.{u1} R 1 (One.toOfNat1.{u1} R (MulOneClass.toOne.{u1} R _inst_2)))) (OfNat.ofNat.{u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toMul.{u1} R _inst_2) c) 1 (One.toOfNat1.{u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toMul.{u1} R _inst_2) c) (RingCon.instOneQuotientToMul.{u1} R _inst_1 _inst_2 c)))
-Case conversion may be inaccurate. Consider using '#align ring_con.coe_one RingCon.coe_oneₓ'. -/
 @[simp, norm_cast]
 theorem coe_one : (↑(1 : R) : c.Quotient) = 1 :=
   rfl
@@ -274,12 +262,6 @@ variable [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R] (c : RingCon
 instance : SMul α c.Quotient :=
   c.toCon.SMul
 
-/- warning: ring_con.coe_smul -> RingCon.coe_smul is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2)) _inst_3] (c : RingCon.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2)) (a : α) (x : R), Eq.{succ u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) R (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (HasLiftT.mk.{succ u2, succ u2} R (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (CoeTCₓ.coe.{succ u2, succ u2} R (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasCoeT.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c))) (SMul.smul.{u1, u2} α R _inst_3 a x)) (SMul.smul.{u1, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasSmul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c) a ((fun (a : Type.{u2}) (b : Type.{u2}) [self : HasLiftT.{succ u2, succ u2} a b] => self.0) R (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (HasLiftT.mk.{succ u2, succ u2} R (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (CoeTCₓ.coe.{succ u2, succ u2} R (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasCoeT.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c))) x))
-but is expected to have type
-  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2)) _inst_3] (c : RingCon.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2)) (a : α) (x : R), Eq.{succ u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.toQuotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c (HSMul.hSMul.{u1, u2, u2} α R R (instHSMul.{u1, u2} α R _inst_3) a x)) (HSMul.hSMul.{u1, u2, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (instHSMul.{u1, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instSMulQuotientToMul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c)) a (RingCon.toQuotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c x))
-Case conversion may be inaccurate. Consider using '#align ring_con.coe_smul RingCon.coe_smulₓ'. -/
 @[simp, norm_cast]
 theorem coe_smul (a : α) (x : R) : (↑(a • x) : c.Quotient) = a • x :=
   rfl
@@ -294,12 +276,6 @@ variable [AddGroup R] [Mul R] (c : RingCon R)
 instance : Neg c.Quotient :=
   c.toAddCon.Neg
 
-/- warning: ring_con.coe_neg -> RingCon.coe_neg is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : AddGroup.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2) (x : R), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c))) (Neg.neg.{u1} R (SubNegMonoid.toHasNeg.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)) x)) (Neg.neg.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasNeg.{u1} R _inst_1 _inst_2 c) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c))) x))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : AddGroup.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2) (x : R), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c (Neg.neg.{u1} R (NegZeroClass.toNeg.{u1} R (SubNegZeroMonoid.toNegZeroClass.{u1} R (SubtractionMonoid.toSubNegZeroMonoid.{u1} R (AddGroup.toSubtractionMonoid.{u1} R _inst_1)))) x)) (Neg.neg.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.instNegQuotientToAddToAddZeroClassToAddMonoidToSubNegMonoid.{u1} R _inst_1 _inst_2 c) (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c x))
-Case conversion may be inaccurate. Consider using '#align ring_con.coe_neg RingCon.coe_negₓ'. -/
 @[simp, norm_cast]
 theorem coe_neg (x : R) : (↑(-x) : c.Quotient) = -x :=
   rfl
@@ -308,33 +284,15 @@ theorem coe_neg (x : R) : (↑(-x) : c.Quotient) = -x :=
 instance : Sub c.Quotient :=
   c.toAddCon.Sub
 
-/- warning: ring_con.coe_sub -> RingCon.coe_sub is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : AddGroup.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2) (x : R) (y : R), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c))) (HSub.hSub.{u1, u1, u1} R R R (instHSub.{u1} R (SubNegMonoid.toHasSub.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1))) x y)) (HSub.hSub.{u1, u1, u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (instHSub.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasSub.{u1} R _inst_1 _inst_2 c)) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c))) x) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c))) y))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : AddGroup.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2) (x : R) (y : R), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c (HSub.hSub.{u1, u1, u1} R R R (instHSub.{u1} R (SubNegMonoid.toSub.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1))) x y)) (HSub.hSub.{u1, u1, u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (instHSub.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.instSubQuotientToAddToAddZeroClassToAddMonoidToSubNegMonoid.{u1} R _inst_1 _inst_2 c)) (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c x) (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c y))
-Case conversion may be inaccurate. Consider using '#align ring_con.coe_sub RingCon.coe_subₓ'. -/
 @[simp, norm_cast]
 theorem coe_sub (x y : R) : (↑(x - y) : c.Quotient) = x - y :=
   rfl
 #align ring_con.coe_sub RingCon.coe_sub
 
-/- warning: ring_con.has_zsmul -> RingCon.hasZsmul is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : AddGroup.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2), SMul.{0, u1} Int (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c)
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : AddGroup.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2), SMul.{0, u1} Int (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c)
-Case conversion may be inaccurate. Consider using '#align ring_con.has_zsmul RingCon.hasZsmulₓ'. -/
 instance hasZsmul : SMul ℤ c.Quotient :=
   c.toAddCon.Quotient.zsmul
 #align ring_con.has_zsmul RingCon.hasZsmul
 
-/- warning: ring_con.coe_zsmul -> RingCon.coe_zsmul is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : AddGroup.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2) (z : Int) (x : R), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c))) (SMul.smul.{0, u1} Int R (SubNegMonoid.SMulInt.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)) z x)) (SMul.smul.{0, u1} Int (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.hasZsmul.{u1} R _inst_1 _inst_2 c) z ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c))) x))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : AddGroup.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2) (z : Int) (x : R), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c (HSMul.hSMul.{0, u1, u1} Int R R (instHSMul.{0, u1} Int R (SubNegMonoid.SMulInt.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1))) z x)) (HSMul.hSMul.{0, u1, u1} Int (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (instHSMul.{0, u1} Int (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c) (RingCon.hasZsmul.{u1} R _inst_1 _inst_2 c)) z (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (SubNegMonoid.toAddMonoid.{u1} R (AddGroup.toSubNegMonoid.{u1} R _inst_1)))) _inst_2 c x))
-Case conversion may be inaccurate. Consider using '#align ring_con.coe_zsmul RingCon.coe_zsmulₓ'. -/
 @[simp, norm_cast]
 theorem coe_zsmul (z : ℤ) (x : R) : (↑(z • x) : c.Quotient) = z • x :=
   rfl
@@ -346,22 +304,10 @@ section Nsmul
 
 variable [AddMonoid R] [Mul R] (c : RingCon R)
 
-/- warning: ring_con.has_nsmul -> RingCon.hasNsmul is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : AddMonoid.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2), SMul.{0, u1} Nat (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c)
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : AddMonoid.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2), SMul.{0, u1} Nat (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c)
-Case conversion may be inaccurate. Consider using '#align ring_con.has_nsmul RingCon.hasNsmulₓ'. -/
 instance hasNsmul : SMul ℕ c.Quotient :=
   c.toAddCon.Quotient.nSMul
 #align ring_con.has_nsmul RingCon.hasNsmul
 
-/- warning: ring_con.coe_nsmul -> RingCon.coe_nsmul is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : AddMonoid.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2) (n : Nat) (x : R), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c))) (SMul.smul.{0, u1} Nat R (AddMonoid.SMul.{u1} R _inst_1) n x)) (SMul.smul.{0, u1} Nat (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (RingCon.hasNsmul.{u1} R _inst_1 _inst_2 c) n ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c))) x))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : AddMonoid.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2) (n : Nat) (x : R), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c (HSMul.hSMul.{0, u1, u1} Nat R R (instHSMul.{0, u1} Nat R (AddMonoid.SMul.{u1} R _inst_1)) n x)) (HSMul.hSMul.{0, u1, u1} Nat (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (instHSMul.{0, u1} Nat (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c) (RingCon.hasNsmul.{u1} R _inst_1 _inst_2 c)) n (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R _inst_1)) _inst_2 c x))
-Case conversion may be inaccurate. Consider using '#align ring_con.coe_nsmul RingCon.coe_nsmulₓ'. -/
 @[simp, norm_cast]
 theorem coe_nsmul (n : ℕ) (x : R) : (↑(n • x) : c.Quotient) = n • x :=
   rfl
@@ -376,12 +322,6 @@ variable [Add R] [Monoid R] (c : RingCon R)
 instance : Pow c.Quotient ℕ :=
   c.toCon.Nat.Pow
 
-/- warning: ring_con.coe_pow -> RingCon.coe_pow is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : Add.{u1} R] [_inst_2 : Monoid.{u1} R] (c : RingCon.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2))) (x : R) (n : Nat), Eq.{succ u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) (RingCon.Quotient.hasCoeT.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c))) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R _inst_2)) x n)) (HPow.hPow.{u1, 0, u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) Nat (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) (instHPow.{u1, 0} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) Nat (RingCon.Nat.hasPow.{u1} R _inst_1 _inst_2 c)) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) (RingCon.Quotient.hasCoeT.{u1} R _inst_1 (MulOneClass.toHasMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c))) x) n)
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : Add.{u1} R] [_inst_2 : Monoid.{u1} R] (c : RingCon.{u1} R _inst_1 (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2))) (x : R) (n : Nat), Eq.{succ u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) (RingCon.toQuotient.{u1} R _inst_1 (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R _inst_2)) x n)) (HPow.hPow.{u1, 0, u1} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) Nat (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) (instHPow.{u1, 0} (RingCon.Quotient.{u1} R _inst_1 (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c) Nat (RingCon.instPowQuotientToMulToMulOneClassNat.{u1} R _inst_1 _inst_2 c)) (RingCon.toQuotient.{u1} R _inst_1 (MulOneClass.toMul.{u1} R (Monoid.toMulOneClass.{u1} R _inst_2)) c x) n)
-Case conversion may be inaccurate. Consider using '#align ring_con.coe_pow RingCon.coe_powₓ'. -/
 @[simp, norm_cast]
 theorem coe_pow (x : R) (n : ℕ) : (↑(x ^ n) : c.Quotient) = x ^ n :=
   rfl
@@ -396,12 +336,6 @@ variable [AddMonoidWithOne R] [Mul R] (c : RingCon R)
 instance : NatCast c.Quotient :=
   ⟨fun n => ↑(n : R)⟩
 
-/- warning: ring_con.coe_nat_cast -> RingCon.coe_nat_cast is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : AddMonoidWithOne.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2) (n : Nat), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat R (HasLiftT.mk.{1, succ u1} Nat R (CoeTCₓ.coe.{1, succ u1} Nat R (Nat.castCoe.{u1} R (AddMonoidWithOne.toNatCast.{u1} R _inst_1)))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c) (HasLiftT.mk.{1, succ u1} Nat (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c) (CoeTCₓ.coe.{1, succ u1} Nat (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c) (Nat.castCoe.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c) (RingCon.Quotient.hasNatCast.{u1} R _inst_1 _inst_2 c)))) n)
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : AddMonoidWithOne.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2) (n : Nat), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c) (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c (Nat.cast.{u1} R (AddMonoidWithOne.toNatCast.{u1} R _inst_1) n)) (Nat.cast.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R _inst_1))) _inst_2 c) (RingCon.instNatCastQuotientToAddToAddZeroClassToAddMonoid.{u1} R _inst_1 _inst_2 c) n)
-Case conversion may be inaccurate. Consider using '#align ring_con.coe_nat_cast RingCon.coe_nat_castₓ'. -/
 @[simp, norm_cast]
 theorem coe_nat_cast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
   rfl
@@ -416,12 +350,6 @@ variable [AddGroupWithOne R] [Mul R] (c : RingCon R)
 instance : IntCast c.Quotient :=
   ⟨fun z => ↑(z : R)⟩
 
-/- warning: ring_con.coe_int_cast -> RingCon.coe_int_cast is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : AddGroupWithOne.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2) (n : Nat), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c) ((fun (a : Type.{u1}) (b : Type.{u1}) [self : HasLiftT.{succ u1, succ u1} a b] => self.0) R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c) (HasLiftT.mk.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c) (CoeTCₓ.coe.{succ u1, succ u1} R (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasCoeT.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat R (HasLiftT.mk.{1, succ u1} Nat R (CoeTCₓ.coe.{1, succ u1} Nat R (Nat.castCoe.{u1} R (AddMonoidWithOne.toNatCast.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1))))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c) (HasLiftT.mk.{1, succ u1} Nat (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c) (CoeTCₓ.coe.{1, succ u1} Nat (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c) (Nat.castCoe.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toHasAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c) (RingCon.Quotient.hasNatCast.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1) _inst_2 c)))) n)
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : AddGroupWithOne.{u1} R] [_inst_2 : Mul.{u1} R] (c : RingCon.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2) (n : Nat), Eq.{succ u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c) (RingCon.toQuotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c (Nat.cast.{u1} R (AddMonoidWithOne.toNatCast.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)) n)) (Nat.cast.{u1} (RingCon.Quotient.{u1} R (AddZeroClass.toAdd.{u1} R (AddMonoid.toAddZeroClass.{u1} R (AddMonoidWithOne.toAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1)))) _inst_2 c) (RingCon.instNatCastQuotientToAddToAddZeroClassToAddMonoid.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R _inst_1) _inst_2 c) n)
-Case conversion may be inaccurate. Consider using '#align ring_con.coe_int_cast RingCon.coe_int_castₓ'. -/
 @[simp, norm_cast]
 theorem coe_int_cast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
   rfl
@@ -485,36 +413,18 @@ instance [CommRing R] (c : RingCon R) : CommRing c.Quotient :=
     (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl)
     (fun _ _ => rfl) (fun _ => rfl) fun _ => rfl
 
-/- warning: ring_con.is_scalar_tower_right -> RingCon.isScalarTower_right is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2)) _inst_3] (c : RingCon.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2)), IsScalarTower.{u1, u2, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasSmul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasMul.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c)) (RingCon.Quotient.hasSmul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c)
-but is expected to have type
-  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2)) _inst_3] (c : RingCon.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2)), IsScalarTower.{u1, u2, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instSMulQuotientToMul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instMulQuotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c)) (RingCon.instSMulQuotientToMul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c)
-Case conversion may be inaccurate. Consider using '#align ring_con.is_scalar_tower_right RingCon.isScalarTower_rightₓ'. -/
 instance isScalarTower_right [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
     (c : RingCon R) : IsScalarTower α c.Quotient c.Quotient
     where smul_assoc a :=
     Quotient.ind₂' fun m₁ m₂ => congr_arg Quotient.mk'' <| smul_mul_assoc _ _ _
 #align ring_con.is_scalar_tower_right RingCon.isScalarTower_right
 
-/- warning: ring_con.smul_comm_class -> RingCon.smulCommClass is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2)) _inst_3] [_inst_5 : SMulCommClass.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2))] (c : RingCon.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2)), SMulCommClass.{u1, u2, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasSmul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasMul.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c))
-but is expected to have type
-  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2)) _inst_3] [_inst_5 : SMulCommClass.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2))] (c : RingCon.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2)), SMulCommClass.{u1, u2, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instSMulQuotientToMul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instMulQuotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c))
-Case conversion may be inaccurate. Consider using '#align ring_con.smul_comm_class RingCon.smulCommClassₓ'. -/
 instance smulCommClass [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
     [SMulCommClass α R R] (c : RingCon R) : SMulCommClass α c.Quotient c.Quotient
     where smul_comm a :=
     Quotient.ind₂' fun m₁ m₂ => congr_arg Quotient.mk'' <| (mul_smul_comm _ _ _).symm
 #align ring_con.smul_comm_class RingCon.smulCommClass
 
-/- warning: ring_con.smul_comm_class' -> RingCon.smulCommClass' is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2)) _inst_3] [_inst_5 : SMulCommClass.{u2, u1, u2} R α R (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2)) _inst_3] (c : RingCon.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2)), SMulCommClass.{u2, u1, u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasMul.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c)) (RingCon.Quotient.hasSmul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c)
-but is expected to have type
-  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2)) _inst_3] [_inst_5 : SMulCommClass.{u2, u1, u2} R α R (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2)) _inst_3] (c : RingCon.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2)), SMulCommClass.{u2, u1, u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instMulQuotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c)) (RingCon.instSMulQuotientToMul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c)
-Case conversion may be inaccurate. Consider using '#align ring_con.smul_comm_class' RingCon.smulCommClass'ₓ'. -/
 instance smulCommClass' [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
     [SMulCommClass R α R] (c : RingCon R) : SMulCommClass c.Quotient α c.Quotient :=
   haveI := SMulCommClass.symm R α R
@@ -534,12 +444,6 @@ instance [Monoid α] [Semiring R] [MulSemiringAction α R] [IsScalarTower α R R
 
 end Algebraic
 
-/- warning: ring_con.mk' -> RingCon.mk' is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : NonAssocSemiring.{u1} R] (c : RingCon.{u1} R (Distrib.toHasAdd.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R _inst_1))) (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R _inst_1)))), RingHom.{u1, u1} R (RingCon.Quotient.{u1} R (Distrib.toHasAdd.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R _inst_1))) (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R _inst_1))) c) _inst_1 (RingCon.Quotient.nonAssocSemiring.{u1} R _inst_1 c)
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : NonAssocSemiring.{u1} R] (c : RingCon.{u1} R (Distrib.toAdd.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R _inst_1))), RingHom.{u1, u1} R (RingCon.Quotient.{u1} R (Distrib.toAdd.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R _inst_1))) (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R _inst_1)) c) _inst_1 (RingCon.instNonAssocSemiringQuotientToAddToDistribToNonUnitalNonAssocSemiringToMul.{u1} R _inst_1 c)
-Case conversion may be inaccurate. Consider using '#align ring_con.mk' RingCon.mk'ₓ'. -/
 /-- The natural homomorphism from a ring to its quotient by a congruence relation. -/
 def mk' [NonAssocSemiring R] (c : RingCon R) : R →+* c.Quotient
     where
Diff
@@ -485,23 +485,41 @@ instance [CommRing R] (c : RingCon R) : CommRing c.Quotient :=
     (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl)
     (fun _ _ => rfl) (fun _ => rfl) fun _ => rfl
 
+/- warning: ring_con.is_scalar_tower_right -> RingCon.isScalarTower_right is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2)) _inst_3] (c : RingCon.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2)), IsScalarTower.{u1, u2, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasSmul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasMul.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c)) (RingCon.Quotient.hasSmul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c)
+but is expected to have type
+  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2)) _inst_3] (c : RingCon.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2)), IsScalarTower.{u1, u2, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instSMulQuotientToMul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instMulQuotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c)) (RingCon.instSMulQuotientToMul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c)
+Case conversion may be inaccurate. Consider using '#align ring_con.is_scalar_tower_right RingCon.isScalarTower_rightₓ'. -/
 instance isScalarTower_right [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
     (c : RingCon R) : IsScalarTower α c.Quotient c.Quotient
     where smul_assoc a :=
     Quotient.ind₂' fun m₁ m₂ => congr_arg Quotient.mk'' <| smul_mul_assoc _ _ _
 #align ring_con.is_scalar_tower_right RingCon.isScalarTower_right
 
-instance sMulCommClass [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
+/- warning: ring_con.smul_comm_class -> RingCon.smulCommClass is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2)) _inst_3] [_inst_5 : SMulCommClass.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2))] (c : RingCon.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2)), SMulCommClass.{u1, u2, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasSmul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasMul.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c))
+but is expected to have type
+  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2)) _inst_3] [_inst_5 : SMulCommClass.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2))] (c : RingCon.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2)), SMulCommClass.{u1, u2, u2} α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instSMulQuotientToMul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instMulQuotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c))
+Case conversion may be inaccurate. Consider using '#align ring_con.smul_comm_class RingCon.smulCommClassₓ'. -/
+instance smulCommClass [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
     [SMulCommClass α R R] (c : RingCon R) : SMulCommClass α c.Quotient c.Quotient
     where smul_comm a :=
     Quotient.ind₂' fun m₁ m₂ => congr_arg Quotient.mk'' <| (mul_smul_comm _ _ _).symm
-#align ring_con.smul_comm_class RingCon.sMulCommClass
+#align ring_con.smul_comm_class RingCon.smulCommClass
 
-instance smul_comm_class' [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
+/- warning: ring_con.smul_comm_class' -> RingCon.smulCommClass' is a dubious translation:
+lean 3 declaration is
+  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2)) _inst_3] [_inst_5 : SMulCommClass.{u2, u1, u2} R α R (Mul.toSMul.{u2} R (MulOneClass.toHasMul.{u2} R _inst_2)) _inst_3] (c : RingCon.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2)), SMulCommClass.{u2, u1, u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c) (RingCon.Quotient.hasMul.{u2} R _inst_1 (MulOneClass.toHasMul.{u2} R _inst_2) c)) (RingCon.Quotient.hasSmul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c)
+but is expected to have type
+  forall {α : Type.{u1}} {R : Type.{u2}} [_inst_1 : Add.{u2} R] [_inst_2 : MulOneClass.{u2} R] [_inst_3 : SMul.{u1, u2} α R] [_inst_4 : IsScalarTower.{u1, u2, u2} α R R _inst_3 (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2)) _inst_3] [_inst_5 : SMulCommClass.{u2, u1, u2} R α R (Mul.toSMul.{u2} R (MulOneClass.toMul.{u2} R _inst_2)) _inst_3] (c : RingCon.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2)), SMulCommClass.{u2, u1, u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) α (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (Mul.toSMul.{u2} (RingCon.Quotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c) (RingCon.instMulQuotient.{u2} R _inst_1 (MulOneClass.toMul.{u2} R _inst_2) c)) (RingCon.instSMulQuotientToMul.{u1, u2} α R _inst_1 _inst_2 _inst_3 _inst_4 c)
+Case conversion may be inaccurate. Consider using '#align ring_con.smul_comm_class' RingCon.smulCommClass'ₓ'. -/
+instance smulCommClass' [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
     [SMulCommClass R α R] (c : RingCon R) : SMulCommClass c.Quotient α c.Quotient :=
   haveI := SMulCommClass.symm R α R
   SMulCommClass.symm _ _ _
-#align ring_con.smul_comm_class' RingCon.smul_comm_class'
+#align ring_con.smul_comm_class' RingCon.smulCommClass'
 
 instance [Monoid α] [NonAssocSemiring R] [DistribMulAction α R] [IsScalarTower α R R]
     (c : RingCon R) : DistribMulAction α c.Quotient :=
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 
 ! This file was ported from Lean 3 source module ring_theory.congruence
-! leanprover-community/mathlib commit cc70d9141824ea8982d1562ce009952f2c3ece30
+! leanprover-community/mathlib commit 2f39bcbc98f8255490f8d4562762c9467694c809
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -485,6 +485,24 @@ instance [CommRing R] (c : RingCon R) : CommRing c.Quotient :=
     (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl)
     (fun _ _ => rfl) (fun _ => rfl) fun _ => rfl
 
+instance isScalarTower_right [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
+    (c : RingCon R) : IsScalarTower α c.Quotient c.Quotient
+    where smul_assoc a :=
+    Quotient.ind₂' fun m₁ m₂ => congr_arg Quotient.mk'' <| smul_mul_assoc _ _ _
+#align ring_con.is_scalar_tower_right RingCon.isScalarTower_right
+
+instance sMulCommClass [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
+    [SMulCommClass α R R] (c : RingCon R) : SMulCommClass α c.Quotient c.Quotient
+    where smul_comm a :=
+    Quotient.ind₂' fun m₁ m₂ => congr_arg Quotient.mk'' <| (mul_smul_comm _ _ _).symm
+#align ring_con.smul_comm_class RingCon.sMulCommClass
+
+instance smul_comm_class' [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
+    [SMulCommClass R α R] (c : RingCon R) : SMulCommClass c.Quotient α c.Quotient :=
+  haveI := SMulCommClass.symm R α R
+  SMulCommClass.symm _ _ _
+#align ring_con.smul_comm_class' RingCon.smul_comm_class'
+
 instance [Monoid α] [NonAssocSemiring R] [DistribMulAction α R] [IsScalarTower α R R]
     (c : RingCon R) : DistribMulAction α c.Quotient :=
   { c.toCon.MulAction with

Changes in mathlib4

mathlib3
mathlib4
chore: Rename nat_cast/int_cast/rat_cast to natCast/intCast/ratCast (#11486)

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

Diff
@@ -301,9 +301,9 @@ instance : NatCast c.Quotient :=
   ⟨fun n => ↑(n : R)⟩
 
 @[simp, norm_cast]
-theorem coe_nat_cast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
+theorem coe_natCast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
   rfl
-#align ring_con.coe_nat_cast RingCon.coe_nat_cast
+#align ring_con.coe_nat_cast RingCon.coe_natCast
 
 end NatCast
 
@@ -315,9 +315,9 @@ instance : IntCast c.Quotient :=
   ⟨fun z => ↑(z : R)⟩
 
 @[simp, norm_cast]
-theorem coe_int_cast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
+theorem coe_intCast (n : ℕ) : (↑(n : R) : c.Quotient) = n :=
   rfl
-#align ring_con.coe_int_cast RingCon.coe_int_cast
+#align ring_con.coe_int_cast RingCon.coe_intCast
 
 end IntCast
 
style: homogenise porting notes (#11145)

Homogenises porting notes via capitalisation and addition of whitespace.

It makes the following changes:

  • converts "--porting note" into "-- Porting note";
  • converts "porting note" into "Porting note".
Diff
@@ -72,7 +72,7 @@ section Basic
 
 variable [Add R] [Mul R] (c : RingCon R)
 
---Porting note: upgrade to `FunLike`
+-- Porting note: upgrade to `FunLike`
 /-- A coercion from a congruence relation to its underlying binary relation. -/
 instance : FunLike (RingCon R) R (R → Prop) :=
   { coe := fun c => c.r,
refactor(*): abbreviation for non-dependent FunLike (#9833)

This follows up from #9785, which renamed FunLike to DFunLike, by introducing a new abbreviation FunLike F α β := DFunLike F α (fun _ => β), to make the non-dependent use of FunLike easier.

I searched for the pattern DFunLike.*fun and DFunLike.*λ in all files to replace expressions of the form DFunLike F α (fun _ => β) with FunLike F α β. I did this everywhere except for extends clauses for two reasons: it would conflict with #8386, and more importantly extends must directly refer to a structure with no unfolding of defs or abbrevs.

Diff
@@ -72,9 +72,9 @@ section Basic
 
 variable [Add R] [Mul R] (c : RingCon R)
 
---Porting note: upgrade to `DFunLike`
+--Porting note: upgrade to `FunLike`
 /-- A coercion from a congruence relation to its underlying binary relation. -/
-instance : DFunLike (RingCon R) R fun _ => R → Prop :=
+instance : FunLike (RingCon R) R (R → Prop) :=
   { coe := fun c => c.r,
     coe_injective' := fun x y h => by
       rcases x with ⟨⟨x, _⟩, _⟩
chore(*): rename FunLike to DFunLike (#9785)

This prepares for the introduction of a non-dependent synonym of FunLike, which helps a lot with keeping #8386 readable.

This is entirely search-and-replace in 680197f combined with manual fixes in 4145626, e900597 and b8428f8. The commands that generated this change:

sed -i 's/\bFunLike\b/DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoFunLike\b/toDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/import Mathlib.Data.DFunLike/import Mathlib.Data.FunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bHom_FunLike\b/Hom_DFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean     
sed -i 's/\binstFunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\bfunLike\b/instDFunLike/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean
sed -i 's/\btoo many metavariables to apply `fun_like.has_coe_to_fun`/too many metavariables to apply `DFunLike.hasCoeToFun`/g' {Archive,Counterexamples,Mathlib,test}/**/*.lean

Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -72,9 +72,9 @@ section Basic
 
 variable [Add R] [Mul R] (c : RingCon R)
 
---Porting note: upgrade to `FunLike`
+--Porting note: upgrade to `DFunLike`
 /-- A coercion from a congruence relation to its underlying binary relation. -/
-instance : FunLike (RingCon R) R fun _ => R → Prop :=
+instance : DFunLike (RingCon R) R fun _ => R → Prop :=
   { coe := fun c => c.r,
     coe_injective' := fun x y h => by
       rcases x with ⟨⟨x, _⟩, _⟩
@@ -119,7 +119,7 @@ theorem rel_mk {s : Con R} {h a b} : RingCon.mk s h a b ↔ s a b :=
   Iff.rfl
 
 /-- The map sending a congruence relation to its underlying binary relation is injective. -/
-theorem ext' {c d : RingCon R} (H : ⇑c = ⇑d) : c = d := FunLike.coe_injective H
+theorem ext' {c d : RingCon R} (H : ⇑c = ⇑d) : c = d := DFunLike.coe_injective H
 
 /-- Extensionality rule for congruence relations. -/
 theorem ext {c d : RingCon R} (H : ∀ x y, c x y ↔ d x y) : c = d :=
chore: Nsmul -> NSMul, Zpow -> ZPow, etc (#9067)

Normalising to naming convention rule number 6.

Diff
@@ -238,7 +238,7 @@ theorem coe_smul (a : α) (x : R) : (↑(a • x) : c.Quotient) = a • (x : c.Q
 
 end SMul
 
-section NegSubZsmul
+section NegSubZSMul
 
 variable [AddGroup R] [Mul R] (c : RingCon R)
 
@@ -256,29 +256,29 @@ theorem coe_sub (x y : R) : (↑(x - y) : c.Quotient) = x - y :=
   rfl
 #align ring_con.coe_sub RingCon.coe_sub
 
-instance hasZsmul : SMul ℤ c.Quotient := inferInstanceAs (SMul ℤ c.toAddCon.Quotient)
-#align ring_con.has_zsmul RingCon.hasZsmul
+instance hasZSMul : SMul ℤ c.Quotient := inferInstanceAs (SMul ℤ c.toAddCon.Quotient)
+#align ring_con.has_zsmul RingCon.hasZSMul
 
 @[simp, norm_cast]
 theorem coe_zsmul (z : ℤ) (x : R) : (↑(z • x) : c.Quotient) = z • (x : c.Quotient) :=
   rfl
 #align ring_con.coe_zsmul RingCon.coe_zsmul
 
-end NegSubZsmul
+end NegSubZSMul
 
-section Nsmul
+section NSMul
 
 variable [AddMonoid R] [Mul R] (c : RingCon R)
 
-instance hasNsmul : SMul ℕ c.Quotient := inferInstanceAs (SMul ℕ c.toAddCon.Quotient)
-#align ring_con.has_nsmul RingCon.hasNsmul
+instance hasNSMul : SMul ℕ c.Quotient := inferInstanceAs (SMul ℕ c.toAddCon.Quotient)
+#align ring_con.has_nsmul RingCon.hasNSMul
 
 @[simp, norm_cast]
 theorem coe_nsmul (n : ℕ) (x : R) : (↑(n • x) : c.Quotient) = n • (x : c.Quotient) :=
   rfl
 #align ring_con.coe_nsmul RingCon.coe_nsmul
 
-end Nsmul
+end NSMul
 
 section Pow
 
feat(RingTheory/Congruence): add the CompleteLattice instance (#8313)

The code is copied from GroupTheory/Congruence.lean, and then modified to fix the errors.

I haven't copied the full contents of GroupTheory/Congruencee, only the results about the lattice structure.

This replaces leanprover-community/mathlib#18588

Diff
@@ -27,10 +27,7 @@ Most of the time you likely want to use the `Ideal.Quotient` API that is built o
 ## TODO
 
 * Use this for `RingQuot` too.
-* Copy across more API from `Con` and `AddCon` in `GroupTheory/Congruence.lean`, such as:
-  * The `CompleteLattice` structure.
-  * The `conGen_eq` lemma, stating that
-    `ringConGen r = sInf {s : RingCon M | ∀ x y, r x y → s x y}`.
+* Copy across more API from `Con` and `AddCon` in `GroupTheory/Congruence.lean`.
 -/
 
 
@@ -118,9 +115,16 @@ instance : Inhabited (RingCon R) :=
   ⟨ringConGen EmptyRelation⟩
 
 @[simp]
-theorem rel_mk {s : Con R} {h a b} : RingCon.mk s h a b ↔ @Setoid.r _ s.toSetoid a b :=
+theorem rel_mk {s : Con R} {h a b} : RingCon.mk s h a b ↔ s a b :=
   Iff.rfl
 
+/-- The map sending a congruence relation to its underlying binary relation is injective. -/
+theorem ext' {c d : RingCon R} (H : ⇑c = ⇑d) : c = d := FunLike.coe_injective H
+
+/-- Extensionality rule for congruence relations. -/
+theorem ext {c d : RingCon R} (H : ∀ x y, c x y ↔ d x y) : c = d :=
+  ext' <| by ext; apply H
+
 end Basic
 
 section Quotient
@@ -415,4 +419,168 @@ def mk' [NonAssocSemiring R] (c : RingCon R) : R →+* c.Quotient
 
 end Quotient
 
+/-! ### Lattice structure
+
+The API in this section is copied from `Mathlib/GroupTheory/Congruence.lean`
+-/
+
+
+section Lattice
+
+variable [Add R] [Mul R]
+
+/-- For congruence relations `c, d` on a type `M` with multiplication and addition, `c ≤ d` iff
+`∀ x y ∈ M`, `x` is related to `y` by `d` if `x` is related to `y` by `c`. -/
+instance : LE (RingCon R) where
+  le c d := ∀ ⦃x y⦄, c x y → d x y
+
+/-- Definition of `≤` for congruence relations. -/
+theorem le_def {c d : RingCon R} : c ≤ d ↔ ∀ {x y}, c x y → d x y :=
+  Iff.rfl
+
+/-- The infimum of a set of congruence relations on a given type with multiplication and
+addition. -/
+instance : InfSet (RingCon R) where
+  sInf S :=
+    { r := fun x y => ∀ c : RingCon R, c ∈ S → c x y
+      iseqv :=
+        ⟨fun x c _hc => c.refl x, fun h c hc => c.symm <| h c hc, fun h1 h2 c hc =>
+          c.trans (h1 c hc) <| h2 c hc⟩
+      add' := fun h1 h2 c hc => c.add (h1 c hc) <| h2 c hc
+      mul' := fun h1 h2 c hc => c.mul (h1 c hc) <| h2 c hc }
+
+/-- The infimum of a set of congruence relations is the same as the infimum of the set's image
+    under the map to the underlying equivalence relation. -/
+theorem sInf_toSetoid (S : Set (RingCon R)) : (sInf S).toSetoid = sInf ((·.toSetoid) '' S) :=
+  Setoid.ext' fun x y =>
+    ⟨fun h r ⟨c, hS, hr⟩ => by rw [← hr]; exact h c hS, fun h c hS => h c.toSetoid ⟨c, hS, rfl⟩⟩
+
+/-- The infimum of a set of congruence relations is the same as the infimum of the set's image
+    under the map to the underlying binary relation. -/
+@[simp, norm_cast]
+theorem coe_sInf (S : Set (RingCon R)) : ⇑(sInf S) = sInf ((⇑) '' S) := by
+  ext; simp only [sInf_image, iInf_apply, iInf_Prop_eq]; rfl
+
+@[simp, norm_cast]
+theorem coe_iInf {ι : Sort*} (f : ι → RingCon R) : ⇑(iInf f) = ⨅ i, ⇑(f i) := by
+  rw [iInf, coe_sInf, ← Set.range_comp, sInf_range, Function.comp]
+
+instance : PartialOrder (RingCon R) where
+  le_refl _c _ _ := id
+  le_trans _c1 _c2 _c3 h1 h2 _x _y h := h2 <| h1 h
+  le_antisymm _c _d hc hd := ext fun _x _y => ⟨fun h => hc h, fun h => hd h⟩
+
+/-- The complete lattice of congruence relations on a given type with multiplication and
+addition. -/
+instance : CompleteLattice (RingCon R) where
+  __ := completeLatticeOfInf (RingCon R) fun s =>
+    ⟨fun r hr x y h => (h : ∀ r ∈ s, (r : RingCon R) x y) r hr,
+      fun _r hr _x _y h _r' hr' => hr hr' h⟩
+  inf c d :=
+    { toSetoid := c.toSetoid ⊓ d.toSetoid
+      mul' := fun h1 h2 => ⟨c.mul h1.1 h2.1, d.mul h1.2 h2.2⟩
+      add' := fun h1 h2 => ⟨c.add h1.1 h2.1, d.add h1.2 h2.2⟩ }
+  inf_le_left _ _ := fun _ _ h => h.1
+  inf_le_right _ _ := fun _ _ h => h.2
+  le_inf _ _ _ hb hc := fun _ _ h => ⟨hb h, hc h⟩
+  top :=
+    { (⊤ : Setoid R) with
+      mul' := fun _ _ => trivial
+      add' := fun _ _ => trivial }
+  le_top _ := fun _ _ _h => trivial
+  bot :=
+    { (⊥ : Setoid R) with
+      mul' := congr_arg₂ _
+      add' := congr_arg₂ _ }
+  bot_le c := fun x _y h => h ▸ c.refl x
+
+@[simp, norm_cast]
+theorem coe_top : ⇑(⊤ : RingCon R) = ⊤ := rfl
+
+/-- The infimum of two congruence relations equals the infimum of the underlying binary
+operations. -/
+@[simp, norm_cast]
+theorem coe_inf {c d : RingCon R} : ⇑(c ⊓ d) = ⇑c ⊓ ⇑d := rfl
+
+/-- Definition of the infimum of two congruence relations. -/
+theorem inf_iff_and {c d : RingCon R} {x y} : (c ⊓ d) x y ↔ c x y ∧ d x y :=
+  Iff.rfl
+
+/-- The inductively defined smallest congruence relation containing a binary relation `r` equals
+    the infimum of the set of congruence relations containing `r`. -/
+theorem ringConGen_eq (r : R → R → Prop) :
+    ringConGen r = sInf {s : RingCon R | ∀ x y, r x y → s x y} :=
+  le_antisymm
+    (fun _x _y H =>
+      RingConGen.Rel.recOn H (fun _ _ h _ hs => hs _ _ h) (RingCon.refl _)
+        (fun _ => RingCon.symm _) (fun _ _ => RingCon.trans _)
+        (fun _ _ h1 h2 c hc => c.add (h1 c hc) <| h2 c hc)
+        (fun _ _ h1 h2 c hc => c.mul (h1 c hc) <| h2 c hc))
+    (sInf_le fun _ _ => RingConGen.Rel.of _ _)
+
+/-- The smallest congruence relation containing a binary relation `r` is contained in any
+    congruence relation containing `r`. -/
+theorem ringConGen_le {r : R → R → Prop} {c : RingCon R}
+    (h : ∀ x y, r x y → c x y) : ringConGen r ≤ c := by
+  rw [ringConGen_eq]; exact sInf_le h
+
+/-- Given binary relations `r, s` with `r` contained in `s`, the smallest congruence relation
+    containing `s` contains the smallest congruence relation containing `r`. -/
+theorem ringConGen_mono {r s : R → R → Prop} (h : ∀ x y, r x y → s x y) :
+    ringConGen r ≤ ringConGen s :=
+  ringConGen_le fun x y hr => RingConGen.Rel.of _ _ <| h x y hr
+
+/-- Congruence relations equal the smallest congruence relation in which they are contained. -/
+theorem ringConGen_of_ringCon (c : RingCon R) : ringConGen c = c :=
+  le_antisymm (by rw [ringConGen_eq]; exact sInf_le fun _ _ => id) RingConGen.Rel.of
+
+/-- The map sending a binary relation to the smallest congruence relation in which it is
+    contained is idempotent. -/
+theorem ringConGen_idem (r : R → R → Prop) : ringConGen (ringConGen r) = ringConGen r :=
+  ringConGen_of_ringCon _
+
+/-- The supremum of congruence relations `c, d` equals the smallest congruence relation containing
+    the binary relation '`x` is related to `y` by `c` or `d`'. -/
+theorem sup_eq_ringConGen (c d : RingCon R) : c ⊔ d = ringConGen fun x y => c x y ∨ d x y := by
+  rw [ringConGen_eq]
+  apply congr_arg sInf
+  simp only [le_def, or_imp, ← forall_and]
+
+/-- The supremum of two congruence relations equals the smallest congruence relation containing
+    the supremum of the underlying binary operations. -/
+theorem sup_def {c d : RingCon R} : c ⊔ d = ringConGen (⇑c ⊔ ⇑d) := by
+  rw [sup_eq_ringConGen]; rfl
+
+/-- The supremum of a set of congruence relations `S` equals the smallest congruence relation
+    containing the binary relation 'there exists `c ∈ S` such that `x` is related to `y` by
+    `c`'. -/
+theorem sSup_eq_ringConGen (S : Set (RingCon R)) :
+    sSup S = ringConGen fun x y => ∃ c : RingCon R, c ∈ S ∧ c x y := by
+  rw [ringConGen_eq]
+  apply congr_arg sInf
+  ext
+  exact ⟨fun h _ _ ⟨r, hr⟩ => h hr.1 hr.2, fun h r hS _ _ hr => h _ _ ⟨r, hS, hr⟩⟩
+
+/-- The supremum of a set of congruence relations is the same as the smallest congruence relation
+    containing the supremum of the set's image under the map to the underlying binary relation. -/
+theorem sSup_def {S : Set (RingCon R)} :
+    sSup S = ringConGen (sSup (@Set.image (RingCon R) (R → R → Prop) (⇑) S)) := by
+  rw [sSup_eq_ringConGen, sSup_image]
+  congr with (x y)
+  simp only [sSup_image, iSup_apply, iSup_Prop_eq, exists_prop, rel_eq_coe]
+
+variable (R)
+
+/-- There is a Galois insertion of congruence relations on a type with multiplication and addition
+`R` into binary relations on `R`. -/
+protected def gi : @GaloisInsertion (R → R → Prop) (RingCon R) _ _ ringConGen (⇑) where
+  choice r _h := ringConGen r
+  gc _r c :=
+    ⟨fun H _ _ h => H <| RingConGen.Rel.of _ _ h, fun H =>
+      ringConGen_of_ringCon c ▸ ringConGen_mono H⟩
+  le_l_u x := (ringConGen_of_ringCon x).symm ▸ le_refl x
+  choice_eq _ _ := rfl
+
+end Lattice
+
 end RingCon
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: Eric Wieser
 -/
 import Mathlib.Algebra.GroupRingAction.Basic
-import Mathlib.Algebra.Hom.Ring.Defs
+import Mathlib.Algebra.Ring.Hom.Defs
 import Mathlib.Algebra.Ring.InjSurj
 import Mathlib.GroupTheory.Congruence
 
perf: remove overspecified fields (#6965)

This removes redundant field values of the form add := add for smaller terms and less unfolding during unification.

A list of all files containing a structure instance of the form { a1, ... with x1 := val, ... } where some xi is a field of some aj was generated by modifying the structure instance elaboration algorithm to print such overlaps to stdout in a custom toolchain.

Using that toolchain, I went through each file on the list and attempted to remove algebraic fields that overlapped and were redundant, eg add := add and not toFun (though some other ones did creep in). If things broke (which was the case in a couple of cases), I did not push further and reverted.

It is possible that pushing harder and trying to remove all redundant overlaps will yield further improvements.

Diff
@@ -392,7 +392,6 @@ instance smulCommClass' [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R
 instance [Monoid α] [NonAssocSemiring R] [DistribMulAction α R] [IsScalarTower α R R]
     (c : RingCon R) : DistribMulAction α c.Quotient :=
   { c.toCon.mulAction with
-    smul := (· • ·)
     smul_zero := fun _ => congr_arg toQuotient <| smul_zero _
     smul_add := fun _ => Quotient.ind₂' fun _ _ => congr_arg toQuotient <| smul_add _ _ _ }
 
chore (RingTheory.Congruence): make RingCon extend AddCon and Con (#6772)

Currently RingCon extends Add and Mul. This changes it to extend AddCon and Con directly.

Diff
@@ -34,17 +34,17 @@ Most of the time you likely want to use the `Ideal.Quotient` API that is built o
 -/
 
 
-/- Note: we can't extend both `AddCon R` and `MulCon R` in Lean 3 due to interactions between old-
-and new-style structures. We can revisit this in Lean 4. (After and not during the port!) -/
 /-- A congruence relation on a type with an addition and multiplication is an equivalence relation
 which preserves both. -/
-structure RingCon (R : Type*) [Add R] [Mul R] extends Setoid R where
-  /-- Ring congruence relations are closed under addition -/
-  add' : ∀ {w x y z}, r w x → r y z → r (w + y) (x + z)
-  /-- Ring congruence relations are closed under multiplication -/
-  mul' : ∀ {w x y z}, r w x → r y z → r (w * y) (x * z)
+structure RingCon (R : Type*) [Add R] [Mul R] extends Con R, AddCon R where
 #align ring_con RingCon
 
+/-- The induced multiplicative congruence from a `RingCon`. -/
+add_decl_doc RingCon.toCon
+
+/-- The induced additive congruence from a `RingCon`. -/
+add_decl_doc RingCon.toAddCon
+
 variable {α R : Type*}
 
 /-- The inductively defined smallest ring congruence relation containing a given binary
@@ -62,8 +62,7 @@ inductive RingConGen.Rel [Add R] [Mul R] (r : R → R → Prop) : R → R → Pr
 
 /-- The inductively defined smallest ring congruence relation containing a given binary
     relation. -/
-def ringConGen [Add R] [Mul R] (r : R → R → Prop) : RingCon R
-    where
+def ringConGen [Add R] [Mul R] (r : R → R → Prop) : RingCon R where
   r := RingConGen.Rel r
   iseqv := ⟨RingConGen.Rel.refl, @RingConGen.Rel.symm _ _ _ _, @RingConGen.Rel.trans _ _ _ _⟩
   add' := RingConGen.Rel.add
@@ -76,16 +75,6 @@ section Basic
 
 variable [Add R] [Mul R] (c : RingCon R)
 
-/-- Every `RingCon` is also an `AddCon` -/
-def toAddCon : AddCon R :=
-  { c with }
-#align ring_con.to_add_con RingCon.toAddCon
-
-/-- Every `RingCon` is also a `Con` -/
-def toCon : Con R :=
-  { c with }
-#align ring_con.to_con RingCon.toCon
-
 --Porting note: upgrade to `FunLike`
 /-- A coercion from a congruence relation to its underlying binary relation. -/
 instance : FunLike (RingCon R) R fun _ => R → Prop :=
@@ -93,14 +82,18 @@ instance : FunLike (RingCon R) R fun _ => R → Prop :=
     coe_injective' := fun x y h => by
       rcases x with ⟨⟨x, _⟩, _⟩
       rcases y with ⟨⟨y, _⟩, _⟩
-      have : x = y := h
-      subst x; rfl }
+      congr!
+      rw [Setoid.ext_iff,(show x.Rel = y.Rel from h)]
+      simp}
 
-@[simp]
 theorem rel_eq_coe : c.r = c :=
   rfl
 #align ring_con.rel_eq_coe RingCon.rel_eq_coe
 
+@[simp]
+theorem toCon_coe_eq_coe : (c.toCon : R → R → Prop) = c :=
+  rfl
+
 protected theorem refl (x) : c x x :=
   c.refl' x
 #align ring_con.refl RingCon.refl
@@ -121,14 +114,13 @@ protected theorem mul {w x y z} : c w x → c y z → c (w * y) (x * z) :=
   c.mul'
 #align ring_con.mul RingCon.mul
 
-@[simp]
-theorem rel_mk {s : Setoid R} {ha hm a b} : RingCon.mk s ha hm a b ↔ Setoid.r a b :=
-  Iff.rfl
-#align ring_con.rel_mk RingCon.rel_mk
-
 instance : Inhabited (RingCon R) :=
   ⟨ringConGen EmptyRelation⟩
 
+@[simp]
+theorem rel_mk {s : Con R} {h a b} : RingCon.mk s h a b ↔ @Setoid.r _ s.toSetoid a b :=
+  Iff.rfl
+
 end Basic
 
 section Quotient
@@ -158,8 +150,8 @@ instance : CoeTC R c.Quotient :=
 
 -- Lower the priority since it unifies with any quotient type.
 /-- The quotient by a decidable congruence relation has decidable equality. -/
-instance (priority := 500) [d : ∀ a b, Decidable (c a b)] : DecidableEq c.Quotient := by
-  delta RingCon.Quotient; infer_instance
+instance (priority := 500) [_d : ∀ a b, Decidable (c a b)] : DecidableEq c.Quotient :=
+  inferInstanceAs (DecidableEq (Quotient c.toSetoid))
 
 @[simp]
 theorem quot_mk_eq_coe (x : R) : Quot.mk c x = (x : c.Quotient) :=
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: Eric Wieser
 -/
 import Mathlib.Algebra.GroupRingAction.Basic
-import Mathlib.Algebra.Hom.Ring
+import Mathlib.Algebra.Hom.Ring.Defs
 import Mathlib.Algebra.Ring.InjSurj
 import Mathlib.GroupTheory.Congruence
 
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
@@ -38,14 +38,14 @@ Most of the time you likely want to use the `Ideal.Quotient` API that is built o
 and new-style structures. We can revisit this in Lean 4. (After and not during the port!) -/
 /-- A congruence relation on a type with an addition and multiplication is an equivalence relation
 which preserves both. -/
-structure RingCon (R : Type _) [Add R] [Mul R] extends Setoid R where
+structure RingCon (R : Type*) [Add R] [Mul R] extends Setoid R where
   /-- Ring congruence relations are closed under addition -/
   add' : ∀ {w x y z}, r w x → r y z → r (w + y) (x + z)
   /-- Ring congruence relations are closed under multiplication -/
   mul' : ∀ {w x y z}, r w x → r y z → r (w * y) (x * z)
 #align ring_con RingCon
 
-variable {α R : Type _}
+variable {α R : Type*}
 
 /-- The inductively defined smallest ring congruence relation containing a given binary
     relation. -/
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,17 +2,14 @@
 Copyright (c) 2022 Eric Wieser. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
-
-! This file was ported from Lean 3 source module ring_theory.congruence
-! leanprover-community/mathlib commit 2f39bcbc98f8255490f8d4562762c9467694c809
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Algebra.GroupRingAction.Basic
 import Mathlib.Algebra.Hom.Ring
 import Mathlib.Algebra.Ring.InjSurj
 import Mathlib.GroupTheory.Congruence
 
+#align_import ring_theory.congruence from "leanprover-community/mathlib"@"2f39bcbc98f8255490f8d4562762c9467694c809"
+
 /-!
 # Congruence relations on rings
 
chore: cleanup whitespace (#5988)

Grepping for [^ .:{-] [^ :] and reviewing the results. Once I started I couldn't stop. :-)

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

Diff
@@ -405,7 +405,7 @@ instance [Monoid α] [NonAssocSemiring R] [DistribMulAction α R] [IsScalarTower
   { c.toCon.mulAction with
     smul := (· • ·)
     smul_zero := fun _ => congr_arg toQuotient <| smul_zero _
-    smul_add := fun _ => Quotient.ind₂' fun _ _  => congr_arg toQuotient <| smul_add _ _ _ }
+    smul_add := fun _ => Quotient.ind₂' fun _ _ => congr_arg toQuotient <| smul_add _ _ _ }
 
 instance [Monoid α] [Semiring R] [MulSemiringAction α R] [IsScalarTower α R R] (c : RingCon R) :
     MulSemiringAction α c.Quotient :=
chore: fix upper/lowercase in comments (#4360)
  • Run a non-interactive version of fix-comments.py on all files.
  • Go through the diff and manually add/discard/edit chunks.
Diff
@@ -79,7 +79,7 @@ section Basic
 
 variable [Add R] [Mul R] (c : RingCon R)
 
-/-- Every `ring_con` is also an `AddCon` -/
+/-- Every `RingCon` is also an `AddCon` -/
 def toAddCon : AddCon R :=
   { c with }
 #align ring_con.to_add_con RingCon.toAddCon
chore: Rename to sSup/iSup (#3938)

As discussed on Zulip

Renames

  • supₛsSup
  • infₛsInf
  • supᵢiSup
  • infᵢiInf
  • bsupₛbsSup
  • binfₛbsInf
  • bsupᵢbiSup
  • binfᵢbiInf
  • csupₛcsSup
  • cinfₛcsInf
  • csupᵢciSup
  • cinfᵢciInf
  • unionₛsUnion
  • interₛsInter
  • unionᵢiUnion
  • interᵢiInter
  • bunionₛbsUnion
  • binterₛbsInter
  • bunionᵢbiUnion
  • binterᵢbiInter

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -33,7 +33,7 @@ Most of the time you likely want to use the `Ideal.Quotient` API that is built o
 * Copy across more API from `Con` and `AddCon` in `GroupTheory/Congruence.lean`, such as:
   * The `CompleteLattice` structure.
   * The `conGen_eq` lemma, stating that
-    `ringConGen r = infₛ {s : RingCon M | ∀ x y, r x y → s x y}`.
+    `ringConGen r = sInf {s : RingCon M | ∀ x y, r x y → s x y}`.
 -/
 
 
chore: forward-port leanprover-community/mathlib#18934 (#3806)

Co-authored-by: Parcly Taxel <reddeloostw@gmail.com>

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Eric Wieser
 
 ! This file was ported from Lean 3 source module ring_theory.congruence
-! leanprover-community/mathlib commit 9003f28797c0664a49e4179487267c494477d853
+! leanprover-community/mathlib commit 2f39bcbc98f8255490f8d4562762c9467694c809
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -384,6 +384,22 @@ instance [CommRing R] (c : RingCon R) : CommRing c.Quotient :=
     (fun _ _ => rfl) (fun _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl) (fun _ _ => rfl)
     (fun _ _ => rfl) (fun _ => rfl) fun _ => rfl
 
+instance isScalarTower_right [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
+    (c : RingCon R) : IsScalarTower α c.Quotient c.Quotient where
+  smul_assoc _ := Quotient.ind₂' fun _ _ => congr_arg Quotient.mk'' <| smul_mul_assoc _ _ _
+#align ring_con.is_scalar_tower_right RingCon.isScalarTower_right
+
+instance smulCommClass [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
+    [SMulCommClass α R R] (c : RingCon R) : SMulCommClass α c.Quotient c.Quotient where
+  smul_comm _ := Quotient.ind₂' fun _ _ => congr_arg Quotient.mk'' <| (mul_smul_comm _ _ _).symm
+#align ring_con.smul_comm_class RingCon.smulCommClass
+
+instance smulCommClass' [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R]
+    [SMulCommClass R α R] (c : RingCon R) : SMulCommClass c.Quotient α c.Quotient :=
+  haveI := SMulCommClass.symm R α R
+  SMulCommClass.symm _ _ _
+#align ring_con.smul_comm_class' RingCon.smulCommClass'
+
 instance [Monoid α] [NonAssocSemiring R] [DistribMulAction α R] [IsScalarTower α R R]
     (c : RingCon R) : DistribMulAction α c.Quotient :=
   { c.toCon.mulAction with
chore: use etaExperiment rather than hacking with instances (#3668)

This is to fix timeouts in https://github.com/leanprover-community/mathlib4/pull/3552.

See discussion at https://leanprover.zulipchat.com/#narrow/stream/287929-mathlib4/topic/!4.233552.20.28LinearAlgebra.2EMatrix.2EToLin.29.

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

Diff
@@ -335,7 +335,7 @@ end Data
 
 /-! ### Algebraic structure
 
-The operations above on the quotient by `c : RingCon R` preseverse the algebraic structure of `R`.
+The operations above on the quotient by `c : RingCon R` preserve the algebraic structure of `R`.
 -/
 
 
chore: use inferInstanceAs (#2074)

Drop

  • by delta mydef; infer_instance. This generates id _ in the proof.

  • show _, by infer_instance. This generates let in let; not sure if it's bad for defeq but a reducible inferInstanceAs should not be worse.

Diff
@@ -190,16 +190,14 @@ section add_mul
 
 variable [Add R] [Mul R] (c : RingCon R)
 
-instance : Add c.Quotient :=
-  show Add c.toAddCon.Quotient by infer_instance
+instance : Add c.Quotient := inferInstanceAs (Add c.toAddCon.Quotient)
 
 @[simp, norm_cast]
 theorem coe_add (x y : R) : (↑(x + y) : c.Quotient) = ↑x + ↑y :=
   rfl
 #align ring_con.coe_add RingCon.coe_add
 
-instance : Mul c.Quotient :=
-  show Mul c.toCon.Quotient by infer_instance
+instance : Mul c.Quotient := inferInstanceAs (Mul c.toCon.Quotient)
 
 @[simp, norm_cast]
 theorem coe_mul (x y : R) : (↑(x * y) : c.Quotient) = ↑x * ↑y :=
@@ -212,8 +210,7 @@ section Zero
 
 variable [AddZeroClass R] [Mul R] (c : RingCon R)
 
-instance : Zero c.Quotient :=
-  show Zero c.toAddCon.Quotient by infer_instance
+instance : Zero c.Quotient := inferInstanceAs (Zero c.toAddCon.Quotient)
 
 @[simp, norm_cast]
 theorem coe_zero : (↑(0 : R) : c.Quotient) = 0 :=
@@ -226,8 +223,7 @@ section One
 
 variable [Add R] [MulOneClass R] (c : RingCon R)
 
-instance : One c.Quotient :=
-  show One c.toCon.Quotient by infer_instance
+instance : One c.Quotient := inferInstanceAs (One c.toCon.Quotient)
 
 @[simp, norm_cast]
 theorem coe_one : (↑(1 : R) : c.Quotient) = 1 :=
@@ -240,8 +236,7 @@ section SMul
 
 variable [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R] (c : RingCon R)
 
-instance : SMul α c.Quotient :=
-  show SMul α c.toCon.Quotient by infer_instance
+instance : SMul α c.Quotient := inferInstanceAs (SMul α c.toCon.Quotient)
 
 @[simp, norm_cast]
 theorem coe_smul (a : α) (x : R) : (↑(a • x) : c.Quotient) = a • (x : c.Quotient) :=
@@ -254,24 +249,21 @@ section NegSubZsmul
 
 variable [AddGroup R] [Mul R] (c : RingCon R)
 
-instance : Neg c.Quotient :=
-  show Neg c.toAddCon.Quotient by infer_instance
+instance : Neg c.Quotient := inferInstanceAs (Neg c.toAddCon.Quotient)
 
 @[simp, norm_cast]
 theorem coe_neg (x : R) : (↑(-x) : c.Quotient) = -x :=
   rfl
 #align ring_con.coe_neg RingCon.coe_neg
 
-instance : Sub c.Quotient :=
-  show Sub c.toAddCon.Quotient by infer_instance
+instance : Sub c.Quotient := inferInstanceAs (Sub c.toAddCon.Quotient)
 
 @[simp, norm_cast]
 theorem coe_sub (x y : R) : (↑(x - y) : c.Quotient) = x - y :=
   rfl
 #align ring_con.coe_sub RingCon.coe_sub
 
-instance hasZsmul : SMul ℤ c.Quotient :=
-  show SMul ℤ c.toAddCon.Quotient by infer_instance
+instance hasZsmul : SMul ℤ c.Quotient := inferInstanceAs (SMul ℤ c.toAddCon.Quotient)
 #align ring_con.has_zsmul RingCon.hasZsmul
 
 @[simp, norm_cast]
@@ -285,8 +277,7 @@ section Nsmul
 
 variable [AddMonoid R] [Mul R] (c : RingCon R)
 
-instance hasNsmul : SMul ℕ c.Quotient :=
-  show SMul ℕ c.toAddCon.Quotient by infer_instance
+instance hasNsmul : SMul ℕ c.Quotient := inferInstanceAs (SMul ℕ c.toAddCon.Quotient)
 #align ring_con.has_nsmul RingCon.hasNsmul
 
 @[simp, norm_cast]
@@ -300,8 +291,7 @@ section Pow
 
 variable [Add R] [Monoid R] (c : RingCon R)
 
-instance : Pow c.Quotient ℕ :=
-  show Pow c.toCon.Quotient ℕ by infer_instance
+instance : Pow c.Quotient ℕ := inferInstanceAs (Pow c.toCon.Quotient ℕ)
 
 @[simp, norm_cast]
 theorem coe_pow (x : R) (n : ℕ) : (↑(x ^ n) : c.Quotient) = (x : c.Quotient) ^ n :=
chore: fix casing errors per naming scheme (#1670)
Diff
@@ -236,7 +236,7 @@ theorem coe_one : (↑(1 : R) : c.Quotient) = 1 :=
 
 end One
 
-section Smul
+section SMul
 
 variable [Add R] [MulOneClass R] [SMul α R] [IsScalarTower α R R] (c : RingCon R)
 
@@ -248,7 +248,7 @@ theorem coe_smul (a : α) (x : R) : (↑(a • x) : c.Quotient) = a • (x : c.Q
   rfl
 #align ring_con.coe_smul RingCon.coe_smul
 
-end Smul
+end SMul
 
 section NegSubZsmul
 
feat: port GroupTheory.GroupAction.Basic (#1845)
Diff
@@ -173,7 +173,7 @@ theorem quot_mk_eq_coe (x : R) : Quot.mk c x = (x : c.Quotient) :=
 element of the quotient by `c`. -/
 @[simp]
 protected theorem eq {a b : R} : (a : c.Quotient) = (b : c.Quotient) ↔ c a b :=
-  Quotient.eq'
+  Quotient.eq''
 #align ring_con.eq RingCon.eq
 
 end Basic
feat: port RingTheory.Congruence (#1629)

Dependencies 4 + 159

160 files ported (97.6%)
67735 lines ported (98.4%)
Show graph

The unported dependencies are