data.rat.castMathlib.Data.Rat.Cast.Order

This file has been ported!

Changes since the initial port

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

Changes in mathlib3

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(last sync)

feat(algebra/*/opposite): Missing instances (#18602)

A few missing instances about nat.cast/int.cast/rat.cast and mul_opposite/add_opposite. Also add the (weirdly) missing add_comm_group_with_one → add_comm_monoid_with_one.

Finally, this changes the defeq of rat.cast on mul_opposite to be simpler.

Diff
@@ -310,20 +310,6 @@ monoid_with_zero_hom.ext_rat' $ ring_hom.congr_fun $
 instance rat.subsingleton_ring_hom {R : Type*} [semiring R] : subsingleton (ℚ →+* R) :=
 ⟨ring_hom.ext_rat⟩
 
-namespace mul_opposite
-
-variables [division_ring α]
-
-@[simp, norm_cast] lemma op_rat_cast (r : ℚ) : op (r : α) = (↑r : αᵐᵒᵖ) :=
-by rw [cast_def, div_eq_mul_inv, op_mul, op_inv, op_nat_cast, op_int_cast,
-    (commute.cast_int_right _ r.num).eq, cast_def, div_eq_mul_inv]
-
-@[simp, norm_cast] lemma unop_rat_cast (r : ℚ) : unop (r : αᵐᵒᵖ) = r :=
-by rw [cast_def, div_eq_mul_inv, unop_mul, unop_inv, unop_nat_cast, unop_int_cast,
-    (commute.cast_int_right _ r.num).eq, cast_def, div_eq_mul_inv]
-
-end mul_opposite
-
 section smul
 
 namespace rat

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(no changes)

(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
@@ -89,9 +89,9 @@ theorem commute_cast (a : α) (r : ℚ) : Commute a r :=
 #align rat.commute_cast Rat.commute_cast
 -/
 
-#print Rat.cast_mk_of_ne_zero /-
+#print Rat.cast_divInt_of_ne_zero /-
 @[norm_cast]
-theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b :=
+theorem cast_divInt_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b :=
   by
   have b0' : b ≠ 0 := by refine' mt _ b0; simp (config := { contextual := true })
   cases' e : a /. b with n d h c
@@ -107,7 +107,7 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
   symm
   rw [cast_def, div_eq_mul_inv, eq_div_iff_mul_eq d0, mul_assoc, (d.commute_cast _).Eq, ← mul_assoc,
     this, mul_assoc, mul_inv_cancel b0, mul_one]
-#align rat.cast_mk_of_ne_zero Rat.cast_mk_of_ne_zero
+#align rat.cast_mk_of_ne_zero Rat.cast_divInt_of_ne_zero
 -/
 
 #print Rat.cast_add_of_ne_zero /-
@@ -589,19 +589,19 @@ namespace Rat
 
 variable {K : Type _} [DivisionRing K]
 
-#print Rat.distribSMul /-
-instance (priority := 100) distribSMul : DistribSMul ℚ K
+#print Rat.instDistribSMul /-
+instance (priority := 100) instDistribSMul : DistribSMul ℚ K
     where
   smul := (· • ·)
   smul_zero a := by rw [smul_def, MulZeroClass.mul_zero]
   smul_add a x y := by simp only [smul_def, mul_add, cast_add]
-#align rat.distrib_smul Rat.distribSMul
+#align rat.distrib_smul Rat.instDistribSMul
 -/
 
-#print Rat.isScalarTower_right /-
-instance isScalarTower_right : IsScalarTower ℚ K K :=
+#print Rat.instIsScalarTowerRight /-
+instance instIsScalarTowerRight : IsScalarTower ℚ K K :=
   ⟨fun a x y => by simp only [smul_def, smul_eq_mul, mul_assoc]⟩
-#align rat.is_scalar_tower_right Rat.isScalarTower_right
+#align rat.is_scalar_tower_right Rat.instIsScalarTowerRight
 -/
 
 end Rat
Diff
@@ -102,7 +102,7 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
     have : (b : α) = (d : α) * (k : α) := by rw [ke, Int.cast_mul, Int.cast_natCast]
     rw [d0, MulZeroClass.zero_mul] at this; contradiction
   rw [num_denom'] at e
-  have := congr_arg (coe : ℤ → α) ((mk_eq b0' <| ne_of_gt <| Int.coe_nat_pos.2 h).1 e)
+  have := congr_arg (coe : ℤ → α) ((mk_eq b0' <| ne_of_gt <| Int.natCast_pos.2 h).1 e)
   rw [Int.cast_mul, Int.cast_mul, Int.cast_natCast] at this
   symm
   rw [cast_def, div_eq_mul_inv, eq_div_iff_mul_eq d0, mul_assoc, (d.commute_cast _).Eq, ← mul_assoc,
Diff
@@ -53,7 +53,7 @@ theorem cast_intCast (n : ℤ) : ((n : ℚ) : α) = n :=
 #print Rat.cast_natCast /-
 @[simp, norm_cast]
 theorem cast_natCast (n : ℕ) : ((n : ℚ) : α) = n := by
-  rw [← Int.cast_ofNat, cast_coe_int, Int.cast_ofNat]
+  rw [← Int.cast_natCast, cast_coe_int, Int.cast_natCast]
 #align rat.cast_coe_nat Rat.cast_natCast
 -/
 
@@ -99,11 +99,11 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
     intro d0
     have dd := denom_dvd a b
     cases' show (d : ℤ) ∣ b by rwa [e] at dd with k ke
-    have : (b : α) = (d : α) * (k : α) := by rw [ke, Int.cast_mul, Int.cast_ofNat]
+    have : (b : α) = (d : α) * (k : α) := by rw [ke, Int.cast_mul, Int.cast_natCast]
     rw [d0, MulZeroClass.zero_mul] at this; contradiction
   rw [num_denom'] at e
   have := congr_arg (coe : ℤ → α) ((mk_eq b0' <| ne_of_gt <| Int.coe_nat_pos.2 h).1 e)
-  rw [Int.cast_mul, Int.cast_mul, Int.cast_ofNat] at this
+  rw [Int.cast_mul, Int.cast_mul, Int.cast_natCast] at this
   symm
   rw [cast_def, div_eq_mul_inv, eq_div_iff_mul_eq d0, mul_assoc, (d.commute_cast _).Eq, ← mul_assoc,
     this, mul_assoc, mul_inv_cancel b0, mul_one]
@@ -215,7 +215,7 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
     by
     let ⟨k, e⟩ := this
     have := congr_arg (coe : ℤ → α) e <;>
-      rwa [Int.cast_mul, Int.cast_ofNat, h, MulZeroClass.zero_mul] at this
+      rwa [Int.cast_mul, Int.cast_natCast, h, MulZeroClass.zero_mul] at this
   rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
 -/
@@ -233,8 +233,8 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
     rw [num_denom', num_denom'] at h ⊢
     rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero] at h <;> simp [d₁0, d₂0] at h ⊢
     rwa [eq_div_iff_mul_eq d₂a, division_def, mul_assoc, (d₁.cast_commute (d₂ : α)).inv_left₀.Eq, ←
-      mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_ofNat d₁, ←
-      Int.cast_mul, ← Int.cast_ofNat d₂, ← Int.cast_mul, Int.cast_inj, ←
+      mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_natCast d₁, ←
+      Int.cast_mul, ← Int.cast_natCast d₂, ← Int.cast_mul, Int.cast_inj, ←
       mk_eq (Int.natCast_ne_zero.2 d₁0) (Int.natCast_ne_zero.2 d₂0)] at h
 #align rat.cast_inj Rat.cast_inj
 -/
@@ -536,7 +536,7 @@ variable {M₀ : Type _} [MonoidWithZero M₀] [MonoidWithZeroHomClass F ℚ M
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
   DFunLike.ext f g fun r => by
-    rw [← r.num_div_denom, div_eq_mul_inv, map_mul, map_mul, h, ← Int.cast_ofNat,
+    rw [← r.num_div_denom, div_eq_mul_inv, map_mul, map_mul, h, ← Int.cast_natCast,
       eq_on_inv₀ f g (h _)]
 #align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'
 -/
Diff
@@ -43,31 +43,31 @@ section WithDivRing
 
 variable [DivisionRing α]
 
-#print Rat.cast_coe_int /-
+#print Rat.cast_intCast /-
 @[simp, norm_cast]
-theorem cast_coe_int (n : ℤ) : ((n : ℚ) : α) = n :=
+theorem cast_intCast (n : ℤ) : ((n : ℚ) : α) = n :=
   (cast_def _).trans <| show (n / (1 : ℕ) : α) = n by rw [Nat.cast_one, div_one]
-#align rat.cast_coe_int Rat.cast_coe_int
+#align rat.cast_coe_int Rat.cast_intCast
 -/
 
-#print Rat.cast_coe_nat /-
+#print Rat.cast_natCast /-
 @[simp, norm_cast]
-theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
+theorem cast_natCast (n : ℕ) : ((n : ℚ) : α) = n := by
   rw [← Int.cast_ofNat, cast_coe_int, Int.cast_ofNat]
-#align rat.cast_coe_nat Rat.cast_coe_nat
+#align rat.cast_coe_nat Rat.cast_natCast
 -/
 
 #print Rat.cast_zero /-
 @[simp, norm_cast]
 theorem cast_zero : ((0 : ℚ) : α) = 0 :=
-  (cast_coe_int _).trans Int.cast_zero
+  (cast_intCast _).trans Int.cast_zero
 #align rat.cast_zero Rat.cast_zero
 -/
 
 #print Rat.cast_one /-
 @[simp, norm_cast]
 theorem cast_one : ((1 : ℚ) : α) = 1 :=
-  (cast_coe_int _).trans Int.cast_one
+  (cast_intCast _).trans Int.cast_one
 #align rat.cast_one Rat.cast_one
 -/
 
@@ -117,9 +117,9 @@ theorem cast_add_of_ne_zero :
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) =>
     by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0 <;> exact d₁0 Nat.cast_zero
+      Int.natCast_ne_zero.2 fun e => by rw [e] at d₁0 <;> exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0 <;> exact d₂0 Nat.cast_zero
+      Int.natCast_ne_zero.2 fun e => by rw [e] at d₂0 <;> exact d₂0 Nat.cast_zero
     rw [num_denom', num_denom', add_def d₁0' d₂0']
     suffices (n₁ * (d₂ * (d₂⁻¹ * d₁⁻¹)) + n₂ * (d₁ * d₂⁻¹) * d₁⁻¹ : α) = n₁ * d₁⁻¹ + n₂ * d₂⁻¹
       by
@@ -158,9 +158,9 @@ theorem cast_mul_of_ne_zero :
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) =>
     by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0 <;> exact d₁0 Nat.cast_zero
+      Int.natCast_ne_zero.2 fun e => by rw [e] at d₁0 <;> exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0 <;> exact d₂0 Nat.cast_zero
+      Int.natCast_ne_zero.2 fun e => by rw [e] at d₂0 <;> exact d₂0 Nat.cast_zero
     rw [num_denom', num_denom', mul_def d₁0' d₂0']
     suffices (n₁ * (n₂ * d₂⁻¹ * d₁⁻¹) : α) = n₁ * (d₁⁻¹ * (n₂ * d₂⁻¹))
       by
@@ -198,7 +198,7 @@ theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α)
     by
     have n0' : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0 <;> exact n0 Int.cast_zero
     have d0' : (d : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d0 <;> exact d0 Nat.cast_zero
+      Int.natCast_ne_zero.2 fun e => by rw [e] at d0 <;> exact d0 Nat.cast_zero
     rw [num_denom', inv_def]
     rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, inv_div] <;> simp [n0, d0]
 #align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zero
@@ -235,7 +235,7 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
     rwa [eq_div_iff_mul_eq d₂a, division_def, mul_assoc, (d₁.cast_commute (d₂ : α)).inv_left₀.Eq, ←
       mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_ofNat d₁, ←
       Int.cast_mul, ← Int.cast_ofNat d₂, ← Int.cast_mul, Int.cast_inj, ←
-      mk_eq (Int.coe_nat_ne_zero.2 d₁0) (Int.coe_nat_ne_zero.2 d₂0)] at h
+      mk_eq (Int.natCast_ne_zero.2 d₁0) (Int.natCast_ne_zero.2 d₂0)] at h
 #align rat.cast_inj Rat.cast_inj
 -/
 
Diff
@@ -98,12 +98,12 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
   have d0 : (d : α) ≠ 0 := by
     intro d0
     have dd := denom_dvd a b
-    cases' show (d : ℤ) ∣ b by rwa [e] at dd  with k ke
+    cases' show (d : ℤ) ∣ b by rwa [e] at dd with k ke
     have : (b : α) = (d : α) * (k : α) := by rw [ke, Int.cast_mul, Int.cast_ofNat]
-    rw [d0, MulZeroClass.zero_mul] at this ; contradiction
-  rw [num_denom'] at e 
+    rw [d0, MulZeroClass.zero_mul] at this; contradiction
+  rw [num_denom'] at e
   have := congr_arg (coe : ℤ → α) ((mk_eq b0' <| ne_of_gt <| Int.coe_nat_pos.2 h).1 e)
-  rw [Int.cast_mul, Int.cast_mul, Int.cast_ofNat] at this 
+  rw [Int.cast_mul, Int.cast_mul, Int.cast_ofNat] at this
   symm
   rw [cast_def, div_eq_mul_inv, eq_div_iff_mul_eq d0, mul_assoc, (d.commute_cast _).Eq, ← mul_assoc,
     this, mul_assoc, mul_inv_cancel b0, mul_one]
@@ -117,9 +117,9 @@ theorem cast_add_of_ne_zero :
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) =>
     by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0  <;> exact d₁0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0 <;> exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0  <;> exact d₂0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0 <;> exact d₂0 Nat.cast_zero
     rw [num_denom', num_denom', add_def d₁0' d₂0']
     suffices (n₁ * (d₂ * (d₂⁻¹ * d₁⁻¹)) + n₂ * (d₁ * d₂⁻¹) * d₁⁻¹ : α) = n₁ * d₁⁻¹ + n₂ * d₂⁻¹
       by
@@ -158,9 +158,9 @@ theorem cast_mul_of_ne_zero :
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) =>
     by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0  <;> exact d₁0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0 <;> exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0  <;> exact d₂0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0 <;> exact d₂0 Nat.cast_zero
     rw [num_denom', num_denom', mul_def d₁0' d₂0']
     suffices (n₁ * (n₂ * d₂⁻¹ * d₁⁻¹) : α) = n₁ * (d₁⁻¹ * (n₂ * d₂⁻¹))
       by
@@ -196,9 +196,9 @@ theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
 theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = n⁻¹
   | ⟨n, d, h, c⟩ => fun (n0 : (n : α) ≠ 0) (d0 : (d : α) ≠ 0) =>
     by
-    have n0' : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0  <;> exact n0 Int.cast_zero
+    have n0' : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0 <;> exact n0 Int.cast_zero
     have d0' : (d : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d0  <;> exact d0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d0 <;> exact d0 Nat.cast_zero
     rw [num_denom', inv_def]
     rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, inv_div] <;> simp [n0, d0]
 #align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zero
@@ -215,7 +215,7 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
     by
     let ⟨k, e⟩ := this
     have := congr_arg (coe : ℤ → α) e <;>
-      rwa [Int.cast_mul, Int.cast_ofNat, h, MulZeroClass.zero_mul] at this 
+      rwa [Int.cast_mul, Int.cast_ofNat, h, MulZeroClass.zero_mul] at this
   rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
 -/
@@ -231,11 +231,11 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
     have d₁a : (d₁ : α) ≠ 0 := Nat.cast_ne_zero.2 d₁0
     have d₂a : (d₂ : α) ≠ 0 := Nat.cast_ne_zero.2 d₂0
     rw [num_denom', num_denom'] at h ⊢
-    rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero] at h  <;> simp [d₁0, d₂0] at h ⊢
+    rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero] at h <;> simp [d₁0, d₂0] at h ⊢
     rwa [eq_div_iff_mul_eq d₂a, division_def, mul_assoc, (d₁.cast_commute (d₂ : α)).inv_left₀.Eq, ←
       mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_ofNat d₁, ←
       Int.cast_mul, ← Int.cast_ofNat d₂, ← Int.cast_mul, Int.cast_inj, ←
-      mk_eq (Int.coe_nat_ne_zero.2 d₁0) (Int.coe_nat_ne_zero.2 d₂0)] at h 
+      mk_eq (Int.coe_nat_ne_zero.2 d₁0) (Int.coe_nat_ne_zero.2 d₂0)] at h
 #align rat.cast_inj Rat.cast_inj
 -/
 
Diff
@@ -535,7 +535,7 @@ variable {M₀ : Type _} [MonoidWithZero M₀] [MonoidWithZeroHomClass F ℚ M
 #print MonoidWithZeroHom.ext_rat' /-
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
-  FunLike.ext f g fun r => by
+  DFunLike.ext f g fun r => by
     rw [← r.num_div_denom, div_eq_mul_inv, map_mul, map_mul, h, ← Int.cast_ofNat,
       eq_on_inv₀ f g (h _)]
 #align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'
@@ -557,7 +557,7 @@ theorem ext_rat {f g : ℚ →*₀ M₀}
 theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
     (same_on_pnat : ∀ n : ℕ, 0 < n → f n = g n) : f = g :=
   ext_rat' <|
-    FunLike.congr_fun <|
+    DFunLike.congr_fun <|
       show
         (f : ℚ →*₀ M₀).comp (Int.castRingHom ℚ : ℤ →*₀ ℚ) =
           (g : ℚ →*₀ M₀).comp (Int.castRingHom ℚ : ℤ →*₀ ℚ)
Diff
@@ -3,12 +3,12 @@ Copyright (c) 2019 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
 -/
-import Mathbin.Data.Rat.Order
-import Mathbin.Data.Rat.Lemmas
-import Mathbin.Data.Int.CharZero
-import Mathbin.Algebra.GroupWithZero.Power
-import Mathbin.Algebra.Field.Opposite
-import Mathbin.Algebra.Order.Field.Basic
+import Data.Rat.Order
+import Data.Rat.Lemmas
+import Data.Int.CharZero
+import Algebra.GroupWithZero.Power
+import Algebra.Field.Opposite
+import Algebra.Order.Field.Basic
 
 #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
 
Diff
@@ -503,11 +503,11 @@ theorem cast_eq_id : (coe : ℚ → ℚ) = id :=
 #align rat.cast_eq_id Rat.cast_eq_id
 -/
 
-#print Rat.cast_hom_rat /-
+#print Rat.castHom_rat /-
 @[simp]
-theorem cast_hom_rat : castHom ℚ = RingHom.id ℚ :=
+theorem castHom_rat : castHom ℚ = RingHom.id ℚ :=
   RingHom.ext cast_id
-#align rat.cast_hom_rat Rat.cast_hom_rat
+#align rat.cast_hom_rat Rat.castHom_rat
 -/
 
 end Rat
Diff
@@ -2,11 +2,6 @@
 Copyright (c) 2019 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
-
-! This file was ported from Lean 3 source module data.rat.cast
-! leanprover-community/mathlib commit acebd8d49928f6ed8920e502a6c90674e75bd441
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathbin.Data.Rat.Order
 import Mathbin.Data.Rat.Lemmas
@@ -15,6 +10,8 @@ import Mathbin.Algebra.GroupWithZero.Power
 import Mathbin.Algebra.Field.Opposite
 import Mathbin.Algebra.Order.Field.Basic
 
+#align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
+
 /-!
 # Casts for Rational Numbers
 
Diff
@@ -46,38 +46,53 @@ section WithDivRing
 
 variable [DivisionRing α]
 
+#print Rat.cast_coe_int /-
 @[simp, norm_cast]
 theorem cast_coe_int (n : ℤ) : ((n : ℚ) : α) = n :=
   (cast_def _).trans <| show (n / (1 : ℕ) : α) = n by rw [Nat.cast_one, div_one]
 #align rat.cast_coe_int Rat.cast_coe_int
+-/
 
+#print Rat.cast_coe_nat /-
 @[simp, norm_cast]
 theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
   rw [← Int.cast_ofNat, cast_coe_int, Int.cast_ofNat]
 #align rat.cast_coe_nat Rat.cast_coe_nat
+-/
 
+#print Rat.cast_zero /-
 @[simp, norm_cast]
 theorem cast_zero : ((0 : ℚ) : α) = 0 :=
   (cast_coe_int _).trans Int.cast_zero
 #align rat.cast_zero Rat.cast_zero
+-/
 
+#print Rat.cast_one /-
 @[simp, norm_cast]
 theorem cast_one : ((1 : ℚ) : α) = 1 :=
   (cast_coe_int _).trans Int.cast_one
 #align rat.cast_one Rat.cast_one
+-/
 
+#print Rat.cast_commute /-
 theorem cast_commute (r : ℚ) (a : α) : Commute (↑r) a := by
   simpa only [cast_def] using (r.1.cast_commute a).divLeft (r.2.cast_commute a)
 #align rat.cast_commute Rat.cast_commute
+-/
 
+#print Rat.cast_comm /-
 theorem cast_comm (r : ℚ) (a : α) : (r : α) * a = a * r :=
   (cast_commute r a).Eq
 #align rat.cast_comm Rat.cast_comm
+-/
 
+#print Rat.commute_cast /-
 theorem commute_cast (a : α) (r : ℚ) : Commute a r :=
   (r.cast_commute a).symm
 #align rat.commute_cast Rat.commute_cast
+-/
 
+#print Rat.cast_mk_of_ne_zero /-
 @[norm_cast]
 theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b :=
   by
@@ -96,7 +111,9 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
   rw [cast_def, div_eq_mul_inv, eq_div_iff_mul_eq d0, mul_assoc, (d.commute_cast _).Eq, ← mul_assoc,
     this, mul_assoc, mul_inv_cancel b0, mul_one]
 #align rat.cast_mk_of_ne_zero Rat.cast_mk_of_ne_zero
+-/
 
+#print Rat.cast_add_of_ne_zero /-
 @[norm_cast]
 theorem cast_add_of_ne_zero :
     ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m + n : ℚ) : α) = m + n
@@ -115,7 +132,9 @@ theorem cast_add_of_ne_zero :
     rw [← mul_assoc (d₂ : α), mul_inv_cancel d₂0, one_mul, (Nat.cast_commute _ _).Eq]
     simp [d₁0, mul_assoc]
 #align rat.cast_add_of_ne_zero Rat.cast_add_of_ne_zero
+-/
 
+#print Rat.cast_neg /-
 @[simp, norm_cast]
 theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
   | ⟨n, d, h, c⟩ => by
@@ -123,7 +142,9 @@ theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
       show (↑(-n) / d : α) = -(n / d) by
         rw [div_eq_mul_inv, div_eq_mul_inv, Int.cast_neg, neg_mul_eq_neg_mul]
 #align rat.cast_neg Rat.cast_neg
+-/
 
+#print Rat.cast_sub_of_ne_zero /-
 @[norm_cast]
 theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den : α) ≠ 0) :
     ((m - n : ℚ) : α) = m - n :=
@@ -131,7 +152,9 @@ theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den :
   have : ((-n).den : α) ≠ 0 := by cases n <;> exact n0
   simp [sub_eq_add_neg, cast_add_of_ne_zero m0 this]
 #align rat.cast_sub_of_ne_zero Rat.cast_sub_of_ne_zero
+-/
 
+#print Rat.cast_mul_of_ne_zero /-
 @[norm_cast]
 theorem cast_mul_of_ne_zero :
     ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m * n : ℚ) : α) = m * n
@@ -149,7 +172,9 @@ theorem cast_mul_of_ne_zero :
       all_goals simp [d₁0, d₂0]
     rw [(d₁.commute_cast (_ : α)).inv_right₀.Eq]
 #align rat.cast_mul_of_ne_zero Rat.cast_mul_of_ne_zero
+-/
 
+#print Rat.cast_inv_nat /-
 @[simp]
 theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
   by
@@ -157,7 +182,9 @@ theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
   simp_rw [coe_nat_eq_mk, inv_def, mk, mk_nat, dif_neg n.succ_ne_zero, mk_pnat]
   simp [cast_def]
 #align rat.cast_inv_nat Rat.cast_inv_nat
+-/
 
+#print Rat.cast_inv_int /-
 @[simp]
 theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
   by
@@ -165,7 +192,9 @@ theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
   · simp [cast_inv_nat]
   · simp only [Int.cast_negSucc, ← Nat.cast_succ, cast_neg, inv_neg, cast_inv_nat]
 #align rat.cast_inv_int Rat.cast_inv_int
+-/
 
+#print Rat.cast_inv_of_ne_zero /-
 @[norm_cast]
 theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = n⁻¹
   | ⟨n, d, h, c⟩ => fun (n0 : (n : α) ≠ 0) (d0 : (d : α) ≠ 0) =>
@@ -176,7 +205,9 @@ theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α)
     rw [num_denom', inv_def]
     rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, inv_div] <;> simp [n0, d0]
 #align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zero
+-/
 
+#print Rat.cast_div_of_ne_zero /-
 @[norm_cast]
 theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num : α) ≠ 0)
     (nd : (n.den : α) ≠ 0) : ((m / n : ℚ) : α) = m / n :=
@@ -190,7 +221,9 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
       rwa [Int.cast_mul, Int.cast_ofNat, h, MulZeroClass.zero_mul] at this 
   rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
+-/
 
+#print Rat.cast_inj /-
 @[simp, norm_cast]
 theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ =>
@@ -207,81 +240,112 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
       Int.cast_mul, ← Int.cast_ofNat d₂, ← Int.cast_mul, Int.cast_inj, ←
       mk_eq (Int.coe_nat_ne_zero.2 d₁0) (Int.coe_nat_ne_zero.2 d₂0)] at h 
 #align rat.cast_inj Rat.cast_inj
+-/
 
+#print Rat.cast_injective /-
 theorem cast_injective [CharZero α] : Function.Injective (coe : ℚ → α)
   | m, n => cast_inj.1
 #align rat.cast_injective Rat.cast_injective
+-/
 
+#print Rat.cast_eq_zero /-
 @[simp]
 theorem cast_eq_zero [CharZero α] {n : ℚ} : (n : α) = 0 ↔ n = 0 := by rw [← cast_zero, cast_inj]
 #align rat.cast_eq_zero Rat.cast_eq_zero
+-/
 
+#print Rat.cast_ne_zero /-
 theorem cast_ne_zero [CharZero α] {n : ℚ} : (n : α) ≠ 0 ↔ n ≠ 0 :=
   not_congr cast_eq_zero
 #align rat.cast_ne_zero Rat.cast_ne_zero
+-/
 
+#print Rat.cast_add /-
 @[simp, norm_cast]
 theorem cast_add [CharZero α] (m n) : ((m + n : ℚ) : α) = m + n :=
   cast_add_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.Pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.Pos)
 #align rat.cast_add Rat.cast_add
+-/
 
+#print Rat.cast_sub /-
 @[simp, norm_cast]
 theorem cast_sub [CharZero α] (m n) : ((m - n : ℚ) : α) = m - n :=
   cast_sub_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.Pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.Pos)
 #align rat.cast_sub Rat.cast_sub
+-/
 
+#print Rat.cast_mul /-
 @[simp, norm_cast]
 theorem cast_mul [CharZero α] (m n) : ((m * n : ℚ) : α) = m * n :=
   cast_mul_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.Pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.Pos)
 #align rat.cast_mul Rat.cast_mul
+-/
 
+#print Rat.cast_bit0 /-
 @[simp, norm_cast]
 theorem cast_bit0 [CharZero α] (n : ℚ) : ((bit0 n : ℚ) : α) = bit0 n :=
   cast_add _ _
 #align rat.cast_bit0 Rat.cast_bit0
+-/
 
+#print Rat.cast_bit1 /-
 @[simp, norm_cast]
 theorem cast_bit1 [CharZero α] (n : ℚ) : ((bit1 n : ℚ) : α) = bit1 n := by
   rw [bit1, cast_add, cast_one, cast_bit0] <;> rfl
 #align rat.cast_bit1 Rat.cast_bit1
+-/
 
 variable (α) [CharZero α]
 
+#print Rat.castHom /-
 /-- Coercion `ℚ → α` as a `ring_hom`. -/
 def castHom : ℚ →+* α :=
   ⟨coe, cast_one, cast_mul, cast_zero, cast_add⟩
 #align rat.cast_hom Rat.castHom
+-/
 
 variable {α}
 
+#print Rat.coe_cast_hom /-
 @[simp]
 theorem coe_cast_hom : ⇑(castHom α) = coe :=
   rfl
 #align rat.coe_cast_hom Rat.coe_cast_hom
+-/
 
+#print Rat.cast_inv /-
 @[simp, norm_cast]
 theorem cast_inv (n) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
   map_inv₀ (castHom α) _
 #align rat.cast_inv Rat.cast_inv
+-/
 
+#print Rat.cast_div /-
 @[simp, norm_cast]
 theorem cast_div (m n) : ((m / n : ℚ) : α) = m / n :=
   map_div₀ (castHom α) _ _
 #align rat.cast_div Rat.cast_div
+-/
 
+#print Rat.cast_zpow /-
 @[simp, norm_cast]
 theorem cast_zpow (q : ℚ) (n : ℤ) : ((q ^ n : ℚ) : α) = q ^ n :=
   map_zpow₀ (castHom α) q n
 #align rat.cast_zpow Rat.cast_zpow
+-/
 
+#print Rat.cast_mk /-
 @[norm_cast]
 theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b := by simp only [mk_eq_div, cast_div, cast_coe_int]
 #align rat.cast_mk Rat.cast_mk
+-/
 
+#print Rat.cast_pow /-
 @[simp, norm_cast]
 theorem cast_pow (q) (k : ℕ) : ((q ^ k : ℚ) : α) = q ^ k :=
   (castHom α).map_pow q k
 #align rat.cast_pow Rat.cast_pow
+-/
 
 end WithDivRing
 
@@ -289,145 +353,198 @@ section LinearOrderedField
 
 variable {K : Type _} [LinearOrderedField K]
 
+#print Rat.cast_pos_of_pos /-
 theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r :=
   by
   rw [Rat.cast_def]
   exact div_pos (Int.cast_pos.2 <| num_pos_iff_pos.2 hr) (Nat.cast_pos.2 r.pos)
 #align rat.cast_pos_of_pos Rat.cast_pos_of_pos
+-/
 
+#print Rat.cast_strictMono /-
 @[mono]
 theorem cast_strictMono : StrictMono (coe : ℚ → K) := fun m n => by
   simpa only [sub_pos, cast_sub] using @cast_pos_of_pos K _ (n - m)
 #align rat.cast_strict_mono Rat.cast_strictMono
+-/
 
+#print Rat.cast_mono /-
 @[mono]
 theorem cast_mono : Monotone (coe : ℚ → K) :=
   cast_strictMono.Monotone
 #align rat.cast_mono Rat.cast_mono
+-/
 
+#print Rat.castOrderEmbedding /-
 /-- Coercion from `ℚ` as an order embedding. -/
 @[simps]
 def castOrderEmbedding : ℚ ↪o K :=
   OrderEmbedding.ofStrictMono coe cast_strictMono
 #align rat.cast_order_embedding Rat.castOrderEmbedding
+-/
 
+#print Rat.cast_le /-
 @[simp, norm_cast]
 theorem cast_le {m n : ℚ} : (m : K) ≤ n ↔ m ≤ n :=
   castOrderEmbedding.le_iff_le
 #align rat.cast_le Rat.cast_le
+-/
 
+#print Rat.cast_lt /-
 @[simp, norm_cast]
 theorem cast_lt {m n : ℚ} : (m : K) < n ↔ m < n :=
   cast_strictMono.lt_iff_lt
 #align rat.cast_lt Rat.cast_lt
+-/
 
+#print Rat.cast_nonneg /-
 @[simp]
 theorem cast_nonneg {n : ℚ} : 0 ≤ (n : K) ↔ 0 ≤ n := by norm_cast
 #align rat.cast_nonneg Rat.cast_nonneg
+-/
 
+#print Rat.cast_nonpos /-
 @[simp]
 theorem cast_nonpos {n : ℚ} : (n : K) ≤ 0 ↔ n ≤ 0 := by norm_cast
 #align rat.cast_nonpos Rat.cast_nonpos
+-/
 
+#print Rat.cast_pos /-
 @[simp]
 theorem cast_pos {n : ℚ} : (0 : K) < n ↔ 0 < n := by norm_cast
 #align rat.cast_pos Rat.cast_pos
+-/
 
+#print Rat.cast_lt_zero /-
 @[simp]
 theorem cast_lt_zero {n : ℚ} : (n : K) < 0 ↔ n < 0 := by norm_cast
 #align rat.cast_lt_zero Rat.cast_lt_zero
+-/
 
+#print Rat.cast_min /-
 @[simp, norm_cast]
 theorem cast_min {a b : ℚ} : (↑(min a b) : K) = min a b :=
   (@cast_mono K _).map_min
 #align rat.cast_min Rat.cast_min
+-/
 
+#print Rat.cast_max /-
 @[simp, norm_cast]
 theorem cast_max {a b : ℚ} : (↑(max a b) : K) = max a b :=
   (@cast_mono K _).map_max
 #align rat.cast_max Rat.cast_max
+-/
 
+#print Rat.cast_abs /-
 @[simp, norm_cast]
 theorem cast_abs {q : ℚ} : ((|q| : ℚ) : K) = |q| := by simp [abs_eq_max_neg]
 #align rat.cast_abs Rat.cast_abs
+-/
 
 open Set
 
+#print Rat.preimage_cast_Icc /-
 @[simp]
 theorem preimage_cast_Icc (a b : ℚ) : coe ⁻¹' Icc (a : K) b = Icc a b := by ext x; simp
 #align rat.preimage_cast_Icc Rat.preimage_cast_Icc
+-/
 
+#print Rat.preimage_cast_Ico /-
 @[simp]
 theorem preimage_cast_Ico (a b : ℚ) : coe ⁻¹' Ico (a : K) b = Ico a b := by ext x; simp
 #align rat.preimage_cast_Ico Rat.preimage_cast_Ico
+-/
 
+#print Rat.preimage_cast_Ioc /-
 @[simp]
 theorem preimage_cast_Ioc (a b : ℚ) : coe ⁻¹' Ioc (a : K) b = Ioc a b := by ext x; simp
 #align rat.preimage_cast_Ioc Rat.preimage_cast_Ioc
+-/
 
+#print Rat.preimage_cast_Ioo /-
 @[simp]
 theorem preimage_cast_Ioo (a b : ℚ) : coe ⁻¹' Ioo (a : K) b = Ioo a b := by ext x; simp
 #align rat.preimage_cast_Ioo Rat.preimage_cast_Ioo
+-/
 
+#print Rat.preimage_cast_Ici /-
 @[simp]
 theorem preimage_cast_Ici (a : ℚ) : coe ⁻¹' Ici (a : K) = Ici a := by ext x; simp
 #align rat.preimage_cast_Ici Rat.preimage_cast_Ici
+-/
 
+#print Rat.preimage_cast_Iic /-
 @[simp]
 theorem preimage_cast_Iic (a : ℚ) : coe ⁻¹' Iic (a : K) = Iic a := by ext x; simp
 #align rat.preimage_cast_Iic Rat.preimage_cast_Iic
+-/
 
+#print Rat.preimage_cast_Ioi /-
 @[simp]
 theorem preimage_cast_Ioi (a : ℚ) : coe ⁻¹' Ioi (a : K) = Ioi a := by ext x; simp
 #align rat.preimage_cast_Ioi Rat.preimage_cast_Ioi
+-/
 
+#print Rat.preimage_cast_Iio /-
 @[simp]
 theorem preimage_cast_Iio (a : ℚ) : coe ⁻¹' Iio (a : K) = Iio a := by ext x; simp
 #align rat.preimage_cast_Iio Rat.preimage_cast_Iio
+-/
 
 end LinearOrderedField
 
+#print Rat.cast_id /-
 @[norm_cast]
 theorem cast_id (n : ℚ) : (↑n : ℚ) = n := by rw [cast_def, num_div_denom]
 #align rat.cast_id Rat.cast_id
+-/
 
+#print Rat.cast_eq_id /-
 @[simp]
 theorem cast_eq_id : (coe : ℚ → ℚ) = id :=
   funext cast_id
 #align rat.cast_eq_id Rat.cast_eq_id
+-/
 
+#print Rat.cast_hom_rat /-
 @[simp]
 theorem cast_hom_rat : castHom ℚ = RingHom.id ℚ :=
   RingHom.ext cast_id
 #align rat.cast_hom_rat Rat.cast_hom_rat
+-/
 
 end Rat
 
 open Rat
 
+#print map_ratCast /-
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
     f q = q := by rw [cast_def, map_div₀, map_intCast, map_natCast, cast_def]
 #align map_rat_cast map_ratCast
+-/
 
+#print eq_ratCast /-
 @[simp]
 theorem eq_ratCast {k} [DivisionRing k] [RingHomClass F ℚ k] (f : F) (r : ℚ) : f r = r := by
   rw [← map_ratCast f, Rat.cast_id]
 #align eq_rat_cast eq_ratCast
+-/
 
 namespace MonoidWithZeroHom
 
 variable {M₀ : Type _} [MonoidWithZero M₀] [MonoidWithZeroHomClass F ℚ M₀] {f g : F}
 
-include M₀
-
+#print MonoidWithZeroHom.ext_rat' /-
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
   FunLike.ext f g fun r => by
     rw [← r.num_div_denom, div_eq_mul_inv, map_mul, map_mul, h, ← Int.cast_ofNat,
       eq_on_inv₀ f g (h _)]
 #align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'
+-/
 
+#print MonoidWithZeroHom.ext_rat /-
 /-- If `f` and `g` agree on the integers then they are equal `φ`.
 
 See note [partially-applied ext lemmas] for why `comp` is used here. -/
@@ -436,7 +553,9 @@ theorem ext_rat {f g : ℚ →*₀ M₀}
     (h : f.comp (Int.castRingHom ℚ : ℤ →*₀ ℚ) = g.comp (Int.castRingHom ℚ)) : f = g :=
   ext_rat' <| congr_fun h
 #align monoid_with_zero_hom.ext_rat MonoidWithZeroHom.ext_rat
+-/
 
+#print MonoidWithZeroHom.ext_rat_on_pnat /-
 /-- Positive integer values of a morphism `φ` and its value on `-1` completely determine `φ`. -/
 theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
     (same_on_pnat : ∀ n : ℕ, 0 < n → f n = g n) : f = g :=
@@ -447,9 +566,11 @@ theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
           (g : ℚ →*₀ M₀).comp (Int.castRingHom ℚ : ℤ →*₀ ℚ)
         from ext_int' (by simpa) (by simpa)
 #align monoid_with_zero_hom.ext_rat_on_pnat MonoidWithZeroHom.ext_rat_on_pnat
+-/
 
 end MonoidWithZeroHom
 
+#print RingHom.ext_rat /-
 /-- Any two ring homomorphisms from `ℚ` to a semiring are equal. If the codomain is a division ring,
 then this lemma follows from `eq_rat_cast`. -/
 theorem RingHom.ext_rat {R : Type _} [Semiring R] [RingHomClass F ℚ R] (f g : F) : f = g :=
@@ -457,10 +578,13 @@ theorem RingHom.ext_rat {R : Type _} [Semiring R] [RingHomClass F ℚ R] (f g :
     RingHom.congr_fun <|
       ((f : ℚ →+* R).comp (Int.castRingHom ℚ)).ext_int ((g : ℚ →+* R).comp (Int.castRingHom ℚ))
 #align ring_hom.ext_rat RingHom.ext_rat
+-/
 
+#print Rat.subsingleton_ringHom /-
 instance Rat.subsingleton_ringHom {R : Type _} [Semiring R] : Subsingleton (ℚ →+* R) :=
   ⟨RingHom.ext_rat⟩
 #align rat.subsingleton_ring_hom Rat.subsingleton_ringHom
+-/
 
 section Smul
 
@@ -468,16 +592,20 @@ namespace Rat
 
 variable {K : Type _} [DivisionRing K]
 
+#print Rat.distribSMul /-
 instance (priority := 100) distribSMul : DistribSMul ℚ K
     where
   smul := (· • ·)
   smul_zero a := by rw [smul_def, MulZeroClass.mul_zero]
   smul_add a x y := by simp only [smul_def, mul_add, cast_add]
 #align rat.distrib_smul Rat.distribSMul
+-/
 
+#print Rat.isScalarTower_right /-
 instance isScalarTower_right : IsScalarTower ℚ K K :=
   ⟨fun a x y => by simp only [smul_def, smul_eq_mul, mul_assoc]⟩
 #align rat.is_scalar_tower_right Rat.isScalarTower_right
+-/
 
 end Rat
 
Diff
@@ -86,12 +86,12 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
   have d0 : (d : α) ≠ 0 := by
     intro d0
     have dd := denom_dvd a b
-    cases' show (d : ℤ) ∣ b by rwa [e] at dd with k ke
+    cases' show (d : ℤ) ∣ b by rwa [e] at dd  with k ke
     have : (b : α) = (d : α) * (k : α) := by rw [ke, Int.cast_mul, Int.cast_ofNat]
-    rw [d0, MulZeroClass.zero_mul] at this; contradiction
-  rw [num_denom'] at e
+    rw [d0, MulZeroClass.zero_mul] at this ; contradiction
+  rw [num_denom'] at e 
   have := congr_arg (coe : ℤ → α) ((mk_eq b0' <| ne_of_gt <| Int.coe_nat_pos.2 h).1 e)
-  rw [Int.cast_mul, Int.cast_mul, Int.cast_ofNat] at this
+  rw [Int.cast_mul, Int.cast_mul, Int.cast_ofNat] at this 
   symm
   rw [cast_def, div_eq_mul_inv, eq_div_iff_mul_eq d0, mul_assoc, (d.commute_cast _).Eq, ← mul_assoc,
     this, mul_assoc, mul_inv_cancel b0, mul_one]
@@ -103,9 +103,9 @@ theorem cast_add_of_ne_zero :
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) =>
     by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0 <;> exact d₁0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0  <;> exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0 <;> exact d₂0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0  <;> exact d₂0 Nat.cast_zero
     rw [num_denom', num_denom', add_def d₁0' d₂0']
     suffices (n₁ * (d₂ * (d₂⁻¹ * d₁⁻¹)) + n₂ * (d₁ * d₂⁻¹) * d₁⁻¹ : α) = n₁ * d₁⁻¹ + n₂ * d₂⁻¹
       by
@@ -138,9 +138,9 @@ theorem cast_mul_of_ne_zero :
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) =>
     by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0 <;> exact d₁0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0  <;> exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0 <;> exact d₂0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0  <;> exact d₂0 Nat.cast_zero
     rw [num_denom', num_denom', mul_def d₁0' d₂0']
     suffices (n₁ * (n₂ * d₂⁻¹ * d₁⁻¹) : α) = n₁ * (d₁⁻¹ * (n₂ * d₂⁻¹))
       by
@@ -170,9 +170,9 @@ theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
 theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = n⁻¹
   | ⟨n, d, h, c⟩ => fun (n0 : (n : α) ≠ 0) (d0 : (d : α) ≠ 0) =>
     by
-    have n0' : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0 <;> exact n0 Int.cast_zero
+    have n0' : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0  <;> exact n0 Int.cast_zero
     have d0' : (d : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d0 <;> exact d0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d0  <;> exact d0 Nat.cast_zero
     rw [num_denom', inv_def]
     rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, inv_div] <;> simp [n0, d0]
 #align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zero
@@ -187,7 +187,7 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
     by
     let ⟨k, e⟩ := this
     have := congr_arg (coe : ℤ → α) e <;>
-      rwa [Int.cast_mul, Int.cast_ofNat, h, MulZeroClass.zero_mul] at this
+      rwa [Int.cast_mul, Int.cast_ofNat, h, MulZeroClass.zero_mul] at this 
   rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
 
@@ -200,12 +200,12 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
     have d₂0 : d₂ ≠ 0 := ne_of_gt h₂
     have d₁a : (d₁ : α) ≠ 0 := Nat.cast_ne_zero.2 d₁0
     have d₂a : (d₂ : α) ≠ 0 := Nat.cast_ne_zero.2 d₂0
-    rw [num_denom', num_denom'] at h⊢
-    rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero] at h <;> simp [d₁0, d₂0] at h⊢
+    rw [num_denom', num_denom'] at h ⊢
+    rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero] at h  <;> simp [d₁0, d₂0] at h ⊢
     rwa [eq_div_iff_mul_eq d₂a, division_def, mul_assoc, (d₁.cast_commute (d₂ : α)).inv_left₀.Eq, ←
       mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_ofNat d₁, ←
       Int.cast_mul, ← Int.cast_ofNat d₂, ← Int.cast_mul, Int.cast_inj, ←
-      mk_eq (Int.coe_nat_ne_zero.2 d₁0) (Int.coe_nat_ne_zero.2 d₂0)] at h
+      mk_eq (Int.coe_nat_ne_zero.2 d₁0) (Int.coe_nat_ne_zero.2 d₂0)] at h 
 #align rat.cast_inj Rat.cast_inj
 
 theorem cast_injective [CharZero α] : Function.Injective (coe : ℚ → α)
Diff
@@ -40,7 +40,7 @@ variable {F ι α β : Type _}
 
 namespace Rat
 
-open Rat
+open scoped Rat
 
 section WithDivRing
 
Diff
@@ -46,86 +46,38 @@ section WithDivRing
 
 variable [DivisionRing α]
 
-/- warning: rat.cast_coe_int -> Rat.cast_coe_int is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) n)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Int.cast.{0} Rat Rat.instIntCastRat n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) n)
-Case conversion may be inaccurate. Consider using '#align rat.cast_coe_int Rat.cast_coe_intₓ'. -/
 @[simp, norm_cast]
 theorem cast_coe_int (n : ℤ) : ((n : ℚ) : α) = n :=
   (cast_def _).trans <| show (n / (1 : ℕ) : α) = n by rw [Nat.cast_one, div_one]
 #align rat.cast_coe_int Rat.cast_coe_int
 
-/- warning: rat.cast_coe_nat -> Rat.cast_coe_nat is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) n)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) n)
-Case conversion may be inaccurate. Consider using '#align rat.cast_coe_nat Rat.cast_coe_natₓ'. -/
 @[simp, norm_cast]
 theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
   rw [← Int.cast_ofNat, cast_coe_int, Int.cast_ofNat]
 #align rat.cast_coe_nat Rat.cast_coe_nat
 
-/- warning: rat.cast_zero -> Rat.cast_zero is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))
-Case conversion may be inaccurate. Consider using '#align rat.cast_zero Rat.cast_zeroₓ'. -/
 @[simp, norm_cast]
 theorem cast_zero : ((0 : ℚ) : α) = 0 :=
   (cast_coe_int _).trans Int.cast_zero
 #align rat.cast_zero Rat.cast_zero
 
-/- warning: rat.cast_one -> Rat.cast_one is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))))
-Case conversion may be inaccurate. Consider using '#align rat.cast_one Rat.cast_oneₓ'. -/
 @[simp, norm_cast]
 theorem cast_one : ((1 : ℚ) : α) = 1 :=
   (cast_coe_int _).trans Int.cast_one
 #align rat.cast_one Rat.cast_one
 
-/- warning: rat.cast_commute -> Rat.cast_commute is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat) (a : α), Commute.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r) a
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat) (a : α), Commute.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r) a
-Case conversion may be inaccurate. Consider using '#align rat.cast_commute Rat.cast_commuteₓ'. -/
 theorem cast_commute (r : ℚ) (a : α) : Commute (↑r) a := by
   simpa only [cast_def] using (r.1.cast_commute a).divLeft (r.2.cast_commute a)
 #align rat.cast_commute Rat.cast_commute
 
-/- warning: rat.cast_comm -> Rat.cast_comm is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat) (a : α), Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r) a) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) a ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat) (a : α), Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r) a) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) a (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r))
-Case conversion may be inaccurate. Consider using '#align rat.cast_comm Rat.cast_commₓ'. -/
 theorem cast_comm (r : ℚ) (a : α) : (r : α) * a = a * r :=
   (cast_commute r a).Eq
 #align rat.cast_comm Rat.cast_comm
 
-/- warning: rat.commute_cast -> Rat.commute_cast is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : α) (r : Rat), Commute.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) a ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : α) (r : Rat), Commute.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) a (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r)
-Case conversion may be inaccurate. Consider using '#align rat.commute_cast Rat.commute_castₓ'. -/
 theorem commute_cast (a : α) (r : ℚ) : Commute a r :=
   (r.cast_commute a).symm
 #align rat.commute_cast Rat.commute_cast
 
-/- warning: rat.cast_mk_of_ne_zero -> Rat.cast_mk_of_ne_zero is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : Int) (b : Int), (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Rat.mk a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : Int) (b : Int), (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Rat.divInt a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) a) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_mk_of_ne_zero Rat.cast_mk_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b :=
   by
@@ -145,12 +97,6 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
     this, mul_assoc, mul_inv_cancel b0, mul_one]
 #align rat.cast_mk_of_ne_zero Rat.cast_mk_of_ne_zero
 
-/- warning: rat.cast_add_of_ne_zero -> Rat.cast_add_of_ne_zero is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_add_of_ne_zero Rat.cast_add_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_add_of_ne_zero :
     ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m + n : ℚ) : α) = m + n
@@ -170,12 +116,6 @@ theorem cast_add_of_ne_zero :
     simp [d₁0, mul_assoc]
 #align rat.cast_add_of_ne_zero Rat.cast_add_of_ne_zero
 
-/- warning: rat.cast_neg -> Rat.cast_neg is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Neg.neg.{0} Rat Rat.hasNeg n)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Neg.neg.{0} Rat Rat.instNegRat n)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
-Case conversion may be inaccurate. Consider using '#align rat.cast_neg Rat.cast_negₓ'. -/
 @[simp, norm_cast]
 theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
   | ⟨n, d, h, c⟩ => by
@@ -184,12 +124,6 @@ theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
         rw [div_eq_mul_inv, div_eq_mul_inv, Int.cast_neg, neg_mul_eq_neg_mul]
 #align rat.cast_neg Rat.cast_neg
 
-/- warning: rat.cast_sub_of_ne_zero -> Rat.cast_sub_of_ne_zero is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_sub_of_ne_zero Rat.cast_sub_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den : α) ≠ 0) :
     ((m - n : ℚ) : α) = m - n :=
@@ -198,12 +132,6 @@ theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den :
   simp [sub_eq_add_neg, cast_add_of_ne_zero m0 this]
 #align rat.cast_sub_of_ne_zero Rat.cast_sub_of_ne_zero
 
-/- warning: rat.cast_mul_of_ne_zero -> Rat.cast_mul_of_ne_zero is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.hasMul) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.instMulRat) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_mul_of_ne_zero Rat.cast_mul_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_mul_of_ne_zero :
     ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m * n : ℚ) : α) = m * n
@@ -222,12 +150,6 @@ theorem cast_mul_of_ne_zero :
     rw [(d₁.commute_cast (_ : α)).inv_right₀.Eq]
 #align rat.cast_mul_of_ne_zero Rat.cast_mul_of_ne_zero
 
-/- warning: rat.cast_inv_nat -> Rat.cast_inv_nat is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n))) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) n))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n))) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) n))
-Case conversion may be inaccurate. Consider using '#align rat.cast_inv_nat Rat.cast_inv_natₓ'. -/
 @[simp]
 theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
   by
@@ -236,12 +158,6 @@ theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
   simp [cast_def]
 #align rat.cast_inv_nat Rat.cast_inv_nat
 
-/- warning: rat.cast_inv_int -> Rat.cast_inv_int is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) n))) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) n))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat (Int.cast.{0} Rat Rat.instIntCastRat n))) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) n))
-Case conversion may be inaccurate. Consider using '#align rat.cast_inv_int Rat.cast_inv_intₓ'. -/
 @[simp]
 theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
   by
@@ -250,12 +166,6 @@ theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
   · simp only [Int.cast_negSucc, ← Nat.cast_succ, cast_neg, inv_neg, cast_inv_nat]
 #align rat.cast_inv_int Rat.cast_inv_int
 
-/- warning: rat.cast_inv_of_ne_zero -> Rat.cast_inv_of_ne_zero is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv n)) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat n)) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = n⁻¹
   | ⟨n, d, h, c⟩ => fun (n0 : (n : α) ≠ 0) (d0 : (d : α) ≠ 0) =>
@@ -267,12 +177,6 @@ theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α)
     rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, inv_div] <;> simp [n0, d0]
 #align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zero
 
-/- warning: rat.cast_div_of_ne_zero -> Rat.cast_div_of_ne_zero is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.hasDiv) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.instDivRat) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num : α) ≠ 0)
     (nd : (n.den : α) ≠ 0) : ((m / n : ℚ) : α) = m / n :=
@@ -287,12 +191,6 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
   rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
 
-/- warning: rat.cast_inj -> Rat.cast_inj is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {m : Rat} {n : Rat}, Iff (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)) (Eq.{1} Rat m n)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {m : Rat} {n : Rat}, Iff (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)) (Eq.{1} Rat m n)
-Case conversion may be inaccurate. Consider using '#align rat.cast_inj Rat.cast_injₓ'. -/
 @[simp, norm_cast]
 theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ =>
@@ -310,86 +208,38 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
       mk_eq (Int.coe_nat_ne_zero.2 d₁0) (Int.coe_nat_ne_zero.2 d₂0)] at h
 #align rat.cast_inj Rat.cast_inj
 
-/- warning: rat.cast_injective -> Rat.cast_injective is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Function.Injective.{1, succ u1} Rat α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Function.Injective.{1, succ u1} Rat α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
-Case conversion may be inaccurate. Consider using '#align rat.cast_injective Rat.cast_injectiveₓ'. -/
 theorem cast_injective [CharZero α] : Function.Injective (coe : ℚ → α)
   | m, n => cast_inj.1
 #align rat.cast_injective Rat.cast_injective
 
-/- warning: rat.cast_eq_zero -> Rat.cast_eq_zero is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {n : Rat}, Iff (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) (Eq.{1} Rat n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {n : Rat}, Iff (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Eq.{1} Rat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_eq_zero Rat.cast_eq_zeroₓ'. -/
 @[simp]
 theorem cast_eq_zero [CharZero α] {n : ℚ} : (n : α) = 0 ↔ n = 0 := by rw [← cast_zero, cast_inj]
 #align rat.cast_eq_zero Rat.cast_eq_zero
 
-/- warning: rat.cast_ne_zero -> Rat.cast_ne_zero is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {n : Rat}, Iff (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) (Ne.{1} Rat n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {n : Rat}, Iff (Ne.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Ne.{1} Rat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_ne_zero Rat.cast_ne_zeroₓ'. -/
 theorem cast_ne_zero [CharZero α] {n : ℚ} : (n : α) ≠ 0 ↔ n ≠ 0 :=
   not_congr cast_eq_zero
 #align rat.cast_ne_zero Rat.cast_ne_zero
 
-/- warning: rat.cast_add -> Rat.cast_add is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
-Case conversion may be inaccurate. Consider using '#align rat.cast_add Rat.cast_addₓ'. -/
 @[simp, norm_cast]
 theorem cast_add [CharZero α] (m n) : ((m + n : ℚ) : α) = m + n :=
   cast_add_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.Pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.Pos)
 #align rat.cast_add Rat.cast_add
 
-/- warning: rat.cast_sub -> Rat.cast_sub is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
-Case conversion may be inaccurate. Consider using '#align rat.cast_sub Rat.cast_subₓ'. -/
 @[simp, norm_cast]
 theorem cast_sub [CharZero α] (m n) : ((m - n : ℚ) : α) = m - n :=
   cast_sub_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.Pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.Pos)
 #align rat.cast_sub Rat.cast_sub
 
-/- warning: rat.cast_mul -> Rat.cast_mul is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.hasMul) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.instMulRat) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
-Case conversion may be inaccurate. Consider using '#align rat.cast_mul Rat.cast_mulₓ'. -/
 @[simp, norm_cast]
 theorem cast_mul [CharZero α] (m n) : ((m * n : ℚ) : α) = m * n :=
   cast_mul_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.Pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.Pos)
 #align rat.cast_mul Rat.cast_mul
 
-/- warning: rat.cast_bit0 -> Rat.cast_bit0 is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (bit0.{0} Rat Rat.hasAdd n)) (bit0.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (bit0.{0} Rat Rat.instAddRat n)) (bit0.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
-Case conversion may be inaccurate. Consider using '#align rat.cast_bit0 Rat.cast_bit0ₓ'. -/
 @[simp, norm_cast]
 theorem cast_bit0 [CharZero α] (n : ℚ) : ((bit0 n : ℚ) : α) = bit0 n :=
   cast_add _ _
 #align rat.cast_bit0 Rat.cast_bit0
 
-/- warning: rat.cast_bit1 -> Rat.cast_bit1 is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (bit1.{0} Rat Rat.hasOne Rat.hasAdd n)) (bit1.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (bit1.{0} Rat (Semiring.toOne.{0} Rat Rat.semiring) Rat.instAddRat n)) (bit1.{u1} α (Semiring.toOne.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
-Case conversion may be inaccurate. Consider using '#align rat.cast_bit1 Rat.cast_bit1ₓ'. -/
 @[simp, norm_cast]
 theorem cast_bit1 [CharZero α] (n : ℚ) : ((bit1 n : ℚ) : α) = bit1 n := by
   rw [bit1, cast_add, cast_one, cast_bit0] <;> rfl
@@ -397,12 +247,6 @@ theorem cast_bit1 [CharZero α] (n : ℚ) : ((bit1 n : ℚ) : α) = bit1 n := by
 
 variable (α) [CharZero α]
 
-/- warning: rat.cast_hom -> Rat.castHom is a dubious translation:
-lean 3 declaration is
-  forall (α : Type.{u1}) [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))
-but is expected to have type
-  forall (α : Type.{u1}) [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_hom Rat.castHomₓ'. -/
 /-- Coercion `ℚ → α` as a `ring_hom`. -/
 def castHom : ℚ →+* α :=
   ⟨coe, cast_one, cast_mul, cast_zero, cast_add⟩
@@ -410,66 +254,30 @@ def castHom : ℚ →+* α :=
 
 variable {α}
 
-/- warning: rat.coe_cast_hom -> Rat.coe_cast_hom is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Eq.{succ u1} (Rat -> α) (coeFn.{succ u1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (fun (_x : RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) => Rat -> α) (RingHom.hasCoeToFun.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (Rat.castHom.{u1} α _inst_1 _inst_2)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Eq.{succ u1} (forall (ᾰ : Rat), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => α) ᾰ) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => α) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (RingHom.instRingHomClassRingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Rat.castHom.{u1} α _inst_1 _inst_2)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
-Case conversion may be inaccurate. Consider using '#align rat.coe_cast_hom Rat.coe_cast_homₓ'. -/
 @[simp]
 theorem coe_cast_hom : ⇑(castHom α) = coe :=
   rfl
 #align rat.coe_cast_hom Rat.coe_cast_hom
 
-/- warning: rat.cast_inv -> Rat.cast_inv is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv n)) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat n)) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
-Case conversion may be inaccurate. Consider using '#align rat.cast_inv Rat.cast_invₓ'. -/
 @[simp, norm_cast]
 theorem cast_inv (n) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
   map_inv₀ (castHom α) _
 #align rat.cast_inv Rat.cast_inv
 
-/- warning: rat.cast_div -> Rat.cast_div is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.hasDiv) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.instDivRat) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
-Case conversion may be inaccurate. Consider using '#align rat.cast_div Rat.cast_divₓ'. -/
 @[simp, norm_cast]
 theorem cast_div (m n) : ((m / n : ℚ) : α) = m / n :=
   map_div₀ (castHom α) _ _
 #align rat.cast_div Rat.cast_div
 
-/- warning: rat.cast_zpow -> Rat.cast_zpow is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (q : Rat) (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) q n)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) q) n)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (q : Rat) (n : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) q n)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) q) n)
-Case conversion may be inaccurate. Consider using '#align rat.cast_zpow Rat.cast_zpowₓ'. -/
 @[simp, norm_cast]
 theorem cast_zpow (q : ℚ) (n : ℤ) : ((q ^ n : ℚ) : α) = q ^ n :=
   map_zpow₀ (castHom α) q n
 #align rat.cast_zpow Rat.cast_zpow
 
-/- warning: rat.cast_mk -> Rat.cast_mk is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (a : Int) (b : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Rat.mk a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b))
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (a : Int) (b : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Rat.divInt a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) a) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b))
-Case conversion may be inaccurate. Consider using '#align rat.cast_mk Rat.cast_mkₓ'. -/
 @[norm_cast]
 theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b := by simp only [mk_eq_div, cast_div, cast_coe_int]
 #align rat.cast_mk Rat.cast_mk
 
-/- warning: rat.cast_pow -> Rat.cast_pow is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (q : Rat) (k : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HPow.hPow.{0, 0, 0} Rat Nat Rat (instHPow.{0, 0} Rat Nat (Monoid.Pow.{0} Rat Rat.monoid)) q k)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) q) k)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (q : Rat) (k : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HPow.hPow.{0, 0, 0} Rat Nat Rat (instHPow.{0, 0} Rat Nat (Monoid.Pow.{0} Rat Rat.monoid)) q k)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) q) k)
-Case conversion may be inaccurate. Consider using '#align rat.cast_pow Rat.cast_powₓ'. -/
 @[simp, norm_cast]
 theorem cast_pow (q) (k : ℕ) : ((q ^ k : ℚ) : α) = q ^ k :=
   (castHom α).map_pow q k
@@ -481,257 +289,113 @@ section LinearOrderedField
 
 variable {K : Type _} [LinearOrderedField K]
 
-/- warning: rat.cast_pos_of_pos -> Rat.cast_pos_of_pos is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {r : Rat}, (LT.lt.{0} Rat Rat.hasLt (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) r) -> (LT.lt.{u1} K (Preorder.toHasLt.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) r))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {r : Rat}, (LT.lt.{0} Rat Rat.instLTRat_1 (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) r) -> (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) r))
-Case conversion may be inaccurate. Consider using '#align rat.cast_pos_of_pos Rat.cast_pos_of_posₓ'. -/
 theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r :=
   by
   rw [Rat.cast_def]
   exact div_pos (Int.cast_pos.2 <| num_pos_iff_pos.2 hr) (Nat.cast_pos.2 r.pos)
 #align rat.cast_pos_of_pos Rat.cast_pos_of_pos
 
-/- warning: rat.cast_strict_mono -> Rat.cast_strictMono is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], StrictMono.{0, u1} Rat K Rat.preorder (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], StrictMono.{0, u1} Rat K Rat.instPreorderRat (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1))
-Case conversion may be inaccurate. Consider using '#align rat.cast_strict_mono Rat.cast_strictMonoₓ'. -/
 @[mono]
 theorem cast_strictMono : StrictMono (coe : ℚ → K) := fun m n => by
   simpa only [sub_pos, cast_sub] using @cast_pos_of_pos K _ (n - m)
 #align rat.cast_strict_mono Rat.cast_strictMono
 
-/- warning: rat.cast_mono -> Rat.cast_mono is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], Monotone.{0, u1} Rat K Rat.preorder (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], Monotone.{0, u1} Rat K Rat.instPreorderRat (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1))
-Case conversion may be inaccurate. Consider using '#align rat.cast_mono Rat.cast_monoₓ'. -/
 @[mono]
 theorem cast_mono : Monotone (coe : ℚ → K) :=
   cast_strictMono.Monotone
 #align rat.cast_mono Rat.cast_mono
 
-/- warning: rat.cast_order_embedding -> Rat.castOrderEmbedding is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], OrderEmbedding.{0, u1} Rat K Rat.hasLe (Preorder.toHasLe.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], OrderEmbedding.{0, u1} Rat K Rat.instLERat (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))
-Case conversion may be inaccurate. Consider using '#align rat.cast_order_embedding Rat.castOrderEmbeddingₓ'. -/
 /-- Coercion from `ℚ` as an order embedding. -/
 @[simps]
 def castOrderEmbedding : ℚ ↪o K :=
   OrderEmbedding.ofStrictMono coe cast_strictMono
 #align rat.cast_order_embedding Rat.castOrderEmbedding
 
-/- warning: rat.cast_le -> Rat.cast_le is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LE.le.{u1} K (Preorder.toHasLe.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LE.le.{0} Rat Rat.hasLe m n)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) m) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LE.le.{0} Rat Rat.instLERat m n)
-Case conversion may be inaccurate. Consider using '#align rat.cast_le Rat.cast_leₓ'. -/
 @[simp, norm_cast]
 theorem cast_le {m n : ℚ} : (m : K) ≤ n ↔ m ≤ n :=
   castOrderEmbedding.le_iff_le
 #align rat.cast_le Rat.cast_le
 
-/- warning: rat.cast_lt -> Rat.cast_lt is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toHasLt.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LT.lt.{0} Rat Rat.hasLt m n)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) m) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LT.lt.{0} Rat Rat.instLTRat_1 m n)
-Case conversion may be inaccurate. Consider using '#align rat.cast_lt Rat.cast_ltₓ'. -/
 @[simp, norm_cast]
 theorem cast_lt {m n : ℚ} : (m : K) < n ↔ m < n :=
   cast_strictMono.lt_iff_lt
 #align rat.cast_lt Rat.cast_lt
 
-/- warning: rat.cast_nonneg -> Rat.cast_nonneg is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toHasLe.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LE.le.{0} Rat Rat.hasLe (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) n)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LE.le.{0} Rat Rat.instLERat (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) n)
-Case conversion may be inaccurate. Consider using '#align rat.cast_nonneg Rat.cast_nonnegₓ'. -/
 @[simp]
 theorem cast_nonneg {n : ℚ} : 0 ≤ (n : K) ↔ 0 ≤ n := by norm_cast
 #align rat.cast_nonneg Rat.cast_nonneg
 
-/- warning: rat.cast_nonpos -> Rat.cast_nonpos is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toHasLe.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))))))) (LE.le.{0} Rat Rat.hasLe n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1)))))))) (LE.le.{0} Rat Rat.instLERat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_nonpos Rat.cast_nonposₓ'. -/
 @[simp]
 theorem cast_nonpos {n : ℚ} : (n : K) ≤ 0 ↔ n ≤ 0 := by norm_cast
 #align rat.cast_nonpos Rat.cast_nonpos
 
-/- warning: rat.cast_pos -> Rat.cast_pos is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toHasLt.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LT.lt.{0} Rat Rat.hasLt (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) n)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LT.lt.{0} Rat Rat.instLTRat_1 (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) n)
-Case conversion may be inaccurate. Consider using '#align rat.cast_pos Rat.cast_posₓ'. -/
 @[simp]
 theorem cast_pos {n : ℚ} : (0 : K) < n ↔ 0 < n := by norm_cast
 #align rat.cast_pos Rat.cast_pos
 
-/- warning: rat.cast_lt_zero -> Rat.cast_lt_zero is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toHasLt.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))))))) (LT.lt.{0} Rat Rat.hasLt n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1)))))))) (LT.lt.{0} Rat Rat.instLTRat_1 n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
-Case conversion may be inaccurate. Consider using '#align rat.cast_lt_zero Rat.cast_lt_zeroₓ'. -/
 @[simp]
 theorem cast_lt_zero {n : ℚ} : (n : K) < 0 ↔ n < 0 := by norm_cast
 #align rat.cast_lt_zero Rat.cast_lt_zero
 
-/- warning: rat.cast_min -> Rat.cast_min is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {a : Rat} {b : Rat}, Eq.{succ u1} K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) (LinearOrder.min.{0} Rat Rat.linearOrder a b)) (LinearOrder.min.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {a : Rat} {b : Rat}, Eq.{succ u1} K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Min.min.{0} Rat (LinearOrderedRing.toMin.{0} Rat Rat.instLinearOrderedRingRat) a b)) (Min.min.{u1} K (LinearOrderedRing.toMin.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))
-Case conversion may be inaccurate. Consider using '#align rat.cast_min Rat.cast_minₓ'. -/
 @[simp, norm_cast]
 theorem cast_min {a b : ℚ} : (↑(min a b) : K) = min a b :=
   (@cast_mono K _).map_min
 #align rat.cast_min Rat.cast_min
 
-/- warning: rat.cast_max -> Rat.cast_max is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {a : Rat} {b : Rat}, Eq.{succ u1} K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) (LinearOrder.max.{0} Rat Rat.linearOrder a b)) (LinearOrder.max.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {a : Rat} {b : Rat}, Eq.{succ u1} K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Max.max.{0} Rat (LinearOrderedRing.toMax.{0} Rat Rat.instLinearOrderedRingRat) a b)) (Max.max.{u1} K (LinearOrderedRing.toMax.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))
-Case conversion may be inaccurate. Consider using '#align rat.cast_max Rat.cast_maxₓ'. -/
 @[simp, norm_cast]
 theorem cast_max {a b : ℚ} : (↑(max a b) : K) = max a b :=
   (@cast_mono K _).map_max
 #align rat.cast_max Rat.cast_max
 
-/- warning: rat.cast_abs -> Rat.cast_abs is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.hasNeg Rat.hasSup) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (SubNegMonoid.toHasNeg.{u1} K (AddGroup.toSubNegMonoid.{u1} K (AddGroupWithOne.toAddGroup.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))) (SemilatticeSup.toHasSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (LinearOrder.toLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) q))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.instNegRat Rat.instSupRat) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (Ring.toNeg.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (SemilatticeSup.toSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (DistribLattice.toLattice.{u1} K (instDistribLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) q))
-Case conversion may be inaccurate. Consider using '#align rat.cast_abs Rat.cast_absₓ'. -/
 @[simp, norm_cast]
 theorem cast_abs {q : ℚ} : ((|q| : ℚ) : K) = |q| := by simp [abs_eq_max_neg]
 #align rat.cast_abs Rat.cast_abs
 
 open Set
 
-/- warning: rat.preimage_cast_Icc -> Rat.preimage_cast_Icc is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Icc.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))) (Set.Icc.{0} Rat Rat.preorder a b)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Icc.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Icc.{0} Rat Rat.instPreorderRat a b)
-Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Icc Rat.preimage_cast_Iccₓ'. -/
 @[simp]
 theorem preimage_cast_Icc (a b : ℚ) : coe ⁻¹' Icc (a : K) b = Icc a b := by ext x; simp
 #align rat.preimage_cast_Icc Rat.preimage_cast_Icc
 
-/- warning: rat.preimage_cast_Ico -> Rat.preimage_cast_Ico is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Ico.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))) (Set.Ico.{0} Rat Rat.preorder a b)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ico.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ico.{0} Rat Rat.instPreorderRat a b)
-Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ico Rat.preimage_cast_Icoₓ'. -/
 @[simp]
 theorem preimage_cast_Ico (a b : ℚ) : coe ⁻¹' Ico (a : K) b = Ico a b := by ext x; simp
 #align rat.preimage_cast_Ico Rat.preimage_cast_Ico
 
-/- warning: rat.preimage_cast_Ioc -> Rat.preimage_cast_Ioc is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Ioc.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))) (Set.Ioc.{0} Rat Rat.preorder a b)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioc.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ioc.{0} Rat Rat.instPreorderRat a b)
-Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ioc Rat.preimage_cast_Iocₓ'. -/
 @[simp]
 theorem preimage_cast_Ioc (a b : ℚ) : coe ⁻¹' Ioc (a : K) b = Ioc a b := by ext x; simp
 #align rat.preimage_cast_Ioc Rat.preimage_cast_Ioc
 
-/- warning: rat.preimage_cast_Ioo -> Rat.preimage_cast_Ioo is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Ioo.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))) (Set.Ioo.{0} Rat Rat.preorder a b)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioo.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ioo.{0} Rat Rat.instPreorderRat a b)
-Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ioo Rat.preimage_cast_Iooₓ'. -/
 @[simp]
 theorem preimage_cast_Ioo (a b : ℚ) : coe ⁻¹' Ioo (a : K) b = Ioo a b := by ext x; simp
 #align rat.preimage_cast_Ioo Rat.preimage_cast_Ioo
 
-/- warning: rat.preimage_cast_Ici -> Rat.preimage_cast_Ici is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Ici.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a))) (Set.Ici.{0} Rat Rat.preorder a)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ici.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Ici.{0} Rat Rat.instPreorderRat a)
-Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ici Rat.preimage_cast_Iciₓ'. -/
 @[simp]
 theorem preimage_cast_Ici (a : ℚ) : coe ⁻¹' Ici (a : K) = Ici a := by ext x; simp
 #align rat.preimage_cast_Ici Rat.preimage_cast_Ici
 
-/- warning: rat.preimage_cast_Iic -> Rat.preimage_cast_Iic is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Iic.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a))) (Set.Iic.{0} Rat Rat.preorder a)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Iic.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Iic.{0} Rat Rat.instPreorderRat a)
-Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Iic Rat.preimage_cast_Iicₓ'. -/
 @[simp]
 theorem preimage_cast_Iic (a : ℚ) : coe ⁻¹' Iic (a : K) = Iic a := by ext x; simp
 #align rat.preimage_cast_Iic Rat.preimage_cast_Iic
 
-/- warning: rat.preimage_cast_Ioi -> Rat.preimage_cast_Ioi is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Ioi.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a))) (Set.Ioi.{0} Rat Rat.preorder a)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioi.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Ioi.{0} Rat Rat.instPreorderRat a)
-Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ioi Rat.preimage_cast_Ioiₓ'. -/
 @[simp]
 theorem preimage_cast_Ioi (a : ℚ) : coe ⁻¹' Ioi (a : K) = Ioi a := by ext x; simp
 #align rat.preimage_cast_Ioi Rat.preimage_cast_Ioi
 
-/- warning: rat.preimage_cast_Iio -> Rat.preimage_cast_Iio is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Iio.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a))) (Set.Iio.{0} Rat Rat.preorder a)
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Iio.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Iio.{0} Rat Rat.instPreorderRat a)
-Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Iio Rat.preimage_cast_Iioₓ'. -/
 @[simp]
 theorem preimage_cast_Iio (a : ℚ) : coe ⁻¹' Iio (a : K) = Iio a := by ext x; simp
 #align rat.preimage_cast_Iio Rat.preimage_cast_Iio
 
 end LinearOrderedField
 
-/- warning: rat.cast_id -> Rat.cast_id is a dubious translation:
-lean 3 declaration is
-  forall (n : Rat), Eq.{1} Rat ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Rat Rat (HasLiftT.mk.{1, 1} Rat Rat (CoeTCₓ.coe.{1, 1} Rat Rat (Rat.castCoe.{0} Rat (DivisionRing.toHasRatCast.{0} Rat Rat.divisionRing)))) n) n
-but is expected to have type
-  forall (n : Rat), Eq.{1} Rat (Rat.cast.{0} Rat instRatCastRat n) n
-Case conversion may be inaccurate. Consider using '#align rat.cast_id Rat.cast_idₓ'. -/
 @[norm_cast]
 theorem cast_id (n : ℚ) : (↑n : ℚ) = n := by rw [cast_def, num_div_denom]
 #align rat.cast_id Rat.cast_id
 
-/- warning: rat.cast_eq_id -> Rat.cast_eq_id is a dubious translation:
-lean 3 declaration is
-  Eq.{1} (Rat -> Rat) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Rat Rat (HasLiftT.mk.{1, 1} Rat Rat (CoeTCₓ.coe.{1, 1} Rat Rat (Rat.castCoe.{0} Rat (DivisionRing.toHasRatCast.{0} Rat Rat.divisionRing))))) (id.{1} Rat)
-but is expected to have type
-  Eq.{1} (Rat -> Rat) (fun (x : Rat) => x) (id.{1} Rat)
-Case conversion may be inaccurate. Consider using '#align rat.cast_eq_id Rat.cast_eq_idₓ'. -/
 @[simp]
 theorem cast_eq_id : (coe : ℚ → ℚ) = id :=
   funext cast_id
 #align rat.cast_eq_id Rat.cast_eq_id
 
-/- warning: rat.cast_hom_rat -> Rat.cast_hom_rat is a dubious translation:
-lean 3 declaration is
-  Eq.{1} (RingHom.{0, 0} Rat Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing)))) (Rat.castHom.{0} Rat Rat.divisionRing (StrictOrderedSemiring.to_charZero.{0} Rat (StrictOrderedRing.toStrictOrderedSemiring.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (RingHom.id.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))
-but is expected to have type
-  Eq.{1} (RingHom.{0, 0} Rat Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{0} Rat (DivisionSemiring.toSemiring.{0} Rat (DivisionRing.toDivisionSemiring.{0} Rat Rat.divisionRing)))) (Rat.castHom.{0} Rat Rat.divisionRing (StrictOrderedSemiring.to_charZero.{0} Rat (LinearOrderedSemiring.toStrictOrderedSemiring.{0} Rat Rat.instLinearOrderedSemiringRat))) (RingHom.id.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))
-Case conversion may be inaccurate. Consider using '#align rat.cast_hom_rat Rat.cast_hom_ratₓ'. -/
 @[simp]
 theorem cast_hom_rat : castHom ℚ = RingHom.id ℚ :=
   RingHom.ext cast_id
@@ -741,23 +405,11 @@ end Rat
 
 open Rat
 
-/- warning: map_rat_cast -> map_ratCast is a dubious translation:
-lean 3 declaration is
-  forall {F : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : DivisionRing.{u2} α] [_inst_2 : DivisionRing.{u3} β] [_inst_3 : RingHomClass.{u1, u2, u3} F α β (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u3} β (coeFn.{succ u1, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u1, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u1, u2, u3} F α β (Distrib.toHasMul.{u2} α (NonUnitalNonAssocSemiring.toDistrib.{u2} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} α (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1)))))) (Distrib.toHasMul.{u3} β (NonUnitalNonAssocSemiring.toDistrib.{u3} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} β (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u2, u3} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} α (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} β (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u2, u3} F α β (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2))) _inst_3)))) f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u2} Rat α (CoeTCₓ.coe.{1, succ u2} Rat α (Rat.castCoe.{u2} α (DivisionRing.toHasRatCast.{u2} α _inst_1)))) q)) ((fun (a : Type) (b : Type.{u3}) [self : HasLiftT.{1, succ u3} a b] => self.0) Rat β (HasLiftT.mk.{1, succ u3} Rat β (CoeTCₓ.coe.{1, succ u3} Rat β (Rat.castCoe.{u3} β (DivisionRing.toHasRatCast.{u3} β _inst_2)))) q)
-but is expected to have type
-  forall {F : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : DivisionRing.{u3} α] [_inst_2 : DivisionRing.{u2} β] [_inst_3 : RingHomClass.{u1, u3, u2} F α β (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))) (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (NonUnitalNonAssocSemiring.toMul.{u3} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u3, u2} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u3, u2} F α β (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))) (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2))) _inst_3))) f (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) _inst_2) q)
-Case conversion may be inaccurate. Consider using '#align map_rat_cast map_ratCastₓ'. -/
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
     f q = q := by rw [cast_def, map_div₀, map_intCast, map_natCast, cast_def]
 #align map_rat_cast map_ratCast
 
-/- warning: eq_rat_cast -> eq_ratCast is a dubious translation:
-lean 3 declaration is
-  forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} k (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> k) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => k) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (Distrib.toHasMul.{0} Rat (NonUnitalNonAssocSemiring.toDistrib.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (Distrib.toHasMul.{u2} k (NonUnitalNonAssocSemiring.toDistrib.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))) _inst_2)))) f r) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Rat k (HasLiftT.mk.{1, succ u2} Rat k (CoeTCₓ.coe.{1, succ u2} Rat k (Rat.castCoe.{u2} k (DivisionRing.toHasRatCast.{u2} k _inst_1)))) r)
-but is expected to have type
-  forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => k) r) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => k) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (NonUnitalNonAssocSemiring.toMul.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1))) _inst_2))) f r) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => k) r) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => k) r) _inst_1) r)
-Case conversion may be inaccurate. Consider using '#align eq_rat_cast eq_ratCastₓ'. -/
 @[simp]
 theorem eq_ratCast {k} [DivisionRing k] [RingHomClass F ℚ k] (f : F) (r : ℚ) : f r = r := by
   rw [← map_ratCast f, Rat.cast_id]
@@ -769,12 +421,6 @@ variable {M₀ : Type _} [MonoidWithZero M₀] [MonoidWithZeroHomClass F ℚ M
 
 include M₀
 
-/- warning: monoid_with_zero_hom.ext_rat' -> MonoidWithZeroHom.ext_rat' is a dubious translation:
-lean 3 declaration is
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m))) -> (Eq.{succ u1} F f g)
-but is expected to have type
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Int.cast.{0} Rat Rat.instIntCastRat m))) -> (Eq.{succ u1} F f g)
-Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'ₓ'. -/
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
   FunLike.ext f g fun r => by
@@ -782,9 +428,6 @@ theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
       eq_on_inv₀ f g (h _)]
 #align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'
 
-/- warning: monoid_with_zero_hom.ext_rat -> MonoidWithZeroHom.ext_rat is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat MonoidWithZeroHom.ext_ratₓ'. -/
 /-- If `f` and `g` agree on the integers then they are equal `φ`.
 
 See note [partially-applied ext lemmas] for why `comp` is used here. -/
@@ -794,9 +437,6 @@ theorem ext_rat {f g : ℚ →*₀ M₀}
   ext_rat' <| congr_fun h
 #align monoid_with_zero_hom.ext_rat MonoidWithZeroHom.ext_rat
 
-/- warning: monoid_with_zero_hom.ext_rat_on_pnat -> MonoidWithZeroHom.ext_rat_on_pnat is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat_on_pnat MonoidWithZeroHom.ext_rat_on_pnatₓ'. -/
 /-- Positive integer values of a morphism `φ` and its value on `-1` completely determine `φ`. -/
 theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
     (same_on_pnat : ∀ n : ℕ, 0 < n → f n = g n) : f = g :=
@@ -810,12 +450,6 @@ theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
 
 end MonoidWithZeroHom
 
-/- warning: ring_hom.ext_rat -> RingHom.ext_rat is a dubious translation:
-lean 3 declaration is
-  forall {F : Type.{u1}} {R : Type.{u2}} [_inst_1 : Semiring.{u2} R] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat R (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (Semiring.toNonAssocSemiring.{u2} R _inst_1)] (f : F) (g : F), Eq.{succ u1} F f g
-but is expected to have type
-  forall {F : Type.{u1}} {R : Type.{u2}} [_inst_1 : Semiring.{u2} R] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat R (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u2} R _inst_1)] (f : F) (g : F), Eq.{succ u1} F f g
-Case conversion may be inaccurate. Consider using '#align ring_hom.ext_rat RingHom.ext_ratₓ'. -/
 /-- Any two ring homomorphisms from `ℚ` to a semiring are equal. If the codomain is a division ring,
 then this lemma follows from `eq_rat_cast`. -/
 theorem RingHom.ext_rat {R : Type _} [Semiring R] [RingHomClass F ℚ R] (f g : F) : f = g :=
@@ -824,12 +458,6 @@ theorem RingHom.ext_rat {R : Type _} [Semiring R] [RingHomClass F ℚ R] (f g :
       ((f : ℚ →+* R).comp (Int.castRingHom ℚ)).ext_int ((g : ℚ →+* R).comp (Int.castRingHom ℚ))
 #align ring_hom.ext_rat RingHom.ext_rat
 
-/- warning: rat.subsingleton_ring_hom -> Rat.subsingleton_ringHom is a dubious translation:
-lean 3 declaration is
-  forall {R : Type.{u1}} [_inst_1 : Semiring.{u1} R], Subsingleton.{succ u1} (RingHom.{0, u1} Rat R (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (Semiring.toNonAssocSemiring.{u1} R _inst_1))
-but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : Semiring.{u1} R], Subsingleton.{succ u1} (RingHom.{0, u1} Rat R (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} R _inst_1))
-Case conversion may be inaccurate. Consider using '#align rat.subsingleton_ring_hom Rat.subsingleton_ringHomₓ'. -/
 instance Rat.subsingleton_ringHom {R : Type _} [Semiring R] : Subsingleton (ℚ →+* R) :=
   ⟨RingHom.ext_rat⟩
 #align rat.subsingleton_ring_hom Rat.subsingleton_ringHom
@@ -840,12 +468,6 @@ namespace Rat
 
 variable {K : Type _} [DivisionRing K]
 
-/- warning: rat.distrib_smul -> Rat.distribSMul is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], DistribSMul.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], DistribSMul.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (Ring.toAddGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))))
-Case conversion may be inaccurate. Consider using '#align rat.distrib_smul Rat.distribSMulₓ'. -/
 instance (priority := 100) distribSMul : DistribSMul ℚ K
     where
   smul := (· • ·)
@@ -853,12 +475,6 @@ instance (priority := 100) distribSMul : DistribSMul ℚ K
   smul_add a x y := by simp only [smul_def, mul_add, cast_add]
 #align rat.distrib_smul Rat.distribSMul
 
-/- warning: rat.is_scalar_tower_right -> Rat.isScalarTower_right is a dubious translation:
-lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], IsScalarTower.{0, u1, u1} Rat K K (SMulZeroClass.toHasSmul.{0, u1} Rat K (AddZeroClass.toHasZero.{u1} K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))))) (DistribSMul.toSmulZeroClass.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))))) (Rat.distribSMul.{u1} K _inst_1))) (Mul.toSMul.{u1} K (Distrib.toHasMul.{u1} K (Ring.toDistrib.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))) (SMulZeroClass.toHasSmul.{0, u1} Rat K (AddZeroClass.toHasZero.{u1} K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))))) (DistribSMul.toSmulZeroClass.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))))) (Rat.distribSMul.{u1} K _inst_1)))
-but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], IsScalarTower.{0, u1, u1} Rat K K (SMulZeroClass.toSMul.{0, u1} Rat K (MonoidWithZero.toZero.{u1} K (Semiring.toMonoidWithZero.{u1} K (DivisionSemiring.toSemiring.{u1} K (DivisionRing.toDivisionSemiring.{u1} K _inst_1)))) (DistribSMul.toSMulZeroClass.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (Ring.toAddGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))) (Rat.distribSMul.{u1} K _inst_1))) (MulAction.toSMul.{u1, u1} K K (MonoidWithZero.toMonoid.{u1} K (Semiring.toMonoidWithZero.{u1} K (DivisionSemiring.toSemiring.{u1} K (DivisionRing.toDivisionSemiring.{u1} K _inst_1)))) (Monoid.toMulAction.{u1} K (MonoidWithZero.toMonoid.{u1} K (Semiring.toMonoidWithZero.{u1} K (DivisionSemiring.toSemiring.{u1} K (DivisionRing.toDivisionSemiring.{u1} K _inst_1)))))) (SMulZeroClass.toSMul.{0, u1} Rat K (MonoidWithZero.toZero.{u1} K (Semiring.toMonoidWithZero.{u1} K (DivisionSemiring.toSemiring.{u1} K (DivisionRing.toDivisionSemiring.{u1} K _inst_1)))) (DistribSMul.toSMulZeroClass.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (Ring.toAddGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))) (Rat.distribSMul.{u1} K _inst_1)))
-Case conversion may be inaccurate. Consider using '#align rat.is_scalar_tower_right Rat.isScalarTower_rightₓ'. -/
 instance isScalarTower_right : IsScalarTower ℚ K K :=
   ⟨fun a x y => by simp only [smul_def, smul_eq_mul, mul_assoc]⟩
 #align rat.is_scalar_tower_right Rat.isScalarTower_right
Diff
@@ -129,17 +129,14 @@ Case conversion may be inaccurate. Consider using '#align rat.cast_mk_of_ne_zero
 @[norm_cast]
 theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b :=
   by
-  have b0' : b ≠ 0 := by
-    refine' mt _ b0
-    simp (config := { contextual := true })
+  have b0' : b ≠ 0 := by refine' mt _ b0; simp (config := { contextual := true })
   cases' e : a /. b with n d h c
   have d0 : (d : α) ≠ 0 := by
     intro d0
     have dd := denom_dvd a b
     cases' show (d : ℤ) ∣ b by rwa [e] at dd with k ke
     have : (b : α) = (d : α) * (k : α) := by rw [ke, Int.cast_mul, Int.cast_ofNat]
-    rw [d0, MulZeroClass.zero_mul] at this
-    contradiction
+    rw [d0, MulZeroClass.zero_mul] at this; contradiction
   rw [num_denom'] at e
   have := congr_arg (coe : ℤ → α) ((mk_eq b0' <| ne_of_gt <| Int.coe_nat_pos.2 h).1 e)
   rw [Int.cast_mul, Int.cast_mul, Int.cast_ofNat] at this
@@ -633,10 +630,7 @@ but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Icc.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Icc.{0} Rat Rat.instPreorderRat a b)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Icc Rat.preimage_cast_Iccₓ'. -/
 @[simp]
-theorem preimage_cast_Icc (a b : ℚ) : coe ⁻¹' Icc (a : K) b = Icc a b :=
-  by
-  ext x
-  simp
+theorem preimage_cast_Icc (a b : ℚ) : coe ⁻¹' Icc (a : K) b = Icc a b := by ext x; simp
 #align rat.preimage_cast_Icc Rat.preimage_cast_Icc
 
 /- warning: rat.preimage_cast_Ico -> Rat.preimage_cast_Ico is a dubious translation:
@@ -646,10 +640,7 @@ but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ico.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ico.{0} Rat Rat.instPreorderRat a b)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ico Rat.preimage_cast_Icoₓ'. -/
 @[simp]
-theorem preimage_cast_Ico (a b : ℚ) : coe ⁻¹' Ico (a : K) b = Ico a b :=
-  by
-  ext x
-  simp
+theorem preimage_cast_Ico (a b : ℚ) : coe ⁻¹' Ico (a : K) b = Ico a b := by ext x; simp
 #align rat.preimage_cast_Ico Rat.preimage_cast_Ico
 
 /- warning: rat.preimage_cast_Ioc -> Rat.preimage_cast_Ioc is a dubious translation:
@@ -659,10 +650,7 @@ but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioc.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ioc.{0} Rat Rat.instPreorderRat a b)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ioc Rat.preimage_cast_Iocₓ'. -/
 @[simp]
-theorem preimage_cast_Ioc (a b : ℚ) : coe ⁻¹' Ioc (a : K) b = Ioc a b :=
-  by
-  ext x
-  simp
+theorem preimage_cast_Ioc (a b : ℚ) : coe ⁻¹' Ioc (a : K) b = Ioc a b := by ext x; simp
 #align rat.preimage_cast_Ioc Rat.preimage_cast_Ioc
 
 /- warning: rat.preimage_cast_Ioo -> Rat.preimage_cast_Ioo is a dubious translation:
@@ -672,10 +660,7 @@ but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioo.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ioo.{0} Rat Rat.instPreorderRat a b)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ioo Rat.preimage_cast_Iooₓ'. -/
 @[simp]
-theorem preimage_cast_Ioo (a b : ℚ) : coe ⁻¹' Ioo (a : K) b = Ioo a b :=
-  by
-  ext x
-  simp
+theorem preimage_cast_Ioo (a b : ℚ) : coe ⁻¹' Ioo (a : K) b = Ioo a b := by ext x; simp
 #align rat.preimage_cast_Ioo Rat.preimage_cast_Ioo
 
 /- warning: rat.preimage_cast_Ici -> Rat.preimage_cast_Ici is a dubious translation:
@@ -685,10 +670,7 @@ but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ici.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Ici.{0} Rat Rat.instPreorderRat a)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ici Rat.preimage_cast_Iciₓ'. -/
 @[simp]
-theorem preimage_cast_Ici (a : ℚ) : coe ⁻¹' Ici (a : K) = Ici a :=
-  by
-  ext x
-  simp
+theorem preimage_cast_Ici (a : ℚ) : coe ⁻¹' Ici (a : K) = Ici a := by ext x; simp
 #align rat.preimage_cast_Ici Rat.preimage_cast_Ici
 
 /- warning: rat.preimage_cast_Iic -> Rat.preimage_cast_Iic is a dubious translation:
@@ -698,10 +680,7 @@ but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Iic.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Iic.{0} Rat Rat.instPreorderRat a)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Iic Rat.preimage_cast_Iicₓ'. -/
 @[simp]
-theorem preimage_cast_Iic (a : ℚ) : coe ⁻¹' Iic (a : K) = Iic a :=
-  by
-  ext x
-  simp
+theorem preimage_cast_Iic (a : ℚ) : coe ⁻¹' Iic (a : K) = Iic a := by ext x; simp
 #align rat.preimage_cast_Iic Rat.preimage_cast_Iic
 
 /- warning: rat.preimage_cast_Ioi -> Rat.preimage_cast_Ioi is a dubious translation:
@@ -711,10 +690,7 @@ but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioi.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Ioi.{0} Rat Rat.instPreorderRat a)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ioi Rat.preimage_cast_Ioiₓ'. -/
 @[simp]
-theorem preimage_cast_Ioi (a : ℚ) : coe ⁻¹' Ioi (a : K) = Ioi a :=
-  by
-  ext x
-  simp
+theorem preimage_cast_Ioi (a : ℚ) : coe ⁻¹' Ioi (a : K) = Ioi a := by ext x; simp
 #align rat.preimage_cast_Ioi Rat.preimage_cast_Ioi
 
 /- warning: rat.preimage_cast_Iio -> Rat.preimage_cast_Iio is a dubious translation:
@@ -724,10 +700,7 @@ but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Iio.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Iio.{0} Rat Rat.instPreorderRat a)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Iio Rat.preimage_cast_Iioₓ'. -/
 @[simp]
-theorem preimage_cast_Iio (a : ℚ) : coe ⁻¹' Iio (a : K) = Iio a :=
-  by
-  ext x
-  simp
+theorem preimage_cast_Iio (a : ℚ) : coe ⁻¹' Iio (a : K) = Iio a := by ext x; simp
 #align rat.preimage_cast_Iio Rat.preimage_cast_Iio
 
 end LinearOrderedField
Diff
@@ -810,10 +810,7 @@ theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
 #align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'
 
 /- warning: monoid_with_zero_hom.ext_rat -> MonoidWithZeroHom.ext_rat is a dubious translation:
-lean 3 declaration is
-  forall {M₀ : Type.{u1}} [_inst_1 : MonoidWithZero.{u1} M₀] {f : MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)} {g : MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)}, (Eq.{succ u1} (MonoidWithZeroHom.{0, u1} Int M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)) (MonoidWithZeroHom.comp.{0, 0, u1} Int Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (HasLiftT.mk.{1, 1} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (CoeTCₓ.coe.{1, 1} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MonoidWithZeroHom.hasCoeT.{0, 0, 0} Int Rat (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (RingHomClass.toMonoidWithZeroHomClass.{0, 0, 0} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (RingHom.ringHomClass.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) (Int.castRingHom.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MonoidWithZeroHom.comp.{0, 0, u1} Int Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (HasLiftT.mk.{1, 1} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (CoeTCₓ.coe.{1, 1} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MonoidWithZeroHom.hasCoeT.{0, 0, 0} Int Rat (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (RingHomClass.toMonoidWithZeroHomClass.{0, 0, 0} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (RingHom.ringHomClass.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) (Int.castRingHom.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) -> (Eq.{succ u1} (MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)) f g)
-but is expected to have type
-  forall {M₀ : Type.{u1}} [_inst_1 : MonoidWithZero.{u1} M₀] {f : MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)} {g : MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)}, (Eq.{succ u1} (MonoidWithZeroHom.{0, u1} Int M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)) (MonoidWithZeroHom.comp.{0, 0, u1} Int Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt)) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1) f (MonoidWithZeroHomClass.toMonoidWithZeroHom.{0, 0, 0} Int Rat (RingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toMulZeroOneClass.{0} Int (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt)) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (RingHomClass.toMonoidWithZeroHomClass.{0, 0, 0} (RingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (RingHom.instRingHomClassRingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (Int.castRingHom.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MonoidWithZeroHom.comp.{0, 0, u1} Int Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt)) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1) g (MonoidWithZeroHomClass.toMonoidWithZeroHom.{0, 0, 0} Int Rat (RingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toMulZeroOneClass.{0} Int (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt)) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (RingHomClass.toMonoidWithZeroHomClass.{0, 0, 0} (RingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (RingHom.instRingHomClassRingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (Int.castRingHom.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) -> (Eq.{succ u1} (MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)) f g)
+<too large>
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat MonoidWithZeroHom.ext_ratₓ'. -/
 /-- If `f` and `g` agree on the integers then they are equal `φ`.
 
@@ -825,10 +822,7 @@ theorem ext_rat {f g : ℚ →*₀ M₀}
 #align monoid_with_zero_hom.ext_rat MonoidWithZeroHom.ext_rat
 
 /- warning: monoid_with_zero_hom.ext_rat_on_pnat -> MonoidWithZeroHom.ext_rat_on_pnat is a dubious translation:
-lean 3 declaration is
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))))) -> (forall (n : Nat), (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) n) -> (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)))) -> (Eq.{succ u1} F f g)
-but is expected to have type
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))))) -> (forall (n : Nat), (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)))) -> (Eq.{succ u1} F f g)
+<too large>
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat_on_pnat MonoidWithZeroHom.ext_rat_on_pnatₓ'. -/
 /-- Positive integer values of a morphism `φ` and its value on `-1` completely determine `φ`. -/
 theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
Diff
@@ -417,7 +417,7 @@ variable {α}
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Eq.{succ u1} (Rat -> α) (coeFn.{succ u1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (fun (_x : RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) => Rat -> α) (RingHom.hasCoeToFun.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (Rat.castHom.{u1} α _inst_1 _inst_2)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Eq.{succ u1} (forall (ᾰ : Rat), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => α) ᾰ) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => α) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (RingHom.instRingHomClassRingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Rat.castHom.{u1} α _inst_1 _inst_2)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Eq.{succ u1} (forall (ᾰ : Rat), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => α) ᾰ) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => α) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (RingHom.instRingHomClassRingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Rat.castHom.{u1} α _inst_1 _inst_2)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
 Case conversion may be inaccurate. Consider using '#align rat.coe_cast_hom Rat.coe_cast_homₓ'. -/
 @[simp]
 theorem coe_cast_hom : ⇑(castHom α) = coe :=
@@ -772,7 +772,7 @@ open Rat
 lean 3 declaration is
   forall {F : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : DivisionRing.{u2} α] [_inst_2 : DivisionRing.{u3} β] [_inst_3 : RingHomClass.{u1, u2, u3} F α β (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u3} β (coeFn.{succ u1, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u1, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u1, u2, u3} F α β (Distrib.toHasMul.{u2} α (NonUnitalNonAssocSemiring.toDistrib.{u2} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} α (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1)))))) (Distrib.toHasMul.{u3} β (NonUnitalNonAssocSemiring.toDistrib.{u3} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} β (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u2, u3} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} α (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} β (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u2, u3} F α β (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2))) _inst_3)))) f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u2} Rat α (CoeTCₓ.coe.{1, succ u2} Rat α (Rat.castCoe.{u2} α (DivisionRing.toHasRatCast.{u2} α _inst_1)))) q)) ((fun (a : Type) (b : Type.{u3}) [self : HasLiftT.{1, succ u3} a b] => self.0) Rat β (HasLiftT.mk.{1, succ u3} Rat β (CoeTCₓ.coe.{1, succ u3} Rat β (Rat.castCoe.{u3} β (DivisionRing.toHasRatCast.{u3} β _inst_2)))) q)
 but is expected to have type
-  forall {F : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : DivisionRing.{u3} α] [_inst_2 : DivisionRing.{u2} β] [_inst_3 : RingHomClass.{u1, u3, u2} F α β (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))) (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (NonUnitalNonAssocSemiring.toMul.{u3} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u3, u2} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u3, u2} F α β (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))) (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2))) _inst_3))) f (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) _inst_2) q)
+  forall {F : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : DivisionRing.{u3} α] [_inst_2 : DivisionRing.{u2} β] [_inst_3 : RingHomClass.{u1, u3, u2} F α β (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))) (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (NonUnitalNonAssocSemiring.toMul.{u3} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u3, u2} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u3, u2} F α β (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))) (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2))) _inst_3))) f (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) _inst_2) q)
 Case conversion may be inaccurate. Consider using '#align map_rat_cast map_ratCastₓ'. -/
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
@@ -783,7 +783,7 @@ theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (
 lean 3 declaration is
   forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} k (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> k) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => k) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (Distrib.toHasMul.{0} Rat (NonUnitalNonAssocSemiring.toDistrib.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (Distrib.toHasMul.{u2} k (NonUnitalNonAssocSemiring.toDistrib.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))) _inst_2)))) f r) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Rat k (HasLiftT.mk.{1, succ u2} Rat k (CoeTCₓ.coe.{1, succ u2} Rat k (Rat.castCoe.{u2} k (DivisionRing.toHasRatCast.{u2} k _inst_1)))) r)
 but is expected to have type
-  forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (NonUnitalNonAssocSemiring.toMul.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1))) _inst_2))) f r) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) _inst_1) r)
+  forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => k) r) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => k) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (NonUnitalNonAssocSemiring.toMul.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1))) _inst_2))) f r) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => k) r) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => k) r) _inst_1) r)
 Case conversion may be inaccurate. Consider using '#align eq_rat_cast eq_ratCastₓ'. -/
 @[simp]
 theorem eq_ratCast {k} [DivisionRing k] [RingHomClass F ℚ k] (f : F) (r : ℚ) : f r = r := by
@@ -800,7 +800,7 @@ include M₀
 lean 3 declaration is
   forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m))) -> (Eq.{succ u1} F f g)
 but is expected to have type
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Int.cast.{0} Rat Rat.instIntCastRat m))) -> (Eq.{succ u1} F f g)
+  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Int.cast.{0} Rat Rat.instIntCastRat m))) -> (Eq.{succ u1} F f g)
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'ₓ'. -/
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
@@ -828,7 +828,7 @@ theorem ext_rat {f g : ℚ →*₀ M₀}
 lean 3 declaration is
   forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))))) -> (forall (n : Nat), (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) n) -> (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)))) -> (Eq.{succ u1} F f g)
 but is expected to have type
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))))) -> (forall (n : Nat), (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)))) -> (Eq.{succ u1} F f g)
+  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))))) -> (forall (n : Nat), (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)))) -> (Eq.{succ u1} F f g)
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat_on_pnat MonoidWithZeroHom.ext_rat_on_pnatₓ'. -/
 /-- Positive integer values of a morphism `φ` and its value on `-1` completely determine `φ`. -/
 theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
Diff
@@ -486,7 +486,7 @@ variable {K : Type _} [LinearOrderedField K]
 
 /- warning: rat.cast_pos_of_pos -> Rat.cast_pos_of_pos is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {r : Rat}, (LT.lt.{0} Rat Rat.hasLt (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) r) -> (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) r))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {r : Rat}, (LT.lt.{0} Rat Rat.hasLt (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) r) -> (LT.lt.{u1} K (Preorder.toHasLt.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) r))
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {r : Rat}, (LT.lt.{0} Rat Rat.instLTRat_1 (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) r) -> (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) r))
 Case conversion may be inaccurate. Consider using '#align rat.cast_pos_of_pos Rat.cast_pos_of_posₓ'. -/
@@ -520,7 +520,7 @@ theorem cast_mono : Monotone (coe : ℚ → K) :=
 
 /- warning: rat.cast_order_embedding -> Rat.castOrderEmbedding is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], OrderEmbedding.{0, u1} Rat K Rat.hasLe (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], OrderEmbedding.{0, u1} Rat K Rat.hasLe (Preorder.toHasLe.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], OrderEmbedding.{0, u1} Rat K Rat.instLERat (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))
 Case conversion may be inaccurate. Consider using '#align rat.cast_order_embedding Rat.castOrderEmbeddingₓ'. -/
@@ -532,7 +532,7 @@ def castOrderEmbedding : ℚ ↪o K :=
 
 /- warning: rat.cast_le -> Rat.cast_le is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LE.le.{0} Rat Rat.hasLe m n)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LE.le.{u1} K (Preorder.toHasLe.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LE.le.{0} Rat Rat.hasLe m n)
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) m) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LE.le.{0} Rat Rat.instLERat m n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_le Rat.cast_leₓ'. -/
@@ -543,7 +543,7 @@ theorem cast_le {m n : ℚ} : (m : K) ≤ n ↔ m ≤ n :=
 
 /- warning: rat.cast_lt -> Rat.cast_lt is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LT.lt.{0} Rat Rat.hasLt m n)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toHasLt.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LT.lt.{0} Rat Rat.hasLt m n)
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) m) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LT.lt.{0} Rat Rat.instLTRat_1 m n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_lt Rat.cast_ltₓ'. -/
@@ -554,7 +554,7 @@ theorem cast_lt {m n : ℚ} : (m : K) < n ↔ m < n :=
 
 /- warning: rat.cast_nonneg -> Rat.cast_nonneg is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LE.le.{0} Rat Rat.hasLe (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) n)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toHasLe.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LE.le.{0} Rat Rat.hasLe (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) n)
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LE.le.{0} Rat Rat.instLERat (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_nonneg Rat.cast_nonnegₓ'. -/
@@ -564,7 +564,7 @@ theorem cast_nonneg {n : ℚ} : 0 ≤ (n : K) ↔ 0 ≤ n := by norm_cast
 
 /- warning: rat.cast_nonpos -> Rat.cast_nonpos is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))))))) (LE.le.{0} Rat Rat.hasLe n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toHasLe.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))))))) (LE.le.{0} Rat Rat.hasLe n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1)))))))) (LE.le.{0} Rat Rat.instLERat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_nonpos Rat.cast_nonposₓ'. -/
@@ -574,7 +574,7 @@ theorem cast_nonpos {n : ℚ} : (n : K) ≤ 0 ↔ n ≤ 0 := by norm_cast
 
 /- warning: rat.cast_pos -> Rat.cast_pos is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LT.lt.{0} Rat Rat.hasLt (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) n)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toHasLt.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LT.lt.{0} Rat Rat.hasLt (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) n)
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LT.lt.{0} Rat Rat.instLTRat_1 (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_pos Rat.cast_posₓ'. -/
@@ -584,7 +584,7 @@ theorem cast_pos {n : ℚ} : (0 : K) < n ↔ 0 < n := by norm_cast
 
 /- warning: rat.cast_lt_zero -> Rat.cast_lt_zero is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))))))) (LT.lt.{0} Rat Rat.hasLt n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toHasLt.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))))))) (LT.lt.{0} Rat Rat.hasLt n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1)))))))) (LT.lt.{0} Rat Rat.instLTRat_1 n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_lt_zero Rat.cast_lt_zeroₓ'. -/
Diff
@@ -61,7 +61,7 @@ theorem cast_coe_int (n : ℤ) : ((n : ℚ) : α) = n :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) n)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) n)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_coe_nat Rat.cast_coe_natₓ'. -/
 @[simp, norm_cast]
 theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
@@ -83,7 +83,7 @@ theorem cast_zero : ((0 : ℚ) : α) = 0 :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (Semiring.toOne.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))))
 Case conversion may be inaccurate. Consider using '#align rat.cast_one Rat.cast_oneₓ'. -/
 @[simp, norm_cast]
 theorem cast_one : ((1 : ℚ) : α) = 1 :=
@@ -152,7 +152,7 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_add_of_ne_zero Rat.cast_add_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_add_of_ne_zero :
@@ -191,7 +191,7 @@ theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_sub_of_ne_zero Rat.cast_sub_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den : α) ≠ 0) :
@@ -205,7 +205,7 @@ theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den :
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.hasMul) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.instMulRat) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.instMulRat) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_mul_of_ne_zero Rat.cast_mul_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_mul_of_ne_zero :
@@ -229,7 +229,7 @@ theorem cast_mul_of_ne_zero :
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n))) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n))) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n))) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_inv_nat Rat.cast_inv_natₓ'. -/
 @[simp]
 theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
@@ -257,7 +257,7 @@ theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv n)) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat n)) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat n)) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = n⁻¹
@@ -274,7 +274,7 @@ theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α)
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.hasDiv) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.instDivRat) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (Semiring.toNatCast.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.instDivRat) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num : α) ≠ 0)
@@ -391,7 +391,7 @@ theorem cast_bit0 [CharZero α] (n : ℚ) : ((bit0 n : ℚ) : α) = bit0 n :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (bit1.{0} Rat Rat.hasOne Rat.hasAdd n)) (bit1.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (bit1.{0} Rat (NonAssocRing.toOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) Rat.instAddRat n)) (bit1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (bit1.{0} Rat (Semiring.toOne.{0} Rat Rat.semiring) Rat.instAddRat n)) (bit1.{u1} α (Semiring.toOne.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_bit1 Rat.cast_bit1ₓ'. -/
 @[simp, norm_cast]
 theorem cast_bit1 [CharZero α] (n : ℚ) : ((bit1 n : ℚ) : α) = bit1 n := by
@@ -404,7 +404,7 @@ variable (α) [CharZero α]
 lean 3 declaration is
   forall (α : Type.{u1}) [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))
 but is expected to have type
-  forall (α : Type.{u1}) [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))
+  forall (α : Type.{u1}) [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_hom Rat.castHomₓ'. -/
 /-- Coercion `ℚ → α` as a `ring_hom`. -/
 def castHom : ℚ →+* α :=
@@ -417,7 +417,7 @@ variable {α}
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Eq.{succ u1} (Rat -> α) (coeFn.{succ u1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (fun (_x : RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) => Rat -> α) (RingHom.hasCoeToFun.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (Rat.castHom.{u1} α _inst_1 _inst_2)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Eq.{succ u1} (forall (ᾰ : Rat), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => α) ᾰ) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => α) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (RingHom.instRingHomClassRingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.castHom.{u1} α _inst_1 _inst_2)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Eq.{succ u1} (forall (ᾰ : Rat), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => α) ᾰ) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => α) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))) Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))) (RingHom.instRingHomClassRingHom.{0, u1} Rat α (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Rat.castHom.{u1} α _inst_1 _inst_2)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
 Case conversion may be inaccurate. Consider using '#align rat.coe_cast_hom Rat.coe_cast_homₓ'. -/
 @[simp]
 theorem coe_cast_hom : ⇑(castHom α) = coe :=
@@ -757,7 +757,7 @@ theorem cast_eq_id : (coe : ℚ → ℚ) = id :=
 lean 3 declaration is
   Eq.{1} (RingHom.{0, 0} Rat Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing)))) (Rat.castHom.{0} Rat Rat.divisionRing (StrictOrderedSemiring.to_charZero.{0} Rat (StrictOrderedRing.toStrictOrderedSemiring.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (RingHom.id.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))
 but is expected to have type
-  Eq.{1} (RingHom.{0, 0} Rat Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (DivisionRing.toRing.{0} Rat Rat.divisionRing)))) (Rat.castHom.{0} Rat Rat.divisionRing (StrictOrderedSemiring.to_charZero.{0} Rat (LinearOrderedSemiring.toStrictOrderedSemiring.{0} Rat Rat.instLinearOrderedSemiringRat))) (RingHom.id.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))
+  Eq.{1} (RingHom.{0, 0} Rat Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{0} Rat (DivisionSemiring.toSemiring.{0} Rat (DivisionRing.toDivisionSemiring.{0} Rat Rat.divisionRing)))) (Rat.castHom.{0} Rat Rat.divisionRing (StrictOrderedSemiring.to_charZero.{0} Rat (LinearOrderedSemiring.toStrictOrderedSemiring.{0} Rat Rat.instLinearOrderedSemiringRat))) (RingHom.id.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))
 Case conversion may be inaccurate. Consider using '#align rat.cast_hom_rat Rat.cast_hom_ratₓ'. -/
 @[simp]
 theorem cast_hom_rat : castHom ℚ = RingHom.id ℚ :=
@@ -772,7 +772,7 @@ open Rat
 lean 3 declaration is
   forall {F : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : DivisionRing.{u2} α] [_inst_2 : DivisionRing.{u3} β] [_inst_3 : RingHomClass.{u1, u2, u3} F α β (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u3} β (coeFn.{succ u1, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u1, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u1, u2, u3} F α β (Distrib.toHasMul.{u2} α (NonUnitalNonAssocSemiring.toDistrib.{u2} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} α (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1)))))) (Distrib.toHasMul.{u3} β (NonUnitalNonAssocSemiring.toDistrib.{u3} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} β (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u2, u3} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} α (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} β (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u2, u3} F α β (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2))) _inst_3)))) f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u2} Rat α (CoeTCₓ.coe.{1, succ u2} Rat α (Rat.castCoe.{u2} α (DivisionRing.toHasRatCast.{u2} α _inst_1)))) q)) ((fun (a : Type) (b : Type.{u3}) [self : HasLiftT.{1, succ u3} a b] => self.0) Rat β (HasLiftT.mk.{1, succ u3} Rat β (CoeTCₓ.coe.{1, succ u3} Rat β (Rat.castCoe.{u3} β (DivisionRing.toHasRatCast.{u3} β _inst_2)))) q)
 but is expected to have type
-  forall {F : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : DivisionRing.{u3} α] [_inst_2 : DivisionRing.{u2} β] [_inst_3 : RingHomClass.{u1, u3, u2} F α β (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (NonUnitalNonAssocSemiring.toMul.{u3} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u3, u2} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u3, u2} F α β (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2))) _inst_3))) f (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) _inst_2) q)
+  forall {F : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : DivisionRing.{u3} α] [_inst_2 : DivisionRing.{u2} β] [_inst_3 : RingHomClass.{u1, u3, u2} F α β (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))) (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (NonUnitalNonAssocSemiring.toMul.{u3} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u3, u2} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u3, u2} F α β (Semiring.toNonAssocSemiring.{u3} α (DivisionSemiring.toSemiring.{u3} α (DivisionRing.toDivisionSemiring.{u3} α _inst_1))) (Semiring.toNonAssocSemiring.{u2} β (DivisionSemiring.toSemiring.{u2} β (DivisionRing.toDivisionSemiring.{u2} β _inst_2))) _inst_3))) f (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) _inst_2) q)
 Case conversion may be inaccurate. Consider using '#align map_rat_cast map_ratCastₓ'. -/
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
@@ -783,7 +783,7 @@ theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (
 lean 3 declaration is
   forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} k (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> k) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => k) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (Distrib.toHasMul.{0} Rat (NonUnitalNonAssocSemiring.toDistrib.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (Distrib.toHasMul.{u2} k (NonUnitalNonAssocSemiring.toDistrib.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))) _inst_2)))) f r) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Rat k (HasLiftT.mk.{1, succ u2} Rat k (CoeTCₓ.coe.{1, succ u2} Rat k (Rat.castCoe.{u2} k (DivisionRing.toHasRatCast.{u2} k _inst_1)))) r)
 but is expected to have type
-  forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))) _inst_2))) f r) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) _inst_1) r)
+  forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (NonUnitalNonAssocSemiring.toMul.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u2} k (DivisionSemiring.toSemiring.{u2} k (DivisionRing.toDivisionSemiring.{u2} k _inst_1))) _inst_2))) f r) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) _inst_1) r)
 Case conversion may be inaccurate. Consider using '#align eq_rat_cast eq_ratCastₓ'. -/
 @[simp]
 theorem eq_ratCast {k} [DivisionRing k] [RingHomClass F ℚ k] (f : F) (r : ℚ) : f r = r := by
@@ -800,7 +800,7 @@ include M₀
 lean 3 declaration is
   forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m))) -> (Eq.{succ u1} F f g)
 but is expected to have type
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Int.cast.{0} Rat Rat.instIntCastRat m))) -> (Eq.{succ u1} F f g)
+  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Int.cast.{0} Rat Rat.instIntCastRat m))) -> (Eq.{succ u1} F f g)
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'ₓ'. -/
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
@@ -813,7 +813,7 @@ theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
 lean 3 declaration is
   forall {M₀ : Type.{u1}} [_inst_1 : MonoidWithZero.{u1} M₀] {f : MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)} {g : MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)}, (Eq.{succ u1} (MonoidWithZeroHom.{0, u1} Int M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)) (MonoidWithZeroHom.comp.{0, 0, u1} Int Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (HasLiftT.mk.{1, 1} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (CoeTCₓ.coe.{1, 1} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MonoidWithZeroHom.hasCoeT.{0, 0, 0} Int Rat (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (RingHomClass.toMonoidWithZeroHomClass.{0, 0, 0} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (RingHom.ringHomClass.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) (Int.castRingHom.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MonoidWithZeroHom.comp.{0, 0, u1} Int Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (HasLiftT.mk.{1, 1} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (CoeTCₓ.coe.{1, 1} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZeroHom.{0, 0} Int Rat (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MonoidWithZeroHom.hasCoeT.{0, 0, 0} Int Rat (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (RingHomClass.toMonoidWithZeroHomClass.{0, 0, 0} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (RingHom.ringHomClass.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.ring)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) (Int.castRingHom.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) -> (Eq.{succ u1} (MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)) f g)
 but is expected to have type
-  forall {M₀ : Type.{u1}} [_inst_1 : MonoidWithZero.{u1} M₀] {f : MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)} {g : MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)}, (Eq.{succ u1} (MonoidWithZeroHom.{0, u1} Int M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)) (MonoidWithZeroHom.comp.{0, 0, u1} Int Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1) f (MonoidWithZeroHomClass.toMonoidWithZeroHom.{0, 0, 0} Int Rat (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (RingHomClass.toMonoidWithZeroHomClass.{0, 0, 0} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (RingHom.instRingHomClassRingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (Int.castRingHom.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MonoidWithZeroHom.comp.{0, 0, u1} Int Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1) g (MonoidWithZeroHomClass.toMonoidWithZeroHom.{0, 0, 0} Int Rat (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toMulZeroOneClass.{0} Int (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt))) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (RingHomClass.toMonoidWithZeroHomClass.{0, 0, 0} (RingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (RingHom.instRingHomClassRingHom.{0, 0} Int Rat (NonAssocRing.toNonAssocSemiring.{0} Int (Ring.toNonAssocRing.{0} Int Int.instRingInt)) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (Int.castRingHom.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) -> (Eq.{succ u1} (MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)) f g)
+  forall {M₀ : Type.{u1}} [_inst_1 : MonoidWithZero.{u1} M₀] {f : MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)} {g : MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)}, (Eq.{succ u1} (MonoidWithZeroHom.{0, u1} Int M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)) (MonoidWithZeroHom.comp.{0, 0, u1} Int Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt)) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1) f (MonoidWithZeroHomClass.toMonoidWithZeroHom.{0, 0, 0} Int Rat (RingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toMulZeroOneClass.{0} Int (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt)) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (RingHomClass.toMonoidWithZeroHomClass.{0, 0, 0} (RingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (RingHom.instRingHomClassRingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (Int.castRingHom.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MonoidWithZeroHom.comp.{0, 0, u1} Int Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Int (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt)) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1) g (MonoidWithZeroHomClass.toMonoidWithZeroHom.{0, 0, 0} Int Rat (RingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toMulZeroOneClass.{0} Int (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt)) (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (RingHomClass.toMonoidWithZeroHomClass.{0, 0, 0} (RingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (RingHom.instRingHomClassRingHom.{0, 0} Int Rat (Semiring.toNonAssocSemiring.{0} Int Int.instSemiringInt) (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (Int.castRingHom.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) -> (Eq.{succ u1} (MonoidWithZeroHom.{0, u1} Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u1} M₀ _inst_1)) f g)
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat MonoidWithZeroHom.ext_ratₓ'. -/
 /-- If `f` and `g` agree on the integers then they are equal `φ`.
 
@@ -828,7 +828,7 @@ theorem ext_rat {f g : ℚ →*₀ M₀}
 lean 3 declaration is
   forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))))) -> (forall (n : Nat), (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) n) -> (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)))) -> (Eq.{succ u1} F f g)
 but is expected to have type
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))))) -> (forall (n : Nat), (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)))) -> (Eq.{succ u1} F f g)
+  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))))) -> (forall (n : Nat), (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring)) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Nat.cast.{0} Rat (Semiring.toNatCast.{0} Rat Rat.semiring) n)))) -> (Eq.{succ u1} F f g)
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat_on_pnat MonoidWithZeroHom.ext_rat_on_pnatₓ'. -/
 /-- Positive integer values of a morphism `φ` and its value on `-1` completely determine `φ`. -/
 theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
@@ -847,7 +847,7 @@ end MonoidWithZeroHom
 lean 3 declaration is
   forall {F : Type.{u1}} {R : Type.{u2}} [_inst_1 : Semiring.{u2} R] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat R (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (Semiring.toNonAssocSemiring.{u2} R _inst_1)] (f : F) (g : F), Eq.{succ u1} F f g
 but is expected to have type
-  forall {F : Type.{u1}} {R : Type.{u2}} [_inst_1 : Semiring.{u2} R] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat R (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (Semiring.toNonAssocSemiring.{u2} R _inst_1)] (f : F) (g : F), Eq.{succ u1} F f g
+  forall {F : Type.{u1}} {R : Type.{u2}} [_inst_1 : Semiring.{u2} R] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat R (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u2} R _inst_1)] (f : F) (g : F), Eq.{succ u1} F f g
 Case conversion may be inaccurate. Consider using '#align ring_hom.ext_rat RingHom.ext_ratₓ'. -/
 /-- Any two ring homomorphisms from `ℚ` to a semiring are equal. If the codomain is a division ring,
 then this lemma follows from `eq_rat_cast`. -/
@@ -861,7 +861,7 @@ theorem RingHom.ext_rat {R : Type _} [Semiring R] [RingHomClass F ℚ R] (f g :
 lean 3 declaration is
   forall {R : Type.{u1}} [_inst_1 : Semiring.{u1} R], Subsingleton.{succ u1} (RingHom.{0, u1} Rat R (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (Semiring.toNonAssocSemiring.{u1} R _inst_1))
 but is expected to have type
-  forall {R : Type.{u1}} [_inst_1 : Semiring.{u1} R], Subsingleton.{succ u1} (RingHom.{0, u1} Rat R (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (Semiring.toNonAssocSemiring.{u1} R _inst_1))
+  forall {R : Type.{u1}} [_inst_1 : Semiring.{u1} R], Subsingleton.{succ u1} (RingHom.{0, u1} Rat R (Semiring.toNonAssocSemiring.{0} Rat Rat.semiring) (Semiring.toNonAssocSemiring.{u1} R _inst_1))
 Case conversion may be inaccurate. Consider using '#align rat.subsingleton_ring_hom Rat.subsingleton_ringHomₓ'. -/
 instance Rat.subsingleton_ringHom {R : Type _} [Semiring R] : Subsingleton (ℚ →+* R) :=
   ⟨RingHom.ext_rat⟩
Diff
@@ -48,7 +48,7 @@ variable [DivisionRing α]
 
 /- warning: rat.cast_coe_int -> Rat.cast_coe_int is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) n)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) n)
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Int.cast.{0} Rat Rat.instIntCastRat n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_coe_int Rat.cast_coe_intₓ'. -/
@@ -59,7 +59,7 @@ theorem cast_coe_int (n : ℤ) : ((n : ℚ) : α) = n :=
 
 /- warning: rat.cast_coe_nat -> Rat.cast_coe_nat is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) n)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) n)
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_coe_nat Rat.cast_coe_natₓ'. -/
@@ -81,7 +81,7 @@ theorem cast_zero : ((0 : ℚ) : α) = 0 :=
 
 /- warning: rat.cast_one -> Rat.cast_one is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))
 Case conversion may be inaccurate. Consider using '#align rat.cast_one Rat.cast_oneₓ'. -/
@@ -122,7 +122,7 @@ theorem commute_cast (a : α) (r : ℚ) : Commute a r :=
 
 /- warning: rat.cast_mk_of_ne_zero -> Rat.cast_mk_of_ne_zero is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : Int) (b : Int), (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Rat.mk a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : Int) (b : Int), (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Rat.mk a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : Int) (b : Int), (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Rat.divInt a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) a) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_mk_of_ne_zero Rat.cast_mk_of_ne_zeroₓ'. -/
@@ -150,7 +150,7 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
 
 /- warning: rat.cast_add_of_ne_zero -> Rat.cast_add_of_ne_zero is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_add_of_ne_zero Rat.cast_add_of_ne_zeroₓ'. -/
@@ -175,7 +175,7 @@ theorem cast_add_of_ne_zero :
 
 /- warning: rat.cast_neg -> Rat.cast_neg is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Neg.neg.{0} Rat Rat.hasNeg n)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Neg.neg.{0} Rat Rat.hasNeg n)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Neg.neg.{0} Rat Rat.instNegRat n)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_neg Rat.cast_negₓ'. -/
@@ -189,7 +189,7 @@ theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
 
 /- warning: rat.cast_sub_of_ne_zero -> Rat.cast_sub_of_ne_zero is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_sub_of_ne_zero Rat.cast_sub_of_ne_zeroₓ'. -/
@@ -203,7 +203,7 @@ theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den :
 
 /- warning: rat.cast_mul_of_ne_zero -> Rat.cast_mul_of_ne_zero is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.hasMul) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.hasMul) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.instMulRat) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_mul_of_ne_zero Rat.cast_mul_of_ne_zeroₓ'. -/
@@ -227,7 +227,7 @@ theorem cast_mul_of_ne_zero :
 
 /- warning: rat.cast_inv_nat -> Rat.cast_inv_nat is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n))) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n))) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) n))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n))) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_inv_nat Rat.cast_inv_natₓ'. -/
@@ -241,7 +241,7 @@ theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
 
 /- warning: rat.cast_inv_int -> Rat.cast_inv_int is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) n))) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) n))) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) n))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat (Int.cast.{0} Rat Rat.instIntCastRat n))) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_inv_int Rat.cast_inv_intₓ'. -/
@@ -255,7 +255,7 @@ theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
 
 /- warning: rat.cast_inv_of_ne_zero -> Rat.cast_inv_of_ne_zero is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv n)) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv n)) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat n)) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zeroₓ'. -/
@@ -272,7 +272,7 @@ theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α)
 
 /- warning: rat.cast_div_of_ne_zero -> Rat.cast_div_of_ne_zero is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.hasDiv) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.hasDiv) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.instDivRat) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zeroₓ'. -/
@@ -292,7 +292,7 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
 
 /- warning: rat.cast_inj -> Rat.cast_inj is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {m : Rat} {n : Rat}, Iff (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)) (Eq.{1} Rat m n)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {m : Rat} {n : Rat}, Iff (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)) (Eq.{1} Rat m n)
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {m : Rat} {n : Rat}, Iff (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)) (Eq.{1} Rat m n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_inj Rat.cast_injₓ'. -/
@@ -315,7 +315,7 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
 
 /- warning: rat.cast_injective -> Rat.cast_injective is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Function.Injective.{1, succ u1} Rat α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Function.Injective.{1, succ u1} Rat α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Function.Injective.{1, succ u1} Rat α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
 Case conversion may be inaccurate. Consider using '#align rat.cast_injective Rat.cast_injectiveₓ'. -/
@@ -325,7 +325,7 @@ theorem cast_injective [CharZero α] : Function.Injective (coe : ℚ → α)
 
 /- warning: rat.cast_eq_zero -> Rat.cast_eq_zero is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {n : Rat}, Iff (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) (Eq.{1} Rat n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {n : Rat}, Iff (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) (Eq.{1} Rat n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {n : Rat}, Iff (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Eq.{1} Rat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_eq_zero Rat.cast_eq_zeroₓ'. -/
@@ -335,7 +335,7 @@ theorem cast_eq_zero [CharZero α] {n : ℚ} : (n : α) = 0 ↔ n = 0 := by rw [
 
 /- warning: rat.cast_ne_zero -> Rat.cast_ne_zero is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {n : Rat}, Iff (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) (Ne.{1} Rat n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {n : Rat}, Iff (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) (Ne.{1} Rat n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {n : Rat}, Iff (Ne.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Ne.{1} Rat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_ne_zero Rat.cast_ne_zeroₓ'. -/
@@ -345,7 +345,7 @@ theorem cast_ne_zero [CharZero α] {n : ℚ} : (n : α) ≠ 0 ↔ n ≠ 0 :=
 
 /- warning: rat.cast_add -> Rat.cast_add is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_add Rat.cast_addₓ'. -/
@@ -356,7 +356,7 @@ theorem cast_add [CharZero α] (m n) : ((m + n : ℚ) : α) = m + n :=
 
 /- warning: rat.cast_sub -> Rat.cast_sub is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_sub Rat.cast_subₓ'. -/
@@ -367,7 +367,7 @@ theorem cast_sub [CharZero α] (m n) : ((m - n : ℚ) : α) = m - n :=
 
 /- warning: rat.cast_mul -> Rat.cast_mul is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.hasMul) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.hasMul) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.instMulRat) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_mul Rat.cast_mulₓ'. -/
@@ -378,7 +378,7 @@ theorem cast_mul [CharZero α] (m n) : ((m * n : ℚ) : α) = m * n :=
 
 /- warning: rat.cast_bit0 -> Rat.cast_bit0 is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (bit0.{0} Rat Rat.hasAdd n)) (bit0.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (bit0.{0} Rat Rat.hasAdd n)) (bit0.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (bit0.{0} Rat Rat.instAddRat n)) (bit0.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_bit0 Rat.cast_bit0ₓ'. -/
@@ -389,7 +389,7 @@ theorem cast_bit0 [CharZero α] (n : ℚ) : ((bit0 n : ℚ) : α) = bit0 n :=
 
 /- warning: rat.cast_bit1 -> Rat.cast_bit1 is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (bit1.{0} Rat Rat.hasOne Rat.hasAdd n)) (bit1.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (bit1.{0} Rat Rat.hasOne Rat.hasAdd n)) (bit1.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (bit1.{0} Rat (NonAssocRing.toOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) Rat.instAddRat n)) (bit1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_bit1 Rat.cast_bit1ₓ'. -/
@@ -402,7 +402,7 @@ variable (α) [CharZero α]
 
 /- warning: rat.cast_hom -> Rat.castHom is a dubious translation:
 lean 3 declaration is
-  forall (α : Type.{u1}) [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))
+  forall (α : Type.{u1}) [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))
 but is expected to have type
   forall (α : Type.{u1}) [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_hom Rat.castHomₓ'. -/
@@ -415,7 +415,7 @@ variable {α}
 
 /- warning: rat.coe_cast_hom -> Rat.coe_cast_hom is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Eq.{succ u1} (Rat -> α) (coeFn.{succ u1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (fun (_x : RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) => Rat -> α) (RingHom.hasCoeToFun.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (Rat.castHom.{u1} α _inst_1 _inst_2)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Eq.{succ u1} (Rat -> α) (coeFn.{succ u1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (fun (_x : RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) => Rat -> α) (RingHom.hasCoeToFun.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (Rat.castHom.{u1} α _inst_1 _inst_2)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Eq.{succ u1} (forall (ᾰ : Rat), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => α) ᾰ) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => α) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (RingHom.instRingHomClassRingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.castHom.{u1} α _inst_1 _inst_2)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
 Case conversion may be inaccurate. Consider using '#align rat.coe_cast_hom Rat.coe_cast_homₓ'. -/
@@ -426,7 +426,7 @@ theorem coe_cast_hom : ⇑(castHom α) = coe :=
 
 /- warning: rat.cast_inv -> Rat.cast_inv is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv n)) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv n)) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat n)) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_inv Rat.cast_invₓ'. -/
@@ -437,7 +437,7 @@ theorem cast_inv (n) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
 
 /- warning: rat.cast_div -> Rat.cast_div is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.hasDiv) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.hasDiv) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.instDivRat) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_div Rat.cast_divₓ'. -/
@@ -448,7 +448,7 @@ theorem cast_div (m n) : ((m / n : ℚ) : α) = m / n :=
 
 /- warning: rat.cast_zpow -> Rat.cast_zpow is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (q : Rat) (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) q n)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) q) n)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (q : Rat) (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) q n)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) q) n)
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (q : Rat) (n : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) q n)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) q) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_zpow Rat.cast_zpowₓ'. -/
@@ -459,7 +459,7 @@ theorem cast_zpow (q : ℚ) (n : ℤ) : ((q ^ n : ℚ) : α) = q ^ n :=
 
 /- warning: rat.cast_mk -> Rat.cast_mk is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (a : Int) (b : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Rat.mk a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (a : Int) (b : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Rat.mk a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b))
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (a : Int) (b : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Rat.divInt a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) a) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b))
 Case conversion may be inaccurate. Consider using '#align rat.cast_mk Rat.cast_mkₓ'. -/
@@ -469,7 +469,7 @@ theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b := by simp only [mk_eq_div,
 
 /- warning: rat.cast_pow -> Rat.cast_pow is a dubious translation:
 lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (q : Rat) (k : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HPow.hPow.{0, 0, 0} Rat Nat Rat (instHPow.{0, 0} Rat Nat (Monoid.Pow.{0} Rat Rat.monoid)) q k)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) q) k)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (AddCommGroupWithOne.toAddGroupWithOne.{u1} α (Ring.toAddCommGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (q : Rat) (k : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HPow.hPow.{0, 0, 0} Rat Nat Rat (instHPow.{0, 0} Rat Nat (Monoid.Pow.{0} Rat Rat.monoid)) q k)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) q) k)
 but is expected to have type
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (q : Rat) (k : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HPow.hPow.{0, 0, 0} Rat Nat Rat (instHPow.{0, 0} Rat Nat (Monoid.Pow.{0} Rat Rat.monoid)) q k)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) q) k)
 Case conversion may be inaccurate. Consider using '#align rat.cast_pow Rat.cast_powₓ'. -/
@@ -616,7 +616,7 @@ theorem cast_max {a b : ℚ} : (↑(max a b) : K) = max a b :=
 
 /- warning: rat.cast_abs -> Rat.cast_abs is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.hasNeg Rat.hasSup) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (SubNegMonoid.toHasNeg.{u1} K (AddGroup.toSubNegMonoid.{u1} K (AddGroupWithOne.toAddGroup.{u1} K (NonAssocRing.toAddGroupWithOne.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))) (SemilatticeSup.toHasSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (LinearOrder.toLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) q))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.hasNeg Rat.hasSup) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (SubNegMonoid.toHasNeg.{u1} K (AddGroup.toSubNegMonoid.{u1} K (AddGroupWithOne.toAddGroup.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))) (SemilatticeSup.toHasSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (LinearOrder.toLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) q))
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.instNegRat Rat.instSupRat) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (Ring.toNeg.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (SemilatticeSup.toSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (DistribLattice.toLattice.{u1} K (instDistribLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) q))
 Case conversion may be inaccurate. Consider using '#align rat.cast_abs Rat.cast_absₓ'. -/
@@ -826,7 +826,7 @@ theorem ext_rat {f g : ℚ →*₀ M₀}
 
 /- warning: monoid_with_zero_hom.ext_rat_on_pnat -> MonoidWithZeroHom.ext_rat_on_pnat is a dubious translation:
 lean 3 declaration is
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))))) -> (forall (n : Nat), (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) n) -> (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)))) -> (Eq.{succ u1} F f g)
+  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))))) -> (forall (n : Nat), (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) n) -> (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (AddCommGroupWithOne.toAddGroupWithOne.{0} Rat (Ring.toAddCommGroupWithOne.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)))) -> (Eq.{succ u1} F f g)
 but is expected to have type
   forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))))) -> (forall (n : Nat), (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)))) -> (Eq.{succ u1} F f g)
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat_on_pnat MonoidWithZeroHom.ext_rat_on_pnatₓ'. -/
@@ -875,7 +875,7 @@ variable {K : Type _} [DivisionRing K]
 
 /- warning: rat.distrib_smul -> Rat.distribSMul is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], DistribSMul.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (NonAssocRing.toAddGroupWithOne.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))))
+  forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], DistribSMul.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))))
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], DistribSMul.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (Ring.toAddGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))))
 Case conversion may be inaccurate. Consider using '#align rat.distrib_smul Rat.distribSMulₓ'. -/
@@ -888,7 +888,7 @@ instance (priority := 100) distribSMul : DistribSMul ℚ K
 
 /- warning: rat.is_scalar_tower_right -> Rat.isScalarTower_right is a dubious translation:
 lean 3 declaration is
-  forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], IsScalarTower.{0, u1, u1} Rat K K (SMulZeroClass.toHasSmul.{0, u1} Rat K (AddZeroClass.toHasZero.{u1} K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (NonAssocRing.toAddGroupWithOne.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))))) (DistribSMul.toSmulZeroClass.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (NonAssocRing.toAddGroupWithOne.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))))) (Rat.distribSMul.{u1} K _inst_1))) (Mul.toSMul.{u1} K (Distrib.toHasMul.{u1} K (Ring.toDistrib.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))) (SMulZeroClass.toHasSmul.{0, u1} Rat K (AddZeroClass.toHasZero.{u1} K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (NonAssocRing.toAddGroupWithOne.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))))) (DistribSMul.toSmulZeroClass.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (NonAssocRing.toAddGroupWithOne.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))))) (Rat.distribSMul.{u1} K _inst_1)))
+  forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], IsScalarTower.{0, u1, u1} Rat K K (SMulZeroClass.toHasSmul.{0, u1} Rat K (AddZeroClass.toHasZero.{u1} K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))))) (DistribSMul.toSmulZeroClass.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))))) (Rat.distribSMul.{u1} K _inst_1))) (Mul.toSMul.{u1} K (Distrib.toHasMul.{u1} K (Ring.toDistrib.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))) (SMulZeroClass.toHasSmul.{0, u1} Rat K (AddZeroClass.toHasZero.{u1} K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))))) (DistribSMul.toSmulZeroClass.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (AddCommGroupWithOne.toAddGroupWithOne.{u1} K (Ring.toAddCommGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))))) (Rat.distribSMul.{u1} K _inst_1)))
 but is expected to have type
   forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], IsScalarTower.{0, u1, u1} Rat K K (SMulZeroClass.toSMul.{0, u1} Rat K (MonoidWithZero.toZero.{u1} K (Semiring.toMonoidWithZero.{u1} K (DivisionSemiring.toSemiring.{u1} K (DivisionRing.toDivisionSemiring.{u1} K _inst_1)))) (DistribSMul.toSMulZeroClass.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (Ring.toAddGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))) (Rat.distribSMul.{u1} K _inst_1))) (MulAction.toSMul.{u1, u1} K K (MonoidWithZero.toMonoid.{u1} K (Semiring.toMonoidWithZero.{u1} K (DivisionSemiring.toSemiring.{u1} K (DivisionRing.toDivisionSemiring.{u1} K _inst_1)))) (Monoid.toMulAction.{u1} K (MonoidWithZero.toMonoid.{u1} K (Semiring.toMonoidWithZero.{u1} K (DivisionSemiring.toSemiring.{u1} K (DivisionRing.toDivisionSemiring.{u1} K _inst_1)))))) (SMulZeroClass.toSMul.{0, u1} Rat K (MonoidWithZero.toZero.{u1} K (Semiring.toMonoidWithZero.{u1} K (DivisionSemiring.toSemiring.{u1} K (DivisionRing.toDivisionSemiring.{u1} K _inst_1)))) (DistribSMul.toSMulZeroClass.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (Ring.toAddGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))) (Rat.distribSMul.{u1} K _inst_1)))
 Case conversion may be inaccurate. Consider using '#align rat.is_scalar_tower_right Rat.isScalarTower_rightₓ'. -/
Diff
@@ -873,14 +873,18 @@ namespace Rat
 
 variable {K : Type _} [DivisionRing K]
 
-#print Rat.distribSMul /-
+/- warning: rat.distrib_smul -> Rat.distribSMul is a dubious translation:
+lean 3 declaration is
+  forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], DistribSMul.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (NonAssocRing.toAddGroupWithOne.{u1} K (Ring.toNonAssocRing.{u1} K (DivisionRing.toRing.{u1} K _inst_1))))))
+but is expected to have type
+  forall {K : Type.{u1}} [_inst_1 : DivisionRing.{u1} K], DistribSMul.{0, u1} Rat K (AddMonoid.toAddZeroClass.{u1} K (AddMonoidWithOne.toAddMonoid.{u1} K (AddGroupWithOne.toAddMonoidWithOne.{u1} K (Ring.toAddGroupWithOne.{u1} K (DivisionRing.toRing.{u1} K _inst_1)))))
+Case conversion may be inaccurate. Consider using '#align rat.distrib_smul Rat.distribSMulₓ'. -/
 instance (priority := 100) distribSMul : DistribSMul ℚ K
     where
   smul := (· • ·)
   smul_zero a := by rw [smul_def, MulZeroClass.mul_zero]
   smul_add a x y := by simp only [smul_def, mul_add, cast_add]
 #align rat.distrib_smul Rat.distribSMul
--/
 
 /- warning: rat.is_scalar_tower_right -> Rat.isScalarTower_right is a dubious translation:
 lean 3 declaration is
Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
 
 ! This file was ported from Lean 3 source module data.rat.cast
-! leanprover-community/mathlib commit baba818b9acea366489e8ba32d2cc0fcaf50a1f7
+! leanprover-community/mathlib commit acebd8d49928f6ed8920e502a6c90674e75bd441
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -867,36 +867,6 @@ instance Rat.subsingleton_ringHom {R : Type _} [Semiring R] : Subsingleton (ℚ
   ⟨RingHom.ext_rat⟩
 #align rat.subsingleton_ring_hom Rat.subsingleton_ringHom
 
-namespace MulOpposite
-
-variable [DivisionRing α]
-
-/- warning: mul_opposite.op_rat_cast -> MulOpposite.op_ratCast is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat), Eq.{succ u1} (MulOpposite.{u1} α) (MulOpposite.op.{u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat (MulOpposite.{u1} α) (HasLiftT.mk.{1, succ u1} Rat (MulOpposite.{u1} α) (CoeTCₓ.coe.{1, succ u1} Rat (MulOpposite.{u1} α) (Rat.castCoe.{u1} (MulOpposite.{u1} α) (DivisionRing.toHasRatCast.{u1} (MulOpposite.{u1} α) (MulOpposite.divisionRing.{u1} α _inst_1))))) r)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat), Eq.{succ u1} (MulOpposite.{u1} α) (MulOpposite.op.{u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r)) (Rat.cast.{u1} (MulOpposite.{u1} α) (DivisionRing.toRatCast.{u1} (MulOpposite.{u1} α) (MulOpposite.instDivisionRingMulOpposite.{u1} α _inst_1)) r)
-Case conversion may be inaccurate. Consider using '#align mul_opposite.op_rat_cast MulOpposite.op_ratCastₓ'. -/
-@[simp, norm_cast]
-theorem op_ratCast (r : ℚ) : op (r : α) = (↑r : αᵐᵒᵖ) := by
-  rw [cast_def, div_eq_mul_inv, op_mul, op_inv, op_nat_cast, op_int_cast,
-    (Commute.cast_int_right _ r.num).Eq, cast_def, div_eq_mul_inv]
-#align mul_opposite.op_rat_cast MulOpposite.op_ratCast
-
-/- warning: mul_opposite.unop_rat_cast -> MulOpposite.unop_ratCast is a dubious translation:
-lean 3 declaration is
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat), Eq.{succ u1} α (MulOpposite.unop.{u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat (MulOpposite.{u1} α) (HasLiftT.mk.{1, succ u1} Rat (MulOpposite.{u1} α) (CoeTCₓ.coe.{1, succ u1} Rat (MulOpposite.{u1} α) (Rat.castCoe.{u1} (MulOpposite.{u1} α) (DivisionRing.toHasRatCast.{u1} (MulOpposite.{u1} α) (MulOpposite.divisionRing.{u1} α _inst_1))))) r)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r)
-but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat), Eq.{succ u1} α (MulOpposite.unop.{u1} α (Rat.cast.{u1} (MulOpposite.{u1} α) (DivisionRing.toRatCast.{u1} (MulOpposite.{u1} α) (MulOpposite.instDivisionRingMulOpposite.{u1} α _inst_1)) r)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r)
-Case conversion may be inaccurate. Consider using '#align mul_opposite.unop_rat_cast MulOpposite.unop_ratCastₓ'. -/
-@[simp, norm_cast]
-theorem unop_ratCast (r : ℚ) : unop (r : αᵐᵒᵖ) = r := by
-  rw [cast_def, div_eq_mul_inv, unop_mul, unop_inv, unop_nat_cast, unop_int_cast,
-    (Commute.cast_int_right _ r.num).Eq, cast_def, div_eq_mul_inv]
-#align mul_opposite.unop_rat_cast MulOpposite.unop_ratCast
-
-end MulOpposite
-
 section Smul
 
 namespace Rat
Diff
@@ -50,7 +50,7 @@ variable [DivisionRing α]
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) n)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Int.cast.{0} Rat Rat.instIntCastRat n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) n)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Int.cast.{0} Rat Rat.instIntCastRat n)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_coe_int Rat.cast_coe_intₓ'. -/
 @[simp, norm_cast]
 theorem cast_coe_int (n : ℤ) : ((n : ℚ) : α) = n :=
@@ -61,7 +61,7 @@ theorem cast_coe_int (n : ℤ) : ((n : ℚ) : α) = n :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) n)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) n)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_coe_nat Rat.cast_coe_natₓ'. -/
 @[simp, norm_cast]
 theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
@@ -72,7 +72,7 @@ theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero)))) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0))) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))
 Case conversion may be inaccurate. Consider using '#align rat.cast_zero Rat.cast_zeroₓ'. -/
 @[simp, norm_cast]
 theorem cast_zero : ((0 : ℚ) : α) = 0 :=
@@ -83,7 +83,7 @@ theorem cast_zero : ((0 : ℚ) : α) = 0 :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))) (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α], Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))) (OfNat.ofNat.{u1} α 1 (One.toOfNat1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))
 Case conversion may be inaccurate. Consider using '#align rat.cast_one Rat.cast_oneₓ'. -/
 @[simp, norm_cast]
 theorem cast_one : ((1 : ℚ) : α) = 1 :=
@@ -94,7 +94,7 @@ theorem cast_one : ((1 : ℚ) : α) = 1 :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat) (a : α), Commute.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r) a
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat) (a : α), Commute.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r) a
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat) (a : α), Commute.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r) a
 Case conversion may be inaccurate. Consider using '#align rat.cast_commute Rat.cast_commuteₓ'. -/
 theorem cast_commute (r : ℚ) (a : α) : Commute (↑r) a := by
   simpa only [cast_def] using (r.1.cast_commute a).divLeft (r.2.cast_commute a)
@@ -104,7 +104,7 @@ theorem cast_commute (r : ℚ) (a : α) : Commute (↑r) a := by
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat) (a : α), Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r) a) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) a ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat) (a : α), Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r) a) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) a (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat) (a : α), Eq.{succ u1} α (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r) a) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) a (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r))
 Case conversion may be inaccurate. Consider using '#align rat.cast_comm Rat.cast_commₓ'. -/
 theorem cast_comm (r : ℚ) (a : α) : (r : α) * a = a * r :=
   (cast_commute r a).Eq
@@ -114,7 +114,7 @@ theorem cast_comm (r : ℚ) (a : α) : (r : α) * a = a * r :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : α) (r : Rat), Commute.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) a ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : α) (r : Rat), Commute.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) a (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : α) (r : Rat), Commute.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) a (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r)
 Case conversion may be inaccurate. Consider using '#align rat.commute_cast Rat.commute_castₓ'. -/
 theorem commute_cast (a : α) (r : ℚ) : Commute a r :=
   (r.cast_commute a).symm
@@ -124,7 +124,7 @@ theorem commute_cast (a : α) (r : ℚ) : Commute a r :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : Int) (b : Int), (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Rat.mk a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : Int) (b : Int), (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Rat.divInt a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) a) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (a : Int) (b : Int), (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Rat.divInt a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) a) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_mk_of_ne_zero Rat.cast_mk_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b :=
@@ -152,7 +152,7 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_add_of_ne_zero Rat.cast_add_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_add_of_ne_zero :
@@ -177,7 +177,7 @@ theorem cast_add_of_ne_zero :
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Neg.neg.{0} Rat Rat.hasNeg n)) (Neg.neg.{u1} α (SubNegMonoid.toHasNeg.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Rat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Neg.neg.{0} Rat Rat.instNegRat n)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Neg.neg.{0} Rat Rat.instNegRat n)) (Neg.neg.{u1} α (Ring.toNeg.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_neg Rat.cast_negₓ'. -/
 @[simp, norm_cast]
 theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
@@ -191,7 +191,7 @@ theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_sub_of_ne_zero Rat.cast_sub_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den : α) ≠ 0) :
@@ -205,7 +205,7 @@ theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den :
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.hasMul) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.instMulRat) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.instMulRat) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_mul_of_ne_zero Rat.cast_mul_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_mul_of_ne_zero :
@@ -229,7 +229,7 @@ theorem cast_mul_of_ne_zero :
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n))) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n))) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n))) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_inv_nat Rat.cast_inv_natₓ'. -/
 @[simp]
 theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
@@ -243,7 +243,7 @@ theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) n))) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat (Int.cast.{0} Rat Rat.instIntCastRat n))) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (n : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat (Int.cast.{0} Rat Rat.instIntCastRat n))) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_inv_int Rat.cast_inv_intₓ'. -/
 @[simp]
 theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
@@ -257,7 +257,7 @@ theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv n)) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat n)) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {n : Rat}, (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat n)) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = n⁻¹
@@ -274,7 +274,7 @@ theorem cast_inv_of_ne_zero : ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α)
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat α (HasLiftT.mk.{1, succ u1} Nat α (CoeTCₓ.coe.{1, succ u1} Nat α (Nat.castCoe.{u1} α (AddMonoidWithOne.toNatCast.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) -> (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.hasDiv) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.instDivRat) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] {m : Rat} {n : Rat}, (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den m)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) (Rat.num n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Ne.{succ u1} α (Nat.cast.{u1} α (NonAssocRing.toNatCast.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.den n)) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) -> (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.instDivRat) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zeroₓ'. -/
 @[norm_cast]
 theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num : α) ≠ 0)
@@ -294,7 +294,7 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {m : Rat} {n : Rat}, Iff (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n)) (Eq.{1} Rat m n)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {m : Rat} {n : Rat}, Iff (Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)) (Eq.{1} Rat m n)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {m : Rat} {n : Rat}, Iff (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n)) (Eq.{1} Rat m n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_inj Rat.cast_injₓ'. -/
 @[simp, norm_cast]
 theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
@@ -317,7 +317,7 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Function.Injective.{1, succ u1} Rat α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Function.Injective.{1, succ u1} Rat α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Function.Injective.{1, succ u1} Rat α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
 Case conversion may be inaccurate. Consider using '#align rat.cast_injective Rat.cast_injectiveₓ'. -/
 theorem cast_injective [CharZero α] : Function.Injective (coe : ℚ → α)
   | m, n => cast_inj.1
@@ -327,7 +327,7 @@ theorem cast_injective [CharZero α] : Function.Injective (coe : ℚ → α)
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {n : Rat}, Iff (Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) (Eq.{1} Rat n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {n : Rat}, Iff (Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Eq.{1} Rat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {n : Rat}, Iff (Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Eq.{1} Rat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_eq_zero Rat.cast_eq_zeroₓ'. -/
 @[simp]
 theorem cast_eq_zero [CharZero α] {n : ℚ} : (n : α) = 0 ↔ n = 0 := by rw [← cast_zero, cast_inj]
@@ -337,7 +337,7 @@ theorem cast_eq_zero [CharZero α] {n : ℚ} : (n : α) = 0 ↔ n = 0 := by rw [
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] {n : Rat}, Iff (Ne.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n) (OfNat.ofNat.{u1} α 0 (OfNat.mk.{u1} α 0 (Zero.zero.{u1} α (MulZeroClass.toHasZero.{u1} α (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))))))) (Ne.{1} Rat n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {n : Rat}, Iff (Ne.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Ne.{1} Rat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] {n : Rat}, Iff (Ne.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n) (OfNat.ofNat.{u1} α 0 (Zero.toOfNat0.{u1} α (MonoidWithZero.toZero.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1))))))) (Ne.{1} Rat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_ne_zero Rat.cast_ne_zeroₓ'. -/
 theorem cast_ne_zero [CharZero α] {n : ℚ} : (n : α) ≠ 0 ↔ n ≠ 0 :=
   not_congr cast_eq_zero
@@ -347,7 +347,7 @@ theorem cast_ne_zero [CharZero α] {n : ℚ} : (n : α) ≠ 0 ↔ n ≠ 0 :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.hasAdd) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HAdd.hAdd.{0, 0, 0} Rat Rat Rat (instHAdd.{0} Rat Rat.instAddRat) m n)) (HAdd.hAdd.{u1, u1, u1} α α α (instHAdd.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_add Rat.cast_addₓ'. -/
 @[simp, norm_cast]
 theorem cast_add [CharZero α] (m n) : ((m + n : ℚ) : α) = m + n :=
@@ -358,7 +358,7 @@ theorem cast_add [CharZero α] (m n) : ((m + n : ℚ) : α) = m + n :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat (SubNegMonoid.toHasSub.{0} Rat (AddGroup.toSubNegMonoid.{0} Rat Rat.addGroup))) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (SubNegMonoid.toHasSub.{u1} α (AddGroup.toSubNegMonoid.{u1} α (AddGroupWithOne.toAddGroup.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HSub.hSub.{0, 0, 0} Rat Rat Rat (instHSub.{0} Rat Rat.instSubRat) m n)) (HSub.hSub.{u1, u1, u1} α α α (instHSub.{u1} α (Ring.toSub.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_sub Rat.cast_subₓ'. -/
 @[simp, norm_cast]
 theorem cast_sub [CharZero α] (m n) : ((m - n : ℚ) : α) = m - n :=
@@ -369,7 +369,7 @@ theorem cast_sub [CharZero α] (m n) : ((m - n : ℚ) : α) = m - n :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.hasMul) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (Distrib.toHasMul.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.instMulRat) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HMul.hMul.{0, 0, 0} Rat Rat Rat (instHMul.{0} Rat Rat.instMulRat) m n)) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (NonUnitalNonAssocRing.toMul.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_mul Rat.cast_mulₓ'. -/
 @[simp, norm_cast]
 theorem cast_mul [CharZero α] (m n) : ((m * n : ℚ) : α) = m * n :=
@@ -380,7 +380,7 @@ theorem cast_mul [CharZero α] (m n) : ((m * n : ℚ) : α) = m * n :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (bit0.{0} Rat Rat.hasAdd n)) (bit0.{u1} α (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (bit0.{0} Rat Rat.instAddRat n)) (bit0.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (bit0.{0} Rat Rat.instAddRat n)) (bit0.{u1} α (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_bit0 Rat.cast_bit0ₓ'. -/
 @[simp, norm_cast]
 theorem cast_bit0 [CharZero α] (n : ℚ) : ((bit0 n : ℚ) : α) = bit0 n :=
@@ -391,7 +391,7 @@ theorem cast_bit0 [CharZero α] (n : ℚ) : ((bit0 n : ℚ) : α) = bit0 n :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (bit1.{0} Rat Rat.hasOne Rat.hasAdd n)) (bit1.{u1} α (AddMonoidWithOne.toOne.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (Distrib.toHasAdd.{u1} α (Ring.toDistrib.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (bit1.{0} Rat (NonAssocRing.toOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) Rat.instAddRat n)) (bit1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (bit1.{0} Rat (NonAssocRing.toOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) Rat.instAddRat n)) (bit1.{u1} α (NonAssocRing.toOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (Distrib.toAdd.{u1} α (NonUnitalNonAssocSemiring.toDistrib.{u1} α (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonUnitalNonAssocRing.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_bit1 Rat.cast_bit1ₓ'. -/
 @[simp, norm_cast]
 theorem cast_bit1 [CharZero α] (n : ℚ) : ((bit1 n : ℚ) : α) = bit1 n := by
@@ -417,7 +417,7 @@ variable {α}
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Eq.{succ u1} (Rat -> α) (coeFn.{succ u1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (fun (_x : RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) => Rat -> α) (RingHom.hasCoeToFun.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (Rat.castHom.{u1} α _inst_1 _inst_2)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Eq.{succ u1} (forall (ᾰ : Rat), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => α) ᾰ) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => α) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (RingHom.instRingHomClassRingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.castHom.{u1} α _inst_1 _inst_2)) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Eq.{succ u1} (forall (ᾰ : Rat), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => α) ᾰ) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => α) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (RingHom.instRingHomClassRingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.castHom.{u1} α _inst_1 _inst_2)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
 Case conversion may be inaccurate. Consider using '#align rat.coe_cast_hom Rat.coe_cast_homₓ'. -/
 @[simp]
 theorem coe_cast_hom : ⇑(castHom α) = coe :=
@@ -428,7 +428,7 @@ theorem coe_cast_hom : ⇑(castHom α) = coe :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Inv.inv.{0} Rat Rat.hasInv n)) (Inv.inv.{u1} α (DivInvMonoid.toHasInv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat n)) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Inv.inv.{0} Rat Rat.instInvRat n)) (Inv.inv.{u1} α (DivisionRing.toInv.{u1} α _inst_1) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_inv Rat.cast_invₓ'. -/
 @[simp, norm_cast]
 theorem cast_inv (n) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
@@ -439,7 +439,7 @@ theorem cast_inv (n) : ((n⁻¹ : ℚ) : α) = n⁻¹ :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (m : Rat) (n : Rat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.hasDiv) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) n))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.instDivRat) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (m : Rat) (n : Rat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HDiv.hDiv.{0, 0, 0} Rat Rat Rat (instHDiv.{0} Rat Rat.instDivRat) m n)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) m) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) n))
 Case conversion may be inaccurate. Consider using '#align rat.cast_div Rat.cast_divₓ'. -/
 @[simp, norm_cast]
 theorem cast_div (m n) : ((m / n : ℚ) : α) = m / n :=
@@ -450,7 +450,7 @@ theorem cast_div (m n) : ((m / n : ℚ) : α) = m / n :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (q : Rat) (n : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) q n)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) q) n)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (q : Rat) (n : Int), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) q n)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) q) n)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (q : Rat) (n : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HPow.hPow.{0, 0, 0} Rat Int Rat (instHPow.{0, 0} Rat Int (DivInvMonoid.Pow.{0} Rat (DivisionRing.toDivInvMonoid.{0} Rat Rat.divisionRing))) q n)) (HPow.hPow.{u1, 0, u1} α Int α (instHPow.{u1, 0} α Int (DivInvMonoid.Pow.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) q) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_zpow Rat.cast_zpowₓ'. -/
 @[simp, norm_cast]
 theorem cast_zpow (q : ℚ) (n : ℤ) : ((q ^ n : ℚ) : α) = q ^ n :=
@@ -461,7 +461,7 @@ theorem cast_zpow (q : ℚ) (n : ℤ) : ((q ^ n : ℚ) : α) = q ^ n :=
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (a : Int) (b : Int), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (Rat.mk a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivInvMonoid.toHasDiv.{u1} α (DivisionRing.toDivInvMonoid.{u1} α _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Int α (HasLiftT.mk.{1, succ u1} Int α (CoeTCₓ.coe.{1, succ u1} Int α (Int.castCoe.{u1} α (AddGroupWithOne.toHasIntCast.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) b))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (a : Int) (b : Int), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Rat.divInt a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) a) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (a : Int) (b : Int), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (Rat.divInt a b)) (HDiv.hDiv.{u1, u1, u1} α α α (instHDiv.{u1} α (DivisionRing.toDiv.{u1} α _inst_1)) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) a) (Int.cast.{u1} α (Ring.toIntCast.{u1} α (DivisionRing.toRing.{u1} α _inst_1)) b))
 Case conversion may be inaccurate. Consider using '#align rat.cast_mk Rat.cast_mkₓ'. -/
 @[norm_cast]
 theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b := by simp only [mk_eq_div, cast_div, cast_coe_int]
@@ -471,7 +471,7 @@ theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b := by simp only [mk_eq_div,
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))] (q : Rat) (k : Nat), Eq.{succ u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) (HPow.hPow.{0, 0, 0} Rat Nat Rat (instHPow.{0, 0} Rat Nat (Monoid.Pow.{0} Rat Rat.monoid)) q k)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (Ring.toMonoid.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) q) k)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (q : Rat) (k : Nat), Eq.{succ u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HPow.hPow.{0, 0, 0} Rat Nat Rat (instHPow.{0, 0} Rat Nat (Monoid.Pow.{0} Rat Rat.monoid)) q k)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))))) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) q) k)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))] (q : Rat) (k : Nat), Eq.{succ u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) (HPow.hPow.{0, 0, 0} Rat Nat Rat (instHPow.{0, 0} Rat Nat (Monoid.Pow.{0} Rat Rat.monoid)) q k)) (HPow.hPow.{u1, 0, u1} α Nat α (instHPow.{u1, 0} α Nat (Monoid.Pow.{u1} α (MonoidWithZero.toMonoid.{u1} α (Semiring.toMonoidWithZero.{u1} α (DivisionSemiring.toSemiring.{u1} α (DivisionRing.toDivisionSemiring.{u1} α _inst_1)))))) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) q) k)
 Case conversion may be inaccurate. Consider using '#align rat.cast_pow Rat.cast_powₓ'. -/
 @[simp, norm_cast]
 theorem cast_pow (q) (k : ℕ) : ((q ^ k : ℚ) : α) = q ^ k :=
@@ -488,7 +488,7 @@ variable {K : Type _} [LinearOrderedField K]
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {r : Rat}, (LT.lt.{0} Rat Rat.hasLt (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) r) -> (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) r))
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {r : Rat}, (LT.lt.{0} Rat Rat.instLTRat_1 (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) r) -> (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) r))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {r : Rat}, (LT.lt.{0} Rat Rat.instLTRat_1 (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) r) -> (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) r))
 Case conversion may be inaccurate. Consider using '#align rat.cast_pos_of_pos Rat.cast_pos_of_posₓ'. -/
 theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r :=
   by
@@ -500,7 +500,7 @@ theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], StrictMono.{0, u1} Rat K Rat.preorder (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))))
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], StrictMono.{0, u1} Rat K Rat.instPreorderRat (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], StrictMono.{0, u1} Rat K Rat.instPreorderRat (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1))
 Case conversion may be inaccurate. Consider using '#align rat.cast_strict_mono Rat.cast_strictMonoₓ'. -/
 @[mono]
 theorem cast_strictMono : StrictMono (coe : ℚ → K) := fun m n => by
@@ -511,7 +511,7 @@ theorem cast_strictMono : StrictMono (coe : ℚ → K) := fun m n => by
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], Monotone.{0, u1} Rat K Rat.preorder (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))))
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], Monotone.{0, u1} Rat K Rat.instPreorderRat (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K], Monotone.{0, u1} Rat K Rat.instPreorderRat (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1))
 Case conversion may be inaccurate. Consider using '#align rat.cast_mono Rat.cast_monoₓ'. -/
 @[mono]
 theorem cast_mono : Monotone (coe : ℚ → K) :=
@@ -534,7 +534,7 @@ def castOrderEmbedding : ℚ ↪o K :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LE.le.{0} Rat Rat.hasLe m n)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) m) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LE.le.{0} Rat Rat.instLERat m n)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) m) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LE.le.{0} Rat Rat.instLERat m n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_le Rat.cast_leₓ'. -/
 @[simp, norm_cast]
 theorem cast_le {m n : ℚ} : (m : K) ≤ n ↔ m ≤ n :=
@@ -545,7 +545,7 @@ theorem cast_le {m n : ℚ} : (m : K) ≤ n ↔ m ≤ n :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) m) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LT.lt.{0} Rat Rat.hasLt m n)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) m) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LT.lt.{0} Rat Rat.instLTRat_1 m n)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {m : Rat} {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) m) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LT.lt.{0} Rat Rat.instLTRat_1 m n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_lt Rat.cast_ltₓ'. -/
 @[simp, norm_cast]
 theorem cast_lt {m n : ℚ} : (m : K) < n ↔ m < n :=
@@ -556,7 +556,7 @@ theorem cast_lt {m n : ℚ} : (m : K) < n ↔ m < n :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LE.le.{0} Rat Rat.hasLe (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) n)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LE.le.{0} Rat Rat.instLERat (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) n)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LE.le.{0} Rat Rat.instLERat (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_nonneg Rat.cast_nonnegₓ'. -/
 @[simp]
 theorem cast_nonneg {n : ℚ} : 0 ≤ (n : K) ↔ 0 ≤ n := by norm_cast
@@ -566,7 +566,7 @@ theorem cast_nonneg {n : ℚ} : 0 ≤ (n : K) ↔ 0 ≤ n := by norm_cast
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))))))) (LE.le.{0} Rat Rat.hasLe n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1)))))))) (LE.le.{0} Rat Rat.instLERat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LE.le.{u1} K (Preorder.toLE.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1)))))))) (LE.le.{0} Rat Rat.instLERat n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_nonpos Rat.cast_nonposₓ'. -/
 @[simp]
 theorem cast_nonpos {n : ℚ} : (n : K) ≤ 0 ↔ n ≤ 0 := by norm_cast
@@ -576,7 +576,7 @@ theorem cast_nonpos {n : ℚ} : (n : K) ≤ 0 ↔ n ≤ 0 := by norm_cast
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n)) (LT.lt.{0} Rat Rat.hasLt (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))) n)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LT.lt.{0} Rat Rat.instLTRat_1 (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) n)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n)) (LT.lt.{0} Rat Rat.instLTRat_1 (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)) n)
 Case conversion may be inaccurate. Consider using '#align rat.cast_pos Rat.cast_posₓ'. -/
 @[simp]
 theorem cast_pos {n : ℚ} : (0 : K) < n ↔ 0 < n := by norm_cast
@@ -586,7 +586,7 @@ theorem cast_pos {n : ℚ} : (0 : K) < n ↔ 0 < n := by norm_cast
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) n) (OfNat.ofNat.{u1} K 0 (OfNat.mk.{u1} K 0 (Zero.zero.{u1} K (MulZeroClass.toHasZero.{u1} K (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} K (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} K (NonAssocRing.toNonUnitalNonAssocRing.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))))))) (LT.lt.{0} Rat Rat.hasLt n (OfNat.ofNat.{0} Rat 0 (OfNat.mk.{0} Rat 0 (Zero.zero.{0} Rat Rat.hasZero))))
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1)))))))) (LT.lt.{0} Rat Rat.instLTRat_1 n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {n : Rat}, Iff (LT.lt.{u1} K (Preorder.toLT.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) n) (OfNat.ofNat.{u1} K 0 (Zero.toOfNat0.{u1} K (CommMonoidWithZero.toZero.{u1} K (CommGroupWithZero.toCommMonoidWithZero.{u1} K (Semifield.toCommGroupWithZero.{u1} K (LinearOrderedSemifield.toSemifield.{u1} K (LinearOrderedField.toLinearOrderedSemifield.{u1} K _inst_1)))))))) (LT.lt.{0} Rat Rat.instLTRat_1 n (OfNat.ofNat.{0} Rat 0 (Rat.instOfNatRat 0)))
 Case conversion may be inaccurate. Consider using '#align rat.cast_lt_zero Rat.cast_lt_zeroₓ'. -/
 @[simp]
 theorem cast_lt_zero {n : ℚ} : (n : K) < 0 ↔ n < 0 := by norm_cast
@@ -596,7 +596,7 @@ theorem cast_lt_zero {n : ℚ} : (n : K) < 0 ↔ n < 0 := by norm_cast
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {a : Rat} {b : Rat}, Eq.{succ u1} K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) (LinearOrder.min.{0} Rat Rat.linearOrder a b)) (LinearOrder.min.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {a : Rat} {b : Rat}, Eq.{succ u1} K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Min.min.{0} Rat (LinearOrderedRing.toMin.{0} Rat Rat.instLinearOrderedRingRat) a b)) (Min.min.{u1} K (LinearOrderedRing.toMin.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {a : Rat} {b : Rat}, Eq.{succ u1} K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Min.min.{0} Rat (LinearOrderedRing.toMin.{0} Rat Rat.instLinearOrderedRingRat) a b)) (Min.min.{u1} K (LinearOrderedRing.toMin.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))
 Case conversion may be inaccurate. Consider using '#align rat.cast_min Rat.cast_minₓ'. -/
 @[simp, norm_cast]
 theorem cast_min {a b : ℚ} : (↑(min a b) : K) = min a b :=
@@ -607,7 +607,7 @@ theorem cast_min {a b : ℚ} : (↑(min a b) : K) = min a b :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {a : Rat} {b : Rat}, Eq.{succ u1} K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) (LinearOrder.max.{0} Rat Rat.linearOrder a b)) (LinearOrder.max.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {a : Rat} {b : Rat}, Eq.{succ u1} K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Max.max.{0} Rat (LinearOrderedRing.toMax.{0} Rat Rat.instLinearOrderedRingRat) a b)) (Max.max.{u1} K (LinearOrderedRing.toMax.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {a : Rat} {b : Rat}, Eq.{succ u1} K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Max.max.{0} Rat (LinearOrderedRing.toMax.{0} Rat Rat.instLinearOrderedRingRat) a b)) (Max.max.{u1} K (LinearOrderedRing.toMax.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))
 Case conversion may be inaccurate. Consider using '#align rat.cast_max Rat.cast_maxₓ'. -/
 @[simp, norm_cast]
 theorem cast_max {a b : ℚ} : (↑(max a b) : K) = max a b :=
@@ -618,7 +618,7 @@ theorem cast_max {a b : ℚ} : (↑(max a b) : K) = max a b :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.hasNeg Rat.hasSup) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (SubNegMonoid.toHasNeg.{u1} K (AddGroup.toSubNegMonoid.{u1} K (AddGroupWithOne.toAddGroup.{u1} K (NonAssocRing.toAddGroupWithOne.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))) (SemilatticeSup.toHasSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (LinearOrder.toLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) q))
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.instNegRat Rat.instSupRat) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (Ring.toNeg.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (SemilatticeSup.toSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (DistribLattice.toLattice.{u1} K (instDistribLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) q))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.instNegRat Rat.instSupRat) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (Ring.toNeg.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (SemilatticeSup.toSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (DistribLattice.toLattice.{u1} K (instDistribLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) q))
 Case conversion may be inaccurate. Consider using '#align rat.cast_abs Rat.cast_absₓ'. -/
 @[simp, norm_cast]
 theorem cast_abs {q : ℚ} : ((|q| : ℚ) : K) = |q| := by simp [abs_eq_max_neg]
@@ -630,7 +630,7 @@ open Set
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Icc.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))) (Set.Icc.{0} Rat Rat.preorder a b)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Icc.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Icc.{0} Rat Rat.instPreorderRat a b)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Icc.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Icc.{0} Rat Rat.instPreorderRat a b)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Icc Rat.preimage_cast_Iccₓ'. -/
 @[simp]
 theorem preimage_cast_Icc (a b : ℚ) : coe ⁻¹' Icc (a : K) b = Icc a b :=
@@ -643,7 +643,7 @@ theorem preimage_cast_Icc (a b : ℚ) : coe ⁻¹' Icc (a : K) b = Icc a b :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Ico.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))) (Set.Ico.{0} Rat Rat.preorder a b)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ico.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ico.{0} Rat Rat.instPreorderRat a b)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ico.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ico.{0} Rat Rat.instPreorderRat a b)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ico Rat.preimage_cast_Icoₓ'. -/
 @[simp]
 theorem preimage_cast_Ico (a b : ℚ) : coe ⁻¹' Ico (a : K) b = Ico a b :=
@@ -656,7 +656,7 @@ theorem preimage_cast_Ico (a b : ℚ) : coe ⁻¹' Ico (a : K) b = Ico a b :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Ioc.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))) (Set.Ioc.{0} Rat Rat.preorder a b)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioc.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ioc.{0} Rat Rat.instPreorderRat a b)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioc.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ioc.{0} Rat Rat.instPreorderRat a b)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ioc Rat.preimage_cast_Iocₓ'. -/
 @[simp]
 theorem preimage_cast_Ioc (a b : ℚ) : coe ⁻¹' Ioc (a : K) b = Ioc a b :=
@@ -669,7 +669,7 @@ theorem preimage_cast_Ioc (a b : ℚ) : coe ⁻¹' Ioc (a : K) b = Ioc a b :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Ioo.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) b))) (Set.Ioo.{0} Rat Rat.preorder a b)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioo.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ioo.{0} Rat Rat.instPreorderRat a b)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat) (b : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioo.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) b))) (Set.Ioo.{0} Rat Rat.instPreorderRat a b)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ioo Rat.preimage_cast_Iooₓ'. -/
 @[simp]
 theorem preimage_cast_Ioo (a b : ℚ) : coe ⁻¹' Ioo (a : K) b = Ioo a b :=
@@ -682,7 +682,7 @@ theorem preimage_cast_Ioo (a b : ℚ) : coe ⁻¹' Ioo (a : K) b = Ioo a b :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Ici.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a))) (Set.Ici.{0} Rat Rat.preorder a)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ici.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Ici.{0} Rat Rat.instPreorderRat a)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ici.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Ici.{0} Rat Rat.instPreorderRat a)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ici Rat.preimage_cast_Iciₓ'. -/
 @[simp]
 theorem preimage_cast_Ici (a : ℚ) : coe ⁻¹' Ici (a : K) = Ici a :=
@@ -695,7 +695,7 @@ theorem preimage_cast_Ici (a : ℚ) : coe ⁻¹' Ici (a : K) = Ici a :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Iic.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a))) (Set.Iic.{0} Rat Rat.preorder a)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Iic.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Iic.{0} Rat Rat.instPreorderRat a)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Iic.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Iic.{0} Rat Rat.instPreorderRat a)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Iic Rat.preimage_cast_Iicₓ'. -/
 @[simp]
 theorem preimage_cast_Iic (a : ℚ) : coe ⁻¹' Iic (a : K) = Iic a :=
@@ -708,7 +708,7 @@ theorem preimage_cast_Iic (a : ℚ) : coe ⁻¹' Iic (a : K) = Iic a :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Ioi.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a))) (Set.Ioi.{0} Rat Rat.preorder a)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioi.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Ioi.{0} Rat Rat.instPreorderRat a)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Ioi.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Ioi.{0} Rat Rat.instPreorderRat a)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Ioi Rat.preimage_cast_Ioiₓ'. -/
 @[simp]
 theorem preimage_cast_Ioi (a : ℚ) : coe ⁻¹' Ioi (a : K) = Ioi a :=
@@ -721,7 +721,7 @@ theorem preimage_cast_Ioi (a : ℚ) : coe ⁻¹' Ioi (a : K) = Ioi a :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1))))))) (Set.Iio.{u1} K (PartialOrder.toPreorder.{u1} K (OrderedAddCommGroup.toPartialOrder.{u1} K (StrictOrderedRing.toOrderedAddCommGroup.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) a))) (Set.Iio.{0} Rat Rat.preorder a)
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Iio.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Iio.{0} Rat Rat.instPreorderRat a)
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] (a : Rat), Eq.{1} (Set.{0} Rat) (Set.preimage.{0, u1} Rat K (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1)) (Set.Iio.{u1} K (PartialOrder.toPreorder.{u1} K (StrictOrderedRing.toPartialOrder.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (Rat.cast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) a))) (Set.Iio.{0} Rat Rat.instPreorderRat a)
 Case conversion may be inaccurate. Consider using '#align rat.preimage_cast_Iio Rat.preimage_cast_Iioₓ'. -/
 @[simp]
 theorem preimage_cast_Iio (a : ℚ) : coe ⁻¹' Iio (a : K) = Iio a :=
@@ -736,7 +736,7 @@ end LinearOrderedField
 lean 3 declaration is
   forall (n : Rat), Eq.{1} Rat ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Rat Rat (HasLiftT.mk.{1, 1} Rat Rat (CoeTCₓ.coe.{1, 1} Rat Rat (Rat.castCoe.{0} Rat (DivisionRing.toHasRatCast.{0} Rat Rat.divisionRing)))) n) n
 but is expected to have type
-  forall (n : Rat), Eq.{1} Rat (RatCast.ratCast.{0} Rat (LinearOrderedField.toRatCast.{0} Rat Rat.instLinearOrderedFieldRat) n) n
+  forall (n : Rat), Eq.{1} Rat (Rat.cast.{0} Rat instRatCastRat n) n
 Case conversion may be inaccurate. Consider using '#align rat.cast_id Rat.cast_idₓ'. -/
 @[norm_cast]
 theorem cast_id (n : ℚ) : (↑n : ℚ) = n := by rw [cast_def, num_div_denom]
@@ -772,7 +772,7 @@ open Rat
 lean 3 declaration is
   forall {F : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : DivisionRing.{u2} α] [_inst_2 : DivisionRing.{u3} β] [_inst_3 : RingHomClass.{u1, u2, u3} F α β (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u3} β (coeFn.{succ u1, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u1, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u1, u2, u3} F α β (Distrib.toHasMul.{u2} α (NonUnitalNonAssocSemiring.toDistrib.{u2} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} α (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1)))))) (Distrib.toHasMul.{u3} β (NonUnitalNonAssocSemiring.toDistrib.{u3} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} β (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u2, u3} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} α (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} β (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u2, u3} F α β (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2))) _inst_3)))) f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u2} Rat α (CoeTCₓ.coe.{1, succ u2} Rat α (Rat.castCoe.{u2} α (DivisionRing.toHasRatCast.{u2} α _inst_1)))) q)) ((fun (a : Type) (b : Type.{u3}) [self : HasLiftT.{1, succ u3} a b] => self.0) Rat β (HasLiftT.mk.{1, succ u3} Rat β (CoeTCₓ.coe.{1, succ u3} Rat β (Rat.castCoe.{u3} β (DivisionRing.toHasRatCast.{u3} β _inst_2)))) q)
 but is expected to have type
-  forall {F : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : DivisionRing.{u3} α] [_inst_2 : DivisionRing.{u2} β] [_inst_3 : RingHomClass.{u1, u3, u2} F α β (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (NonUnitalNonAssocSemiring.toMul.{u3} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u3, u2} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u3, u2} F α β (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2))) _inst_3))) f (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (RatCast.ratCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) _inst_2) q)
+  forall {F : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : DivisionRing.{u3} α] [_inst_2 : DivisionRing.{u2} β] [_inst_3 : RingHomClass.{u1, u3, u2} F α β (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (NonUnitalNonAssocSemiring.toMul.{u3} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u3, u2} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u3, u2} F α β (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2))) _inst_3))) f (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : α) => β) (Rat.cast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) _inst_2) q)
 Case conversion may be inaccurate. Consider using '#align map_rat_cast map_ratCastₓ'. -/
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
@@ -783,7 +783,7 @@ theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (
 lean 3 declaration is
   forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} k (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> k) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => k) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (Distrib.toHasMul.{0} Rat (NonUnitalNonAssocSemiring.toDistrib.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (Distrib.toHasMul.{u2} k (NonUnitalNonAssocSemiring.toDistrib.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))) _inst_2)))) f r) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Rat k (HasLiftT.mk.{1, succ u2} Rat k (CoeTCₓ.coe.{1, succ u2} Rat k (Rat.castCoe.{u2} k (DivisionRing.toHasRatCast.{u2} k _inst_1)))) r)
 but is expected to have type
-  forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => k) r) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => k) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))) _inst_2))) f r) (RatCast.ratCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => k) r) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => k) r) _inst_1) r)
+  forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))) _inst_2))) f r) (Rat.cast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => k) r) _inst_1) r)
 Case conversion may be inaccurate. Consider using '#align eq_rat_cast eq_ratCastₓ'. -/
 @[simp]
 theorem eq_ratCast {k} [DivisionRing k] [RingHomClass F ℚ k] (f : F) (r : ℚ) : f r = r := by
@@ -800,7 +800,7 @@ include M₀
 lean 3 declaration is
   forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m))) -> (Eq.{succ u1} F f g)
 but is expected to have type
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Int.cast.{0} Rat Rat.instIntCastRat m))) -> (Eq.{succ u1} F f g)
+  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Int.cast.{0} Rat Rat.instIntCastRat m))) -> (Eq.{succ u1} F f g)
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'ₓ'. -/
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
@@ -828,7 +828,7 @@ theorem ext_rat {f g : ℚ →*₀ M₀}
 lean 3 declaration is
   forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))))) -> (forall (n : Nat), (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) n) -> (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)))) -> (Eq.{succ u1} F f g)
 but is expected to have type
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))))) -> (forall (n : Nat), (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)))) -> (Eq.{succ u1} F f g)
+  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))))) -> (forall (n : Nat), (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)))) -> (Eq.{succ u1} F f g)
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat_on_pnat MonoidWithZeroHom.ext_rat_on_pnatₓ'. -/
 /-- Positive integer values of a morphism `φ` and its value on `-1` completely determine `φ`. -/
 theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
@@ -875,7 +875,7 @@ variable [DivisionRing α]
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat), Eq.{succ u1} (MulOpposite.{u1} α) (MulOpposite.op.{u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat (MulOpposite.{u1} α) (HasLiftT.mk.{1, succ u1} Rat (MulOpposite.{u1} α) (CoeTCₓ.coe.{1, succ u1} Rat (MulOpposite.{u1} α) (Rat.castCoe.{u1} (MulOpposite.{u1} α) (DivisionRing.toHasRatCast.{u1} (MulOpposite.{u1} α) (MulOpposite.divisionRing.{u1} α _inst_1))))) r)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat), Eq.{succ u1} (MulOpposite.{u1} α) (MulOpposite.op.{u1} α (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r)) (RatCast.ratCast.{u1} (MulOpposite.{u1} α) (DivisionRing.toRatCast.{u1} (MulOpposite.{u1} α) (MulOpposite.instDivisionRingMulOpposite.{u1} α _inst_1)) r)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat), Eq.{succ u1} (MulOpposite.{u1} α) (MulOpposite.op.{u1} α (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r)) (Rat.cast.{u1} (MulOpposite.{u1} α) (DivisionRing.toRatCast.{u1} (MulOpposite.{u1} α) (MulOpposite.instDivisionRingMulOpposite.{u1} α _inst_1)) r)
 Case conversion may be inaccurate. Consider using '#align mul_opposite.op_rat_cast MulOpposite.op_ratCastₓ'. -/
 @[simp, norm_cast]
 theorem op_ratCast (r : ℚ) : op (r : α) = (↑r : αᵐᵒᵖ) := by
@@ -887,7 +887,7 @@ theorem op_ratCast (r : ℚ) : op (r : α) = (↑r : αᵐᵒᵖ) := by
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat), Eq.{succ u1} α (MulOpposite.unop.{u1} α ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat (MulOpposite.{u1} α) (HasLiftT.mk.{1, succ u1} Rat (MulOpposite.{u1} α) (CoeTCₓ.coe.{1, succ u1} Rat (MulOpposite.{u1} α) (Rat.castCoe.{u1} (MulOpposite.{u1} α) (DivisionRing.toHasRatCast.{u1} (MulOpposite.{u1} α) (MulOpposite.divisionRing.{u1} α _inst_1))))) r)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))) r)
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat), Eq.{succ u1} α (MulOpposite.unop.{u1} α (RatCast.ratCast.{u1} (MulOpposite.{u1} α) (DivisionRing.toRatCast.{u1} (MulOpposite.{u1} α) (MulOpposite.instDivisionRingMulOpposite.{u1} α _inst_1)) r)) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r)
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] (r : Rat), Eq.{succ u1} α (MulOpposite.unop.{u1} α (Rat.cast.{u1} (MulOpposite.{u1} α) (DivisionRing.toRatCast.{u1} (MulOpposite.{u1} α) (MulOpposite.instDivisionRingMulOpposite.{u1} α _inst_1)) r)) (Rat.cast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1) r)
 Case conversion may be inaccurate. Consider using '#align mul_opposite.unop_rat_cast MulOpposite.unop_ratCastₓ'. -/
 @[simp, norm_cast]
 theorem unop_ratCast (r : ℚ) : unop (r : αᵐᵒᵖ) = r := by
Diff
@@ -138,7 +138,7 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
     have dd := denom_dvd a b
     cases' show (d : ℤ) ∣ b by rwa [e] at dd with k ke
     have : (b : α) = (d : α) * (k : α) := by rw [ke, Int.cast_mul, Int.cast_ofNat]
-    rw [d0, zero_mul] at this
+    rw [d0, MulZeroClass.zero_mul] at this
     contradiction
   rw [num_denom'] at e
   have := congr_arg (coe : ℤ → α) ((mk_eq b0' <| ne_of_gt <| Int.coe_nat_pos.2 h).1 e)
@@ -285,7 +285,8 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
   have : (n⁻¹.den : α) = 0 → (n.num : α) = 0 := fun h =>
     by
     let ⟨k, e⟩ := this
-    have := congr_arg (coe : ℤ → α) e <;> rwa [Int.cast_mul, Int.cast_ofNat, h, zero_mul] at this
+    have := congr_arg (coe : ℤ → α) e <;>
+      rwa [Int.cast_mul, Int.cast_ofNat, h, MulZeroClass.zero_mul] at this
   rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
 
@@ -906,7 +907,7 @@ variable {K : Type _} [DivisionRing K]
 instance (priority := 100) distribSMul : DistribSMul ℚ K
     where
   smul := (· • ·)
-  smul_zero a := by rw [smul_def, mul_zero]
+  smul_zero a := by rw [smul_def, MulZeroClass.mul_zero]
   smul_add a x y := by simp only [smul_def, mul_add, cast_add]
 #align rat.distrib_smul Rat.distribSMul
 -/
Diff
@@ -416,7 +416,7 @@ variable {α}
 lean 3 declaration is
   forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (NonAssocRing.toAddGroupWithOne.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))], Eq.{succ u1} (Rat -> α) (coeFn.{succ u1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (fun (_x : RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) => Rat -> α) (RingHom.hasCoeToFun.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (Rat.castHom.{u1} α _inst_1 _inst_2)) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u1} Rat α (CoeTCₓ.coe.{1, succ u1} Rat α (Rat.castCoe.{u1} α (DivisionRing.toHasRatCast.{u1} α _inst_1)))))
 but is expected to have type
-  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Eq.{succ u1} (forall (ᾰ : Rat), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => α) ᾰ) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => α) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (RingHom.instRingHomClassRingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.castHom.{u1} α _inst_1 _inst_2)) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
+  forall {α : Type.{u1}} [_inst_1 : DivisionRing.{u1} α] [_inst_2 : CharZero.{u1} α (AddGroupWithOne.toAddMonoidWithOne.{u1} α (Ring.toAddGroupWithOne.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))], Eq.{succ u1} (forall (ᾰ : Rat), (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => α) ᾰ) (FunLike.coe.{succ u1, 1, succ u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => α) _x) (MulHomClass.toFunLike.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u1} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} α (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u1} (RingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1)))) Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))) (RingHom.instRingHomClassRingHom.{0, u1} Rat α (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u1} α (Ring.toNonAssocRing.{u1} α (DivisionRing.toRing.{u1} α _inst_1))))))) (Rat.castHom.{u1} α _inst_1 _inst_2)) (RatCast.ratCast.{u1} α (DivisionRing.toRatCast.{u1} α _inst_1))
 Case conversion may be inaccurate. Consider using '#align rat.coe_cast_hom Rat.coe_cast_homₓ'. -/
 @[simp]
 theorem coe_cast_hom : ⇑(castHom α) = coe :=
@@ -771,7 +771,7 @@ open Rat
 lean 3 declaration is
   forall {F : Type.{u1}} {α : Type.{u2}} {β : Type.{u3}} [_inst_1 : DivisionRing.{u2} α] [_inst_2 : DivisionRing.{u3} β] [_inst_3 : RingHomClass.{u1, u2, u3} F α β (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u3} β (coeFn.{succ u1, max (succ u2) (succ u3)} F (fun (_x : F) => α -> β) (FunLike.hasCoeToFun.{succ u1, succ u2, succ u3} F α (fun (_x : α) => β) (MulHomClass.toFunLike.{u1, u2, u3} F α β (Distrib.toHasMul.{u2} α (NonUnitalNonAssocSemiring.toDistrib.{u2} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} α (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1)))))) (Distrib.toHasMul.{u3} β (NonUnitalNonAssocSemiring.toDistrib.{u3} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} β (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u2, u3} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} α (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} β (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u2, u3} F α β (NonAssocRing.toNonAssocSemiring.{u2} α (Ring.toNonAssocRing.{u2} α (DivisionRing.toRing.{u2} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u3} β (Ring.toNonAssocRing.{u3} β (DivisionRing.toRing.{u3} β _inst_2))) _inst_3)))) f ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Rat α (HasLiftT.mk.{1, succ u2} Rat α (CoeTCₓ.coe.{1, succ u2} Rat α (Rat.castCoe.{u2} α (DivisionRing.toHasRatCast.{u2} α _inst_1)))) q)) ((fun (a : Type) (b : Type.{u3}) [self : HasLiftT.{1, succ u3} a b] => self.0) Rat β (HasLiftT.mk.{1, succ u3} Rat β (CoeTCₓ.coe.{1, succ u3} Rat β (Rat.castCoe.{u3} β (DivisionRing.toHasRatCast.{u3} β _inst_2)))) q)
 but is expected to have type
-  forall {F : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : DivisionRing.{u3} α] [_inst_2 : DivisionRing.{u2} β] [_inst_3 : RingHomClass.{u1, u3, u2} F α β (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (NonUnitalNonAssocSemiring.toMul.{u3} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u3, u2} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u3, u2} F α β (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2))) _inst_3))) f (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (RatCast.ratCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : α) => β) (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) _inst_2) q)
+  forall {F : Type.{u1}} {α : Type.{u3}} {β : Type.{u2}} [_inst_1 : DivisionRing.{u3} α] [_inst_2 : DivisionRing.{u2} β] [_inst_3 : RingHomClass.{u1, u3, u2} F α β (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2)))] (f : F) (q : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (FunLike.coe.{succ u1, succ u3, succ u2} F α (fun (_x : α) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) _x) (MulHomClass.toFunLike.{u1, u3, u2} F α β (NonUnitalNonAssocSemiring.toMul.{u3} α (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u2} β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u3, u2} F α β (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} α (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1)))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} β (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2)))) (RingHomClass.toNonUnitalRingHomClass.{u1, u3, u2} F α β (NonAssocRing.toNonAssocSemiring.{u3} α (Ring.toNonAssocRing.{u3} α (DivisionRing.toRing.{u3} α _inst_1))) (NonAssocRing.toNonAssocSemiring.{u2} β (Ring.toNonAssocRing.{u2} β (DivisionRing.toRing.{u2} β _inst_2))) _inst_3))) f (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (RatCast.ratCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : α) => β) (RatCast.ratCast.{u3} α (DivisionRing.toRatCast.{u3} α _inst_1) q)) _inst_2) q)
 Case conversion may be inaccurate. Consider using '#align map_rat_cast map_ratCastₓ'. -/
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
@@ -782,7 +782,7 @@ theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (
 lean 3 declaration is
   forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} k (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> k) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => k) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (Distrib.toHasMul.{0} Rat (NonUnitalNonAssocSemiring.toDistrib.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (Distrib.toHasMul.{u2} k (NonUnitalNonAssocSemiring.toDistrib.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))) _inst_2)))) f r) ((fun (a : Type) (b : Type.{u2}) [self : HasLiftT.{1, succ u2} a b] => self.0) Rat k (HasLiftT.mk.{1, succ u2} Rat k (CoeTCₓ.coe.{1, succ u2} Rat k (Rat.castCoe.{u2} k (DivisionRing.toHasRatCast.{u2} k _inst_1)))) r)
 but is expected to have type
-  forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => k) r) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => k) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))) _inst_2))) f r) (RatCast.ratCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => k) r) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => k) r) _inst_1) r)
+  forall {F : Type.{u1}} {k : Type.{u2}} [_inst_1 : DivisionRing.{u2} k] [_inst_2 : RingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))] (f : F) (r : Rat), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => k) r) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => k) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat k (NonUnitalNonAssocSemiring.toMul.{0} Rat (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (NonUnitalNonAssocSemiring.toMul.{u2} k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))))) (NonUnitalRingHomClass.toMulHomClass.{u1, 0, u2} F Rat k (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} k (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1)))) (RingHomClass.toNonUnitalRingHomClass.{u1, 0, u2} F Rat k (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) (NonAssocRing.toNonAssocSemiring.{u2} k (Ring.toNonAssocRing.{u2} k (DivisionRing.toRing.{u2} k _inst_1))) _inst_2))) f r) (RatCast.ratCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => k) r) (DivisionRing.toRatCast.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => k) r) _inst_1) r)
 Case conversion may be inaccurate. Consider using '#align eq_rat_cast eq_ratCastₓ'. -/
 @[simp]
 theorem eq_ratCast {k} [DivisionRing k] [RingHomClass F ℚ k] (f : F) (r : ℚ) : f r = r := by
@@ -799,7 +799,7 @@ include M₀
 lean 3 declaration is
   forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Int Rat (HasLiftT.mk.{1, 1} Int Rat (CoeTCₓ.coe.{1, 1} Int Rat (Int.castCoe.{0} Rat Rat.hasIntCast))) m))) -> (Eq.{succ u1} F f g)
 but is expected to have type
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => M₀) (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Int.cast.{0} Rat Rat.instIntCastRat m))) -> (Eq.{succ u1} F f g)
+  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (forall (m : Int), Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Int.cast.{0} Rat Rat.instIntCastRat m)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Int.cast.{0} Rat Rat.instIntCastRat m))) -> (Eq.{succ u1} F f g)
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'ₓ'. -/
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
@@ -827,7 +827,7 @@ theorem ext_rat {f g : ℚ →*₀ M₀}
 lean 3 declaration is
   forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne))))) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g (Neg.neg.{0} Rat Rat.hasNeg (OfNat.ofNat.{0} Rat 1 (OfNat.mk.{0} Rat 1 (One.one.{0} Rat Rat.hasOne)))))) -> (forall (n : Nat), (LT.lt.{0} Nat Nat.hasLt (OfNat.ofNat.{0} Nat 0 (OfNat.mk.{0} Nat 0 (Zero.zero.{0} Nat Nat.hasZero))) n) -> (Eq.{succ u2} M₀ (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) f ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)) (coeFn.{succ u1, succ u2} F (fun (_x : F) => Rat -> M₀) (FunLike.hasCoeToFun.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => M₀) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toHasMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))) (MulOneClass.toHasMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2)))) g ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) Nat Rat (HasLiftT.mk.{1, 1} Nat Rat (CoeTCₓ.coe.{1, 1} Nat Rat (Nat.castCoe.{0} Rat (AddMonoidWithOne.toNatCast.{0} Rat (AddGroupWithOne.toAddMonoidWithOne.{0} Rat (NonAssocRing.toAddGroupWithOne.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.linearOrderedRing))))))))) n)))) -> (Eq.{succ u1} F f g)
 but is expected to have type
-  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => M₀) (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))))) -> (forall (n : Nat), (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => M₀) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2398 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)))) -> (Eq.{succ u1} F f g)
+  forall {F : Type.{u1}} {M₀ : Type.{u2}} [_inst_1 : MonoidWithZero.{u2} M₀] [_inst_2 : MonoidWithZeroHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)] {f : F} {g : F}, (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1)))) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Neg.neg.{0} Rat Rat.instNegRat (OfNat.ofNat.{0} Rat 1 (Rat.instOfNatRat 1))))) -> (forall (n : Nat), (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) n) -> (Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) f (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)) (FunLike.coe.{succ u1, 1, succ u2} F Rat (fun (_x : Rat) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2372 : Rat) => M₀) _x) (MulHomClass.toFunLike.{u1, 0, u2} F Rat M₀ (MulOneClass.toMul.{0} Rat (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))))) (MulOneClass.toMul.{u2} M₀ (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1))) (MonoidHomClass.toMulHomClass.{u1, 0, u2} F Rat M₀ (MulZeroOneClass.toMulOneClass.{0} Rat (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))))) (MulZeroOneClass.toMulOneClass.{u2} M₀ (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1)) (MonoidWithZeroHomClass.toMonoidHomClass.{u1, 0, u2} F Rat M₀ (NonAssocSemiring.toMulZeroOneClass.{0} Rat (NonAssocRing.toNonAssocSemiring.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat))))) (MonoidWithZero.toMulZeroOneClass.{u2} M₀ _inst_1) _inst_2))) g (Nat.cast.{0} Rat (NonAssocRing.toNatCast.{0} Rat (Ring.toNonAssocRing.{0} Rat (StrictOrderedRing.toRing.{0} Rat (LinearOrderedRing.toStrictOrderedRing.{0} Rat Rat.instLinearOrderedRingRat)))) n)))) -> (Eq.{succ u1} F f g)
 Case conversion may be inaccurate. Consider using '#align monoid_with_zero_hom.ext_rat_on_pnat MonoidWithZeroHom.ext_rat_on_pnatₓ'. -/
 /-- Positive integer values of a morphism `φ` and its value on `-1` completely determine `φ`. -/
 theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
Diff
@@ -617,7 +617,7 @@ theorem cast_max {a b : ℚ} : (↑(max a b) : K) = max a b :=
 lean 3 declaration is
   forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.hasNeg Rat.hasSup) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (SubNegMonoid.toHasNeg.{u1} K (AddGroup.toSubNegMonoid.{u1} K (AddGroupWithOne.toAddGroup.{u1} K (NonAssocRing.toAddGroupWithOne.{u1} K (Ring.toNonAssocRing.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))))) (SemilatticeSup.toHasSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (LinearOrder.toLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))))) ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Rat K (HasLiftT.mk.{1, succ u1} Rat K (CoeTCₓ.coe.{1, succ u1} Rat K (Rat.castCoe.{u1} K (DivisionRing.toHasRatCast.{u1} K (Field.toDivisionRing.{u1} K (LinearOrderedField.toField.{u1} K _inst_1)))))) q))
 but is expected to have type
-  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.instNegRat Rat.instHasSupRat) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (Ring.toNeg.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (SemilatticeSup.toHasSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (DistribLattice.toLattice.{u1} K (instDistribLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) q))
+  forall {K : Type.{u1}} [_inst_1 : LinearOrderedField.{u1} K] {q : Rat}, Eq.{succ u1} K (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) (Abs.abs.{0} Rat (Neg.toHasAbs.{0} Rat Rat.instNegRat Rat.instSupRat) q)) (Abs.abs.{u1} K (Neg.toHasAbs.{u1} K (Ring.toNeg.{u1} K (StrictOrderedRing.toRing.{u1} K (LinearOrderedRing.toStrictOrderedRing.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1))))) (SemilatticeSup.toSup.{u1} K (Lattice.toSemilatticeSup.{u1} K (DistribLattice.toLattice.{u1} K (instDistribLattice.{u1} K (LinearOrderedRing.toLinearOrder.{u1} K (LinearOrderedCommRing.toLinearOrderedRing.{u1} K (LinearOrderedField.toLinearOrderedCommRing.{u1} K _inst_1)))))))) (RatCast.ratCast.{u1} K (LinearOrderedField.toRatCast.{u1} K _inst_1) q))
 Case conversion may be inaccurate. Consider using '#align rat.cast_abs Rat.cast_absₓ'. -/
 @[simp, norm_cast]
 theorem cast_abs {q : ℚ} : ((|q| : ℚ) : K) = |q| := by simp [abs_eq_max_neg]

Changes in mathlib4

mathlib3
mathlib4
chore: adapt to multiple goal linter 2 (#12361)

A PR analogous to #12338: reformatting proofs following the multiple goals linter of #12339.

Diff
@@ -64,8 +64,8 @@ lemma cast_comm (q : ℚ≥0) (a : α) : q * a = a * q := cast_commute _ _
   rw [cast_def]
   dsimp
   rw [Commute.div_eq_div_iff _ hd hb]
-  norm_cast
-  rw [e]
+  · norm_cast
+    rw [e]
   exact b.commute_cast _
 
 @[norm_cast]
@@ -73,8 +73,8 @@ lemma cast_add_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
     ↑(q + r) = (q + r : α) := by
   rw [add_def, cast_divNat_of_ne_zero, cast_def, cast_def, mul_comm _ q.den,
     (Nat.commute_cast _ _).div_add_div (Nat.commute_cast _ _) hq hr]
-  push_cast
-  rfl
+  · push_cast
+    rfl
   · push_cast
     exact mul_ne_zero hq hr
 
@@ -83,8 +83,8 @@ lemma cast_mul_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
     ↑(q * r) = (q * r : α) := by
   rw [mul_def, cast_divNat_of_ne_zero, cast_def, cast_def,
     (Nat.commute_cast _ _).div_mul_div_comm (Nat.commute_cast _ _)]
-  push_cast
-  rfl
+  · push_cast
+    rfl
   · push_cast
     exact mul_ne_zero hq hr
 
@@ -97,8 +97,8 @@ lemma cast_div_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.num : α) ≠ 0) :
     ↑(q / r) = (q / r : α) := by
   rw [div_def, cast_divNat_of_ne_zero, cast_def, cast_def, div_eq_mul_inv (_ / _),
     inv_div, (Nat.commute_cast _ _).div_mul_div_comm (Nat.commute_cast _ _)]
-  push_cast
-  rfl
+  · push_cast
+    rfl
   · push_cast
     exact mul_ne_zero hq hr
 
chore: adapt to multiple goal linter 1 (#12338)

A PR accompanying #12339.

Zulip discussion

Diff
@@ -179,8 +179,8 @@ lemma cast_add_of_ne_zero {q r : ℚ} (hq : (q.den : α) ≠ 0) (hr : (r.den : 
     (q + r : ℚ) = (q + r : α) := by
   rw [add_def', cast_mkRat_of_ne_zero, cast_def, cast_def, mul_comm r.num,
     (Nat.cast_commute _ _).div_add_div (Nat.commute_cast _ _) hq hr]
-  push_cast
-  rfl
+  · push_cast
+    rfl
   · push_cast
     exact mul_ne_zero hq hr
 #align rat.cast_add_of_ne_zero Rat.cast_add_of_ne_zero
@@ -196,8 +196,8 @@ lemma cast_add_of_ne_zero {q r : ℚ} (hq : (q.den : α) ≠ 0) (hr : (r.den : 
     ↑(p * q) = (p * q : α) := by
   rw [mul_eq_mkRat, cast_mkRat_of_ne_zero, cast_def, cast_def,
     (Nat.commute_cast _ _).div_mul_div_comm (Int.commute_cast _ _)]
-  push_cast
-  rfl
+  · push_cast
+    rfl
   · push_cast
     exact mul_ne_zero hp hq
 #align rat.cast_mul_of_ne_zero Rat.cast_mul_of_ne_zero
@@ -211,8 +211,8 @@ lemma cast_inv_of_ne_zero (hq : (q.num : α) ≠ 0) : ↑(q⁻¹) = (q⁻¹ : α
     ↑(p / q) = (p / q : α) := by
   rw [div_def', cast_divInt_of_ne_zero, cast_def, cast_def, div_eq_mul_inv (_ / _), inv_div,
     (Int.commute_cast _ _).div_mul_div_comm (Nat.commute_cast _ _)]
-  push_cast
-  rfl
+  · push_cast
+    rfl
   · push_cast
     exact mul_ne_zero hp hq
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
chore(Data/Rat/Defs): Fix names of a few lemmas (#12505)

There are more wrong lemmas in Std, but it's out of my scope

Diff
@@ -172,7 +172,7 @@ lemma cast_divInt_of_ne_zero (a : ℤ) {b : ℤ} (b0 : (b : α) ≠ 0) : (a /. b
 
 @[norm_cast]
 lemma cast_mkRat_of_ne_zero (a : ℤ) {b : ℕ} (hb : (b : α) ≠ 0) : (mkRat a b : α) = a / b := by
-  rw [Rat.mkRat_eq, cast_divInt_of_ne_zero, Int.cast_natCast]; rwa [Int.cast_natCast]
+  rw [Rat.mkRat_eq_divInt, cast_divInt_of_ne_zero, Int.cast_natCast]; rwa [Int.cast_natCast]
 
 @[norm_cast]
 lemma cast_add_of_ne_zero {q r : ℚ} (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
@@ -194,7 +194,7 @@ lemma cast_add_of_ne_zero {q r : ℚ} (hq : (q.den : α) ≠ 0) (hr : (r.den : 
 
 @[norm_cast] lemma cast_mul_of_ne_zero (hp : (p.den : α) ≠ 0) (hq : (q.den : α) ≠ 0) :
     ↑(p * q) = (p * q : α) := by
-  rw [mul_def', cast_mkRat_of_ne_zero, cast_def, cast_def,
+  rw [mul_eq_mkRat, cast_mkRat_of_ne_zero, cast_def, cast_def,
     (Nat.commute_cast _ _).div_mul_div_comm (Int.commute_cast _ _)]
   push_cast
   rfl
feat: add an OfScientific instance for NNRat and NNReal (#12485)

The existing RatCast.toOfScientific instance has to be removed since it forms a non-defeq diamond (there is nothing enforcing that nnratCast and ratCast are defeq).

The norm_num extension also needs some fixes, though the old design didn't make much sense anyway, as it synthesize the instances separately, thus losing important defeqs.

Diff
@@ -39,3 +39,25 @@ theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ := by
   · simp [ofInt_eq_cast, cast_inv_nat]
   · simp only [ofInt_eq_cast, Int.cast_negSucc, ← Nat.cast_succ, cast_neg, inv_neg, cast_inv_nat]
 #align rat.cast_inv_int Rat.cast_inv_int
+
+@[simp, norm_cast]
+theorem cast_nnratCast {K} [DivisionRing K] (q : ℚ≥0) :
+    ((q : ℚ) : K) = (q : K) := by
+  rw [Rat.cast_def, NNRat.cast_def, NNRat.cast_def]
+  have hn := @num_div_eq_of_coprime q.num q.den ?hdp q.coprime_num_den
+  have hd := @den_div_eq_of_coprime q.num q.den ?hdp q.coprime_num_den
+  case hdp => simpa only [Nat.cast_pos] using q.den_pos
+  simp only [Int.cast_natCast, Nat.cast_inj] at hn hd
+  rw [hn, hd, Int.cast_natCast]
+
+/-- Casting a scientific literal via `ℚ` is the same as casting directly. -/
+@[simp, norm_cast]
+theorem cast_ofScientific {K} [DivisionRing K] (m : ℕ) (s : Bool) (e : ℕ) :
+    (OfScientific.ofScientific m s e : ℚ) = (OfScientific.ofScientific m s e : K) := by
+  rw [← NNRat.cast_ofScientific (K := K), ← NNRat.cast_ofScientific, cast_nnratCast]
+
+end Rat
+
+open OfScientific in
+theorem Nonneg.coe_ofScientific {K} [LinearOrderedField K] (m : ℕ) (s : Bool) (e : ℕ) :
+    (ofScientific m s e : {x : K // 0 ≤ x}).val = ofScientific m s e := rfl
feat: NNRat.cast (#11203)

Define the canonical coercion from the nonnegative rationals to any division semiring.

From LeanAPAP

Diff
@@ -29,6 +29,81 @@ rat, rationals, field, ℚ, numerator, denominator, num, denom, cast, coercion,
 
 variable {F ι α β : Type*}
 
+namespace NNRat
+variable [DivisionSemiring α] {q r : ℚ≥0}
+
+@[simp, norm_cast] lemma cast_natCast (n : ℕ) : ((n : ℚ≥0) : α) = n := by simp [cast_def]
+
+-- See note [no_index around OfNat.ofNat]
+@[simp, norm_cast] lemma cast_ofNat (n : ℕ) [n.AtLeastTwo] :
+    no_index (OfNat.ofNat n : ℚ≥0) = (OfNat.ofNat n : α) := cast_natCast _
+
+@[simp, norm_cast] lemma cast_zero : ((0 : ℚ≥0) : α) = 0 := (cast_natCast _).trans Nat.cast_zero
+@[simp, norm_cast] lemma cast_one : ((1 : ℚ≥0) : α) = 1 := (cast_natCast _).trans Nat.cast_one
+
+lemma cast_commute (q : ℚ≥0) (a : α) : Commute (↑q) a := by
+  simpa only [cast_def] using (q.num.cast_commute a).div_left (q.den.cast_commute a)
+
+lemma commute_cast (a : α) (q : ℚ≥0) : Commute a q := (cast_commute ..).symm
+
+lemma cast_comm (q : ℚ≥0) (a : α) : q * a = a * q := cast_commute _ _
+
+@[norm_cast] lemma cast_divNat_of_ne_zero (a : ℕ) {b : ℕ} (hb : (b : α) ≠ 0) :
+    divNat a b = (a / b : α) := by
+  rcases e : divNat a b with ⟨⟨n, d, h, c⟩, hn⟩
+  rw [← Rat.num_nonneg] at hn
+  lift n to ℕ using hn
+  have hd : (d : α) ≠ 0 := by
+    refine fun hd ↦ hb ?_
+    have : Rat.divInt a b = _ := congr_arg NNRat.cast e
+    obtain ⟨k, rfl⟩ : d ∣ b := by simpa [Int.natCast_dvd_natCast, this] using Rat.den_dvd a b
+    simp [*]
+  have hb' : b ≠ 0 := by rintro rfl; exact hb Nat.cast_zero
+  have hd' : d ≠ 0 := by rintro rfl; exact hd Nat.cast_zero
+  simp_rw [Rat.mk'_eq_divInt, mk_divInt, divNat_inj hb' hd'] at e
+  rw [cast_def]
+  dsimp
+  rw [Commute.div_eq_div_iff _ hd hb]
+  norm_cast
+  rw [e]
+  exact b.commute_cast _
+
+@[norm_cast]
+lemma cast_add_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
+    ↑(q + r) = (q + r : α) := by
+  rw [add_def, cast_divNat_of_ne_zero, cast_def, cast_def, mul_comm _ q.den,
+    (Nat.commute_cast _ _).div_add_div (Nat.commute_cast _ _) hq hr]
+  push_cast
+  rfl
+  · push_cast
+    exact mul_ne_zero hq hr
+
+@[norm_cast]
+lemma cast_mul_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
+    ↑(q * r) = (q * r : α) := by
+  rw [mul_def, cast_divNat_of_ne_zero, cast_def, cast_def,
+    (Nat.commute_cast _ _).div_mul_div_comm (Nat.commute_cast _ _)]
+  push_cast
+  rfl
+  · push_cast
+    exact mul_ne_zero hq hr
+
+@[norm_cast]
+lemma cast_inv_of_ne_zero (hq : (q.num : α) ≠ 0) : (q⁻¹ : ℚ≥0) = (q⁻¹ : α) := by
+  rw [inv_def, cast_divNat_of_ne_zero _ hq, cast_def, inv_div]
+
+@[norm_cast]
+lemma cast_div_of_ne_zero (hq : (q.den : α) ≠ 0) (hr : (r.num : α) ≠ 0) :
+    ↑(q / r) = (q / r : α) := by
+  rw [div_def, cast_divNat_of_ne_zero, cast_def, cast_def, div_eq_mul_inv (_ / _),
+    inv_div, (Nat.commute_cast _ _).div_mul_div_comm (Nat.commute_cast _ _)]
+  push_cast
+  rfl
+  · push_cast
+    exact mul_ne_zero hq hr
+
+end NNRat
+
 namespace Rat
 
 variable [DivisionRing α] {p q : ℚ}
@@ -148,6 +223,13 @@ open Rat
 
 variable [FunLike F α β]
 
+@[simp] lemma map_nnratCast [DivisionSemiring α] [DivisionSemiring β] [RingHomClass F α β] (f : F)
+    (q : ℚ≥0) : f q = q := by simp_rw [NNRat.cast_def, map_div₀, map_natCast]
+
+@[simp]
+lemma eq_nnratCast [DivisionSemiring α] [FunLike F ℚ≥0 α] [RingHomClass F ℚ≥0 α] (f : F) (q : ℚ≥0) :
+    f q = q := by rw [← map_nnratCast f, NNRat.cast_id]
+
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
     f q = q := by rw [cast_def, map_div₀, map_intCast, map_natCast, cast_def]
@@ -207,11 +289,22 @@ instance Rat.subsingleton_ringHom {R : Type*} [Semiring R] : Subsingleton (ℚ 
 
 /-! ### Scalar multiplication -/
 
+namespace NNRat
+variable [DivisionSemiring α]
+
+instance (priority := 100) instDistribSMul : DistribSMul ℚ≥0 α where
+  smul_zero a := by rw [smul_def, mul_zero]
+  smul_add a x y := by rw [smul_def, smul_def, smul_def, mul_add]
+
+instance instIsScalarTowerRight : IsScalarTower ℚ≥0 α α where
+  smul_assoc a x y := by simp only [smul_def, smul_eq_mul, mul_assoc]
+
+end NNRat
+
 namespace Rat
 variable [DivisionRing α]
 
 instance (priority := 100) instDistribSMul : DistribSMul ℚ α where
-  smul := (· • ·)
   smul_zero a := by rw [smul_def, mul_zero]
   smul_add a x y := by rw [smul_def, smul_def, smul_def, mul_add]
 #align rat.distrib_smul Rat.instDistribSMul
refactor(Rat): Streamline basic theory (#11504)

Rat has a long history in (and before) mathlib and as such its development is full of cruft. Now that NNRat is a thing, there is a need for the theory of Rat to be mimickable to yield the theory of NNRat, which is not currently the case.

Broadly, this PR aims at mirroring the Rat and NNRat declarations. It achieves this by:

  • Relying more on Rat.num and Rat.den, and less on the structure representation of Rat
  • Abandoning the vestigial Rat.Nonneg (which was replaced in Std by a new development of the order on Rat)
  • Renaming many Rat lemmas with dubious names. This creates quite a lot of conflicts with Std lemmas, whose names are themselves dubious. I am priming the relevant new mathlib names and leaving TODOs to fix the Std names.
  • Handling most of the Rat porting notes

Reduce the diff of #11203

Diff
@@ -20,23 +20,18 @@ casting lemmas showing the well-behavedness of this injection.
 
 ## Notations
 
-- `/.` is infix notation for `rat.mk`.
+- `/.` is infix notation for `Rat.divInt`.
 
 ## Tags
 
 rat, rationals, field, ℚ, numerator, denominator, num, denom, cast, coercion, casting
 -/
 
-
 variable {F ι α β : Type*}
 
 namespace Rat
 
-open Rat
-
-section WithDivRing
-
-variable [DivisionRing α]
+variable [DivisionRing α] {p q : ℚ}
 
 @[simp, norm_cast]
 theorem cast_intCast (n : ℤ) : ((n : ℚ) : α) = n :=
@@ -80,7 +75,7 @@ theorem commute_cast (a : α) (r : ℚ) : Commute a r :=
 #align rat.commute_cast Rat.commute_cast
 
 @[norm_cast]
-theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b := by
+lemma cast_divInt_of_ne_zero (a : ℤ) {b : ℤ} (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b := by
   have b0' : b ≠ 0 := by
     refine' mt _ b0
     simp (config := { contextual := true })
@@ -92,97 +87,61 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
     have : (b : α) = (d : α) * (k : α) := by rw [ke, Int.cast_mul, Int.cast_natCast]
     rw [d0, zero_mul] at this
     contradiction
-  rw [num_den'] at e
+  rw [mk'_eq_divInt] at e
   have := congr_arg ((↑) : ℤ → α)
     ((divInt_eq_iff b0' <| ne_of_gt <| Int.natCast_pos.2 h.bot_lt).1 e)
   rw [Int.cast_mul, Int.cast_mul, Int.cast_natCast] at this
-  -- Porting note: was `symm`
-  apply Eq.symm
-  rw [cast_def, div_eq_mul_inv, eq_div_iff_mul_eq d0, mul_assoc, (d.commute_cast _).eq, ← mul_assoc,
-    this, mul_assoc, mul_inv_cancel b0, mul_one]
-#align rat.cast_mk_of_ne_zero Rat.cast_mk_of_ne_zero
+  rw [eq_comm, cast_def, div_eq_mul_inv, eq_div_iff_mul_eq d0, mul_assoc, (d.commute_cast _).eq,
+    ← mul_assoc, this, mul_assoc, mul_inv_cancel b0, mul_one]
+#align rat.cast_mk_of_ne_zero Rat.cast_divInt_of_ne_zero
 
 @[norm_cast]
-theorem cast_add_of_ne_zero :
-    ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m + n : ℚ) : α) = m + n
-  | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) => by
-    have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.natCast_ne_zero.2 fun e => by rw [e] at d₁0; exact d₁0 Nat.cast_zero
-    have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.natCast_ne_zero.2 fun e => by rw [e] at d₂0; exact d₂0 Nat.cast_zero
-    rw [num_den', num_den', add_def'' d₁0' d₂0']
-    suffices (n₁ * (d₂ * ((d₂ : α)⁻¹ * (d₁ : α)⁻¹)) + n₂ * (d₁ * (d₂ : α)⁻¹) * (d₁ : α)⁻¹ : α)
-        = n₁ * (d₁ : α)⁻¹ + n₂ * (d₂ : α)⁻¹ by
-      rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, cast_mk_of_ne_zero]
-      · simpa [division_def, left_distrib, right_distrib, mul_inv_rev, d₁0, d₂0, mul_assoc]
-      all_goals simp [d₁0, d₂0]
-    rw [← mul_assoc (d₂ : α), mul_inv_cancel d₂0, one_mul, (Nat.cast_commute _ _).eq]
-    simp [d₁0, mul_assoc]
+lemma cast_mkRat_of_ne_zero (a : ℤ) {b : ℕ} (hb : (b : α) ≠ 0) : (mkRat a b : α) = a / b := by
+  rw [Rat.mkRat_eq, cast_divInt_of_ne_zero, Int.cast_natCast]; rwa [Int.cast_natCast]
+
+@[norm_cast]
+lemma cast_add_of_ne_zero {q r : ℚ} (hq : (q.den : α) ≠ 0) (hr : (r.den : α) ≠ 0) :
+    (q + r : ℚ) = (q + r : α) := by
+  rw [add_def', cast_mkRat_of_ne_zero, cast_def, cast_def, mul_comm r.num,
+    (Nat.cast_commute _ _).div_add_div (Nat.commute_cast _ _) hq hr]
+  push_cast
+  rfl
+  · push_cast
+    exact mul_ne_zero hq hr
 #align rat.cast_add_of_ne_zero Rat.cast_add_of_ne_zero
 
-@[simp, norm_cast]
-theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
-  | ⟨n, d, h, c⟩ => by
-    simpa only [cast_def] using
-      show (↑(-n) / d : α) = -(n / d) by
-        rw [div_eq_mul_inv, div_eq_mul_inv, Int.cast_neg, neg_mul_eq_neg_mul]
+@[simp, norm_cast] lemma cast_neg (q : ℚ) : ↑(-q) = (-q : α) := by simp [cast_def, neg_div]
 #align rat.cast_neg Rat.cast_neg
 
-@[norm_cast]
-theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den : α) ≠ 0) :
-    ((m - n : ℚ) : α) = m - n := by
-  have : ((-n).den : α) ≠ 0 := by cases n; exact n0
-  simp [sub_eq_add_neg, cast_add_of_ne_zero m0 this]
+@[norm_cast] lemma cast_sub_of_ne_zero (hp : (p.den : α) ≠ 0) (hq : (q.den : α) ≠ 0) :
+    ↑(p - q) = (p - q : α) := by simp [sub_eq_add_neg, cast_add_of_ne_zero, hp, hq]
 #align rat.cast_sub_of_ne_zero Rat.cast_sub_of_ne_zero
 
-@[norm_cast]
-theorem cast_mul_of_ne_zero :
-    ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m * n : ℚ) : α) = m * n
-  | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) => by
-    have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.natCast_ne_zero.2 fun e => by rw [e] at d₁0; exact d₁0 Nat.cast_zero
-    have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.natCast_ne_zero.2 fun e => by rw [e] at d₂0; exact d₂0 Nat.cast_zero
-    rw [num_den', num_den', mul_def' d₁0' d₂0']
-    suffices (n₁ * (n₂ * (d₂ : α)⁻¹ * (d₁ : α)⁻¹) : α) = n₁ * ((d₁ : α)⁻¹ * (n₂ * (d₂ : α)⁻¹)) by
-      rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, cast_mk_of_ne_zero]
-      · simpa [division_def, mul_inv_rev, d₁0, d₂0, mul_assoc]
-      all_goals simp [d₁0, d₂0]
-    rw [(d₁.commute_cast (_ : α)).inv_right₀.eq]
+@[norm_cast] lemma cast_mul_of_ne_zero (hp : (p.den : α) ≠ 0) (hq : (q.den : α) ≠ 0) :
+    ↑(p * q) = (p * q : α) := by
+  rw [mul_def', cast_mkRat_of_ne_zero, cast_def, cast_def,
+    (Nat.commute_cast _ _).div_mul_div_comm (Int.commute_cast _ _)]
+  push_cast
+  rfl
+  · push_cast
+    exact mul_ne_zero hp hq
 #align rat.cast_mul_of_ne_zero Rat.cast_mul_of_ne_zero
 
 @[norm_cast]
-theorem cast_inv_of_ne_zero :
-    ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = (n : α)⁻¹
-  | ⟨n, d, h, c⟩ => fun (n0 : (n : α) ≠ 0) (d0 : (d : α) ≠ 0) => by
-    rw [num_den', inv_def']
-    rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, inv_div] <;> simp [n0, d0]
+lemma cast_inv_of_ne_zero (hq : (q.num : α) ≠ 0) : ↑(q⁻¹) = (q⁻¹ : α) := by
+  rw [inv_def', cast_divInt_of_ne_zero _ hq, cast_def, inv_div, Int.cast_natCast]
 #align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zero
 
-@[norm_cast]
-theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num : α) ≠ 0)
-    (nd : (n.den : α) ≠ 0) : ((m / n : ℚ) : α) = m / n := by
-  have : (n⁻¹.den : ℤ) ∣ n.num := by
-    conv in n⁻¹.den => rw [← @num_den n, inv_def']
-    apply den_dvd
-  have : (n⁻¹.den : α) = 0 → (n.num : α) = 0 := fun h => by
-    let ⟨k, e⟩ := this
-    have := congr_arg ((↑) : ℤ → α) e; rwa [Int.cast_mul, Int.cast_natCast, h, zero_mul] at this
-  rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
+@[norm_cast] lemma cast_div_of_ne_zero (hp : (p.den : α) ≠ 0) (hq : (q.num : α) ≠ 0) :
+    ↑(p / q) = (p / q : α) := by
+  rw [div_def', cast_divInt_of_ne_zero, cast_def, cast_def, div_eq_mul_inv (_ / _), inv_div,
+    (Int.commute_cast _ _).div_mul_div_comm (Nat.commute_cast _ _)]
+  push_cast
+  rfl
+  · push_cast
+    exact mul_ne_zero hp hq
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
 
-end WithDivRing
-
--- Porting note: statement made more explicit
-@[norm_cast]
-theorem cast_id (n : ℚ) : Rat.cast n = n := rfl
-#align rat.cast_id Rat.cast_id
-
-@[simp]
-theorem cast_eq_id : ((↑) : ℚ → ℚ) = id :=
-  funext fun _ => rfl
-#align rat.cast_eq_id Rat.cast_eq_id
-
 end Rat
 
 open Rat
@@ -194,10 +153,8 @@ theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (
     f q = q := by rw [cast_def, map_div₀, map_intCast, map_natCast, cast_def]
 #align map_rat_cast map_ratCast
 
-@[simp]
-theorem eq_ratCast {k} [DivisionRing k] [FunLike F ℚ k] [RingHomClass F ℚ k] (f : F) (r : ℚ) :
-    f r = r := by
-  rw [← map_ratCast f, Rat.cast_id]
+@[simp] lemma eq_ratCast [DivisionRing α] [FunLike F ℚ α] [RingHomClass F ℚ α] (f : F) (q : ℚ) :
+    f q = q := by rw [← map_ratCast f, Rat.cast_id]
 #align eq_rat_cast eq_ratCast
 
 namespace MonoidWithZeroHom
@@ -248,25 +205,19 @@ instance Rat.subsingleton_ringHom {R : Type*} [Semiring R] : Subsingleton (ℚ 
   ⟨RingHom.ext_rat⟩
 #align rat.subsingleton_ring_hom Rat.subsingleton_ringHom
 
-section SMul
+/-! ### Scalar multiplication -/
 
 namespace Rat
+variable [DivisionRing α]
 
-variable {K : Type*} [DivisionRing K]
-
-instance (priority := 100) distribSMul : DistribSMul ℚ K where
+instance (priority := 100) instDistribSMul : DistribSMul ℚ α where
   smul := (· • ·)
   smul_zero a := by rw [smul_def, mul_zero]
   smul_add a x y := by rw [smul_def, smul_def, smul_def, mul_add]
-#align rat.distrib_smul Rat.distribSMul
+#align rat.distrib_smul Rat.instDistribSMul
 
-instance isScalarTower_right : IsScalarTower ℚ K K :=
-  ⟨fun a x y => by simp only [smul_def, smul_eq_mul, mul_assoc]⟩
-#align rat.is_scalar_tower_right Rat.isScalarTower_right
+instance instIsScalarTowerRight : IsScalarTower ℚ α α where
+  smul_assoc a x y := by simp only [smul_def, smul_eq_mul, mul_assoc]
+#align rat.is_scalar_tower_right Rat.instIsScalarTowerRight
 
 end Rat
-
-end SMul
-
--- Guard against import creep regression.
-assert_not_exists add_div
refactor(Rat): Streamline basic theory (#11504)

Rat has a long history in (and before) mathlib and as such its development is full of cruft. Now that NNRat is a thing, there is a need for the theory of Rat to be mimickable to yield the theory of NNRat, which is not currently the case.

Broadly, this PR aims at mirroring the Rat and NNRat declarations. It achieves this by:

  • Relying more on Rat.num and Rat.den, and less on the structure representation of Rat
  • Abandoning the vestigial Rat.Nonneg (which was replaced in Std by a new development of the order on Rat)
  • Renaming many Rat lemmas with dubious names. This creates quite a lot of conflicts with Std lemmas, whose names are themselves dubious. I am priming the relevant new mathlib names and leaving TODOs to fix the Std names.
  • Handling most of the Rat porting notes

Reduce the diff of #11203

Diff
@@ -31,12 +31,12 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
     refine' ⟨fun h => _, congr_arg _⟩
     have d₁a : (d₁ : α) ≠ 0 := Nat.cast_ne_zero.2 d₁0
     have d₂a : (d₂ : α) ≠ 0 := Nat.cast_ne_zero.2 d₂0
-    rw [num_den', num_den'] at h ⊢
-    rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero] at h <;> simp [d₁0, d₂0] at h ⊢
-    rwa [eq_div_iff_mul_eq d₂a, division_def, mul_assoc, (d₁.cast_commute (d₂ : α)).inv_left₀.eq,
-      ← mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_natCast d₁,
-      ← Int.cast_mul, ← Int.cast_natCast d₂, ← Int.cast_mul, Int.cast_inj,
-      ← mkRat_eq_iff d₁0 d₂0] at h
+    rw [mk'_eq_divInt, mk'_eq_divInt] at h ⊢
+    rw [cast_divInt_of_ne_zero, cast_divInt_of_ne_zero] at h <;> simp [d₁0, d₂0] at h ⊢
+    rwa [eq_div_iff_mul_eq d₂a, division_def, mul_assoc, (d₁.cast_commute (d₂ : α)).inv_left₀.eq, ←
+      mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_natCast d₁, ←
+      Int.cast_mul, ← Int.cast_natCast d₂, ← Int.cast_mul, Int.cast_inj, ← mkRat_eq_iff d₁0 d₂0]
+      at h
 #align rat.cast_inj Rat.cast_inj
 
 theorem cast_injective [CharZero α] : Function.Injective ((↑) : ℚ → α)
chore: Rename coe_nat/coe_int/coe_rat to natCast/intCast/ratCast (#11499)

This is less exhaustive than its sibling #11486 because edge cases are harder to classify. No fundamental difficulty, just me being a bit fast and lazy.

Reduce the diff of #11203

Diff
@@ -28,7 +28,7 @@ variable {α : Type*} [DivisionRing α]
 theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ := by
   cases' n with n
   · simp
-  rw [cast_def, inv_coe_nat_num, inv_coe_nat_den, if_neg n.succ_ne_zero,
+  rw [cast_def, inv_natCast_num, inv_natCast_den, if_neg n.succ_ne_zero,
     Int.sign_eq_one_of_pos (Nat.cast_pos.mpr n.succ_pos), Int.cast_one, one_div]
 #align rat.cast_inv_nat Rat.cast_inv_nat
 
chore: Rename coe_nat/coe_int/coe_rat to natCast/intCast/ratCast (#11499)

This is less exhaustive than its sibling #11486 because edge cases are harder to classify. No fundamental difficulty, just me being a bit fast and lazy.

Reduce the diff of #11203

Diff
@@ -94,7 +94,7 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
     contradiction
   rw [num_den'] at e
   have := congr_arg ((↑) : ℤ → α)
-    ((divInt_eq_iff b0' <| ne_of_gt <| Int.coe_nat_pos.2 h.bot_lt).1 e)
+    ((divInt_eq_iff b0' <| ne_of_gt <| Int.natCast_pos.2 h.bot_lt).1 e)
   rw [Int.cast_mul, Int.cast_mul, Int.cast_natCast] at this
   -- Porting note: was `symm`
   apply Eq.symm
chore(Data/Int/Cast): fix confusion between OfNat and Nat.cast lemmas (#11861)

This renames

  • Int.cast_ofNat to Int.cast_natCast
  • Int.int_cast_ofNat to Int.cast_ofNat

I think the history here is that this lemma was previously about Int.ofNat, before we globally fixed the simp-normal form to be Nat.cast.

Since the Int.cast_ofNat name is repurposed, it can't be deprecated. Int.int_cast_ofNat is such a wonky name that it was probably never used.

Diff
@@ -45,7 +45,7 @@ theorem cast_intCast (n : ℤ) : ((n : ℚ) : α) = n :=
 
 @[simp, norm_cast]
 theorem cast_natCast (n : ℕ) : ((n : ℚ) : α) = n := by
-  rw [← Int.cast_ofNat, cast_intCast, Int.cast_ofNat]
+  rw [← Int.cast_natCast, cast_intCast, Int.cast_natCast]
 #align rat.cast_coe_nat Rat.cast_natCast
 
 -- 2024-03-21
@@ -89,13 +89,13 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
     intro d0
     have dd := den_dvd a b
     cases' show (d : ℤ) ∣ b by rwa [e] at dd with k ke
-    have : (b : α) = (d : α) * (k : α) := by rw [ke, Int.cast_mul, Int.cast_ofNat]
+    have : (b : α) = (d : α) * (k : α) := by rw [ke, Int.cast_mul, Int.cast_natCast]
     rw [d0, zero_mul] at this
     contradiction
   rw [num_den'] at e
   have := congr_arg ((↑) : ℤ → α)
     ((divInt_eq_iff b0' <| ne_of_gt <| Int.coe_nat_pos.2 h.bot_lt).1 e)
-  rw [Int.cast_mul, Int.cast_mul, Int.cast_ofNat] at this
+  rw [Int.cast_mul, Int.cast_mul, Int.cast_natCast] at this
   -- Porting note: was `symm`
   apply Eq.symm
   rw [cast_def, div_eq_mul_inv, eq_div_iff_mul_eq d0, mul_assoc, (d.commute_cast _).eq, ← mul_assoc,
@@ -167,7 +167,7 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
     apply den_dvd
   have : (n⁻¹.den : α) = 0 → (n.num : α) = 0 := fun h => by
     let ⟨k, e⟩ := this
-    have := congr_arg ((↑) : ℤ → α) e; rwa [Int.cast_mul, Int.cast_ofNat, h, zero_mul] at this
+    have := congr_arg ((↑) : ℤ → α) e; rwa [Int.cast_mul, Int.cast_natCast, h, zero_mul] at this
   rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
 
@@ -208,7 +208,7 @@ variable {f g : F}
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
   (DFunLike.ext f g) fun r => by
-    rw [← r.num_div_den, div_eq_mul_inv, map_mul, map_mul, h, ← Int.cast_ofNat,
+    rw [← r.num_div_den, div_eq_mul_inv, map_mul, map_mul, h, ← Int.cast_natCast,
       eq_on_inv₀ f g]
     apply h
 #align monoid_with_zero_hom.ext_rat' MonoidWithZeroHom.ext_rat'
chore(Data/Int/Cast): fix confusion between OfNat and Nat.cast lemmas (#11861)

This renames

  • Int.cast_ofNat to Int.cast_natCast
  • Int.int_cast_ofNat to Int.cast_ofNat

I think the history here is that this lemma was previously about Int.ofNat, before we globally fixed the simp-normal form to be Nat.cast.

Since the Int.cast_ofNat name is repurposed, it can't be deprecated. Int.int_cast_ofNat is such a wonky name that it was probably never used.

Diff
@@ -33,9 +33,10 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
     have d₂a : (d₂ : α) ≠ 0 := Nat.cast_ne_zero.2 d₂0
     rw [num_den', num_den'] at h ⊢
     rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero] at h <;> simp [d₁0, d₂0] at h ⊢
-    rwa [eq_div_iff_mul_eq d₂a, division_def, mul_assoc, (d₁.cast_commute (d₂ : α)).inv_left₀.eq, ←
-      mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_ofNat d₁, ←
-      Int.cast_mul, ← Int.cast_ofNat d₂, ← Int.cast_mul, Int.cast_inj, ← mkRat_eq_iff d₁0 d₂0] at h
+    rwa [eq_div_iff_mul_eq d₂a, division_def, mul_assoc, (d₁.cast_commute (d₂ : α)).inv_left₀.eq,
+      ← mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_natCast d₁,
+      ← Int.cast_mul, ← Int.cast_natCast d₂, ← Int.cast_mul, Int.cast_inj,
+      ← mkRat_eq_iff d₁0 d₂0] at h
 #align rat.cast_inj Rat.cast_inj
 
 theorem cast_injective [CharZero α] : Function.Injective ((↑) : ℚ → α)
chore(Data/Int): Rename coe_nat to natCast (#11637)

Reduce the diff of #11499

Renames

All in the Int namespace:

  • ofNat_eq_castofNat_eq_natCast
  • cast_eq_cast_iff_NatnatCast_inj
  • natCast_eq_ofNatofNat_eq_natCast
  • coe_nat_subnatCast_sub
  • coe_nat_nonnegnatCast_nonneg
  • sign_coe_add_onesign_natCast_add_one
  • nat_succ_eq_int_succnatCast_succ
  • succ_neg_nat_succsucc_neg_natCast_succ
  • coe_pred_of_posnatCast_pred_of_pos
  • coe_nat_divnatCast_div
  • coe_nat_edivnatCast_ediv
  • sign_coe_nat_of_nonzerosign_natCast_of_ne_zero
  • toNat_coe_nattoNat_natCast
  • toNat_coe_nat_add_onetoNat_natCast_add_one
  • coe_nat_dvdnatCast_dvd_natCast
  • coe_nat_dvd_leftnatCast_dvd
  • coe_nat_dvd_rightdvd_natCast
  • le_coe_nat_suble_natCast_sub
  • succ_coe_nat_possucc_natCast_pos
  • coe_nat_modEq_iffnatCast_modEq_iff
  • coe_natAbsnatCast_natAbs
  • coe_nat_eq_zeronatCast_eq_zero
  • coe_nat_ne_zeronatCast_ne_zero
  • coe_nat_ne_zero_iff_posnatCast_ne_zero_iff_pos
  • abs_coe_natabs_natCast
  • coe_nat_nonpos_iffnatCast_nonpos_iff

Also rename Nat.coe_nat_dvd to Nat.cast_dvd_cast

Diff
@@ -107,9 +107,9 @@ theorem cast_add_of_ne_zero :
     ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m + n : ℚ) : α) = m + n
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) => by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0; exact d₁0 Nat.cast_zero
+      Int.natCast_ne_zero.2 fun e => by rw [e] at d₁0; exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0; exact d₂0 Nat.cast_zero
+      Int.natCast_ne_zero.2 fun e => by rw [e] at d₂0; exact d₂0 Nat.cast_zero
     rw [num_den', num_den', add_def'' d₁0' d₂0']
     suffices (n₁ * (d₂ * ((d₂ : α)⁻¹ * (d₁ : α)⁻¹)) + n₂ * (d₁ * (d₂ : α)⁻¹) * (d₁ : α)⁻¹ : α)
         = n₁ * (d₁ : α)⁻¹ + n₂ * (d₂ : α)⁻¹ by
@@ -140,9 +140,9 @@ theorem cast_mul_of_ne_zero :
     ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m * n : ℚ) : α) = m * n
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) => by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0; exact d₁0 Nat.cast_zero
+      Int.natCast_ne_zero.2 fun e => by rw [e] at d₁0; exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0; exact d₂0 Nat.cast_zero
+      Int.natCast_ne_zero.2 fun e => by rw [e] at d₂0; exact d₂0 Nat.cast_zero
     rw [num_den', num_den', mul_def' d₁0' d₂0']
     suffices (n₁ * (n₂ * (d₂ : α)⁻¹ * (d₁ : α)⁻¹) : α) = n₁ * ((d₁ : α)⁻¹ * (n₂ * (d₂ : α)⁻¹)) by
       rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, cast_mk_of_ne_zero]
chore: Deprecated aliases for Rat.cast_natCast, Rat.cast_intCast (#11636)

These were moved in #11552.

Diff
@@ -48,6 +48,10 @@ theorem cast_natCast (n : ℕ) : ((n : ℚ) : α) = n := by
   rw [← Int.cast_ofNat, cast_intCast, Int.cast_ofNat]
 #align rat.cast_coe_nat Rat.cast_natCast
 
+-- 2024-03-21
+@[deprecated] alias cast_coe_int := cast_intCast
+@[deprecated] alias cast_coe_nat := cast_natCast
+
 -- See note [no_index around OfNat.ofNat]
 @[simp, norm_cast] lemma cast_ofNat (n : ℕ) [n.AtLeastTwo] :
     ((no_index (OfNat.ofNat n : ℚ)) : α) = (OfNat.ofNat n : α) := by
chore: Rename cat_coe_nat/cast_coe_int to cast_natCast/cast_intCast (#11552)

Reduce the diff of #11499

Diff
@@ -39,14 +39,14 @@ section WithDivRing
 variable [DivisionRing α]
 
 @[simp, norm_cast]
-theorem cast_coe_int (n : ℤ) : ((n : ℚ) : α) = n :=
+theorem cast_intCast (n : ℤ) : ((n : ℚ) : α) = n :=
   (cast_def _).trans <| show (n / (1 : ℕ) : α) = n by rw [Nat.cast_one, div_one]
-#align rat.cast_coe_int Rat.cast_coe_int
+#align rat.cast_coe_int Rat.cast_intCast
 
 @[simp, norm_cast]
-theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
-  rw [← Int.cast_ofNat, cast_coe_int, Int.cast_ofNat]
-#align rat.cast_coe_nat Rat.cast_coe_nat
+theorem cast_natCast (n : ℕ) : ((n : ℚ) : α) = n := by
+  rw [← Int.cast_ofNat, cast_intCast, Int.cast_ofNat]
+#align rat.cast_coe_nat Rat.cast_natCast
 
 -- See note [no_index around OfNat.ofNat]
 @[simp, norm_cast] lemma cast_ofNat (n : ℕ) [n.AtLeastTwo] :
@@ -55,12 +55,12 @@ theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
 
 @[simp, norm_cast]
 theorem cast_zero : ((0 : ℚ) : α) = 0 :=
-  (cast_coe_int _).trans Int.cast_zero
+  (cast_intCast _).trans Int.cast_zero
 #align rat.cast_zero Rat.cast_zero
 
 @[simp, norm_cast]
 theorem cast_one : ((1 : ℚ) : α) = 1 :=
-  (cast_coe_int _).trans Int.cast_one
+  (cast_intCast _).trans Int.cast_one
 #align rat.cast_one Rat.cast_one
 
 theorem cast_commute (r : ℚ) (a : α) : Commute (↑r) a := by
chore: Rename cat_coe_nat/cast_coe_int to cast_natCast/cast_intCast (#11552)

Reduce the diff of #11499

Diff
@@ -117,7 +117,7 @@ theorem cast_zpow (q : ℚ) (n : ℤ) : ((q ^ n : ℚ) : α) = (q : α) ^ n :=
 
 @[norm_cast]
 theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b := by
-  simp only [divInt_eq_div, cast_div, cast_coe_int]
+  simp only [divInt_eq_div, cast_div, cast_intCast]
 #align rat.cast_mk Rat.cast_mk
 
 @[simp, norm_cast]
chore: Move basic ordered field lemmas (#11503)

These lemmas are needed to define the semifield structure on NNRat, hence I am repurposing Algebra.Order.Field.Defs from avoiding a timeout (which I believe was solved long ago) to avoiding to import random stuff in the definition of the semifield structure on NNRat (although this PR doesn't actually reduce imports there, it will be in a later PR).

Reduce the diff of #11203

Diff
@@ -3,9 +3,9 @@ Copyright (c) 2019 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
 -/
-import Mathlib.Algebra.Order.Field.Basic
 import Mathlib.Data.Rat.Cast.CharZero
 import Mathlib.Data.Rat.Order
+import Mathlib.Tactic.Positivity.Core
 
 #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
 
chore: Move GroupWithZero lemmas earlier (#10919)

Move from Algebra.GroupWithZero.Units.Lemmas to Algebra.GroupWithZero.Units.Basic the lemmas that can be moved.

Diff
@@ -3,6 +3,7 @@ Copyright (c) 2019 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
 -/
+import Mathlib.Algebra.GroupWithZero.Units.Lemmas
 import Mathlib.Data.Rat.Field
 import Mathlib.Data.Rat.Lemmas
 
feat: positivity extension for Rat.num, Rat.den (#10218)

and rename num_nonneg_iff_zero_le to num_nonneg, num_pos_iff_pos to num_pos

From LeanAPAP

Diff
@@ -30,7 +30,7 @@ variable {K : Type*} [LinearOrderedField K]
 
 theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r := by
   rw [Rat.cast_def]
-  exact div_pos (Int.cast_pos.2 <| num_pos_iff_pos.2 hr) (Nat.cast_pos.2 r.pos)
+  exact div_pos (Int.cast_pos.2 <| num_pos.2 hr) (Nat.cast_pos.2 r.pos)
 #align rat.cast_pos_of_pos Rat.cast_pos_of_pos
 
 @[mono]
chore(NNRat): Rearrange imports (#10392)

The goal is to separate the field material on Rat/NNRat from everything before to make way for NNRat.cast. We achieve this by

  • splitting Data.Rat.NNRat into
    • Data.NNRat.Defs for the foundationl stuff that will be needed in the definition of Field
    • Data.NNRat.Lemmas for the field and big operators material
  • moving the field material from Data.Rat.Order to Data.Rat.Basic
  • proving a few lemmas by rfl rather than coeHom.some_now_unavailable_lemma
  • renaming Data.Rat.NNRat.BigOperators to Data.NNRat.BigOperators
Diff
@@ -3,7 +3,7 @@ Copyright (c) 2019 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
 -/
-import Mathlib.Data.Rat.Basic
+import Mathlib.Data.Rat.Field
 import Mathlib.Data.Rat.Lemmas
 
 #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
refactor(Data/FunLike): use unbundled inheritance from FunLike (#8386)

The FunLike hierarchy is very big and gets scanned through each time we need a coercion (via the CoeFun instance). It looks like unbundled inheritance suits Lean 4 better here. The only class that still extends FunLike is EquivLike, since that has a custom coe_injective' field that is easier to implement. All other classes should take FunLike or EquivLike as a parameter.

Zulip thread

Important changes

Previously, morphism classes would be Type-valued and extend FunLike:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  extends FunLike F A B :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

After this PR, they should be Prop-valued and take FunLike as a parameter:

/-- `MyHomClass F A B` states that `F` is a type of `MyClass.op`-preserving morphisms.
You should extend this class when you extend `MyHom`. -/
class MyHomClass (F : Type*) (A B : outParam <| Type*) [MyClass A] [MyClass B]
  [FunLike F A B] : Prop :=
(map_op : ∀ (f : F) (x y : A), f (MyClass.op x y) = MyClass.op (f x) (f y))

(Note that A B stay marked as outParam even though they are not purely required to be so due to the FunLike parameter already filling them in. This is required to see through type synonyms, which is important in the category theory library. Also, I think keeping them as outParam is slightly faster.)

Similarly, MyEquivClass should take EquivLike as a parameter.

As a result, every mention of [MyHomClass F A B] should become [FunLike F A B] [MyHomClass F A B].

Remaining issues

Slower (failing) search

While overall this gives some great speedups, there are some cases that are noticeably slower. In particular, a failing application of a lemma such as map_mul is more expensive. This is due to suboptimal processing of arguments. For example:

variable [FunLike F M N] [Mul M] [Mul N] (f : F) (x : M) (y : M)

theorem map_mul [MulHomClass F M N] : f (x * y) = f x * f y

example [AddHomClass F A B] : f (x * y) = f x * f y := map_mul f _ _

Before this PR, applying map_mul f gives the goals [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Since M and N are out_params, [MulHomClass F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found.

After this PR, the goals become [FunLike F ?M ?N] [Mul ?M] [Mul ?N] [MulHomClass F ?M ?N]. Now [FunLike F ?M ?N] is synthesized first, supplies values for ?M and ?N and then the Mul M and Mul N instances can be found, before trying MulHomClass F M N which fails. Since the Mul hierarchy is very big, this can be slow to fail, especially when there is no such Mul instance.

A long-term but harder to achieve solution would be to specify the order in which instance goals get solved. For example, we'd like to change the arguments to map_mul to look like [FunLike F M N] [Mul M] [Mul N] [highPriority <| MulHomClass F M N] because MulHomClass fails or succeeds much faster than the others.

As a consequence, the simpNF linter is much slower since by design it tries and fails to apply many map_ lemmas. The same issue occurs a few times in existing calls to simp [map_mul], where map_mul is tried "too soon" and fails. Thanks to the speedup of leanprover/lean4#2478 the impact is very limited, only in files that already were close to the timeout.

simp not firing sometimes

This affects map_smulₛₗ and related definitions. For simp lemmas Lean apparently uses a slightly different mechanism to find instances, so that rw can find every argument to map_smulₛₗ successfully but simp can't: leanprover/lean4#3701.

Missing instances due to unification failing

Especially in the category theory library, we might sometimes have a type A which is also accessible as a synonym (Bundled A hA).1. Instance synthesis doesn't always work if we have f : A →* B but x * y : (Bundled A hA).1 or vice versa. This seems to be mostly fixed by keeping A B as outParams in MulHomClass F A B. (Presumably because Lean will do a definitional check A =?= (Bundled A hA).1 instead of using the syntax in the discrimination tree.)

Workaround for issues

The timeouts can be worked around for now by specifying which map_mul we mean, either as map_mul f for some explicit f, or as e.g. MonoidHomClass.map_mul.

map_smulₛₗ not firing as simp lemma can be worked around by going back to the pre-FunLike situation and making LinearMap.map_smulₛₗ a simp lemma instead of the generic map_smulₛₗ. Writing simp [map_smulₛₗ _] also works.

Co-authored-by: Matthew Ballard <matt@mrb.email> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott@tqft.net> Co-authored-by: Anne Baanen <Vierkantor@users.noreply.github.com>

Diff
@@ -182,20 +182,23 @@ end Rat
 
 open Rat
 
+variable [FunLike F α β]
+
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
     f q = q := by rw [cast_def, map_div₀, map_intCast, map_natCast, cast_def]
 #align map_rat_cast map_ratCast
 
 @[simp]
-theorem eq_ratCast {k} [DivisionRing k] [RingHomClass F ℚ k] (f : F) (r : ℚ) : f r = r := by
+theorem eq_ratCast {k} [DivisionRing k] [FunLike F ℚ k] [RingHomClass F ℚ k] (f : F) (r : ℚ) :
+    f r = r := by
   rw [← map_ratCast f, Rat.cast_id]
 #align eq_rat_cast eq_ratCast
 
 namespace MonoidWithZeroHom
 
-variable {M₀ : Type*} [MonoidWithZero M₀] [MonoidWithZeroHomClass F ℚ M₀] {f g : F}
-
+variable {M₀ : Type*} [MonoidWithZero M₀] [FunLike F ℚ M₀] [MonoidWithZeroHomClass F ℚ M₀]
+variable {f g : F}
 
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
@@ -229,7 +232,8 @@ end MonoidWithZeroHom
 
 /-- Any two ring homomorphisms from `ℚ` to a semiring are equal. If the codomain is a division ring,
 then this lemma follows from `eq_ratCast`. -/
-theorem RingHom.ext_rat {R : Type*} [Semiring R] [RingHomClass F ℚ R] (f g : F) : f = g :=
+theorem RingHom.ext_rat {R : Type*} [Semiring R] [FunLike F ℚ R] [RingHomClass F ℚ R] (f g : F) :
+    f = g :=
   MonoidWithZeroHom.ext_rat' <|
     RingHom.congr_fun <|
       ((f : ℚ →+* R).comp (Int.castRingHom ℚ)).ext_int ((g : ℚ →+* R).comp (Int.castRingHom ℚ))
chore: Move positivity extensions (#10140)

The goal here is to have access to positivity earlier in the import hierarchy

Diff
@@ -3,10 +3,9 @@ Copyright (c) 2019 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
 -/
+import Mathlib.Algebra.Order.Field.Basic
 import Mathlib.Data.Rat.Cast.CharZero
 import Mathlib.Data.Rat.Order
-import Mathlib.Data.Set.Intervals.OrderEmbedding
-import Mathlib.Algebra.Order.Field.Basic
 
 #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
 
@@ -147,3 +146,29 @@ theorem preimage_cast_uIoc (a b : ℚ) : (↑) ⁻¹' uIoc (a : K) b = uIoc a b
   (castOrderEmbedding (K := K)).preimage_uIoc a b
 
 end LinearOrderedField
+end Rat
+
+namespace Mathlib.Meta.Positivity
+open Lean Meta Qq Function
+
+/-- Extension for Rat.cast. -/
+@[positivity Rat.cast _]
+def evalRatCast : PositivityExt where eval {u α} _zα _pα e := do
+  let ~q(@Rat.cast _ (_) ($a : ℚ)) := e | throwError "not Rat.cast"
+  match ← core q(inferInstance) q(inferInstance) a with
+  | .positive pa =>
+    let _oα ← synthInstanceQ q(LinearOrderedField $α)
+    assumeInstancesCommute
+    return .positive q((Rat.cast_pos (K := $α)).mpr $pa)
+  | .nonnegative pa =>
+    let _oα ← synthInstanceQ q(LinearOrderedField $α)
+    assumeInstancesCommute
+    return .nonnegative q((Rat.cast_nonneg (K := $α)).mpr $pa)
+  | .nonzero pa =>
+    let _oα ← synthInstanceQ q(DivisionRing $α)
+    let _cα ← synthInstanceQ q(CharZero $α)
+    assumeInstancesCommute
+    return .nonzero q((Rat.cast_ne_zero (α := $α)).mpr $pa)
+  | .none => pure .none
+
+end Mathlib.Meta.Positivity
feat: add lemmas about preimages of intervals under order embeddings (#9925)

Also use them for Rat.cast.

Diff
@@ -5,6 +5,7 @@ Authors: Johannes Hölzl, Mario Carneiro
 -/
 import Mathlib.Data.Rat.Cast.CharZero
 import Mathlib.Data.Rat.Order
+import Mathlib.Data.Set.Intervals.OrderEmbedding
 import Mathlib.Algebra.Order.Field.Basic
 
 #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
@@ -98,51 +99,51 @@ theorem cast_abs {q : ℚ} : ((|q| : ℚ) : K) = |(q : K)| := by simp [abs_eq_ma
 open Set
 
 @[simp]
-theorem preimage_cast_Icc (a b : ℚ) : (↑) ⁻¹' Icc (a : K) b = Icc a b := by
-  ext x
-  simp
+theorem preimage_cast_Icc (a b : ℚ) : (↑) ⁻¹' Icc (a : K) b = Icc a b :=
+  castOrderEmbedding.preimage_Icc ..
 #align rat.preimage_cast_Icc Rat.preimage_cast_Icc
 
 @[simp]
-theorem preimage_cast_Ico (a b : ℚ) : (↑) ⁻¹' Ico (a : K) b = Ico a b := by
-  ext x
-  simp
+theorem preimage_cast_Ico (a b : ℚ) : (↑) ⁻¹' Ico (a : K) b = Ico a b :=
+  castOrderEmbedding.preimage_Ico ..
 #align rat.preimage_cast_Ico Rat.preimage_cast_Ico
 
 @[simp]
-theorem preimage_cast_Ioc (a b : ℚ) : (↑) ⁻¹' Ioc (a : K) b = Ioc a b := by
-  ext x
-  simp
+theorem preimage_cast_Ioc (a b : ℚ) : (↑) ⁻¹' Ioc (a : K) b = Ioc a b :=
+  castOrderEmbedding.preimage_Ioc a b
 #align rat.preimage_cast_Ioc Rat.preimage_cast_Ioc
 
 @[simp]
-theorem preimage_cast_Ioo (a b : ℚ) : (↑) ⁻¹' Ioo (a : K) b = Ioo a b := by
-  ext x
-  simp
+theorem preimage_cast_Ioo (a b : ℚ) : (↑) ⁻¹' Ioo (a : K) b = Ioo a b :=
+  castOrderEmbedding.preimage_Ioo a b
 #align rat.preimage_cast_Ioo Rat.preimage_cast_Ioo
 
 @[simp]
-theorem preimage_cast_Ici (a : ℚ) : (↑) ⁻¹' Ici (a : K) = Ici a := by
-  ext x
-  simp
+theorem preimage_cast_Ici (a : ℚ) : (↑) ⁻¹' Ici (a : K) = Ici a :=
+  castOrderEmbedding.preimage_Ici a
 #align rat.preimage_cast_Ici Rat.preimage_cast_Ici
 
 @[simp]
-theorem preimage_cast_Iic (a : ℚ) : (↑) ⁻¹' Iic (a : K) = Iic a := by
-  ext x
-  simp
+theorem preimage_cast_Iic (a : ℚ) : (↑) ⁻¹' Iic (a : K) = Iic a :=
+  castOrderEmbedding.preimage_Iic a
 #align rat.preimage_cast_Iic Rat.preimage_cast_Iic
 
 @[simp]
-theorem preimage_cast_Ioi (a : ℚ) : (↑) ⁻¹' Ioi (a : K) = Ioi a := by
-  ext x
-  simp
+theorem preimage_cast_Ioi (a : ℚ) : (↑) ⁻¹' Ioi (a : K) = Ioi a :=
+  castOrderEmbedding.preimage_Ioi a
 #align rat.preimage_cast_Ioi Rat.preimage_cast_Ioi
 
 @[simp]
-theorem preimage_cast_Iio (a : ℚ) : (↑) ⁻¹' Iio (a : K) = Iio a := by
-  ext x
-  simp
+theorem preimage_cast_Iio (a : ℚ) : (↑) ⁻¹' Iio (a : K) = Iio a :=
+  castOrderEmbedding.preimage_Iio a
 #align rat.preimage_cast_Iio Rat.preimage_cast_Iio
 
+@[simp]
+theorem preimage_cast_uIcc (a b : ℚ) : (↑) ⁻¹' uIcc (a : K) b = uIcc a b :=
+  (castOrderEmbedding (K := K)).preimage_uIcc a b
+
+@[simp]
+theorem preimage_cast_uIoc (a b : ℚ) : (↑) ⁻¹' uIoc (a : K) b = uIoc a b :=
+  (castOrderEmbedding (K := K)).preimage_uIoc a b
+
 end LinearOrderedField
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
@@ -199,7 +199,7 @@ variable {M₀ : Type*} [MonoidWithZero M₀] [MonoidWithZeroHomClass F ℚ M₀
 
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
 theorem ext_rat' (h : ∀ m : ℤ, f m = g m) : f = g :=
-  (FunLike.ext f g) fun r => by
+  (DFunLike.ext f g) fun r => by
     rw [← r.num_div_den, div_eq_mul_inv, map_mul, map_mul, h, ← Int.cast_ofNat,
       eq_on_inv₀ f g]
     apply h
@@ -211,14 +211,14 @@ See note [partially-applied ext lemmas] for why `comp` is used here. -/
 @[ext]
 theorem ext_rat {f g : ℚ →*₀ M₀}
     (h : f.comp (Int.castRingHom ℚ : ℤ →*₀ ℚ) = g.comp (Int.castRingHom ℚ)) : f = g :=
-  ext_rat' <| FunLike.congr_fun h
+  ext_rat' <| DFunLike.congr_fun h
 #align monoid_with_zero_hom.ext_rat MonoidWithZeroHom.ext_rat
 
 /-- Positive integer values of a morphism `φ` and its value on `-1` completely determine `φ`. -/
 theorem ext_rat_on_pnat (same_on_neg_one : f (-1) = g (-1))
     (same_on_pnat : ∀ n : ℕ, 0 < n → f n = g n) : f = g :=
   ext_rat' <|
-    FunLike.congr_fun <|
+    DFunLike.congr_fun <|
       show
         (f : ℚ →*₀ M₀).comp (Int.castRingHom ℚ : ℤ →*₀ ℚ) =
           (g : ℚ →*₀ M₀).comp (Int.castRingHom ℚ : ℤ →*₀ ℚ)
chore(*): golf, mostly dropping unused haves (#9292)
Diff
@@ -150,9 +150,6 @@ theorem cast_mul_of_ne_zero :
 theorem cast_inv_of_ne_zero :
     ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = (n : α)⁻¹
   | ⟨n, d, h, c⟩ => fun (n0 : (n : α) ≠ 0) (d0 : (d : α) ≠ 0) => by
-    have _ : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0; exact n0 Int.cast_zero
-    have _ : (d : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d0; exact d0 Nat.cast_zero
     rw [num_den', inv_def']
     rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, inv_div] <;> simp [n0, d0]
 #align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zero
feat: rify tactic (#7990)
Diff
@@ -47,6 +47,10 @@ theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
   rw [← Int.cast_ofNat, cast_coe_int, Int.cast_ofNat]
 #align rat.cast_coe_nat Rat.cast_coe_nat
 
+-- See note [no_index around OfNat.ofNat]
+@[simp, norm_cast] lemma cast_ofNat (n : ℕ) [n.AtLeastTwo] :
+    ((no_index (OfNat.ofNat n : ℚ)) : α) = (OfNat.ofNat n : α) := by
+  simp [cast_def]
 
 @[simp, norm_cast]
 theorem cast_zero : ((0 : ℚ) : α) = 0 :=
style(Algebra): write coe_pow lemmas more clearly (#8292)
Diff
@@ -121,7 +121,7 @@ theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b := by
 #align rat.cast_mk Rat.cast_mk
 
 @[simp, norm_cast]
-theorem cast_pow (q : ℚ) (k : ℕ) : (↑(q ^ k) : α) = (q : α) ^ k :=
+theorem cast_pow (q : ℚ) (k : ℕ) : ↑(q ^ k) = (q : α) ^ k :=
   (castHom α).map_pow q k
 #align rat.cast_pow Rat.cast_pow
 
chore: bump to v4.3.0-rc2 (#8366)

PR contents

This is the supremum of

along with some minor fixes from failures on nightly-testing as Mathlib master is merged into it.

Note that some PRs for changes that are already compatible with the current toolchain and will be necessary have already been split out: #8380.

I am hopeful that in future we will be able to progressively merge adaptation PRs into a bump/v4.X.0 branch, so we never end up with a "big merge" like this. However one of these adaptation PRs (#8056) predates my new scheme for combined CI, and it wasn't possible to keep that PR viable in the meantime.

Lean PRs involved in this bump

In particular this includes adjustments for the Lean PRs

leanprover/lean4#2778

We can get rid of all the

local macro_rules | `($x ^ $y) => `(HPow.hPow $x $y) -- Porting note: See issue [lean4#2220](https://github.com/leanprover/lean4/pull/2220)

macros across Mathlib (and in any projects that want to write natural number powers of reals).

leanprover/lean4#2722

Changes the default behaviour of simp to (config := {decide := false}). This makes simp (and consequentially norm_num) less powerful, but also more consistent, and less likely to blow up in long failures. This requires a variety of changes: changing some previously by simp or norm_num to decide or rfl, or adding (config := {decide := true}).

leanprover/lean4#2783

This changed the behaviour of simp so that simp [f] will only unfold "fully applied" occurrences of f. The old behaviour can be recovered with simp (config := { unfoldPartialApp := true }). We may in future add a syntax for this, e.g. simp [!f]; please provide feedback! In the meantime, we have made the following changes:

  • switching to using explicit lemmas that have the intended level of application
  • (config := { unfoldPartialApp := true }) in some places, to recover the old behaviour
  • Using @[eqns] to manually adjust the equation lemmas for a particular definition, recovering the old behaviour just for that definition. See #8371, where we do this for Function.comp and Function.flip.

This change in Lean may require further changes down the line (e.g. adding the !f syntax, and/or upstreaming the special treatment for Function.comp and Function.flip, and/or removing this special treatment). Please keep an open and skeptical mind about these changes!

Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Mauricio Collares <mauricio@collares.org>

Diff
@@ -121,7 +121,7 @@ theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b := by
 #align rat.cast_mk Rat.cast_mk
 
 @[simp, norm_cast]
-theorem cast_pow (q) (k : ℕ) : ((q : ℚ) ^ k : α) = (q : α) ^ k :=
+theorem cast_pow (q : ℚ) (k : ℕ) : (↑(q ^ k) : α) = (q : α) ^ k :=
   (castHom α).map_pow q k
 #align rat.cast_pow Rat.cast_pow
 
chore: only four spaces for subsequent lines (#7286)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -144,7 +144,7 @@ theorem cast_mul_of_ne_zero :
 
 @[norm_cast]
 theorem cast_inv_of_ne_zero :
-  ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = (n : α)⁻¹
+    ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = (n : α)⁻¹
   | ⟨n, d, h, c⟩ => fun (n0 : (n : α) ≠ 0) (d0 : (d : α) ≠ 0) => by
     have _ : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0; exact n0 Int.cast_zero
     have _ : (d : ℤ) ≠ 0 :=
chore: reduce imports to Data.Rat.Cast.CharZero (#7091)

Removing further unnecessary imports on the path to major tactics.

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

Diff
@@ -5,7 +5,7 @@ Authors: Johannes Hölzl, Mario Carneiro
 -/
 import Mathlib.Data.Rat.Cast.Defs
 import Mathlib.Data.Int.CharZero
-import Mathlib.Algebra.GroupWithZero.Power
+import Mathlib.Algebra.GroupWithZero.Units.Lemmas
 
 #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
 
@@ -128,3 +128,6 @@ theorem cast_pow (q) (k : ℕ) : ((q : ℚ) ^ k : α) = (q : α) ^ k :=
 end WithDivRing
 
 end Rat
+
+-- Guard against import creep regression.
+assert_not_exists zpow_add₀
chore: cleanup imports of Data/Rat/Cast/Defs (#7092)

Removing further unnecessary imports on the path to major tactics.

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

chore: cleanup imports of Data/Rat/Cast/Defs (#7092)

Removing further unnecessary imports on the path to major tactics.

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

Diff
@@ -5,7 +5,6 @@ Authors: Johannes Hölzl, Mario Carneiro
 -/
 import Mathlib.Data.Rat.Basic
 import Mathlib.Data.Rat.Lemmas
-import Mathlib.Algebra.Field.Basic
 
 #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
 
@@ -143,23 +142,6 @@ theorem cast_mul_of_ne_zero :
     rw [(d₁.commute_cast (_ : α)).inv_right₀.eq]
 #align rat.cast_mul_of_ne_zero Rat.cast_mul_of_ne_zero
 
--- Porting note: rewrote proof
-@[simp]
-theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ := by
-  cases' n with n
-  · simp
-  rw [cast_def, inv_coe_nat_num, inv_coe_nat_den, if_neg n.succ_ne_zero,
-    Int.sign_eq_one_of_pos (Nat.cast_pos.mpr n.succ_pos), Int.cast_one, one_div]
-#align rat.cast_inv_nat Rat.cast_inv_nat
-
--- Porting note: proof got a lot easier - is this still the intended statement?
-@[simp]
-theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ := by
-  cases' n with n n
-  · simp [ofInt_eq_cast, cast_inv_nat]
-  · simp only [ofInt_eq_cast, Int.cast_negSucc, ← Nat.cast_succ, cast_neg, inv_neg, cast_inv_nat]
-#align rat.cast_inv_int Rat.cast_inv_int
-
 @[norm_cast]
 theorem cast_inv_of_ne_zero :
   ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = (n : α)⁻¹
@@ -275,3 +257,6 @@ instance isScalarTower_right : IsScalarTower ℚ K K :=
 end Rat
 
 end SMul
+
+-- Guard against import creep regression.
+assert_not_exists add_div
chore: tidy various files (#7035)
Diff
@@ -20,9 +20,9 @@ namespace Rat
 open Rat
 
 @[simp]
-theorem cast_hom_rat : castHom ℚ = RingHom.id ℚ :=
+theorem castHom_rat : castHom ℚ = RingHom.id ℚ :=
   RingHom.ext cast_id
-#align rat.cast_hom_rat Rat.cast_hom_rat
+#align rat.cast_hom_rat Rat.castHom_rat
 
 section LinearOrderedField
 
@@ -62,22 +62,22 @@ theorem cast_lt {m n : ℚ} : (m : K) < n ↔ m < n :=
 
 @[simp]
 theorem cast_nonneg {n : ℚ} : 0 ≤ (n : K) ↔ 0 ≤ n := by
-      norm_cast
+  norm_cast
 #align rat.cast_nonneg Rat.cast_nonneg
 
 @[simp]
 theorem cast_nonpos {n : ℚ} : (n : K) ≤ 0 ↔ n ≤ 0 := by
-      norm_cast
+  norm_cast
 #align rat.cast_nonpos Rat.cast_nonpos
 
 @[simp]
 theorem cast_pos {n : ℚ} : (0 : K) < n ↔ 0 < n := by
-      norm_cast
+  norm_cast
 #align rat.cast_pos Rat.cast_pos
 
 @[simp]
 theorem cast_lt_zero {n : ℚ} : (n : K) < 0 ↔ n < 0 := by
-      norm_cast
+  norm_cast
 #align rat.cast_lt_zero Rat.cast_lt_zero
 
 @[simp, norm_cast]
chore: split Data.Rat.Cast (#7001)

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

chore: split Data.Rat.Cast (#7001)

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

Diff
@@ -3,12 +3,9 @@ Copyright (c) 2019 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
 -/
-import Mathlib.Data.Rat.Order
+import Mathlib.Data.Rat.Basic
 import Mathlib.Data.Rat.Lemmas
-import Mathlib.Data.Int.CharZero
-import Mathlib.Algebra.GroupWithZero.Power
-import Mathlib.Algebra.Field.Opposite
-import Mathlib.Algebra.Order.Field.Basic
+import Mathlib.Algebra.Field.Basic
 
 #align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
 
@@ -46,7 +43,6 @@ theorem cast_coe_int (n : ℤ) : ((n : ℚ) : α) = n :=
   (cast_def _).trans <| show (n / (1 : ℕ) : α) = n by rw [Nat.cast_one, div_one]
 #align rat.cast_coe_int Rat.cast_coe_int
 
-
 @[simp, norm_cast]
 theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
   rw [← Int.cast_ofNat, cast_coe_int, Int.cast_ofNat]
@@ -187,231 +183,8 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
   rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
 
-@[simp, norm_cast]
-theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
-  | ⟨n₁, d₁, d₁0, c₁⟩, ⟨n₂, d₂, d₂0, c₂⟩ => by
-    refine' ⟨fun h => _, congr_arg _⟩
-    have d₁a : (d₁ : α) ≠ 0 := Nat.cast_ne_zero.2 d₁0
-    have d₂a : (d₂ : α) ≠ 0 := Nat.cast_ne_zero.2 d₂0
-    rw [num_den', num_den'] at h ⊢
-    rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero] at h <;> simp [d₁0, d₂0] at h ⊢
-    rwa [eq_div_iff_mul_eq d₂a, division_def, mul_assoc, (d₁.cast_commute (d₂ : α)).inv_left₀.eq, ←
-      mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_ofNat d₁, ←
-      Int.cast_mul, ← Int.cast_ofNat d₂, ← Int.cast_mul, Int.cast_inj, ← mkRat_eq_iff d₁0 d₂0] at h
-#align rat.cast_inj Rat.cast_inj
-
-theorem cast_injective [CharZero α] : Function.Injective ((↑) : ℚ → α)
-  | _, _ => cast_inj.1
-#align rat.cast_injective Rat.cast_injective
-
-@[simp]
-theorem cast_eq_zero [CharZero α] {n : ℚ} : (n : α) = 0 ↔ n = 0 := by rw [← cast_zero, cast_inj]
-#align rat.cast_eq_zero Rat.cast_eq_zero
-
-theorem cast_ne_zero [CharZero α] {n : ℚ} : (n : α) ≠ 0 ↔ n ≠ 0 :=
-  not_congr cast_eq_zero
-#align rat.cast_ne_zero Rat.cast_ne_zero
-
-@[simp, norm_cast]
-theorem cast_add [CharZero α] (m n) : ((m + n : ℚ) : α) = m + n :=
-  cast_add_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.pos)
-#align rat.cast_add Rat.cast_add
-
-@[simp, norm_cast]
-theorem cast_sub [CharZero α] (m n) : ((m - n : ℚ) : α) = m - n :=
-  cast_sub_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.pos)
-#align rat.cast_sub Rat.cast_sub
-
-@[simp, norm_cast]
-theorem cast_mul [CharZero α] (m n) : ((m * n : ℚ) : α) = m * n :=
-  cast_mul_of_ne_zero (Nat.cast_ne_zero.2 <| ne_of_gt m.pos) (Nat.cast_ne_zero.2 <| ne_of_gt n.pos)
-#align rat.cast_mul Rat.cast_mul
-
-section
-
-set_option linter.deprecated false
-
-@[simp, norm_cast]
-theorem cast_bit0 [CharZero α] (n : ℚ) : ((bit0 n : ℚ) : α) = (bit0 n : α) :=
-  cast_add _ _
-#align rat.cast_bit0 Rat.cast_bit0
-
-@[simp, norm_cast]
-theorem cast_bit1 [CharZero α] (n : ℚ) : ((bit1 n : ℚ) : α) = (bit1 n : α) := by
-  rw [bit1, cast_add, cast_one, cast_bit0]; rfl
-#align rat.cast_bit1 Rat.cast_bit1
-
-end
-
-variable (α)
-variable [CharZero α]
-
-/-- Coercion `ℚ → α` as a `RingHom`. -/
-def castHom : ℚ →+* α where
-  toFun := (↑)
-  map_one' := cast_one
-  map_mul' := cast_mul
-  map_zero' := cast_zero
-  map_add' := cast_add
-#align rat.cast_hom Rat.castHom
-
-variable {α}
-
-@[simp]
-theorem coe_cast_hom : ⇑(castHom α) = ((↑) : ℚ → α) :=
-  rfl
-#align rat.coe_cast_hom Rat.coe_cast_hom
-
-@[simp, norm_cast]
-theorem cast_inv (n) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ :=
-  map_inv₀ (castHom α) _
-#align rat.cast_inv Rat.cast_inv
-
-@[simp, norm_cast]
-theorem cast_div (m n) : ((m / n : ℚ) : α) = m / n :=
-  map_div₀ (castHom α) _ _
-#align rat.cast_div Rat.cast_div
-
-@[simp, norm_cast]
-theorem cast_zpow (q : ℚ) (n : ℤ) : ((q ^ n : ℚ) : α) = (q : α) ^ n :=
-  map_zpow₀ (castHom α) q n
-#align rat.cast_zpow Rat.cast_zpow
-
-@[norm_cast]
-theorem cast_mk (a b : ℤ) : (a /. b : α) = a / b := by
-  simp only [divInt_eq_div, cast_div, cast_coe_int]
-#align rat.cast_mk Rat.cast_mk
-
-@[simp, norm_cast]
-theorem cast_pow (q) (k : ℕ) : ((q : ℚ) ^ k : α) = (q : α) ^ k :=
-  (castHom α).map_pow q k
-#align rat.cast_pow Rat.cast_pow
-
 end WithDivRing
 
-section LinearOrderedField
-
-variable {K : Type*} [LinearOrderedField K]
-
-theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r := by
-  rw [Rat.cast_def]
-  exact div_pos (Int.cast_pos.2 <| num_pos_iff_pos.2 hr) (Nat.cast_pos.2 r.pos)
-#align rat.cast_pos_of_pos Rat.cast_pos_of_pos
-
-@[mono]
-theorem cast_strictMono : StrictMono ((↑) : ℚ → K) := fun m n => by
-  simpa only [sub_pos, cast_sub] using @cast_pos_of_pos K _ (n - m)
-#align rat.cast_strict_mono Rat.cast_strictMono
-
-@[mono]
-theorem cast_mono : Monotone ((↑) : ℚ → K) :=
-  cast_strictMono.monotone
-#align rat.cast_mono Rat.cast_mono
-
-/-- Coercion from `ℚ` as an order embedding. -/
-@[simps!]
-def castOrderEmbedding : ℚ ↪o K :=
-  OrderEmbedding.ofStrictMono (↑) cast_strictMono
-#align rat.cast_order_embedding Rat.castOrderEmbedding
-#align rat.cast_order_embedding_apply Rat.castOrderEmbedding_apply
-
-@[simp, norm_cast]
-theorem cast_le {m n : ℚ} : (m : K) ≤ n ↔ m ≤ n :=
-  castOrderEmbedding.le_iff_le
-#align rat.cast_le Rat.cast_le
-
-@[simp, norm_cast]
-theorem cast_lt {m n : ℚ} : (m : K) < n ↔ m < n :=
-  cast_strictMono.lt_iff_lt
-#align rat.cast_lt Rat.cast_lt
-
-@[simp]
-theorem cast_nonneg {n : ℚ} : 0 ≤ (n : K) ↔ 0 ≤ n := by
-      norm_cast
-#align rat.cast_nonneg Rat.cast_nonneg
-
-@[simp]
-theorem cast_nonpos {n : ℚ} : (n : K) ≤ 0 ↔ n ≤ 0 := by
-      norm_cast
-#align rat.cast_nonpos Rat.cast_nonpos
-
-@[simp]
-theorem cast_pos {n : ℚ} : (0 : K) < n ↔ 0 < n := by
-      norm_cast
-#align rat.cast_pos Rat.cast_pos
-
-@[simp]
-theorem cast_lt_zero {n : ℚ} : (n : K) < 0 ↔ n < 0 := by
-      norm_cast
-#align rat.cast_lt_zero Rat.cast_lt_zero
-
-@[simp, norm_cast]
-theorem cast_min {a b : ℚ} : (↑(min a b) : K) = min (a : K) (b : K) :=
-  (@cast_mono K _).map_min
-#align rat.cast_min Rat.cast_min
-
-@[simp, norm_cast]
-theorem cast_max {a b : ℚ} : (↑(max a b) : K) = max (a : K) (b : K) :=
-  (@cast_mono K _).map_max
-#align rat.cast_max Rat.cast_max
-
-
-@[simp, norm_cast]
-theorem cast_abs {q : ℚ} : ((|q| : ℚ) : K) = |(q : K)| := by simp [abs_eq_max_neg]
-#align rat.cast_abs Rat.cast_abs
-
-open Set
-
-@[simp]
-theorem preimage_cast_Icc (a b : ℚ) : (↑) ⁻¹' Icc (a : K) b = Icc a b := by
-  ext x
-  simp
-#align rat.preimage_cast_Icc Rat.preimage_cast_Icc
-
-@[simp]
-theorem preimage_cast_Ico (a b : ℚ) : (↑) ⁻¹' Ico (a : K) b = Ico a b := by
-  ext x
-  simp
-#align rat.preimage_cast_Ico Rat.preimage_cast_Ico
-
-@[simp]
-theorem preimage_cast_Ioc (a b : ℚ) : (↑) ⁻¹' Ioc (a : K) b = Ioc a b := by
-  ext x
-  simp
-#align rat.preimage_cast_Ioc Rat.preimage_cast_Ioc
-
-@[simp]
-theorem preimage_cast_Ioo (a b : ℚ) : (↑) ⁻¹' Ioo (a : K) b = Ioo a b := by
-  ext x
-  simp
-#align rat.preimage_cast_Ioo Rat.preimage_cast_Ioo
-
-@[simp]
-theorem preimage_cast_Ici (a : ℚ) : (↑) ⁻¹' Ici (a : K) = Ici a := by
-  ext x
-  simp
-#align rat.preimage_cast_Ici Rat.preimage_cast_Ici
-
-@[simp]
-theorem preimage_cast_Iic (a : ℚ) : (↑) ⁻¹' Iic (a : K) = Iic a := by
-  ext x
-  simp
-#align rat.preimage_cast_Iic Rat.preimage_cast_Iic
-
-@[simp]
-theorem preimage_cast_Ioi (a : ℚ) : (↑) ⁻¹' Ioi (a : K) = Ioi a := by
-  ext x
-  simp
-#align rat.preimage_cast_Ioi Rat.preimage_cast_Ioi
-
-@[simp]
-theorem preimage_cast_Iio (a : ℚ) : (↑) ⁻¹' Iio (a : K) = Iio a := by
-  ext x
-  simp
-#align rat.preimage_cast_Iio Rat.preimage_cast_Iio
-
-end LinearOrderedField
-
 -- Porting note: statement made more explicit
 @[norm_cast]
 theorem cast_id (n : ℚ) : Rat.cast n = n := rfl
@@ -422,11 +195,6 @@ theorem cast_eq_id : ((↑) : ℚ → ℚ) = id :=
   funext fun _ => rfl
 #align rat.cast_eq_id Rat.cast_eq_id
 
-@[simp]
-theorem cast_hom_rat : castHom ℚ = RingHom.id ℚ :=
-  RingHom.ext cast_id
-#align rat.cast_hom_rat Rat.cast_hom_rat
-
 end Rat
 
 open Rat
chore: split Data.Rat.Cast (#7001)

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

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
@@ -31,7 +31,7 @@ rat, rationals, field, ℚ, numerator, denominator, num, denom, cast, coercion,
 -/
 
 
-variable {F ι α β : Type _}
+variable {F ι α β : Type*}
 
 namespace Rat
 
@@ -291,7 +291,7 @@ end WithDivRing
 
 section LinearOrderedField
 
-variable {K : Type _} [LinearOrderedField K]
+variable {K : Type*} [LinearOrderedField K]
 
 theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r := by
   rw [Rat.cast_def]
@@ -443,7 +443,7 @@ theorem eq_ratCast {k} [DivisionRing k] [RingHomClass F ℚ k] (f : F) (r : ℚ)
 
 namespace MonoidWithZeroHom
 
-variable {M₀ : Type _} [MonoidWithZero M₀] [MonoidWithZeroHomClass F ℚ M₀] {f g : F}
+variable {M₀ : Type*} [MonoidWithZero M₀] [MonoidWithZeroHomClass F ℚ M₀] {f g : F}
 
 
 /-- If `f` and `g` agree on the integers then they are equal `φ`. -/
@@ -478,13 +478,13 @@ end MonoidWithZeroHom
 
 /-- Any two ring homomorphisms from `ℚ` to a semiring are equal. If the codomain is a division ring,
 then this lemma follows from `eq_ratCast`. -/
-theorem RingHom.ext_rat {R : Type _} [Semiring R] [RingHomClass F ℚ R] (f g : F) : f = g :=
+theorem RingHom.ext_rat {R : Type*} [Semiring R] [RingHomClass F ℚ R] (f g : F) : f = g :=
   MonoidWithZeroHom.ext_rat' <|
     RingHom.congr_fun <|
       ((f : ℚ →+* R).comp (Int.castRingHom ℚ)).ext_int ((g : ℚ →+* R).comp (Int.castRingHom ℚ))
 #align ring_hom.ext_rat RingHom.ext_rat
 
-instance Rat.subsingleton_ringHom {R : Type _} [Semiring R] : Subsingleton (ℚ →+* R) :=
+instance Rat.subsingleton_ringHom {R : Type*} [Semiring R] : Subsingleton (ℚ →+* R) :=
   ⟨RingHom.ext_rat⟩
 #align rat.subsingleton_ring_hom Rat.subsingleton_ringHom
 
@@ -492,7 +492,7 @@ section SMul
 
 namespace Rat
 
-variable {K : Type _} [DivisionRing K]
+variable {K : Type*} [DivisionRing K]
 
 instance (priority := 100) distribSMul : DistribSMul ℚ K where
   smul := (· • ·)
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,11 +2,6 @@
 Copyright (c) 2019 Johannes Hölzl. All rights reserved.
 Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
-
-! This file was ported from Lean 3 source module data.rat.cast
-! leanprover-community/mathlib commit acebd8d49928f6ed8920e502a6c90674e75bd441
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
 -/
 import Mathlib.Data.Rat.Order
 import Mathlib.Data.Rat.Lemmas
@@ -15,6 +10,8 @@ import Mathlib.Algebra.GroupWithZero.Power
 import Mathlib.Algebra.Field.Opposite
 import Mathlib.Algebra.Order.Field.Basic
 
+#align_import data.rat.cast from "leanprover-community/mathlib"@"acebd8d49928f6ed8920e502a6c90674e75bd441"
+
 
 /-!
 # Casts for Rational Numbers
chore: remove occurrences of semicolon after space (#5713)

This is the second half of the changes originally in #5699, removing all occurrences of ; after a space and implementing a linter rule to enforce it.

In most cases this 2-character substring has a space after it, so the following command was run first:

find . -type f -name "*.lean" -exec sed -i -E 's/ ; /; /g' {} \;

The remaining cases were few enough in number that they were done manually.

Diff
@@ -106,9 +106,9 @@ theorem cast_add_of_ne_zero :
     ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m + n : ℚ) : α) = m + n
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) => by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0 ; exact d₁0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0; exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0 ; exact d₂0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0; exact d₂0 Nat.cast_zero
     rw [num_den', num_den', add_def'' d₁0' d₂0']
     suffices (n₁ * (d₂ * ((d₂ : α)⁻¹ * (d₁ : α)⁻¹)) + n₂ * (d₁ * (d₂ : α)⁻¹) * (d₁ : α)⁻¹ : α)
         = n₁ * (d₁ : α)⁻¹ + n₂ * (d₂ : α)⁻¹ by
@@ -130,7 +130,7 @@ theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
 @[norm_cast]
 theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den : α) ≠ 0) :
     ((m - n : ℚ) : α) = m - n := by
-  have : ((-n).den : α) ≠ 0 := by cases n ; exact n0
+  have : ((-n).den : α) ≠ 0 := by cases n; exact n0
   simp [sub_eq_add_neg, cast_add_of_ne_zero m0 this]
 #align rat.cast_sub_of_ne_zero Rat.cast_sub_of_ne_zero
 
@@ -139,9 +139,9 @@ theorem cast_mul_of_ne_zero :
     ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m * n : ℚ) : α) = m * n
   | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) => by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0 ; exact d₁0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0; exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0 ; exact d₂0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0; exact d₂0 Nat.cast_zero
     rw [num_den', num_den', mul_def' d₁0' d₂0']
     suffices (n₁ * (n₂ * (d₂ : α)⁻¹ * (d₁ : α)⁻¹) : α) = n₁ * ((d₁ : α)⁻¹ * (n₂ * (d₂ : α)⁻¹)) by
       rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, cast_mk_of_ne_zero]
@@ -171,9 +171,9 @@ theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ := by
 theorem cast_inv_of_ne_zero :
   ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = (n : α)⁻¹
   | ⟨n, d, h, c⟩ => fun (n0 : (n : α) ≠ 0) (d0 : (d : α) ≠ 0) => by
-    have _ : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0 ; exact n0 Int.cast_zero
+    have _ : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0; exact n0 Int.cast_zero
     have _ : (d : ℤ) ≠ 0 :=
-      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d0 ; exact d0 Nat.cast_zero
+      Int.coe_nat_ne_zero.2 fun e => by rw [e] at d0; exact d0 Nat.cast_zero
     rw [num_den', inv_def']
     rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, inv_div] <;> simp [n0, d0]
 #align rat.cast_inv_of_ne_zero Rat.cast_inv_of_ne_zero
@@ -186,7 +186,7 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
     apply den_dvd
   have : (n⁻¹.den : α) = 0 → (n.num : α) = 0 := fun h => by
     let ⟨k, e⟩ := this
-    have := congr_arg ((↑) : ℤ → α) e ; rwa [Int.cast_mul, Int.cast_ofNat, h, zero_mul] at this
+    have := congr_arg ((↑) : ℤ → α) e; rwa [Int.cast_mul, Int.cast_ofNat, h, zero_mul] at this
   rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
 #align rat.cast_div_of_ne_zero Rat.cast_div_of_ne_zero
 
@@ -241,7 +241,7 @@ theorem cast_bit0 [CharZero α] (n : ℚ) : ((bit0 n : ℚ) : α) = (bit0 n : α
 
 @[simp, norm_cast]
 theorem cast_bit1 [CharZero α] (n : ℚ) : ((bit1 n : ℚ) : α) = (bit1 n : α) := by
-  rw [bit1, cast_add, cast_one, cast_bit0] ; rfl
+  rw [bit1, cast_add, cast_one, cast_bit0]; rfl
 #align rat.cast_bit1 Rat.cast_bit1
 
 end
chore: clean up spacing around at and goals (#5387)

Changes are of the form

  • some_tactic at h⊢ -> some_tactic at h ⊢
  • some_tactic at h -> some_tactic at h
Diff
@@ -196,8 +196,8 @@ theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
     refine' ⟨fun h => _, congr_arg _⟩
     have d₁a : (d₁ : α) ≠ 0 := Nat.cast_ne_zero.2 d₁0
     have d₂a : (d₂ : α) ≠ 0 := Nat.cast_ne_zero.2 d₂0
-    rw [num_den', num_den'] at h⊢
-    rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero] at h <;> simp [d₁0, d₂0] at h⊢
+    rw [num_den', num_den'] at h ⊢
+    rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero] at h <;> simp [d₁0, d₂0] at h ⊢
     rwa [eq_div_iff_mul_eq d₂a, division_def, mul_assoc, (d₁.cast_commute (d₂ : α)).inv_left₀.eq, ←
       mul_assoc, ← division_def, eq_comm, eq_div_iff_mul_eq d₁a, eq_comm, ← Int.cast_ofNat d₁, ←
       Int.cast_mul, ← Int.cast_ofNat d₂, ← Int.cast_mul, Int.cast_inj, ← mkRat_eq_iff d₁0 d₂0] at h
chore: reenable eta, bump to nightly 2023-05-16 (#3414)

Now that leanprover/lean4#2210 has been merged, this PR:

  • removes all the set_option synthInstance.etaExperiment true commands (and some etaExperiment% term elaborators)
  • removes many but not quite all set_option maxHeartbeats commands
  • makes various other changes required to cope with leanprover/lean4#2210.

Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Matthew Ballard <matt@mrb.email>

Diff
@@ -434,7 +434,6 @@ end Rat
 
 open Rat
 
-set_option synthInstance.etaExperiment true in
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
     f q = q := by rw [cast_def, map_div₀, map_intCast, map_natCast, cast_def]
chore(*): tweak priorities for linear algebra (#3840)

We make sure that the canonical path from NonAssocSemiring to Ring passes through Semiring, as this is a path which is followed all the time in linear algebra where the defining semilinear map σ : R →+* S depends on the NonAssocSemiring structure of R and S while the module definition depends on the Semiring structure.

Tt is not currently possible to adjust priorities by hand (see lean4#2115). Instead, the last declared instance is used, so we make sure that Semiring is declared after NonAssocRing, so that Semiring -> NonAssocSemiring is tried before NonAssocRing -> NonAssocSemiring.

Diff
@@ -434,6 +434,7 @@ end Rat
 
 open Rat
 
+set_option synthInstance.etaExperiment true in
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
     f q = q := by rw [cast_def, map_div₀, map_intCast, map_natCast, cast_def]
chore: bye-bye, solo bys! (#3825)

This PR puts, with one exception, every single remaining by that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh. The exception is when the by begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.

Essentially this is s/\n *by$/ by/g, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated bys".

Diff
@@ -104,16 +104,14 @@ theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a
 @[norm_cast]
 theorem cast_add_of_ne_zero :
     ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m + n : ℚ) : α) = m + n
-  | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) =>
-    by
+  | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) => by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
       Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0 ; exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
       Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0 ; exact d₂0 Nat.cast_zero
     rw [num_den', num_den', add_def'' d₁0' d₂0']
     suffices (n₁ * (d₂ * ((d₂ : α)⁻¹ * (d₁ : α)⁻¹)) + n₂ * (d₁ * (d₂ : α)⁻¹) * (d₁ : α)⁻¹ : α)
-        = n₁ * (d₁ : α)⁻¹ + n₂ * (d₂ : α)⁻¹
-      by
+        = n₁ * (d₁ : α)⁻¹ + n₂ * (d₂ : α)⁻¹ by
       rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, cast_mk_of_ne_zero]
       · simpa [division_def, left_distrib, right_distrib, mul_inv_rev, d₁0, d₂0, mul_assoc]
       all_goals simp [d₁0, d₂0]
@@ -139,15 +137,13 @@ theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den :
 @[norm_cast]
 theorem cast_mul_of_ne_zero :
     ∀ {m n : ℚ}, (m.den : α) ≠ 0 → (n.den : α) ≠ 0 → ((m * n : ℚ) : α) = m * n
-  | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) =>
-    by
+  | ⟨n₁, d₁, h₁, c₁⟩, ⟨n₂, d₂, h₂, c₂⟩ => fun (d₁0 : (d₁ : α) ≠ 0) (d₂0 : (d₂ : α) ≠ 0) => by
     have d₁0' : (d₁ : ℤ) ≠ 0 :=
       Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₁0 ; exact d₁0 Nat.cast_zero
     have d₂0' : (d₂ : ℤ) ≠ 0 :=
       Int.coe_nat_ne_zero.2 fun e => by rw [e] at d₂0 ; exact d₂0 Nat.cast_zero
     rw [num_den', num_den', mul_def' d₁0' d₂0']
-    suffices (n₁ * (n₂ * (d₂ : α)⁻¹ * (d₁ : α)⁻¹) : α) = n₁ * ((d₁ : α)⁻¹ * (n₂ * (d₂ : α)⁻¹))
-      by
+    suffices (n₁ * (n₂ * (d₂ : α)⁻¹ * (d₁ : α)⁻¹) : α) = n₁ * ((d₁ : α)⁻¹ * (n₂ * (d₂ : α)⁻¹)) by
       rw [cast_mk_of_ne_zero, cast_mk_of_ne_zero, cast_mk_of_ne_zero]
       · simpa [division_def, mul_inv_rev, d₁0, d₂0, mul_assoc]
       all_goals simp [d₁0, d₂0]
@@ -174,8 +170,7 @@ theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ := by
 @[norm_cast]
 theorem cast_inv_of_ne_zero :
   ∀ {n : ℚ}, (n.num : α) ≠ 0 → (n.den : α) ≠ 0 → ((n⁻¹ : ℚ) : α) = (n : α)⁻¹
-  | ⟨n, d, h, c⟩ => fun (n0 : (n : α) ≠ 0) (d0 : (d : α) ≠ 0) =>
-    by
+  | ⟨n, d, h, c⟩ => fun (n0 : (n : α) ≠ 0) (d0 : (d : α) ≠ 0) => by
     have _ : (n : ℤ) ≠ 0 := fun e => by rw [e] at n0 ; exact n0 Int.cast_zero
     have _ : (d : ℤ) ≠ 0 :=
       Int.coe_nat_ne_zero.2 fun e => by rw [e] at d0 ; exact d0 Nat.cast_zero
@@ -189,8 +184,7 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
   have : (n⁻¹.den : ℤ) ∣ n.num := by
     conv in n⁻¹.den => rw [← @num_den n, inv_def']
     apply den_dvd
-  have : (n⁻¹.den : α) = 0 → (n.num : α) = 0 := fun h =>
-    by
+  have : (n⁻¹.den : α) = 0 → (n.num : α) = 0 := fun h => by
     let ⟨k, e⟩ := this
     have := congr_arg ((↑) : ℤ → α) e ; rwa [Int.cast_mul, Int.cast_ofNat, h, zero_mul] at this
   rw [division_def, cast_mul_of_ne_zero md (mt this nn), cast_inv_of_ne_zero nn nd, division_def]
@@ -198,8 +192,7 @@ theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num :
 
 @[simp, norm_cast]
 theorem cast_inj [CharZero α] : ∀ {m n : ℚ}, (m : α) = n ↔ m = n
-  | ⟨n₁, d₁, d₁0, c₁⟩, ⟨n₂, d₂, d₂0, c₂⟩ =>
-    by
+  | ⟨n₁, d₁, d₁0, c₁⟩, ⟨n₂, d₂, d₂0, c₂⟩ => by
     refine' ⟨fun h => _, congr_arg _⟩
     have d₁a : (d₁ : α) ≠ 0 := Nat.cast_ne_zero.2 d₁0
     have d₂a : (d₂ : α) ≠ 0 := Nat.cast_ne_zero.2 d₂0
chore: fix #align lines (#3640)

This PR fixes two things:

  • Most align statements for definitions and theorems and instances that are separated by two newlines from the relevant declaration (s/\n\n#align/\n#align). This is often seen in the mathport output after ending calc blocks.
  • All remaining more-than-one-line #align statements. (This was needed for a script I wrote for #3630.)
Diff
@@ -338,7 +338,6 @@ theorem cast_lt {m n : ℚ} : (m : K) < n ↔ m < n :=
 @[simp]
 theorem cast_nonneg {n : ℚ} : 0 ≤ (n : K) ↔ 0 ≤ n := by
       norm_cast
-
 #align rat.cast_nonneg Rat.cast_nonneg
 
 @[simp]
feat: Missing opposite instances (#2940)

Match https://github.com/leanprover-community/mathlib/pull/18602

Co-authored-by: Eric Wieser <wieser.eric@gmail.com>

Diff
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
 Authors: Johannes Hölzl, Mario Carneiro
 
 ! This file was ported from Lean 3 source module data.rat.cast
-! leanprover-community/mathlib commit 422e70f7ce183d2900c586a8cda8381e788a0c62
+! leanprover-community/mathlib commit acebd8d49928f6ed8920e502a6c90674e75bd441
 ! Please do not edit these lines, except to modify the commit id
 ! if you have ported upstream changes.
 -/
@@ -499,24 +499,6 @@ instance Rat.subsingleton_ringHom {R : Type _} [Semiring R] : Subsingleton (ℚ
   ⟨RingHom.ext_rat⟩
 #align rat.subsingleton_ring_hom Rat.subsingleton_ringHom
 
-namespace MulOpposite
-
-variable [DivisionRing α]
-
-@[simp, norm_cast]
-theorem op_ratCast (r : ℚ) : op (r : α) = (↑r : αᵐᵒᵖ) := by
-  rw [cast_def, div_eq_mul_inv, op_mul, op_inv, op_natCast, op_intCast,
-    (Commute.cast_int_right _ r.num).eq, cast_def, div_eq_mul_inv]
-#align mul_opposite.op_rat_cast MulOpposite.op_ratCast
-
-@[simp, norm_cast]
-theorem unop_ratCast (r : ℚ) : unop (r : αᵐᵒᵖ) = r := by
-  rw [cast_def, div_eq_mul_inv, unop_mul, unop_inv, unop_natCast, unop_intCast,
-    (Commute.cast_int_right _ r.num).eq, cast_def, div_eq_mul_inv]
-#align mul_opposite.unop_rat_cast MulOpposite.unop_ratCast
-
-end MulOpposite
-
 section SMul
 
 namespace Rat
chore: bump to nightly-2023-03-09 (#2762)
Diff
@@ -425,7 +425,7 @@ end LinearOrderedField
 
 -- Porting note: statement made more explicit
 @[norm_cast]
-theorem cast_id (n : ℚ) : (RatCast.ratCast n ) = n := by rfl
+theorem cast_id (n : ℚ) : Rat.cast n = n := rfl
 #align rat.cast_id Rat.cast_id
 
 @[simp]
feat: quick version of mono tactic (#1740)

This is an extremely partial port of the mono* tactic from Lean 3, implemented as a macro on top of solve_by_elim. The original mono had many configuration options and no documentation, so quite a bit is missing (and almost all the Lean 3 tests fail). Nonetheless I think it's worth merging this, because

  • it will get rid of errors in mathport output which come from lemmas being tagged with a nonexistent attribute @[mono]
  • in most mathlib3 uses of mono, only the basic version was used, not the various configuration options; thus I would guess that this version of mono will succeed fairly often in the port even though it fails nearly all the tests

Co-authored-by: thorimur <68410468+thorimur@users.noreply.github.com>

Diff
@@ -308,12 +308,12 @@ theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r := by
   exact div_pos (Int.cast_pos.2 <| num_pos_iff_pos.2 hr) (Nat.cast_pos.2 r.pos)
 #align rat.cast_pos_of_pos Rat.cast_pos_of_pos
 
--- @[mono]
+@[mono]
 theorem cast_strictMono : StrictMono ((↑) : ℚ → K) := fun m n => by
   simpa only [sub_pos, cast_sub] using @cast_pos_of_pos K _ (n - m)
 #align rat.cast_strict_mono Rat.cast_strictMono
 
--- @[mono]
+@[mono]
 theorem cast_mono : Monotone ((↑) : ℚ → K) :=
   cast_strictMono.monotone
 #align rat.cast_mono Rat.cast_mono
feat: require @[simps!] if simps runs in expensive mode (#1885)
  • This does not change the behavior of simps, just raises a linter error if you run simps in a more expensive mode without writing !.
  • Fixed some incorrect occurrences of to_additive, simps. Will do that systematically in future PR.
  • Fix port of OmegaCompletePartialOrder.ContinuousHom.ofMono a bit

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

Diff
@@ -319,7 +319,7 @@ theorem cast_mono : Monotone ((↑) : ℚ → K) :=
 #align rat.cast_mono Rat.cast_mono
 
 /-- Coercion from `ℚ` as an order embedding. -/
-@[simps]
+@[simps!]
 def castOrderEmbedding : ℚ ↪o K :=
   OrderEmbedding.ofStrictMono (↑) cast_strictMono
 #align rat.cast_order_embedding Rat.castOrderEmbedding
chore: add missing #align statements (#1902)

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

  • take all mathlib 3 names, remove _ and make all uppercase letters into lowercase
  • take all mathlib 4 names, remove _ and make all uppercase letters into lowercase
  • look for matches, and create pairs (original_lean3_name, OriginalLean4Name)
  • for pairs that do not have an align statement:
    • use Lean 4 to lookup the file + position of the Lean 4 name
    • add an #align statement just before the next empty line
  • manually fix some tiny mistakes (e.g., empty lines in proofs might cause the #align statement to have been inserted too early)
Diff
@@ -323,6 +323,7 @@ theorem cast_mono : Monotone ((↑) : ℚ → K) :=
 def castOrderEmbedding : ℚ ↪o K :=
   OrderEmbedding.ofStrictMono (↑) cast_strictMono
 #align rat.cast_order_embedding Rat.castOrderEmbedding
+#align rat.cast_order_embedding_apply Rat.castOrderEmbedding_apply
 
 @[simp, norm_cast]
 theorem cast_le {m n : ℚ} : (m : K) ≤ n ↔ m ≤ n :=
chore: fix casing errors per naming scheme (#1670)
Diff
@@ -494,9 +494,9 @@ theorem RingHom.ext_rat {R : Type _} [Semiring R] [RingHomClass F ℚ R] (f g :
       ((f : ℚ →+* R).comp (Int.castRingHom ℚ)).ext_int ((g : ℚ →+* R).comp (Int.castRingHom ℚ))
 #align ring_hom.ext_rat RingHom.ext_rat
 
-instance Rat.subsingleton_ring_hom {R : Type _} [Semiring R] : Subsingleton (ℚ →+* R) :=
+instance Rat.subsingleton_ringHom {R : Type _} [Semiring R] : Subsingleton (ℚ →+* R) :=
   ⟨RingHom.ext_rat⟩
-#align rat.subsingleton_ring_hom Rat.subsingleton_ring_hom
+#align rat.subsingleton_ring_hom Rat.subsingleton_ringHom
 
 namespace MulOpposite
 
chore: format by line breaks (#1523)

During porting, I usually fix the desired format we seem to want for the line breaks around by with

awk '{do {{if (match($0, "^  by$") && length(p) < 98) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}' Mathlib/File/Im/Working/On.lean

I noticed there are some more files that slipped through.

This pull request is the result of running this command:

grep -lr "^  by\$" Mathlib | xargs -n 1 awk -i inplace '{do {{if (match($0, "^  by$") && length(p) < 98 && not (match(p, "^[ \t]*--"))) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}'

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -79,8 +79,7 @@ theorem commute_cast (a : α) (r : ℚ) : Commute a r :=
 #align rat.commute_cast Rat.commute_cast
 
 @[norm_cast]
-theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b :=
-  by
+theorem cast_mk_of_ne_zero (a b : ℤ) (b0 : (b : α) ≠ 0) : (a /. b : α) = a / b := by
   have b0' : b ≠ 0 := by
     refine' mt _ b0
     simp (config := { contextual := true })
@@ -132,8 +131,7 @@ theorem cast_neg : ∀ n, ((-n : ℚ) : α) = -n
 
 @[norm_cast]
 theorem cast_sub_of_ne_zero {m n : ℚ} (m0 : (m.den : α) ≠ 0) (n0 : (n.den : α) ≠ 0) :
-    ((m - n : ℚ) : α) = m - n :=
-  by
+    ((m - n : ℚ) : α) = m - n := by
   have : ((-n).den : α) ≠ 0 := by cases n ; exact n0
   simp [sub_eq_add_neg, cast_add_of_ne_zero m0 this]
 #align rat.cast_sub_of_ne_zero Rat.cast_sub_of_ne_zero
@@ -158,8 +156,7 @@ theorem cast_mul_of_ne_zero :
 
 -- Porting note: rewrote proof
 @[simp]
-theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ :=
-  by
+theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ := by
   cases' n with n
   · simp
   rw [cast_def, inv_coe_nat_num, inv_coe_nat_den, if_neg n.succ_ne_zero,
@@ -168,8 +165,7 @@ theorem cast_inv_nat (n : ℕ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ :=
 
 -- Porting note: proof got a lot easier - is this still the intended statement?
 @[simp]
-theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ :=
-  by
+theorem cast_inv_int (n : ℤ) : ((n⁻¹ : ℚ) : α) = (n : α)⁻¹ := by
   cases' n with n n
   · simp [ofInt_eq_cast, cast_inv_nat]
   · simp only [ofInt_eq_cast, Int.cast_negSucc, ← Nat.cast_succ, cast_neg, inv_neg, cast_inv_nat]
@@ -189,8 +185,7 @@ theorem cast_inv_of_ne_zero :
 
 @[norm_cast]
 theorem cast_div_of_ne_zero {m n : ℚ} (md : (m.den : α) ≠ 0) (nn : (n.num : α) ≠ 0)
-    (nd : (n.den : α) ≠ 0) : ((m / n : ℚ) : α) = m / n :=
-  by
+    (nd : (n.den : α) ≠ 0) : ((m / n : ℚ) : α) = m / n := by
   have : (n⁻¹.den : ℤ) ∣ n.num := by
     conv in n⁻¹.den => rw [← @num_den n, inv_def']
     apply den_dvd
@@ -308,8 +303,7 @@ section LinearOrderedField
 
 variable {K : Type _} [LinearOrderedField K]
 
-theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r :=
-  by
+theorem cast_pos_of_pos {r : ℚ} (hr : 0 < r) : (0 : K) < r := by
   rw [Rat.cast_def]
   exact div_pos (Int.cast_pos.2 <| num_pos_iff_pos.2 hr) (Nat.cast_pos.2 r.pos)
 #align rat.cast_pos_of_pos Rat.cast_pos_of_pos
@@ -379,57 +373,49 @@ theorem cast_abs {q : ℚ} : ((|q| : ℚ) : K) = |(q : K)| := by simp [abs_eq_ma
 open Set
 
 @[simp]
-theorem preimage_cast_Icc (a b : ℚ) : (↑) ⁻¹' Icc (a : K) b = Icc a b :=
-  by
+theorem preimage_cast_Icc (a b : ℚ) : (↑) ⁻¹' Icc (a : K) b = Icc a b := by
   ext x
   simp
 #align rat.preimage_cast_Icc Rat.preimage_cast_Icc
 
 @[simp]
-theorem preimage_cast_Ico (a b : ℚ) : (↑) ⁻¹' Ico (a : K) b = Ico a b :=
-  by
+theorem preimage_cast_Ico (a b : ℚ) : (↑) ⁻¹' Ico (a : K) b = Ico a b := by
   ext x
   simp
 #align rat.preimage_cast_Ico Rat.preimage_cast_Ico
 
 @[simp]
-theorem preimage_cast_Ioc (a b : ℚ) : (↑) ⁻¹' Ioc (a : K) b = Ioc a b :=
-  by
+theorem preimage_cast_Ioc (a b : ℚ) : (↑) ⁻¹' Ioc (a : K) b = Ioc a b := by
   ext x
   simp
 #align rat.preimage_cast_Ioc Rat.preimage_cast_Ioc
 
 @[simp]
-theorem preimage_cast_Ioo (a b : ℚ) : (↑) ⁻¹' Ioo (a : K) b = Ioo a b :=
-  by
+theorem preimage_cast_Ioo (a b : ℚ) : (↑) ⁻¹' Ioo (a : K) b = Ioo a b := by
   ext x
   simp
 #align rat.preimage_cast_Ioo Rat.preimage_cast_Ioo
 
 @[simp]
-theorem preimage_cast_Ici (a : ℚ) : (↑) ⁻¹' Ici (a : K) = Ici a :=
-  by
+theorem preimage_cast_Ici (a : ℚ) : (↑) ⁻¹' Ici (a : K) = Ici a := by
   ext x
   simp
 #align rat.preimage_cast_Ici Rat.preimage_cast_Ici
 
 @[simp]
-theorem preimage_cast_Iic (a : ℚ) : (↑) ⁻¹' Iic (a : K) = Iic a :=
-  by
+theorem preimage_cast_Iic (a : ℚ) : (↑) ⁻¹' Iic (a : K) = Iic a := by
   ext x
   simp
 #align rat.preimage_cast_Iic Rat.preimage_cast_Iic
 
 @[simp]
-theorem preimage_cast_Ioi (a : ℚ) : (↑) ⁻¹' Ioi (a : K) = Ioi a :=
-  by
+theorem preimage_cast_Ioi (a : ℚ) : (↑) ⁻¹' Ioi (a : K) = Ioi a := by
   ext x
   simp
 #align rat.preimage_cast_Ioi Rat.preimage_cast_Ioi
 
 @[simp]
-theorem preimage_cast_Iio (a : ℚ) : (↑) ⁻¹' Iio (a : K) = Iio a :=
-  by
+theorem preimage_cast_Iio (a : ℚ) : (↑) ⁻¹' Iio (a : K) = Iio a := by
   ext x
   simp
 #align rat.preimage_cast_Iio Rat.preimage_cast_Iio
chore: Fixed occurences of 'Smul' (#1570)
Diff
@@ -530,17 +530,17 @@ theorem unop_ratCast (r : ℚ) : unop (r : αᵐᵒᵖ) = r := by
 
 end MulOpposite
 
-section Smul
+section SMul
 
 namespace Rat
 
 variable {K : Type _} [DivisionRing K]
 
-instance (priority := 100) distribSmul : DistribSMul ℚ K where
+instance (priority := 100) distribSMul : DistribSMul ℚ K where
   smul := (· • ·)
   smul_zero a := by rw [smul_def, mul_zero]
   smul_add a x y := by rw [smul_def, smul_def, smul_def, mul_add]
-#align rat.distrib_smul Rat.distribSmul
+#align rat.distrib_smul Rat.distribSMul
 
 instance isScalarTower_right : IsScalarTower ℚ K K :=
   ⟨fun a x y => by simp only [smul_def, smul_eq_mul, mul_assoc]⟩
@@ -548,4 +548,4 @@ instance isScalarTower_right : IsScalarTower ℚ K K :=
 
 end Rat
 
-end Smul
+end SMul
fix: norm_cast for rationals (#1422)
Diff
@@ -52,7 +52,7 @@ theorem cast_coe_int (n : ℤ) : ((n : ℚ) : α) = n :=
 
 @[simp, norm_cast]
 theorem cast_coe_nat (n : ℕ) : ((n : ℚ) : α) = n := by
-  rw [← Int.cast_ofNat, ←ofInt_eq_cast, cast_coe_int, Int.cast_ofNat]
+  rw [← Int.cast_ofNat, cast_coe_int, Int.cast_ofNat]
 #align rat.cast_coe_nat Rat.cast_coe_nat
 
 
chore: rename some 'int_cast' to 'intCast' (#1337)

Co-authored-by: Moritz Firsching <firsching@google.com>

Diff
@@ -457,7 +457,7 @@ open Rat
 
 @[simp]
 theorem map_ratCast [DivisionRing α] [DivisionRing β] [RingHomClass F α β] (f : F) (q : ℚ) :
-    f q = q := by rw [cast_def, map_div₀, map_int_cast, map_natCast, cast_def]
+    f q = q := by rw [cast_def, map_div₀, map_intCast, map_natCast, cast_def]
 #align map_rat_cast map_ratCast
 
 @[simp]
@@ -518,13 +518,13 @@ variable [DivisionRing α]
 
 @[simp, norm_cast]
 theorem op_ratCast (r : ℚ) : op (r : α) = (↑r : αᵐᵒᵖ) := by
-  rw [cast_def, div_eq_mul_inv, op_mul, op_inv, op_natCast, op_int_cast,
+  rw [cast_def, div_eq_mul_inv, op_mul, op_inv, op_natCast, op_intCast,
     (Commute.cast_int_right _ r.num).eq, cast_def, div_eq_mul_inv]
 #align mul_opposite.op_rat_cast MulOpposite.op_ratCast
 
 @[simp, norm_cast]
 theorem unop_ratCast (r : ℚ) : unop (r : αᵐᵒᵖ) = r := by
-  rw [cast_def, div_eq_mul_inv, unop_mul, unop_inv, unop_natCast, unop_int_cast,
+  rw [cast_def, div_eq_mul_inv, unop_mul, unop_inv, unop_natCast, unop_intCast,
     (Commute.cast_int_right _ r.num).eq, cast_def, div_eq_mul_inv]
 #align mul_opposite.unop_rat_cast MulOpposite.unop_ratCast
 
chore: rename HasRatCast to RatCast (#1329)
Diff
@@ -438,7 +438,7 @@ end LinearOrderedField
 
 -- Porting note: statement made more explicit
 @[norm_cast]
-theorem cast_id (n : ℚ) : (HasRatCast.ratCast n ) = n := by rfl
+theorem cast_id (n : ℚ) : (RatCast.ratCast n ) = n := by rfl
 #align rat.cast_id Rat.cast_id
 
 @[simp]
feat: port data.rat.cast (#1261)

Co-authored-by: ChrisHughes24 <chrishughes24@gmail.com> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com>

Dependencies 3 + 158

159 files ported (98.1%)
60608 lines ported (98.3%)
Show graph

The unported dependencies are