ring_theory.integral_domain
⟷
Mathlib.RingTheory.IntegralDomain
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.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(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)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,7 +3,7 @@ Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Chris Hughes
-/
-import Data.Polynomial.RingDivision
+import Algebra.Polynomial.RingDivision
import GroupTheory.SpecificGroups.Cyclic
import Algebra.GeomSum
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -82,7 +82,7 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprime
-/
-/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (i j «expr ∈ » s) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:642:2: warning: expanding binder collection (i j «expr ∈ » s) -/
#print Finset.exists_eq_pow_of_mul_eq_pow_of_coprime /-
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -90,11 +90,11 @@ theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemir
(hprod : ∏ i in s, f i = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
classical
intro i hi
- rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
+ rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
refine'
exists_eq_pow_of_mul_eq_pow_of_coprime
(IsCoprime.prod_right fun j hj => h i hi j (erase_subset i s hj) fun hij => _) hprod
- rw [hij] at hj
+ rw [hij] at hj
exact (s.not_mem_erase _) hj
#align finset.exists_eq_pow_of_mul_eq_pow_of_coprime Finset.exists_eq_pow_of_mul_eq_pow_of_coprime
-/
@@ -148,7 +148,7 @@ theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective
refine' le_trans _ (nth_roots n (f g₀)).toFinset_card_le
apply card_le_card_of_inj_on f
· intro g hg
- rw [sep_def, mem_filter] at hg
+ rw [sep_def, mem_filter] at hg
rw [Multiset.mem_toFinset, mem_nth_roots hn, ← f.map_pow, hg.2]
· intros; apply hf; assumption
#align card_nth_roots_subgroup_units card_nthRoots_subgroup_units
@@ -227,7 +227,7 @@ theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G
simp (config := { contextual := true }) only [mem_filter, one_mul, MonoidHom.map_mul, mem_univ,
mul_right_inv, eq_self_iff_true, MonoidHom.map_mul_inv, and_self_iff, forall_true_iff]
· simp only [mul_left_inj, imp_self, forall₂_true_iff]
- · simp only [true_and_iff, mem_filter, mem_univ] at hg
+ · simp only [true_and_iff, mem_filter, mem_univ] at hg
simp only [hg, mem_filter, one_mul, MonoidHom.map_mul, mem_univ, mul_right_inv,
eq_self_iff_true, exists_prop_of_true, MonoidHom.map_mul_inv, and_self_iff,
mul_inv_cancel_right, inv_mul_cancel_right]
@@ -250,7 +250,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0
rw [MonoidHom.one_apply]
cases' hx ⟨f.to_hom_units g, g, rfl⟩ with n hn
rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow,
- eq_comm] at hn
+ eq_comm] at hn
replace hx1 : (x : R) - 1 ≠ 0
exact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
let c := (univ.filter fun g => f.to_hom_units g = 1).card
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -87,7 +87,15 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
(h : ∀ (i) (_ : i ∈ s) (j) (_ : j ∈ s), i ≠ j → IsCoprime (f i) (f j))
- (hprod : ∏ i in s, f i = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by classical
+ (hprod : ∏ i in s, f i = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
+ classical
+ intro i hi
+ rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
+ refine'
+ exists_eq_pow_of_mul_eq_pow_of_coprime
+ (IsCoprime.prod_right fun j hj => h i hi j (erase_subset i s hj) fun hij => _) hprod
+ rw [hij] at hj
+ exact (s.not_mem_erase _) hj
#align finset.exists_eq_pow_of_mul_eq_pow_of_coprime Finset.exists_eq_pow_of_mul_eq_pow_of_coprime
-/
@@ -150,6 +158,10 @@ theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective
/-- A finite subgroup of the unit group of an integral domain is cyclic. -/
theorem isCyclic_of_subgroup_isDomain [Finite G] (f : G →* R) (hf : Injective f) : IsCyclic G := by
classical
+ cases nonempty_fintype G
+ apply isCyclic_of_card_pow_eq_one_le
+ intro n hn
+ convert le_trans (card_nthRoots_subgroup_units f hf hn 1) (card_nth_roots n (f 1))
#align is_cyclic_of_subgroup_is_domain isCyclic_of_subgroup_isDomain
-/
@@ -225,15 +237,69 @@ theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G
#print sum_hom_units_eq_zero /-
/-- In an integral domain, a sum indexed by a nontrivial homomorphism from a finite group is zero.
-/
-theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0 := by classical
+theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0 := by
+ classical
+ obtain ⟨x, hx⟩ :
+ ∃ x : MonoidHom.range f.to_hom_units,
+ ∀ y : MonoidHom.range f.to_hom_units, y ∈ Submonoid.powers x
+ exact IsCyclic.exists_monoid_generator
+ have hx1 : x ≠ 1 := by
+ rintro rfl
+ apply hf
+ ext g
+ rw [MonoidHom.one_apply]
+ cases' hx ⟨f.to_hom_units g, g, rfl⟩ with n hn
+ rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow,
+ eq_comm] at hn
+ replace hx1 : (x : R) - 1 ≠ 0
+ exact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
+ let c := (univ.filter fun g => f.to_hom_units g = 1).card
+ calc
+ ∑ g : G, f g = ∑ g : G, f.to_hom_units g := rfl
+ _ =
+ ∑ u : Rˣ in univ.image f.to_hom_units,
+ (univ.filter fun g => f.to_hom_units g = u).card • u :=
+ (sum_comp (coe : Rˣ → R) f.to_hom_units)
+ _ = ∑ u : Rˣ in univ.image f.to_hom_units, c • u :=
+ (sum_congr rfl fun u hu => congr_arg₂ _ _ rfl)
+ -- remaining goal 1, proven below
+ _ =
+ ∑ b : MonoidHom.range f.to_hom_units, c • ↑b :=
+ (Finset.sum_subtype _ (by simp) _)
+ _ = c • ∑ b : MonoidHom.range f.to_hom_units, (b : R) := smul_sum.symm
+ _ = c • 0 := (congr_arg₂ _ rfl _)
+ -- remaining goal 2, proven below
+ _ =
+ 0 :=
+ smul_zero _
+ · -- remaining goal 1
+ show (univ.filter fun g : G => f.to_hom_units g = u).card = c
+ apply card_fiber_eq_of_mem_range f.to_hom_units
+ · simpa only [mem_image, mem_univ, exists_prop_of_true, Set.mem_range] using hu
+ · exact ⟨1, f.to_hom_units.map_one⟩
+ -- remaining goal 2
+ show ∑ b : MonoidHom.range f.to_hom_units, (b : R) = 0
+ calc
+ ∑ b : MonoidHom.range f.to_hom_units, (b : R) = ∑ n in range (orderOf x), x ^ n :=
+ Eq.symm <|
+ sum_bij (fun n _ => x ^ n) (by simp only [mem_univ, forall_true_iff])
+ (by
+ simp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow, Units.val_pow_eq_pow_val,
+ coe_coe])
+ (fun m n hm hn =>
+ pow_injOn_Iio_orderOf _ (by simpa only [mem_range] using hm)
+ (by simpa only [mem_range] using hn))
+ fun b hb =>
+ let ⟨n, hn⟩ := hx b
+ ⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)), by rw [← pow_mod_orderOf, hn]⟩
+ _ = 0 := _
+ rw [← mul_left_inj' hx1, MulZeroClass.zero_mul, geom_sum_mul, coe_coe]
+ norm_cast
+ simp [pow_orderOf_eq_one]
#align sum_hom_units_eq_zero sum_hom_units_eq_zero
-/
#print sum_hom_units /-
--- remaining goal 1, proven below
--- remaining goal 2, proven below
--- remaining goal 1
--- remaining goal 2
/-- In an integral domain, a sum indexed by a homomorphism from a finite group is zero,
unless the homomorphism is trivial, in which case the sum is equal to the cardinality of the group.
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -87,15 +87,7 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
(h : ∀ (i) (_ : i ∈ s) (j) (_ : j ∈ s), i ≠ j → IsCoprime (f i) (f j))
- (hprod : ∏ i in s, f i = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
- classical
- intro i hi
- rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
- refine'
- exists_eq_pow_of_mul_eq_pow_of_coprime
- (IsCoprime.prod_right fun j hj => h i hi j (erase_subset i s hj) fun hij => _) hprod
- rw [hij] at hj
- exact (s.not_mem_erase _) hj
+ (hprod : ∏ i in s, f i = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by classical
#align finset.exists_eq_pow_of_mul_eq_pow_of_coprime Finset.exists_eq_pow_of_mul_eq_pow_of_coprime
-/
@@ -158,10 +150,6 @@ theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective
/-- A finite subgroup of the unit group of an integral domain is cyclic. -/
theorem isCyclic_of_subgroup_isDomain [Finite G] (f : G →* R) (hf : Injective f) : IsCyclic G := by
classical
- cases nonempty_fintype G
- apply isCyclic_of_card_pow_eq_one_le
- intro n hn
- convert le_trans (card_nthRoots_subgroup_units f hf hn 1) (card_nth_roots n (f 1))
#align is_cyclic_of_subgroup_is_domain isCyclic_of_subgroup_isDomain
-/
@@ -237,69 +225,15 @@ theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G
#print sum_hom_units_eq_zero /-
/-- In an integral domain, a sum indexed by a nontrivial homomorphism from a finite group is zero.
-/
-theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0 := by
- classical
- obtain ⟨x, hx⟩ :
- ∃ x : MonoidHom.range f.to_hom_units,
- ∀ y : MonoidHom.range f.to_hom_units, y ∈ Submonoid.powers x
- exact IsCyclic.exists_monoid_generator
- have hx1 : x ≠ 1 := by
- rintro rfl
- apply hf
- ext g
- rw [MonoidHom.one_apply]
- cases' hx ⟨f.to_hom_units g, g, rfl⟩ with n hn
- rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow,
- eq_comm] at hn
- replace hx1 : (x : R) - 1 ≠ 0
- exact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
- let c := (univ.filter fun g => f.to_hom_units g = 1).card
- calc
- ∑ g : G, f g = ∑ g : G, f.to_hom_units g := rfl
- _ =
- ∑ u : Rˣ in univ.image f.to_hom_units,
- (univ.filter fun g => f.to_hom_units g = u).card • u :=
- (sum_comp (coe : Rˣ → R) f.to_hom_units)
- _ = ∑ u : Rˣ in univ.image f.to_hom_units, c • u :=
- (sum_congr rfl fun u hu => congr_arg₂ _ _ rfl)
- -- remaining goal 1, proven below
- _ =
- ∑ b : MonoidHom.range f.to_hom_units, c • ↑b :=
- (Finset.sum_subtype _ (by simp) _)
- _ = c • ∑ b : MonoidHom.range f.to_hom_units, (b : R) := smul_sum.symm
- _ = c • 0 := (congr_arg₂ _ rfl _)
- -- remaining goal 2, proven below
- _ =
- 0 :=
- smul_zero _
- · -- remaining goal 1
- show (univ.filter fun g : G => f.to_hom_units g = u).card = c
- apply card_fiber_eq_of_mem_range f.to_hom_units
- · simpa only [mem_image, mem_univ, exists_prop_of_true, Set.mem_range] using hu
- · exact ⟨1, f.to_hom_units.map_one⟩
- -- remaining goal 2
- show ∑ b : MonoidHom.range f.to_hom_units, (b : R) = 0
- calc
- ∑ b : MonoidHom.range f.to_hom_units, (b : R) = ∑ n in range (orderOf x), x ^ n :=
- Eq.symm <|
- sum_bij (fun n _ => x ^ n) (by simp only [mem_univ, forall_true_iff])
- (by
- simp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow, Units.val_pow_eq_pow_val,
- coe_coe])
- (fun m n hm hn =>
- pow_injOn_Iio_orderOf _ (by simpa only [mem_range] using hm)
- (by simpa only [mem_range] using hn))
- fun b hb =>
- let ⟨n, hn⟩ := hx b
- ⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)), by rw [← pow_mod_orderOf, hn]⟩
- _ = 0 := _
- rw [← mul_left_inj' hx1, MulZeroClass.zero_mul, geom_sum_mul, coe_coe]
- norm_cast
- simp [pow_orderOf_eq_one]
+theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0 := by classical
#align sum_hom_units_eq_zero sum_hom_units_eq_zero
-/
#print sum_hom_units /-
+-- remaining goal 1, proven below
+-- remaining goal 2, proven below
+-- remaining goal 1
+-- remaining goal 2
/-- In an integral domain, a sum indexed by a homomorphism from a finite group is zero,
unless the homomorphism is trivial, in which case the sum is equal to the cardinality of the group.
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -287,12 +287,11 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0
simp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow, Units.val_pow_eq_pow_val,
coe_coe])
(fun m n hm hn =>
- pow_injective_of_lt_orderOf _ (by simpa only [mem_range] using hm)
+ pow_injOn_Iio_orderOf _ (by simpa only [mem_range] using hm)
(by simpa only [mem_range] using hn))
fun b hb =>
let ⟨n, hn⟩ := hx b
- ⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)), by
- rw [← pow_eq_mod_orderOf, hn]⟩
+ ⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)), by rw [← pow_mod_orderOf, hn]⟩
_ = 0 := _
rw [← mul_left_inj' hx1, MulZeroClass.zero_mul, geom_sum_mul, coe_coe]
norm_cast
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Chris Hughes
-/
-import Mathbin.Data.Polynomial.RingDivision
-import Mathbin.GroupTheory.SpecificGroups.Cyclic
-import Mathbin.Algebra.GeomSum
+import Data.Polynomial.RingDivision
+import GroupTheory.SpecificGroups.Cyclic
+import Algebra.GeomSum
#align_import ring_theory.integral_domain from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
@@ -82,7 +82,7 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprime
-/
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (i j «expr ∈ » s) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:641:2: warning: expanding binder collection (i j «expr ∈ » s) -/
#print Finset.exists_eq_pow_of_mul_eq_pow_of_coprime /-
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Chris Hughes
-
-! This file was ported from Lean 3 source module ring_theory.integral_domain
-! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Polynomial.RingDivision
import Mathbin.GroupTheory.SpecificGroups.Cyclic
import Mathbin.Algebra.GeomSum
+#align_import ring_theory.integral_domain from "leanprover-community/mathlib"@"0b7c740e25651db0ba63648fbae9f9d6f941e31b"
+
/-!
# Integral domains
@@ -85,7 +82,7 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprime
-/
-/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (i j «expr ∈ » s) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (i j «expr ∈ » s) -/
#print Finset.exists_eq_pow_of_mul_eq_pow_of_coprime /-
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -46,13 +46,17 @@ section CancelMonoidWithZero
-- There doesn't seem to be a better home for these right now
variable {M : Type _} [CancelMonoidWithZero M] [Finite M]
+#print mul_right_bijective_of_finite₀ /-
theorem mul_right_bijective_of_finite₀ {a : M} (ha : a ≠ 0) : Bijective fun b => a * b :=
Finite.injective_iff_bijective.1 <| mul_right_injective₀ ha
#align mul_right_bijective_of_finite₀ mul_right_bijective_of_finite₀
+-/
+#print mul_left_bijective_of_finite₀ /-
theorem mul_left_bijective_of_finite₀ {a : M} (ha : a ≠ 0) : Bijective fun b => b * a :=
Finite.injective_iff_bijective.1 <| mul_left_injective₀ ha
#align mul_left_bijective_of_finite₀ mul_left_bijective_of_finite₀
+-/
#print Fintype.groupWithZeroOfCancel /-
/-- Every finite nontrivial cancel_monoid_with_zero is a group_with_zero. -/
@@ -68,6 +72,7 @@ def Fintype.groupWithZeroOfCancel (M : Type _) [CancelMonoidWithZero M] [Decidab
#align fintype.group_with_zero_of_cancel Fintype.groupWithZeroOfCancel
-/
+#print exists_eq_pow_of_mul_eq_pow_of_coprime /-
theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {a b c : R} {n : ℕ} (cp : IsCoprime a b) (h : a * b = c ^ n) :
∃ d : R, a = d ^ n :=
@@ -78,8 +83,10 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
exact
dvd_add (dvd_mul_of_dvd_right (gcd_dvd_left _ _) _) (dvd_mul_of_dvd_right (gcd_dvd_right _ _) _)
#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprime
+-/
/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (i j «expr ∈ » s) -/
+#print Finset.exists_eq_pow_of_mul_eq_pow_of_coprime /-
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
(h : ∀ (i) (_ : i ∈ s) (j) (_ : j ∈ s), i ≠ j → IsCoprime (f i) (f j))
@@ -93,6 +100,7 @@ theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemir
rw [hij] at hj
exact (s.not_mem_erase _) hj
#align finset.exists_eq_pow_of_mul_eq_pow_of_coprime Finset.exists_eq_pow_of_mul_eq_pow_of_coprime
+-/
end CancelMonoidWithZero
@@ -135,6 +143,7 @@ end Ring
variable [CommRing R] [IsDomain R] [Group G]
+#print card_nthRoots_subgroup_units /-
theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective f) {n : ℕ}
(hn : 0 < n) (g₀ : G) : ({g ∈ univ | g ^ n = g₀} : Finset G).card ≤ (nthRoots n (f g₀)).card :=
by
@@ -146,7 +155,9 @@ theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective
rw [Multiset.mem_toFinset, mem_nth_roots hn, ← f.map_pow, hg.2]
· intros; apply hf; assumption
#align card_nth_roots_subgroup_units card_nthRoots_subgroup_units
+-/
+#print isCyclic_of_subgroup_isDomain /-
/-- A finite subgroup of the unit group of an integral domain is cyclic. -/
theorem isCyclic_of_subgroup_isDomain [Finite G] (f : G →* R) (hf : Injective f) : IsCyclic G := by
classical
@@ -155,6 +166,7 @@ theorem isCyclic_of_subgroup_isDomain [Finite G] (f : G →* R) (hf : Injective
intro n hn
convert le_trans (card_nthRoots_subgroup_units f hf hn 1) (card_nth_roots n (f 1))
#align is_cyclic_of_subgroup_is_domain isCyclic_of_subgroup_isDomain
+-/
/-- The unit group of a finite integral domain is cyclic.
@@ -167,6 +179,7 @@ section
variable (S : Subgroup Rˣ) [Finite S]
+#print subgroup_units_cyclic /-
/-- A finite subgroup of the units of an integral domain is cyclic. -/
instance subgroup_units_cyclic : IsCyclic S :=
by
@@ -174,6 +187,7 @@ instance subgroup_units_cyclic : IsCyclic S :=
· simp
· intros; simp
#align subgroup_units_cyclic subgroup_units_cyclic
+-/
end
@@ -185,6 +199,7 @@ open scoped Polynomial
variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
+#print Polynomial.div_eq_quo_add_rem_div /-
theorem div_eq_quo_add_rem_div (f : R[X]) {g : R[X]} (hg : g.Monic) :
∃ q r : R[X], r.degree < g.degree ∧ (↑f : K) / ↑g = ↑q + ↑r / ↑g :=
by
@@ -195,6 +210,7 @@ theorem div_eq_quo_add_rem_div (f : R[X]) {g : R[X]} (hg : g.Monic) :
norm_cast
rw [add_comm, mul_comm, mod_by_monic_add_div f hg]
#align polynomial.div_eq_quo_add_rem_div Polynomial.div_eq_quo_add_rem_div
+-/
end Polynomial
@@ -202,6 +218,7 @@ end EuclideanDivision
variable [Fintype G]
+#print card_fiber_eq_of_mem_range /-
theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G →* H) {x y : H}
(hx : x ∈ Set.range f) (hy : y ∈ Set.range f) :
(univ.filterₓ fun g => f g = x).card = (univ.filterₓ fun g => f g = y).card :=
@@ -218,7 +235,9 @@ theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G
eq_self_iff_true, exists_prop_of_true, MonoidHom.map_mul_inv, and_self_iff,
mul_inv_cancel_right, inv_mul_cancel_right]
#align card_fiber_eq_of_mem_range card_fiber_eq_of_mem_range
+-/
+#print sum_hom_units_eq_zero /-
/-- In an integral domain, a sum indexed by a nontrivial homomorphism from a finite group is zero.
-/
theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0 := by
@@ -282,7 +301,9 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0
norm_cast
simp [pow_orderOf_eq_one]
#align sum_hom_units_eq_zero sum_hom_units_eq_zero
+-/
+#print sum_hom_units /-
/-- In an integral domain, a sum indexed by a homomorphism from a finite group is zero,
unless the homomorphism is trivial, in which case the sum is equal to the cardinality of the group.
-/
@@ -293,6 +314,7 @@ theorem sum_hom_units (f : G →* R) [Decidable (f = 1)] :
· simp [h, card_univ]
· exact sum_hom_units_eq_zero f h
#align sum_hom_units sum_hom_units
+-/
end
mathlib commit https://github.com/leanprover-community/mathlib/commit/a3e83f0fa4391c8740f7d773a7a9b74e311ae2a3
@@ -83,7 +83,7 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
(h : ∀ (i) (_ : i ∈ s) (j) (_ : j ∈ s), i ≠ j → IsCoprime (f i) (f j))
- (hprod : (∏ i in s, f i) = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
+ (hprod : ∏ i in s, f i = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
classical
intro i hi
rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
@@ -221,7 +221,7 @@ theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G
/-- In an integral domain, a sum indexed by a nontrivial homomorphism from a finite group is zero.
-/
-theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) = 0 := by
+theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0 := by
classical
obtain ⟨x, hx⟩ :
∃ x : MonoidHom.range f.to_hom_units,
@@ -239,7 +239,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
exact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
let c := (univ.filter fun g => f.to_hom_units g = 1).card
calc
- (∑ g : G, f g) = ∑ g : G, f.to_hom_units g := rfl
+ ∑ g : G, f g = ∑ g : G, f.to_hom_units g := rfl
_ =
∑ u : Rˣ in univ.image f.to_hom_units,
(univ.filter fun g => f.to_hom_units g = u).card • u :=
@@ -262,9 +262,9 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
· simpa only [mem_image, mem_univ, exists_prop_of_true, Set.mem_range] using hu
· exact ⟨1, f.to_hom_units.map_one⟩
-- remaining goal 2
- show (∑ b : MonoidHom.range f.to_hom_units, (b : R)) = 0
+ show ∑ b : MonoidHom.range f.to_hom_units, (b : R) = 0
calc
- (∑ b : MonoidHom.range f.to_hom_units, (b : R)) = ∑ n in range (orderOf x), x ^ n :=
+ ∑ b : MonoidHom.range f.to_hom_units, (b : R) = ∑ n in range (orderOf x), x ^ n :=
Eq.symm <|
sum_bij (fun n _ => x ^ n) (by simp only [mem_univ, forall_true_iff])
(by
@@ -287,7 +287,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
unless the homomorphism is trivial, in which case the sum is equal to the cardinality of the group.
-/
theorem sum_hom_units (f : G →* R) [Decidable (f = 1)] :
- (∑ g : G, f g) = if f = 1 then Fintype.card G else 0 :=
+ ∑ g : G, f g = if f = 1 then Fintype.card G else 0 :=
by
split_ifs with h h
· simp [h, card_univ]
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -256,7 +256,6 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
_ =
0 :=
smul_zero _
-
· -- remaining goal 1
show (univ.filter fun g : G => f.to_hom_units g = u).card = c
apply card_fiber_eq_of_mem_range f.to_hom_units
@@ -279,7 +278,6 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)), by
rw [← pow_eq_mod_orderOf, hn]⟩
_ = 0 := _
-
rw [← mul_left_inj' hx1, MulZeroClass.zero_mul, geom_sum_mul, coe_coe]
norm_cast
simp [pow_orderOf_eq_one]
mathlib commit https://github.com/leanprover-community/mathlib/commit/31c24aa72e7b3e5ed97a8412470e904f82b81004
@@ -79,7 +79,7 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
dvd_add (dvd_mul_of_dvd_right (gcd_dvd_left _ _) _) (dvd_mul_of_dvd_right (gcd_dvd_right _ _) _)
#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprime
-/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (i j «expr ∈ » s) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:638:2: warning: expanding binder collection (i j «expr ∈ » s) -/
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
(h : ∀ (i) (_ : i ∈ s) (j) (_ : j ∈ s), i ≠ j → IsCoprime (f i) (f j))
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -85,13 +85,13 @@ theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemir
(h : ∀ (i) (_ : i ∈ s) (j) (_ : j ∈ s), i ≠ j → IsCoprime (f i) (f j))
(hprod : (∏ i in s, f i) = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
classical
- intro i hi
- rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
- refine'
- exists_eq_pow_of_mul_eq_pow_of_coprime
- (IsCoprime.prod_right fun j hj => h i hi j (erase_subset i s hj) fun hij => _) hprod
- rw [hij] at hj
- exact (s.not_mem_erase _) hj
+ intro i hi
+ rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
+ refine'
+ exists_eq_pow_of_mul_eq_pow_of_coprime
+ (IsCoprime.prod_right fun j hj => h i hi j (erase_subset i s hj) fun hij => _) hprod
+ rw [hij] at hj
+ exact (s.not_mem_erase _) hj
#align finset.exists_eq_pow_of_mul_eq_pow_of_coprime Finset.exists_eq_pow_of_mul_eq_pow_of_coprime
end CancelMonoidWithZero
@@ -136,8 +136,7 @@ end Ring
variable [CommRing R] [IsDomain R] [Group G]
theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective f) {n : ℕ}
- (hn : 0 < n) (g₀ : G) :
- ({ g ∈ univ | g ^ n = g₀ } : Finset G).card ≤ (nthRoots n (f g₀)).card :=
+ (hn : 0 < n) (g₀ : G) : ({g ∈ univ | g ^ n = g₀} : Finset G).card ≤ (nthRoots n (f g₀)).card :=
by
haveI : DecidableEq R := Classical.decEq _
refine' le_trans _ (nth_roots n (f g₀)).toFinset_card_le
@@ -151,10 +150,10 @@ theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective
/-- A finite subgroup of the unit group of an integral domain is cyclic. -/
theorem isCyclic_of_subgroup_isDomain [Finite G] (f : G →* R) (hf : Injective f) : IsCyclic G := by
classical
- cases nonempty_fintype G
- apply isCyclic_of_card_pow_eq_one_le
- intro n hn
- convert le_trans (card_nthRoots_subgroup_units f hf hn 1) (card_nth_roots n (f 1))
+ cases nonempty_fintype G
+ apply isCyclic_of_card_pow_eq_one_le
+ intro n hn
+ convert le_trans (card_nthRoots_subgroup_units f hf hn 1) (card_nth_roots n (f 1))
#align is_cyclic_of_subgroup_is_domain isCyclic_of_subgroup_isDomain
/-- The unit group of a finite integral domain is cyclic.
@@ -224,66 +223,66 @@ theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G
-/
theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) = 0 := by
classical
- obtain ⟨x, hx⟩ :
- ∃ x : MonoidHom.range f.to_hom_units,
- ∀ y : MonoidHom.range f.to_hom_units, y ∈ Submonoid.powers x
- exact IsCyclic.exists_monoid_generator
- have hx1 : x ≠ 1 := by
- rintro rfl
- apply hf
- ext g
- rw [MonoidHom.one_apply]
- cases' hx ⟨f.to_hom_units g, g, rfl⟩ with n hn
- rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow,
- eq_comm] at hn
- replace hx1 : (x : R) - 1 ≠ 0
- exact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
- let c := (univ.filter fun g => f.to_hom_units g = 1).card
- calc
- (∑ g : G, f g) = ∑ g : G, f.to_hom_units g := rfl
- _ =
- ∑ u : Rˣ in univ.image f.to_hom_units,
- (univ.filter fun g => f.to_hom_units g = u).card • u :=
- (sum_comp (coe : Rˣ → R) f.to_hom_units)
- _ = ∑ u : Rˣ in univ.image f.to_hom_units, c • u :=
- (sum_congr rfl fun u hu => congr_arg₂ _ _ rfl)
- -- remaining goal 1, proven below
- _ =
- ∑ b : MonoidHom.range f.to_hom_units, c • ↑b :=
- (Finset.sum_subtype _ (by simp) _)
- _ = c • ∑ b : MonoidHom.range f.to_hom_units, (b : R) := smul_sum.symm
- _ = c • 0 := (congr_arg₂ _ rfl _)
- -- remaining goal 2, proven below
- _ =
- 0 :=
- smul_zero _
-
- · -- remaining goal 1
- show (univ.filter fun g : G => f.to_hom_units g = u).card = c
- apply card_fiber_eq_of_mem_range f.to_hom_units
- · simpa only [mem_image, mem_univ, exists_prop_of_true, Set.mem_range] using hu
- · exact ⟨1, f.to_hom_units.map_one⟩
- -- remaining goal 2
- show (∑ b : MonoidHom.range f.to_hom_units, (b : R)) = 0
- calc
- (∑ b : MonoidHom.range f.to_hom_units, (b : R)) = ∑ n in range (orderOf x), x ^ n :=
- Eq.symm <|
- sum_bij (fun n _ => x ^ n) (by simp only [mem_univ, forall_true_iff])
- (by
- simp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow, Units.val_pow_eq_pow_val,
- coe_coe])
- (fun m n hm hn =>
- pow_injective_of_lt_orderOf _ (by simpa only [mem_range] using hm)
- (by simpa only [mem_range] using hn))
- fun b hb =>
- let ⟨n, hn⟩ := hx b
- ⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)), by
- rw [← pow_eq_mod_orderOf, hn]⟩
- _ = 0 := _
-
- rw [← mul_left_inj' hx1, MulZeroClass.zero_mul, geom_sum_mul, coe_coe]
- norm_cast
- simp [pow_orderOf_eq_one]
+ obtain ⟨x, hx⟩ :
+ ∃ x : MonoidHom.range f.to_hom_units,
+ ∀ y : MonoidHom.range f.to_hom_units, y ∈ Submonoid.powers x
+ exact IsCyclic.exists_monoid_generator
+ have hx1 : x ≠ 1 := by
+ rintro rfl
+ apply hf
+ ext g
+ rw [MonoidHom.one_apply]
+ cases' hx ⟨f.to_hom_units g, g, rfl⟩ with n hn
+ rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow,
+ eq_comm] at hn
+ replace hx1 : (x : R) - 1 ≠ 0
+ exact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
+ let c := (univ.filter fun g => f.to_hom_units g = 1).card
+ calc
+ (∑ g : G, f g) = ∑ g : G, f.to_hom_units g := rfl
+ _ =
+ ∑ u : Rˣ in univ.image f.to_hom_units,
+ (univ.filter fun g => f.to_hom_units g = u).card • u :=
+ (sum_comp (coe : Rˣ → R) f.to_hom_units)
+ _ = ∑ u : Rˣ in univ.image f.to_hom_units, c • u :=
+ (sum_congr rfl fun u hu => congr_arg₂ _ _ rfl)
+ -- remaining goal 1, proven below
+ _ =
+ ∑ b : MonoidHom.range f.to_hom_units, c • ↑b :=
+ (Finset.sum_subtype _ (by simp) _)
+ _ = c • ∑ b : MonoidHom.range f.to_hom_units, (b : R) := smul_sum.symm
+ _ = c • 0 := (congr_arg₂ _ rfl _)
+ -- remaining goal 2, proven below
+ _ =
+ 0 :=
+ smul_zero _
+
+ · -- remaining goal 1
+ show (univ.filter fun g : G => f.to_hom_units g = u).card = c
+ apply card_fiber_eq_of_mem_range f.to_hom_units
+ · simpa only [mem_image, mem_univ, exists_prop_of_true, Set.mem_range] using hu
+ · exact ⟨1, f.to_hom_units.map_one⟩
+ -- remaining goal 2
+ show (∑ b : MonoidHom.range f.to_hom_units, (b : R)) = 0
+ calc
+ (∑ b : MonoidHom.range f.to_hom_units, (b : R)) = ∑ n in range (orderOf x), x ^ n :=
+ Eq.symm <|
+ sum_bij (fun n _ => x ^ n) (by simp only [mem_univ, forall_true_iff])
+ (by
+ simp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow, Units.val_pow_eq_pow_val,
+ coe_coe])
+ (fun m n hm hn =>
+ pow_injective_of_lt_orderOf _ (by simpa only [mem_range] using hm)
+ (by simpa only [mem_range] using hn))
+ fun b hb =>
+ let ⟨n, hn⟩ := hx b
+ ⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)), by
+ rw [← pow_eq_mod_orderOf, hn]⟩
+ _ = 0 := _
+
+ rw [← mul_left_inj' hx1, MulZeroClass.zero_mul, geom_sum_mul, coe_coe]
+ norm_cast
+ simp [pow_orderOf_eq_one]
#align sum_hom_units_eq_zero sum_hom_units_eq_zero
/-- In an integral domain, a sum indexed by a homomorphism from a finite group is zero,
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -86,11 +86,11 @@ theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemir
(hprod : (∏ i in s, f i) = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
classical
intro i hi
- rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
+ rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
refine'
exists_eq_pow_of_mul_eq_pow_of_coprime
(IsCoprime.prod_right fun j hj => h i hi j (erase_subset i s hj) fun hij => _) hprod
- rw [hij] at hj
+ rw [hij] at hj
exact (s.not_mem_erase _) hj
#align finset.exists_eq_pow_of_mul_eq_pow_of_coprime Finset.exists_eq_pow_of_mul_eq_pow_of_coprime
@@ -143,9 +143,9 @@ theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective
refine' le_trans _ (nth_roots n (f g₀)).toFinset_card_le
apply card_le_card_of_inj_on f
· intro g hg
- rw [sep_def, mem_filter] at hg
+ rw [sep_def, mem_filter] at hg
rw [Multiset.mem_toFinset, mem_nth_roots hn, ← f.map_pow, hg.2]
- · intros ; apply hf; assumption
+ · intros; apply hf; assumption
#align card_nth_roots_subgroup_units card_nthRoots_subgroup_units
/-- A finite subgroup of the unit group of an integral domain is cyclic. -/
@@ -173,7 +173,7 @@ instance subgroup_units_cyclic : IsCyclic S :=
by
refine' isCyclic_of_subgroup_isDomain ⟨(coe : S → R), _, _⟩ (units.ext.comp Subtype.val_injective)
· simp
- · intros ; simp
+ · intros; simp
#align subgroup_units_cyclic subgroup_units_cyclic
end
@@ -214,7 +214,7 @@ theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G
simp (config := { contextual := true }) only [mem_filter, one_mul, MonoidHom.map_mul, mem_univ,
mul_right_inv, eq_self_iff_true, MonoidHom.map_mul_inv, and_self_iff, forall_true_iff]
· simp only [mul_left_inj, imp_self, forall₂_true_iff]
- · simp only [true_and_iff, mem_filter, mem_univ] at hg
+ · simp only [true_and_iff, mem_filter, mem_univ] at hg
simp only [hg, mem_filter, one_mul, MonoidHom.map_mul, mem_univ, mul_right_inv,
eq_self_iff_true, exists_prop_of_true, MonoidHom.map_mul_inv, and_self_iff,
mul_inv_cancel_right, inv_mul_cancel_right]
@@ -235,7 +235,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
rw [MonoidHom.one_apply]
cases' hx ⟨f.to_hom_units g, g, rfl⟩ with n hn
rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow,
- eq_comm] at hn
+ eq_comm] at hn
replace hx1 : (x : R) - 1 ≠ 0
exact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
let c := (univ.filter fun g => f.to_hom_units g = 1).card
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -39,7 +39,7 @@ section
open Finset Polynomial Function
-open BigOperators Nat
+open scoped BigOperators Nat
section CancelMonoidWithZero
@@ -182,7 +182,7 @@ section EuclideanDivision
namespace Polynomial
-open Polynomial
+open scoped Polynomial
variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -46,22 +46,10 @@ section CancelMonoidWithZero
-- There doesn't seem to be a better home for these right now
variable {M : Type _} [CancelMonoidWithZero M] [Finite M]
-/- warning: mul_right_bijective_of_finite₀ -> mul_right_bijective_of_finite₀ is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} M] [_inst_2 : Finite.{succ u1} M] {a : M}, (Ne.{succ u1} M a (OfNat.ofNat.{u1} M 0 (OfNat.mk.{u1} M 0 (Zero.zero.{u1} M (MulZeroClass.toHasZero.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))))))) -> (Function.Bijective.{succ u1, succ u1} M M (fun (b : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) a b))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} M] [_inst_2 : Finite.{succ u1} M] {a : M}, (Ne.{succ u1} M a (OfNat.ofNat.{u1} M 0 (Zero.toOfNat0.{u1} M (MonoidWithZero.toZero.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) -> (Function.Bijective.{succ u1, succ u1} M M (fun (b : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) a b))
-Case conversion may be inaccurate. Consider using '#align mul_right_bijective_of_finite₀ mul_right_bijective_of_finite₀ₓ'. -/
theorem mul_right_bijective_of_finite₀ {a : M} (ha : a ≠ 0) : Bijective fun b => a * b :=
Finite.injective_iff_bijective.1 <| mul_right_injective₀ ha
#align mul_right_bijective_of_finite₀ mul_right_bijective_of_finite₀
-/- warning: mul_left_bijective_of_finite₀ -> mul_left_bijective_of_finite₀ is a dubious translation:
-lean 3 declaration is
- forall {M : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} M] [_inst_2 : Finite.{succ u1} M] {a : M}, (Ne.{succ u1} M a (OfNat.ofNat.{u1} M 0 (OfNat.mk.{u1} M 0 (Zero.zero.{u1} M (MulZeroClass.toHasZero.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))))))) -> (Function.Bijective.{succ u1, succ u1} M M (fun (b : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) b a))
-but is expected to have type
- forall {M : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} M] [_inst_2 : Finite.{succ u1} M] {a : M}, (Ne.{succ u1} M a (OfNat.ofNat.{u1} M 0 (Zero.toOfNat0.{u1} M (MonoidWithZero.toZero.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) -> (Function.Bijective.{succ u1, succ u1} M M (fun (b : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) b a))
-Case conversion may be inaccurate. Consider using '#align mul_left_bijective_of_finite₀ mul_left_bijective_of_finite₀ₓ'. -/
theorem mul_left_bijective_of_finite₀ {a : M} (ha : a ≠ 0) : Bijective fun b => b * a :=
Finite.injective_iff_bijective.1 <| mul_left_injective₀ ha
#align mul_left_bijective_of_finite₀ mul_left_bijective_of_finite₀
@@ -80,12 +68,6 @@ def Fintype.groupWithZeroOfCancel (M : Type _) [CancelMonoidWithZero M] [Decidab
#align fintype.group_with_zero_of_cancel Fintype.groupWithZeroOfCancel
-/
-/- warning: exists_eq_pow_of_mul_eq_pow_of_coprime -> exists_eq_pow_of_mul_eq_pow_of_coprime is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_5 : GCDMonoid.{u1} R (IsDomain.toCancelCommMonoidWithZero.{u1} R _inst_3 _inst_4)] [_inst_6 : Unique.{succ u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))] {a : R} {b : R} {c : R} {n : Nat}, (IsCoprime.{u1} R _inst_3 a b) -> (Eq.{succ u1} R (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))))) a b) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) c n)) -> (Exists.{succ u1} R (fun (d : R) => Eq.{succ u1} R a (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) d n)))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_5 : GCDMonoid.{u1} R (IsDomain.toCancelCommMonoidWithZero.{u1} R _inst_3 _inst_4)] [_inst_6 : Unique.{succ u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))] {a : R} {b : R} {c : R} {n : Nat}, (IsCoprime.{u1} R _inst_3 a b) -> (Eq.{succ u1} R (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) a b) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) c n)) -> (Exists.{succ u1} R (fun (d : R) => Eq.{succ u1} R a (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) d n)))
-Case conversion may be inaccurate. Consider using '#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprimeₓ'. -/
theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {a b c : R} {n : ℕ} (cp : IsCoprime a b) (h : a * b = c ^ n) :
∃ d : R, a = d ^ n :=
@@ -97,12 +79,6 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
dvd_add (dvd_mul_of_dvd_right (gcd_dvd_left _ _) _) (dvd_mul_of_dvd_right (gcd_dvd_right _ _) _)
#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprime
-/- warning: finset.exists_eq_pow_of_mul_eq_pow_of_coprime -> Finset.exists_eq_pow_of_mul_eq_pow_of_coprime is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {R : Type.{u2}} [_inst_3 : CommSemiring.{u2} R] [_inst_4 : IsDomain.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)] [_inst_5 : GCDMonoid.{u2} R (IsDomain.toCancelCommMonoidWithZero.{u2} R _inst_3 _inst_4)] [_inst_6 : Unique.{succ u2} (Units.{u2} R (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))] {n : Nat} {c : R} {s : Finset.{u1} ι} {f : ι -> R}, (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (forall (j : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) j s) -> (Ne.{succ u1} ι i j) -> (IsCoprime.{u2} R _inst_3 (f i) (f j)))) -> (Eq.{succ u2} R (Finset.prod.{u2, u1} R ι (CommSemiring.toCommMonoid.{u2} R _inst_3) s (fun (i : ι) => f i)) (HPow.hPow.{u2, 0, u2} R Nat R (instHPow.{u2, 0} R Nat (Monoid.Pow.{u2} R (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) c n)) -> (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (Exists.{succ u2} R (fun (d : R) => Eq.{succ u2} R (f i) (HPow.hPow.{u2, 0, u2} R Nat R (instHPow.{u2, 0} R Nat (Monoid.Pow.{u2} R (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) d n))))
-but is expected to have type
- forall {ι : Type.{u2}} {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_5 : GCDMonoid.{u1} R (IsDomain.toCancelCommMonoidWithZero.{u1} R _inst_3 _inst_4)] [_inst_6 : Unique.{succ u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))] {n : Nat} {c : R} {s : Finset.{u2} ι} {f : ι -> R}, (forall (i : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i s) -> (forall (j : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) j s) -> (Ne.{succ u2} ι i j) -> (IsCoprime.{u1} R _inst_3 (f i) (f j)))) -> (Eq.{succ u1} R (Finset.prod.{u1, u2} R ι (CommSemiring.toCommMonoid.{u1} R _inst_3) s (fun (i : ι) => f i)) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) c n)) -> (forall (i : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i s) -> (Exists.{succ u1} R (fun (d : R) => Eq.{succ u1} R (f i) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) d n))))
-Case conversion may be inaccurate. Consider using '#align finset.exists_eq_pow_of_mul_eq_pow_of_coprime Finset.exists_eq_pow_of_mul_eq_pow_of_coprimeₓ'. -/
/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (i j «expr ∈ » s) -/
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
@@ -159,9 +135,6 @@ end Ring
variable [CommRing R] [IsDomain R] [Group G]
-/- warning: card_nth_roots_subgroup_units -> card_nthRoots_subgroup_units is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align card_nth_roots_subgroup_units card_nthRoots_subgroup_unitsₓ'. -/
theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective f) {n : ℕ}
(hn : 0 < n) (g₀ : G) :
({ g ∈ univ | g ^ n = g₀ } : Finset G).card ≤ (nthRoots n (f g₀)).card :=
@@ -175,12 +148,6 @@ theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective
· intros ; apply hf; assumption
#align card_nth_roots_subgroup_units card_nthRoots_subgroup_units
-/- warning: is_cyclic_of_subgroup_is_domain -> isCyclic_of_subgroup_isDomain is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Finite.{succ u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))), (Function.Injective.{succ u2, succ u1} G R (coeFn.{max (succ u1) (succ u2), max (succ u2) (succ u1)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (fun (_x : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) => G -> R) (MonoidHom.hasCoeToFun.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f)) -> (IsCyclic.{u2} G _inst_3)
-but is expected to have type
- forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Finite.{succ u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))), (Function.Injective.{succ u2, succ u1} G R (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) _x) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (MulOneClass.toMul.{u2} G (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) (MulOneClass.toMul.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (MonoidHomClass.toMulHomClass.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (MonoidHom.monoidHomClass.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) f)) -> (IsCyclic.{u2} G _inst_3)
-Case conversion may be inaccurate. Consider using '#align is_cyclic_of_subgroup_is_domain isCyclic_of_subgroup_isDomainₓ'. -/
/-- A finite subgroup of the unit group of an integral domain is cyclic. -/
theorem isCyclic_of_subgroup_isDomain [Finite G] (f : G →* R) (hf : Injective f) : IsCyclic G := by
classical
@@ -201,12 +168,6 @@ section
variable (S : Subgroup Rˣ) [Finite S]
-/- warning: subgroup_units_cyclic -> subgroup_units_cyclic is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] (S : Subgroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1)))) [_inst_4 : Finite.{succ u1} (coeSort.{succ u1, succ (succ u1)} (Subgroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1)))) Type.{u1} (SetLike.hasCoeToSort.{u1, u1} (Subgroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Subgroup.setLike.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))))) S)], IsCyclic.{u1} (coeSort.{succ u1, succ (succ u1)} (Subgroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1)))) Type.{u1} (SetLike.hasCoeToSort.{u1, u1} (Subgroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Subgroup.setLike.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))))) S) (Subgroup.toGroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) S)
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] (S : Subgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) [_inst_4 : Finite.{succ u1} (Subtype.{succ u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (fun (x : Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) => Membership.mem.{u1, u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Subgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (SetLike.instMembership.{u1, u1} (Subgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Subgroup.instSetLikeSubgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))) x S))], IsCyclic.{u1} (Subtype.{succ u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (fun (x : Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) => Membership.mem.{u1, u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Subgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (SetLike.instMembership.{u1, u1} (Subgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Subgroup.instSetLikeSubgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))) x S)) (Subgroup.toGroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) S)
-Case conversion may be inaccurate. Consider using '#align subgroup_units_cyclic subgroup_units_cyclicₓ'. -/
/-- A finite subgroup of the units of an integral domain is cyclic. -/
instance subgroup_units_cyclic : IsCyclic S :=
by
@@ -225,9 +186,6 @@ open Polynomial
variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
-/- warning: polynomial.div_eq_quo_add_rem_div -> Polynomial.div_eq_quo_add_rem_div is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align polynomial.div_eq_quo_add_rem_div Polynomial.div_eq_quo_add_rem_divₓ'. -/
theorem div_eq_quo_add_rem_div (f : R[X]) {g : R[X]} (hg : g.Monic) :
∃ q r : R[X], r.degree < g.degree ∧ (↑f : K) / ↑g = ↑q + ↑r / ↑g :=
by
@@ -245,9 +203,6 @@ end EuclideanDivision
variable [Fintype G]
-/- warning: card_fiber_eq_of_mem_range -> card_fiber_eq_of_mem_range is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align card_fiber_eq_of_mem_range card_fiber_eq_of_mem_rangeₓ'. -/
theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G →* H) {x y : H}
(hx : x ∈ Set.range f) (hy : y ∈ Set.range f) :
(univ.filterₓ fun g => f g = x).card = (univ.filterₓ fun g => f g = y).card :=
@@ -265,12 +220,6 @@ theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G
mul_inv_cancel_right, inv_mul_cancel_right]
#align card_fiber_eq_of_mem_range card_fiber_eq_of_mem_range
-/- warning: sum_hom_units_eq_zero -> sum_hom_units_eq_zero is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))), (Ne.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (OfNat.mk.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (One.one.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (MonoidHom.hasOne.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))))))) -> (Eq.{succ u1} R (Finset.sum.{u1, u2} R G (AddCommGroup.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toAddCommGroup.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Finset.univ.{u2} G _inst_4) (fun (g : G) => coeFn.{max (succ u1) (succ u2), max (succ u2) (succ u1)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (fun (_x : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) => G -> R) (MonoidHom.hasCoeToFun.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f g)) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))))))))
-but is expected to have type
- forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))), (Ne.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) 1 (One.toOfNat1.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (instOneMonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) -> (Eq.{succ u1} R (Finset.sum.{u1, u2} R G (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Finset.univ.{u2} G _inst_4) (fun (g : G) => FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) _x) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (MulOneClass.toMul.{u2} G (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) (MulOneClass.toMul.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (MonoidHomClass.toMulHomClass.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (MonoidHom.monoidHomClass.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) f g)) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (CommMonoidWithZero.toZero.{u1} R (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} R (IsDomain.toCancelCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1) _inst_2))))))
-Case conversion may be inaccurate. Consider using '#align sum_hom_units_eq_zero sum_hom_units_eq_zeroₓ'. -/
/-- In an integral domain, a sum indexed by a nontrivial homomorphism from a finite group is zero.
-/
theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) = 0 := by
@@ -337,9 +286,6 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
simp [pow_orderOf_eq_one]
#align sum_hom_units_eq_zero sum_hom_units_eq_zero
-/- warning: sum_hom_units -> sum_hom_units is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align sum_hom_units sum_hom_unitsₓ'. -/
/-- In an integral domain, a sum indexed by a homomorphism from a finite group is zero,
unless the homomorphism is trivial, in which case the sum is equal to the cardinality of the group.
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -74,8 +74,7 @@ def Fintype.groupWithZeroOfCancel (M : Type _) [CancelMonoidWithZero M] [Decidab
‹CancelMonoidWithZero
M› with
inv := fun a => if h : a = 0 then 0 else Fintype.bijInv (mul_right_bijective_of_finite₀ h) 1
- mul_inv_cancel := fun a ha => by
- simp [Inv.inv, dif_neg ha]
+ mul_inv_cancel := fun a ha => by simp [Inv.inv, dif_neg ha];
exact Fintype.rightInverse_bijInv _ _
inv_zero := by simp [Inv.inv, dif_pos rfl] }
#align fintype.group_with_zero_of_cancel Fintype.groupWithZeroOfCancel
@@ -173,9 +172,7 @@ theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective
· intro g hg
rw [sep_def, mem_filter] at hg
rw [Multiset.mem_toFinset, mem_nth_roots hn, ← f.map_pow, hg.2]
- · intros
- apply hf
- assumption
+ · intros ; apply hf; assumption
#align card_nth_roots_subgroup_units card_nthRoots_subgroup_units
/- warning: is_cyclic_of_subgroup_is_domain -> isCyclic_of_subgroup_isDomain is a dubious translation:
@@ -215,8 +212,7 @@ instance subgroup_units_cyclic : IsCyclic S :=
by
refine' isCyclic_of_subgroup_isDomain ⟨(coe : S → R), _, _⟩ (units.ext.comp Subtype.val_injective)
· simp
- · intros
- simp
+ · intros ; simp
#align subgroup_units_cyclic subgroup_units_cyclic
end
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Chris Hughes
! This file was ported from Lean 3 source module ring_theory.integral_domain
-! leanprover-community/mathlib commit 6e70e0d419bf686784937d64ed4bfde866ff229e
+! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.Algebra.GeomSum
/-!
# Integral domains
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
Assorted theorems about integral domains.
## Main theorems
@@ -158,10 +161,7 @@ end Ring
variable [CommRing R] [IsDomain R] [Group G]
/- warning: card_nth_roots_subgroup_units -> card_nthRoots_subgroup_units is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))), (Function.Injective.{succ u2, succ u1} G R (coeFn.{max (succ u1) (succ u2), max (succ u2) (succ u1)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (fun (_x : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) => G -> R) (MonoidHom.hasCoeToFun.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f)) -> (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) -> (forall (g₀ : G), LE.le.{0} Nat Nat.hasLe (Finset.card.{u2} G (Sep.sep.{u2, u2} G (Finset.{u2} G) (Finset.hasSep.{u2} G) (fun (g : G) => Eq.{succ u2} G (HPow.hPow.{u2, 0, u2} G Nat G (instHPow.{u2, 0} G Nat (Monoid.Pow.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) g n) g₀) (Finset.univ.{u2} G _inst_4))) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, 0} (Multiset.{u1} R) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} R) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} R) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} R) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} R) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} R) (Multiset.orderedCancelAddCommMonoid.{u1} R)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (fun (_x : AddMonoidHom.{u1, 0} (Multiset.{u1} R) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} R) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} R) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} R) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} R) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} R) (Multiset.orderedCancelAddCommMonoid.{u1} R)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) => (Multiset.{u1} R) -> Nat) (AddMonoidHom.hasCoeToFun.{u1, 0} (Multiset.{u1} R) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} R) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} R) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} R) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} R) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} R) (Multiset.orderedCancelAddCommMonoid.{u1} R)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.card.{u1} R) (Polynomial.nthRoots.{u1} R _inst_1 _inst_2 n (coeFn.{max (succ u1) (succ u2), max (succ u2) (succ u1)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (fun (_x : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) => G -> R) (MonoidHom.hasCoeToFun.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f g₀)))))
-but is expected to have type
- forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] [f : DecidableEq.{succ u2} G] (hf : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))), (Function.Injective.{succ u2, succ u1} G R (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G (fun (a : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) a) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (MulOneClass.toMul.{u2} G (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) (MulOneClass.toMul.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (MonoidHomClass.toMulHomClass.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (MonoidHom.monoidHomClass.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) hf)) -> (forall {hn : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) hn) -> (forall (g₀ : G), LE.le.{0} Nat instLENat (Finset.card.{u2} G (Finset.filter.{u2} G (fun (g : G) => Eq.{succ u2} G (HPow.hPow.{u2, 0, u2} G Nat G (instHPow.{u2, 0} G Nat (Monoid.Pow.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) g hn) g₀) (fun (a : G) => f (HPow.hPow.{u2, 0, u2} G Nat G (instHPow.{u2, 0} G Nat (Monoid.Pow.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) a hn) g₀) (Finset.univ.{u2} G _inst_4))) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (fun (a : Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) => Nat) a) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Polynomial.nthRoots.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀) _inst_1 _inst_2 hn (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G (fun (a : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) a) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (MulOneClass.toMul.{u2} G (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) (MulOneClass.toMul.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (MonoidHomClass.toMulHomClass.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (MonoidHom.monoidHomClass.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) hf g₀)))))
+<too large>
Case conversion may be inaccurate. Consider using '#align card_nth_roots_subgroup_units card_nthRoots_subgroup_unitsₓ'. -/
theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective f) {n : ℕ}
(hn : 0 < n) (g₀ : G) :
@@ -230,10 +230,7 @@ open Polynomial
variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
/- warning: polynomial.div_eq_quo_add_rem_div -> Polynomial.div_eq_quo_add_rem_div is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] (K : Type) [_inst_4 : Field.{0} K] [_inst_5 : Algebra.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4)))] [_inst_6 : IsFractionRing.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.commRing.{u1} R _inst_1) K (EuclideanDomain.toCommRing.{0} K (Field.toEuclideanDomain.{0} K _inst_4)) _inst_5] (f : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) {g : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))}, (Polynomial.Monic.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) g) -> (Exists.{succ u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (fun (q : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) => Exists.{succ u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (fun (r : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toHasLt.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) r) (Polynomial.degree.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) g)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_4)))) ((fun (a : Type.{u1}) (b : Type) [self : HasLiftT.{succ u1, 1} a b] => self.0) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (algebraMap.coeHTCT.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))) _inst_5) f) ((fun (a : Type.{u1}) (b : Type) [self : HasLiftT.{succ u1, 1} a b] => self.0) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (algebraMap.coeHTCT.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))) _inst_5) g)) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))))) ((fun (a : Type.{u1}) (b : Type) [self : HasLiftT.{succ u1, 1} a b] => self.0) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (algebraMap.coeHTCT.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))) _inst_5) q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_4)))) ((fun (a : Type.{u1}) (b : Type) [self : HasLiftT.{succ u1, 1} a b] => self.0) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (algebraMap.coeHTCT.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))) _inst_5) r) ((fun (a : Type.{u1}) (b : Type) [self : HasLiftT.{succ u1, 1} a b] => self.0) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (algebraMap.coeHTCT.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))) _inst_5) g)))))))
-but is expected to have type
- forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] (K : Type) [_inst_4 : Field.{0} K] [_inst_5 : Algebra.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))] [_inst_6 : IsFractionRing.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commRing.{u1} R _inst_1) K (EuclideanDomain.toCommRing.{0} K (Field.toEuclideanDomain.{0} K _inst_4)) _inst_5] (f : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) {g : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))}, (Polynomial.Monic.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) g) -> (Exists.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (q : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => Exists.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (r : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) r) (Polynomial.degree.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) g)) (Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) f) (HDiv.hDiv.{0, 0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) f) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) g) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) f) (instHDiv.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) f) (Field.toDiv.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) f) _inst_4)) (FunLike.coe.{succ u1, succ u1, 1} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) a) (MulHomClass.toFunLike.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toMul.{0} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))) (RingHom.instRingHomClassRingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))))) (algebraMap.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))) _inst_5) f) (FunLike.coe.{succ u1, succ u1, 1} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) a) (MulHomClass.toFunLike.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toMul.{0} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))) (RingHom.instRingHomClassRingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))))) (algebraMap.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))) _inst_5) g)) (HAdd.hAdd.{0, 0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) r) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (instHAdd.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (Distrib.toAdd.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (NonUnitalNonAssocSemiring.toDistrib.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (NonAssocRing.toNonUnitalNonAssocRing.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (Ring.toNonAssocRing.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (DivisionRing.toRing.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (Field.toDivisionRing.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) _inst_4)))))))) (FunLike.coe.{succ u1, succ u1, 1} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) a) (MulHomClass.toFunLike.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toMul.{0} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))) (RingHom.instRingHomClassRingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))))) (algebraMap.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))) _inst_5) q) (HDiv.hDiv.{0, 0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) r) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) g) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) r) (instHDiv.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) r) (Field.toDiv.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) r) _inst_4)) (FunLike.coe.{succ u1, succ u1, 1} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) a) (MulHomClass.toFunLike.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toMul.{0} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))) (RingHom.instRingHomClassRingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))))) (algebraMap.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))) _inst_5) r) (FunLike.coe.{succ u1, succ u1, 1} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) a) (MulHomClass.toFunLike.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toMul.{0} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))) (RingHom.instRingHomClassRingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))))) (algebraMap.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))) _inst_5) g)))))))
+<too large>
Case conversion may be inaccurate. Consider using '#align polynomial.div_eq_quo_add_rem_div Polynomial.div_eq_quo_add_rem_divₓ'. -/
theorem div_eq_quo_add_rem_div (f : R[X]) {g : R[X]} (hg : g.Monic) :
∃ q r : R[X], r.degree < g.degree ∧ (↑f : K) / ↑g = ↑q + ↑r / ↑g :=
@@ -253,10 +250,7 @@ end EuclideanDivision
variable [Fintype G]
/- warning: card_fiber_eq_of_mem_range -> card_fiber_eq_of_mem_range is a dubious translation:
-lean 3 declaration is
- forall {G : Type.{u1}} [_inst_3 : Group.{u1} G] [_inst_4 : Fintype.{u1} G] {H : Type.{u2}} [_inst_5 : Group.{u2} H] [_inst_6 : DecidableEq.{succ u2} H] (f : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) {x : H} {y : H}, (Membership.Mem.{u2, u2} H (Set.{u2} H) (Set.hasMem.{u2} H) x (Set.range.{u2, succ u1} H G (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f))) -> (Membership.Mem.{u2, u2} H (Set.{u2} H) (Set.hasMem.{u2} H) y (Set.range.{u2, succ u1} H G (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f))) -> (Eq.{1} Nat (Finset.card.{u1} G (Finset.filter.{u1} G (fun (g : G) => Eq.{succ u2} H (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f g) x) (fun (a : G) => _inst_6 (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f a) x) (Finset.univ.{u1} G _inst_4))) (Finset.card.{u1} G (Finset.filter.{u1} G (fun (g : G) => Eq.{succ u2} H (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f g) y) (fun (a : G) => _inst_6 (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f a) y) (Finset.univ.{u1} G _inst_4))))
-but is expected to have type
- forall {G : Type.{u1}} [_inst_3 : Group.{u1} G] [_inst_4 : Fintype.{u1} G] {H : Type.{u2}} [_inst_5 : Group.{u2} H] [_inst_6 : DecidableEq.{succ u2} H] (f : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) {x : H} {y : H}, (Membership.mem.{u2, u2} H (Set.{u2} H) (Set.instMembershipSet.{u2} H) x (Set.range.{u2, succ u1} H G (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f))) -> (Membership.mem.{u2, u2} H (Set.{u2} H) (Set.instMembershipSet.{u2} H) y (Set.range.{u2, succ u1} H G (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f))) -> (Eq.{1} Nat (Finset.card.{u1} G (Finset.filter.{u1} G (fun (g : G) => Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) g) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f g) x) (fun (a : G) => _inst_6 (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f a) x) (Finset.univ.{u1} G _inst_4))) (Finset.card.{u1} G (Finset.filter.{u1} G (fun (g : G) => Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) g) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f g) y) (fun (a : G) => _inst_6 (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f a) y) (Finset.univ.{u1} G _inst_4))))
+<too large>
Case conversion may be inaccurate. Consider using '#align card_fiber_eq_of_mem_range card_fiber_eq_of_mem_rangeₓ'. -/
theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G →* H) {x y : H}
(hx : x ∈ Set.range f) (hy : y ∈ Set.range f) :
@@ -348,10 +342,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
#align sum_hom_units_eq_zero sum_hom_units_eq_zero
/- warning: sum_hom_units -> sum_hom_units is a dubious translation:
-lean 3 declaration is
- forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) [_inst_5 : Decidable (Eq.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (OfNat.mk.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (One.one.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (MonoidHom.hasOne.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))))))))], Eq.{succ u1} R (Finset.sum.{u1, u2} R G (AddCommGroup.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toAddCommGroup.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Finset.univ.{u2} G _inst_4) (fun (g : G) => coeFn.{max (succ u1) (succ u2), max (succ u2) (succ u1)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (fun (_x : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) => G -> R) (MonoidHom.hasCoeToFun.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f g)) (ite.{succ u1} R (Eq.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (OfNat.mk.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (One.one.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (MonoidHom.hasOne.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))))))) _inst_5 ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat R (HasLiftT.mk.{1, succ u1} Nat R (CoeTCₓ.coe.{1, succ u1} Nat R (Nat.castCoe.{u1} R (AddMonoidWithOne.toNatCast.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R (AddCommGroupWithOne.toAddGroupWithOne.{u1} R (Ring.toAddCommGroupWithOne.{u1} R (CommRing.toRing.{u1} R _inst_1)))))))) (Fintype.card.{u2} G _inst_4)) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))))))))
-but is expected to have type
- forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) [_inst_5 : Decidable (Eq.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) 1 (One.toOfNat1.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (instOneMonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))))], Eq.{succ u1} R (Finset.sum.{u1, u2} R G (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Finset.univ.{u2} G _inst_4) (fun (g : G) => FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) _x) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (MulOneClass.toMul.{u2} G (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) (MulOneClass.toMul.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (MonoidHomClass.toMulHomClass.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (MonoidHom.monoidHomClass.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) f g)) (Nat.cast.{u1} R (Semiring.toNatCast.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (ite.{1} Nat (Eq.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) 1 (One.toOfNat1.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (instOneMonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) _inst_5 (Fintype.card.{u2} G _inst_4) (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))
+<too large>
Case conversion may be inaccurate. Consider using '#align sum_hom_units sum_hom_unitsₓ'. -/
/-- In an integral domain, a sum indexed by a homomorphism from a finite group is zero,
unless the homomorphism is trivial, in which case the sum is equal to the cardinality of the group.
mathlib commit https://github.com/leanprover-community/mathlib/commit/e1a18cad9cd462973d760af7de36b05776b8811c
@@ -43,14 +43,27 @@ section CancelMonoidWithZero
-- There doesn't seem to be a better home for these right now
variable {M : Type _} [CancelMonoidWithZero M] [Finite M]
+/- warning: mul_right_bijective_of_finite₀ -> mul_right_bijective_of_finite₀ is a dubious translation:
+lean 3 declaration is
+ forall {M : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} M] [_inst_2 : Finite.{succ u1} M] {a : M}, (Ne.{succ u1} M a (OfNat.ofNat.{u1} M 0 (OfNat.mk.{u1} M 0 (Zero.zero.{u1} M (MulZeroClass.toHasZero.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))))))) -> (Function.Bijective.{succ u1, succ u1} M M (fun (b : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) a b))
+but is expected to have type
+ forall {M : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} M] [_inst_2 : Finite.{succ u1} M] {a : M}, (Ne.{succ u1} M a (OfNat.ofNat.{u1} M 0 (Zero.toOfNat0.{u1} M (MonoidWithZero.toZero.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) -> (Function.Bijective.{succ u1, succ u1} M M (fun (b : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) a b))
+Case conversion may be inaccurate. Consider using '#align mul_right_bijective_of_finite₀ mul_right_bijective_of_finite₀ₓ'. -/
theorem mul_right_bijective_of_finite₀ {a : M} (ha : a ≠ 0) : Bijective fun b => a * b :=
Finite.injective_iff_bijective.1 <| mul_right_injective₀ ha
#align mul_right_bijective_of_finite₀ mul_right_bijective_of_finite₀
+/- warning: mul_left_bijective_of_finite₀ -> mul_left_bijective_of_finite₀ is a dubious translation:
+lean 3 declaration is
+ forall {M : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} M] [_inst_2 : Finite.{succ u1} M] {a : M}, (Ne.{succ u1} M a (OfNat.ofNat.{u1} M 0 (OfNat.mk.{u1} M 0 (Zero.zero.{u1} M (MulZeroClass.toHasZero.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1)))))))) -> (Function.Bijective.{succ u1, succ u1} M M (fun (b : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulZeroClass.toHasMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) b a))
+but is expected to have type
+ forall {M : Type.{u1}} [_inst_1 : CancelMonoidWithZero.{u1} M] [_inst_2 : Finite.{succ u1} M] {a : M}, (Ne.{succ u1} M a (OfNat.ofNat.{u1} M 0 (Zero.toOfNat0.{u1} M (MonoidWithZero.toZero.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) -> (Function.Bijective.{succ u1, succ u1} M M (fun (b : M) => HMul.hMul.{u1, u1, u1} M M M (instHMul.{u1} M (MulZeroClass.toMul.{u1} M (MulZeroOneClass.toMulZeroClass.{u1} M (MonoidWithZero.toMulZeroOneClass.{u1} M (CancelMonoidWithZero.toMonoidWithZero.{u1} M _inst_1))))) b a))
+Case conversion may be inaccurate. Consider using '#align mul_left_bijective_of_finite₀ mul_left_bijective_of_finite₀ₓ'. -/
theorem mul_left_bijective_of_finite₀ {a : M} (ha : a ≠ 0) : Bijective fun b => b * a :=
Finite.injective_iff_bijective.1 <| mul_left_injective₀ ha
#align mul_left_bijective_of_finite₀ mul_left_bijective_of_finite₀
+#print Fintype.groupWithZeroOfCancel /-
/-- Every finite nontrivial cancel_monoid_with_zero is a group_with_zero. -/
def Fintype.groupWithZeroOfCancel (M : Type _) [CancelMonoidWithZero M] [DecidableEq M] [Fintype M]
[Nontrivial M] : GroupWithZero M :=
@@ -63,7 +76,14 @@ def Fintype.groupWithZeroOfCancel (M : Type _) [CancelMonoidWithZero M] [Decidab
exact Fintype.rightInverse_bijInv _ _
inv_zero := by simp [Inv.inv, dif_pos rfl] }
#align fintype.group_with_zero_of_cancel Fintype.groupWithZeroOfCancel
+-/
+/- warning: exists_eq_pow_of_mul_eq_pow_of_coprime -> exists_eq_pow_of_mul_eq_pow_of_coprime is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_5 : GCDMonoid.{u1} R (IsDomain.toCancelCommMonoidWithZero.{u1} R _inst_3 _inst_4)] [_inst_6 : Unique.{succ u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))] {a : R} {b : R} {c : R} {n : Nat}, (IsCoprime.{u1} R _inst_3 a b) -> (Eq.{succ u1} R (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (Distrib.toHasMul.{u1} R (NonUnitalNonAssocSemiring.toDistrib.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)))))) a b) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) c n)) -> (Exists.{succ u1} R (fun (d : R) => Eq.{succ u1} R a (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) d n)))
+but is expected to have type
+ forall {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_5 : GCDMonoid.{u1} R (IsDomain.toCancelCommMonoidWithZero.{u1} R _inst_3 _inst_4)] [_inst_6 : Unique.{succ u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))] {a : R} {b : R} {c : R} {n : Nat}, (IsCoprime.{u1} R _inst_3 a b) -> (Eq.{succ u1} R (HMul.hMul.{u1, u1, u1} R R R (instHMul.{u1} R (NonUnitalNonAssocSemiring.toMul.{u1} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) a b) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) c n)) -> (Exists.{succ u1} R (fun (d : R) => Eq.{succ u1} R a (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) d n)))
+Case conversion may be inaccurate. Consider using '#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprimeₓ'. -/
theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {a b c : R} {n : ℕ} (cp : IsCoprime a b) (h : a * b = c ^ n) :
∃ d : R, a = d ^ n :=
@@ -75,6 +95,12 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
dvd_add (dvd_mul_of_dvd_right (gcd_dvd_left _ _) _) (dvd_mul_of_dvd_right (gcd_dvd_right _ _) _)
#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprime
+/- warning: finset.exists_eq_pow_of_mul_eq_pow_of_coprime -> Finset.exists_eq_pow_of_mul_eq_pow_of_coprime is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {R : Type.{u2}} [_inst_3 : CommSemiring.{u2} R] [_inst_4 : IsDomain.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3)] [_inst_5 : GCDMonoid.{u2} R (IsDomain.toCancelCommMonoidWithZero.{u2} R _inst_3 _inst_4)] [_inst_6 : Unique.{succ u2} (Units.{u2} R (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))] {n : Nat} {c : R} {s : Finset.{u1} ι} {f : ι -> R}, (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (forall (j : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) j s) -> (Ne.{succ u1} ι i j) -> (IsCoprime.{u2} R _inst_3 (f i) (f j)))) -> (Eq.{succ u2} R (Finset.prod.{u2, u1} R ι (CommSemiring.toCommMonoid.{u2} R _inst_3) s (fun (i : ι) => f i)) (HPow.hPow.{u2, 0, u2} R Nat R (instHPow.{u2, 0} R Nat (Monoid.Pow.{u2} R (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) c n)) -> (forall (i : ι), (Membership.Mem.{u1, u1} ι (Finset.{u1} ι) (Finset.hasMem.{u1} ι) i s) -> (Exists.{succ u2} R (fun (d : R) => Eq.{succ u2} R (f i) (HPow.hPow.{u2, 0, u2} R Nat R (instHPow.{u2, 0} R Nat (Monoid.Pow.{u2} R (MonoidWithZero.toMonoid.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_3))))) d n))))
+but is expected to have type
+ forall {ι : Type.{u2}} {R : Type.{u1}} [_inst_3 : CommSemiring.{u1} R] [_inst_4 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3)] [_inst_5 : GCDMonoid.{u1} R (IsDomain.toCancelCommMonoidWithZero.{u1} R _inst_3 _inst_4)] [_inst_6 : Unique.{succ u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))] {n : Nat} {c : R} {s : Finset.{u2} ι} {f : ι -> R}, (forall (i : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i s) -> (forall (j : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) j s) -> (Ne.{succ u2} ι i j) -> (IsCoprime.{u1} R _inst_3 (f i) (f j)))) -> (Eq.{succ u1} R (Finset.prod.{u1, u2} R ι (CommSemiring.toCommMonoid.{u1} R _inst_3) s (fun (i : ι) => f i)) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) c n)) -> (forall (i : ι), (Membership.mem.{u2, u2} ι (Finset.{u2} ι) (Finset.instMembershipFinset.{u2} ι) i s) -> (Exists.{succ u1} R (fun (d : R) => Eq.{succ u1} R (f i) (HPow.hPow.{u1, 0, u1} R Nat R (instHPow.{u1, 0} R Nat (Monoid.Pow.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_3))))) d n))))
+Case conversion may be inaccurate. Consider using '#align finset.exists_eq_pow_of_mul_eq_pow_of_coprime Finset.exists_eq_pow_of_mul_eq_pow_of_coprimeₓ'. -/
/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (i j «expr ∈ » s) -/
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
@@ -98,6 +124,7 @@ section Ring
variable [Ring R] [IsDomain R] [Fintype R]
+#print Fintype.divisionRingOfIsDomain /-
/-- Every finite domain is a division ring.
TODO: Prove Wedderburn's little theorem,
@@ -106,7 +133,9 @@ def Fintype.divisionRingOfIsDomain (R : Type _) [Ring R] [IsDomain R] [Decidable
DivisionRing R :=
{ show GroupWithZero R from Fintype.groupWithZeroOfCancel R, ‹Ring R› with }
#align fintype.division_ring_of_is_domain Fintype.divisionRingOfIsDomain
+-/
+#print Fintype.fieldOfDomain /-
/-- Every finite commutative domain is a field.
TODO: Prove Wedderburn's little theorem, which shows a finite domain is automatically commutative,
@@ -114,17 +143,26 @@ dropping one assumption from this theorem. -/
def Fintype.fieldOfDomain (R) [CommRing R] [IsDomain R] [DecidableEq R] [Fintype R] : Field R :=
{ Fintype.groupWithZeroOfCancel R, ‹CommRing R› with }
#align fintype.field_of_domain Fintype.fieldOfDomain
+-/
+#print Finite.isField_of_domain /-
theorem Finite.isField_of_domain (R) [CommRing R] [IsDomain R] [Finite R] : IsField R :=
by
cases nonempty_fintype R
exact @Field.toIsField R (@Fintype.fieldOfDomain R _ _ (Classical.decEq R) _)
#align finite.is_field_of_domain Finite.isField_of_domain
+-/
end Ring
variable [CommRing R] [IsDomain R] [Group G]
+/- warning: card_nth_roots_subgroup_units -> card_nthRoots_subgroup_units is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))), (Function.Injective.{succ u2, succ u1} G R (coeFn.{max (succ u1) (succ u2), max (succ u2) (succ u1)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (fun (_x : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) => G -> R) (MonoidHom.hasCoeToFun.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f)) -> (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) -> (forall (g₀ : G), LE.le.{0} Nat Nat.hasLe (Finset.card.{u2} G (Sep.sep.{u2, u2} G (Finset.{u2} G) (Finset.hasSep.{u2} G) (fun (g : G) => Eq.{succ u2} G (HPow.hPow.{u2, 0, u2} G Nat G (instHPow.{u2, 0} G Nat (Monoid.Pow.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) g n) g₀) (Finset.univ.{u2} G _inst_4))) (coeFn.{succ u1, succ u1} (AddMonoidHom.{u1, 0} (Multiset.{u1} R) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} R) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} R) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} R) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} R) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} R) (Multiset.orderedCancelAddCommMonoid.{u1} R)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (fun (_x : AddMonoidHom.{u1, 0} (Multiset.{u1} R) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} R) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} R) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} R) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} R) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} R) (Multiset.orderedCancelAddCommMonoid.{u1} R)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) => (Multiset.{u1} R) -> Nat) (AddMonoidHom.hasCoeToFun.{u1, 0} (Multiset.{u1} R) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} R) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} R) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} R) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} R) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} R) (Multiset.orderedCancelAddCommMonoid.{u1} R)))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.card.{u1} R) (Polynomial.nthRoots.{u1} R _inst_1 _inst_2 n (coeFn.{max (succ u1) (succ u2), max (succ u2) (succ u1)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (fun (_x : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) => G -> R) (MonoidHom.hasCoeToFun.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f g₀)))))
+but is expected to have type
+ forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] [f : DecidableEq.{succ u2} G] (hf : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))), (Function.Injective.{succ u2, succ u1} G R (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G (fun (a : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) a) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (MulOneClass.toMul.{u2} G (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) (MulOneClass.toMul.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (MonoidHomClass.toMulHomClass.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (MonoidHom.monoidHomClass.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) hf)) -> (forall {hn : Nat}, (LT.lt.{0} Nat instLTNat (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0)) hn) -> (forall (g₀ : G), LE.le.{0} Nat instLENat (Finset.card.{u2} G (Finset.filter.{u2} G (fun (g : G) => Eq.{succ u2} G (HPow.hPow.{u2, 0, u2} G Nat G (instHPow.{u2, 0} G Nat (Monoid.Pow.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) g hn) g₀) (fun (a : G) => f (HPow.hPow.{u2, 0, u2} G Nat G (instHPow.{u2, 0} G Nat (Monoid.Pow.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) a hn) g₀) (Finset.univ.{u2} G _inst_4))) (FunLike.coe.{succ u1, succ u1, 1} (AddMonoidHom.{u1, 0} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (fun (a : Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.403 : Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) => Nat) a) (AddHomClass.toFunLike.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddZeroClass.toAdd.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)))))))) (AddZeroClass.toAdd.{0} Nat (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (AddMonoidHomClass.toAddHomClass.{u1, u1, 0} (AddMonoidHom.{u1, 0} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)) (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid) (AddMonoidHom.addMonoidHomClass.{u1, 0} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) Nat (AddMonoid.toAddZeroClass.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddRightCancelMonoid.toAddMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelMonoid.toAddRightCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (AddCancelCommMonoid.toAddCancelMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (OrderedCancelAddCommMonoid.toCancelAddCommMonoid.{u1} (Multiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Multiset.instOrderedCancelAddCommMonoidMultiset.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀))))))) (AddMonoid.toAddZeroClass.{0} Nat Nat.addMonoid)))) (Multiset.card.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀)) (Polynomial.nthRoots.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) g₀) _inst_1 _inst_2 hn (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G (fun (a : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) a) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (MulOneClass.toMul.{u2} G (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) (MulOneClass.toMul.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (MonoidHomClass.toMulHomClass.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (MonoidHom.monoidHomClass.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) hf g₀)))))
+Case conversion may be inaccurate. Consider using '#align card_nth_roots_subgroup_units card_nthRoots_subgroup_unitsₓ'. -/
theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective f) {n : ℕ}
(hn : 0 < n) (g₀ : G) :
({ g ∈ univ | g ^ n = g₀ } : Finset G).card ≤ (nthRoots n (f g₀)).card :=
@@ -140,6 +178,12 @@ theorem card_nthRoots_subgroup_units [Fintype G] (f : G →* R) (hf : Injective
assumption
#align card_nth_roots_subgroup_units card_nthRoots_subgroup_units
+/- warning: is_cyclic_of_subgroup_is_domain -> isCyclic_of_subgroup_isDomain is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Finite.{succ u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))), (Function.Injective.{succ u2, succ u1} G R (coeFn.{max (succ u1) (succ u2), max (succ u2) (succ u1)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (fun (_x : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) => G -> R) (MonoidHom.hasCoeToFun.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f)) -> (IsCyclic.{u2} G _inst_3)
+but is expected to have type
+ forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Finite.{succ u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))), (Function.Injective.{succ u2, succ u1} G R (FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) _x) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (MulOneClass.toMul.{u2} G (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) (MulOneClass.toMul.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (MonoidHomClass.toMulHomClass.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (MonoidHom.monoidHomClass.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) f)) -> (IsCyclic.{u2} G _inst_3)
+Case conversion may be inaccurate. Consider using '#align is_cyclic_of_subgroup_is_domain isCyclic_of_subgroup_isDomainₓ'. -/
/-- A finite subgroup of the unit group of an integral domain is cyclic. -/
theorem isCyclic_of_subgroup_isDomain [Finite G] (f : G →* R) (hf : Injective f) : IsCyclic G := by
classical
@@ -160,6 +204,12 @@ section
variable (S : Subgroup Rˣ) [Finite S]
+/- warning: subgroup_units_cyclic -> subgroup_units_cyclic is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] (S : Subgroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1)))) [_inst_4 : Finite.{succ u1} (coeSort.{succ u1, succ (succ u1)} (Subgroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1)))) Type.{u1} (SetLike.hasCoeToSort.{u1, u1} (Subgroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Subgroup.setLike.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))))) S)], IsCyclic.{u1} (coeSort.{succ u1, succ (succ u1)} (Subgroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1)))) Type.{u1} (SetLike.hasCoeToSort.{u1, u1} (Subgroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1)))) (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Subgroup.setLike.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))))) S) (Subgroup.toGroup.{u1} (Units.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Units.group.{u1} R (Ring.toMonoid.{u1} R (CommRing.toRing.{u1} R _inst_1))) S)
+but is expected to have type
+ forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] (S : Subgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) [_inst_4 : Finite.{succ u1} (Subtype.{succ u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (fun (x : Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) => Membership.mem.{u1, u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Subgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (SetLike.instMembership.{u1, u1} (Subgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Subgroup.instSetLikeSubgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))) x S))], IsCyclic.{u1} (Subtype.{succ u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (fun (x : Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) => Membership.mem.{u1, u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Subgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (SetLike.instMembership.{u1, u1} (Subgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Subgroup.instSetLikeSubgroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))) x S)) (Subgroup.toGroup.{u1} (Units.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (Units.instGroupUnits.{u1} R (MonoidWithZero.toMonoid.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) S)
+Case conversion may be inaccurate. Consider using '#align subgroup_units_cyclic subgroup_units_cyclicₓ'. -/
/-- A finite subgroup of the units of an integral domain is cyclic. -/
instance subgroup_units_cyclic : IsCyclic S :=
by
@@ -179,6 +229,12 @@ open Polynomial
variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
+/- warning: polynomial.div_eq_quo_add_rem_div -> Polynomial.div_eq_quo_add_rem_div is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] (K : Type) [_inst_4 : Field.{0} K] [_inst_5 : Algebra.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4)))] [_inst_6 : IsFractionRing.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (Polynomial.commRing.{u1} R _inst_1) K (EuclideanDomain.toCommRing.{0} K (Field.toEuclideanDomain.{0} K _inst_4)) _inst_5] (f : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) {g : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))}, (Polynomial.Monic.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) g) -> (Exists.{succ u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (fun (q : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) => Exists.{succ u1} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) (fun (r : Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toHasLt.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (OrderedCancelAddCommMonoid.toPartialOrder.{0} Nat (StrictOrderedSemiring.toOrderedCancelAddCommMonoid.{0} Nat Nat.strictOrderedSemiring))))) (Polynomial.degree.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) r) (Polynomial.degree.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1)) g)) (Eq.{1} K (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_4)))) ((fun (a : Type.{u1}) (b : Type) [self : HasLiftT.{succ u1, 1} a b] => self.0) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (algebraMap.coeHTCT.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))) _inst_5) f) ((fun (a : Type.{u1}) (b : Type) [self : HasLiftT.{succ u1, 1} a b] => self.0) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (algebraMap.coeHTCT.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))) _inst_5) g)) (HAdd.hAdd.{0, 0, 0} K K K (instHAdd.{0} K (Distrib.toHasAdd.{0} K (Ring.toDistrib.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))))) ((fun (a : Type.{u1}) (b : Type) [self : HasLiftT.{succ u1, 1} a b] => self.0) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (algebraMap.coeHTCT.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))) _inst_5) q) (HDiv.hDiv.{0, 0, 0} K K K (instHDiv.{0} K (DivInvMonoid.toHasDiv.{0} K (DivisionRing.toDivInvMonoid.{0} K (Field.toDivisionRing.{0} K _inst_4)))) ((fun (a : Type.{u1}) (b : Type) [self : HasLiftT.{succ u1, 1} a b] => self.0) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (algebraMap.coeHTCT.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))) _inst_5) r) ((fun (a : Type.{u1}) (b : Type) [self : HasLiftT.{succ u1, 1} a b] => self.0) (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (algebraMap.coeHTCT.{u1, 0} (Polynomial.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (Ring.toSemiring.{0} K (DivisionRing.toRing.{0} K (Field.toDivisionRing.{0} K _inst_4))) _inst_5) g)))))))
+but is expected to have type
+ forall {R : Type.{u1}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] (K : Type) [_inst_4 : Field.{0} K] [_inst_5 : Algebra.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))] [_inst_6 : IsFractionRing.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commRing.{u1} R _inst_1) K (EuclideanDomain.toCommRing.{0} K (Field.toEuclideanDomain.{0} K _inst_4)) _inst_5] (f : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) {g : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))}, (Polynomial.Monic.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) g) -> (Exists.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (q : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => Exists.{succ u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (r : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => And (LT.lt.{0} (WithBot.{0} Nat) (Preorder.toLT.{0} (WithBot.{0} Nat) (WithBot.preorder.{0} Nat (PartialOrder.toPreorder.{0} Nat (StrictOrderedSemiring.toPartialOrder.{0} Nat Nat.strictOrderedSemiring)))) (Polynomial.degree.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) r) (Polynomial.degree.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) g)) (Eq.{1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) f) (HDiv.hDiv.{0, 0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) f) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) g) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) f) (instHDiv.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) f) (Field.toDiv.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) f) _inst_4)) (FunLike.coe.{succ u1, succ u1, 1} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) a) (MulHomClass.toFunLike.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toMul.{0} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))) (RingHom.instRingHomClassRingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))))) (algebraMap.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))) _inst_5) f) (FunLike.coe.{succ u1, succ u1, 1} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) a) (MulHomClass.toFunLike.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toMul.{0} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))) (RingHom.instRingHomClassRingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))))) (algebraMap.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))) _inst_5) g)) (HAdd.hAdd.{0, 0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) r) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (instHAdd.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (Distrib.toAdd.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (NonUnitalNonAssocSemiring.toDistrib.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (NonAssocRing.toNonUnitalNonAssocRing.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (Ring.toNonAssocRing.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (DivisionRing.toRing.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) (Field.toDivisionRing.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) q) _inst_4)))))))) (FunLike.coe.{succ u1, succ u1, 1} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) a) (MulHomClass.toFunLike.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toMul.{0} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))) (RingHom.instRingHomClassRingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))))) (algebraMap.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))) _inst_5) q) (HDiv.hDiv.{0, 0, 0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) r) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) g) ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) r) (instHDiv.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) r) (Field.toDiv.{0} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) r) _inst_4)) (FunLike.coe.{succ u1, succ u1, 1} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) a) (MulHomClass.toFunLike.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toMul.{0} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))) (RingHom.instRingHomClassRingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))))) (algebraMap.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))) _inst_5) r) (FunLike.coe.{succ u1, succ u1, 1} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (fun (a : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) => K) a) (MulHomClass.toFunLike.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonUnitalNonAssocSemiring.toMul.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (NonUnitalNonAssocSemiring.toMul.{0} K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))) (NonUnitalRingHomClass.toMulHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{0} K (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (RingHomClass.toNonUnitalRingHomClass.{u1, u1, 0} (RingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))))) (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))) (RingHom.instRingHomClassRingHom.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Semiring.toNonAssocSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (CommSemiring.toSemiring.{u1} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))) (Semiring.toNonAssocSemiring.{0} K (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4)))))))) (algebraMap.{u1, 0} (Polynomial.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) K (Polynomial.commSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)) (DivisionSemiring.toSemiring.{0} K (Semifield.toDivisionSemiring.{0} K (Field.toSemifield.{0} K _inst_4))) _inst_5) g)))))))
+Case conversion may be inaccurate. Consider using '#align polynomial.div_eq_quo_add_rem_div Polynomial.div_eq_quo_add_rem_divₓ'. -/
theorem div_eq_quo_add_rem_div (f : R[X]) {g : R[X]} (hg : g.Monic) :
∃ q r : R[X], r.degree < g.degree ∧ (↑f : K) / ↑g = ↑q + ↑r / ↑g :=
by
@@ -196,6 +252,12 @@ end EuclideanDivision
variable [Fintype G]
+/- warning: card_fiber_eq_of_mem_range -> card_fiber_eq_of_mem_range is a dubious translation:
+lean 3 declaration is
+ forall {G : Type.{u1}} [_inst_3 : Group.{u1} G] [_inst_4 : Fintype.{u1} G] {H : Type.{u2}} [_inst_5 : Group.{u2} H] [_inst_6 : DecidableEq.{succ u2} H] (f : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) {x : H} {y : H}, (Membership.Mem.{u2, u2} H (Set.{u2} H) (Set.hasMem.{u2} H) x (Set.range.{u2, succ u1} H G (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f))) -> (Membership.Mem.{u2, u2} H (Set.{u2} H) (Set.hasMem.{u2} H) y (Set.range.{u2, succ u1} H G (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f))) -> (Eq.{1} Nat (Finset.card.{u1} G (Finset.filter.{u1} G (fun (g : G) => Eq.{succ u2} H (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f g) x) (fun (a : G) => _inst_6 (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f a) x) (Finset.univ.{u1} G _inst_4))) (Finset.card.{u1} G (Finset.filter.{u1} G (fun (g : G) => Eq.{succ u2} H (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f g) y) (fun (a : G) => _inst_6 (coeFn.{max (succ u2) (succ u1), max (succ u1) (succ u2)} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (fun (_x : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) => G -> H) (MonoidHom.hasCoeToFun.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) f a) y) (Finset.univ.{u1} G _inst_4))))
+but is expected to have type
+ forall {G : Type.{u1}} [_inst_3 : Group.{u1} G] [_inst_4 : Fintype.{u1} G] {H : Type.{u2}} [_inst_5 : Group.{u2} H] [_inst_6 : DecidableEq.{succ u2} H] (f : MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) {x : H} {y : H}, (Membership.mem.{u2, u2} H (Set.{u2} H) (Set.instMembershipSet.{u2} H) x (Set.range.{u2, succ u1} H G (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f))) -> (Membership.mem.{u2, u2} H (Set.{u2} H) (Set.instMembershipSet.{u2} H) y (Set.range.{u2, succ u1} H G (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f))) -> (Eq.{1} Nat (Finset.card.{u1} G (Finset.filter.{u1} G (fun (g : G) => Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) g) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f g) x) (fun (a : G) => _inst_6 (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f a) x) (Finset.univ.{u1} G _inst_4))) (Finset.card.{u1} G (Finset.filter.{u1} G (fun (g : G) => Eq.{succ u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) g) (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f g) y) (fun (a : G) => _inst_6 (FunLike.coe.{max (succ u1) (succ u2), succ u1, succ u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => H) _x) (MulHomClass.toFunLike.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (MulOneClass.toMul.{u1} G (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3)))) (MulOneClass.toMul.{u2} H (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) (MonoidHomClass.toMulHomClass.{max u1 u2, u1, u2} (MonoidHom.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))) G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5))) (MonoidHom.monoidHomClass.{u1, u2} G H (Monoid.toMulOneClass.{u1} G (DivInvMonoid.toMonoid.{u1} G (Group.toDivInvMonoid.{u1} G _inst_3))) (Monoid.toMulOneClass.{u2} H (DivInvMonoid.toMonoid.{u2} H (Group.toDivInvMonoid.{u2} H _inst_5)))))) f a) y) (Finset.univ.{u1} G _inst_4))))
+Case conversion may be inaccurate. Consider using '#align card_fiber_eq_of_mem_range card_fiber_eq_of_mem_rangeₓ'. -/
theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G →* H) {x y : H}
(hx : x ∈ Set.range f) (hy : y ∈ Set.range f) :
(univ.filterₓ fun g => f g = x).card = (univ.filterₓ fun g => f g = y).card :=
@@ -213,6 +275,12 @@ theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G
mul_inv_cancel_right, inv_mul_cancel_right]
#align card_fiber_eq_of_mem_range card_fiber_eq_of_mem_range
+/- warning: sum_hom_units_eq_zero -> sum_hom_units_eq_zero is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))), (Ne.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (OfNat.mk.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (One.one.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (MonoidHom.hasOne.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))))))) -> (Eq.{succ u1} R (Finset.sum.{u1, u2} R G (AddCommGroup.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toAddCommGroup.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Finset.univ.{u2} G _inst_4) (fun (g : G) => coeFn.{max (succ u1) (succ u2), max (succ u2) (succ u1)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (fun (_x : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) => G -> R) (MonoidHom.hasCoeToFun.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f g)) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))))))))
+but is expected to have type
+ forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))), (Ne.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) 1 (One.toOfNat1.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (instOneMonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) -> (Eq.{succ u1} R (Finset.sum.{u1, u2} R G (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Finset.univ.{u2} G _inst_4) (fun (g : G) => FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) _x) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (MulOneClass.toMul.{u2} G (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) (MulOneClass.toMul.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (MonoidHomClass.toMulHomClass.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (MonoidHom.monoidHomClass.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) f g)) (OfNat.ofNat.{u1} R 0 (Zero.toOfNat0.{u1} R (CommMonoidWithZero.toZero.{u1} R (CancelCommMonoidWithZero.toCommMonoidWithZero.{u1} R (IsDomain.toCancelCommMonoidWithZero.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1) _inst_2))))))
+Case conversion may be inaccurate. Consider using '#align sum_hom_units_eq_zero sum_hom_units_eq_zeroₓ'. -/
/-- In an integral domain, a sum indexed by a nontrivial homomorphism from a finite group is zero.
-/
theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) = 0 := by
@@ -279,6 +347,12 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
simp [pow_orderOf_eq_one]
#align sum_hom_units_eq_zero sum_hom_units_eq_zero
+/- warning: sum_hom_units -> sum_hom_units is a dubious translation:
+lean 3 declaration is
+ forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (Ring.toSemiring.{u1} R (CommRing.toRing.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) [_inst_5 : Decidable (Eq.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (OfNat.mk.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (One.one.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (MonoidHom.hasOne.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))))))))], Eq.{succ u1} R (Finset.sum.{u1, u2} R G (AddCommGroup.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toAddCommGroup.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Finset.univ.{u2} G _inst_4) (fun (g : G) => coeFn.{max (succ u1) (succ u2), max (succ u2) (succ u1)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (fun (_x : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) => G -> R) (MonoidHom.hasCoeToFun.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f g)) (ite.{succ u1} R (Eq.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (OfNat.mk.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) 1 (One.one.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))) (MonoidHom.hasOne.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (NonAssocRing.toNonAssocSemiring.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1)))))))))) _inst_5 ((fun (a : Type) (b : Type.{u1}) [self : HasLiftT.{1, succ u1} a b] => self.0) Nat R (HasLiftT.mk.{1, succ u1} Nat R (CoeTCₓ.coe.{1, succ u1} Nat R (Nat.castCoe.{u1} R (AddMonoidWithOne.toNatCast.{u1} R (AddGroupWithOne.toAddMonoidWithOne.{u1} R (AddCommGroupWithOne.toAddGroupWithOne.{u1} R (Ring.toAddCommGroupWithOne.{u1} R (CommRing.toRing.{u1} R _inst_1)))))))) (Fintype.card.{u2} G _inst_4)) (OfNat.ofNat.{u1} R 0 (OfNat.mk.{u1} R 0 (Zero.zero.{u1} R (MulZeroClass.toHasZero.{u1} R (NonUnitalNonAssocSemiring.toMulZeroClass.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))))))))
+but is expected to have type
+ forall {R : Type.{u1}} {G : Type.{u2}} [_inst_1 : CommRing.{u1} R] [_inst_2 : IsDomain.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))] [_inst_3 : Group.{u2} G] [_inst_4 : Fintype.{u2} G] (f : MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) [_inst_5 : Decidable (Eq.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) 1 (One.toOfNat1.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (instOneMonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))))], Eq.{succ u1} R (Finset.sum.{u1, u2} R G (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} R (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} R (NonAssocRing.toNonUnitalNonAssocRing.{u1} R (Ring.toNonAssocRing.{u1} R (CommRing.toRing.{u1} R _inst_1))))) (Finset.univ.{u2} G _inst_4) (fun (g : G) => FunLike.coe.{max (succ u1) (succ u2), succ u2, succ u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G (fun (_x : G) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2397 : G) => R) _x) (MulHomClass.toFunLike.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (MulOneClass.toMul.{u2} G (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3)))) (MulOneClass.toMul.{u1} R (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (MonoidHomClass.toMulHomClass.{max u1 u2, u2, u1} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))) (MonoidHom.monoidHomClass.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))))) f g)) (Nat.cast.{u1} R (Semiring.toNatCast.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))) (ite.{1} Nat (Eq.{max (succ u1) (succ u2)} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) f (OfNat.ofNat.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) 1 (One.toOfNat1.{max u1 u2} (MonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1)))))) (instOneMonoidHom.{u2, u1} G R (Monoid.toMulOneClass.{u2} G (DivInvMonoid.toMonoid.{u2} G (Group.toDivInvMonoid.{u2} G _inst_3))) (MulZeroOneClass.toMulOneClass.{u1} R (NonAssocSemiring.toMulZeroOneClass.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R (CommRing.toCommSemiring.{u1} R _inst_1))))))))) _inst_5 (Fintype.card.{u2} G _inst_4) (OfNat.ofNat.{0} Nat 0 (instOfNatNat 0))))
+Case conversion may be inaccurate. Consider using '#align sum_hom_units sum_hom_unitsₓ'. -/
/-- In an integral domain, a sum indexed by a homomorphism from a finite group is zero,
unless the homomorphism is trivial, in which case the sum is equal to the cardinality of the group.
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/3180fab693e2cee3bff62675571264cb8778b212
@@ -274,7 +274,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
rw [← pow_eq_mod_orderOf, hn]⟩
_ = 0 := _
- rw [← mul_left_inj' hx1, zero_mul, geom_sum_mul, coe_coe]
+ rw [← mul_left_inj' hx1, MulZeroClass.zero_mul, geom_sum_mul, coe_coe]
norm_cast
simp [pow_orderOf_eq_one]
#align sum_hom_units_eq_zero sum_hom_units_eq_zero
mathlib commit https://github.com/leanprover-community/mathlib/commit/4c586d291f189eecb9d00581aeb3dd998ac34442
@@ -75,7 +75,7 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
dvd_add (dvd_mul_of_dvd_right (gcd_dvd_left _ _) _) (dvd_mul_of_dvd_right (gcd_dvd_right _ _) _)
#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprime
-/- ./././Mathport/Syntax/Translate/Basic.lean:628:2: warning: expanding binder collection (i j «expr ∈ » s) -/
+/- ./././Mathport/Syntax/Translate/Basic.lean:635:2: warning: expanding binder collection (i j «expr ∈ » s) -/
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
(h : ∀ (i) (_ : i ∈ s) (j) (_ : j ∈ s), i ≠ j → IsCoprime (f i) (f j))
@@ -237,15 +237,15 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
_ =
∑ u : Rˣ in univ.image f.to_hom_units,
(univ.filter fun g => f.to_hom_units g = u).card • u :=
- sum_comp (coe : Rˣ → R) f.to_hom_units
+ (sum_comp (coe : Rˣ → R) f.to_hom_units)
_ = ∑ u : Rˣ in univ.image f.to_hom_units, c • u :=
- sum_congr rfl fun u hu => congr_arg₂ _ _ rfl
+ (sum_congr rfl fun u hu => congr_arg₂ _ _ rfl)
-- remaining goal 1, proven below
_ =
∑ b : MonoidHom.range f.to_hom_units, c • ↑b :=
- Finset.sum_subtype _ (by simp) _
+ (Finset.sum_subtype _ (by simp) _)
_ = c • ∑ b : MonoidHom.range f.to_hom_units, (b : R) := smul_sum.symm
- _ = c • 0 := congr_arg₂ _ rfl _
+ _ = c • 0 := (congr_arg₂ _ rfl _)
-- remaining goal 2, proven below
_ =
0 :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
NNRat.cast
(#11203)
Define the canonical coercion from the nonnegative rationals to any division semiring.
From LeanAPAP
@@ -98,6 +98,7 @@ def Fintype.divisionRingOfIsDomain (R : Type*) [Ring R] [IsDomain R] [DecidableE
DivisionRing R where
__ := Fintype.groupWithZeroOfCancel R
__ := ‹Ring R›
+ nnqsmul := _
qsmul := _
#align fintype.division_ring_of_is_domain Fintype.divisionRingOfIsDomain
NNRat.cast
(#12360)
This is the parts of the diff of #11203 which don't mention NNRat.cast
.
where
notation.qsmul := _
instead of qsmul := qsmulRec _
to make the instances more robust to definition changes.qsmulRec
.qsmul
before ratCast_def
in instance declarations.rat_smul
to qsmul
.@@ -95,9 +95,10 @@ variable [Ring R] [IsDomain R] [Fintype R]
/-- Every finite domain is a division ring. More generally, they are fields; this can be found in
`Mathlib.RingTheory.LittleWedderburn`. -/
def Fintype.divisionRingOfIsDomain (R : Type*) [Ring R] [IsDomain R] [DecidableEq R] [Fintype R] :
- DivisionRing R :=
- { show GroupWithZero R from Fintype.groupWithZeroOfCancel R, ‹Ring R› with
- qsmul := qsmulRec _}
+ DivisionRing R where
+ __ := Fintype.groupWithZeroOfCancel R
+ __ := ‹Ring R›
+ qsmul := _
#align fintype.division_ring_of_is_domain Fintype.divisionRingOfIsDomain
/-- Every finite commutative domain is a field. More generally, commutativity is not required: this
@@ -241,7 +241,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0
_ = ∑ b : MonoidHom.range f.toHomUnits, c • ((b : Rˣ) : R) :=
(Finset.sum_subtype _ (by simp) _)
_ = c • ∑ b : MonoidHom.range f.toHomUnits, ((b : Rˣ) : R) := smul_sum.symm
- _ = c • (0 : R) := (congr_arg₂ _ rfl ?_)
+ _ = c • (0 : R) := congr_arg₂ _ rfl ?_
-- remaining goal 2, proven below
_ = (0 : R) := smul_zero _
· -- remaining goal 1
Data
(#11751)
Polynomial
and MvPolynomial
are algebraic objects, hence should be under Algebra
(or at least not under Data
)
@@ -3,9 +3,9 @@ Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Chris Hughes
-/
-import Mathlib.Data.Polynomial.RingDivision
-import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.Algebra.GeomSum
+import Mathlib.Algebra.Polynomial.RingDivision
+import Mathlib.GroupTheory.SpecificGroups.Cyclic
#align_import ring_theory.integral_domain from "leanprover-community/mathlib"@"6e70e0d419bf686784937d64ed4bfde866ff229e"
@@ -96,13 +96,14 @@ variable [Ring R] [IsDomain R] [Fintype R]
`Mathlib.RingTheory.LittleWedderburn`. -/
def Fintype.divisionRingOfIsDomain (R : Type*) [Ring R] [IsDomain R] [DecidableEq R] [Fintype R] :
DivisionRing R :=
- { show GroupWithZero R from Fintype.groupWithZeroOfCancel R, ‹Ring R› with }
+ { show GroupWithZero R from Fintype.groupWithZeroOfCancel R, ‹Ring R› with
+ qsmul := qsmulRec _}
#align fintype.division_ring_of_is_domain Fintype.divisionRingOfIsDomain
/-- Every finite commutative domain is a field. More generally, commutativity is not required: this
can be found in `Mathlib.RingTheory.LittleWedderburn`. -/
def Fintype.fieldOfDomain (R) [CommRing R] [IsDomain R] [DecidableEq R] [Fintype R] : Field R :=
- { Fintype.groupWithZeroOfCancel R, ‹CommRing R› with }
+ { Fintype.divisionRingOfIsDomain R, ‹CommRing R› with }
#align fintype.field_of_domain Fintype.fieldOfDomain
theorem Finite.isField_of_domain (R) [CommRing R] [IsDomain R] [Finite R] : IsField R := by
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -64,7 +64,7 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type*} [CommSemiring R] [IsD
refine' exists_eq_pow_of_mul_eq_pow (isUnit_of_dvd_one _) h
obtain ⟨x, y, hxy⟩ := cp
rw [← hxy]
- exact -- porting note: added `GCDMonoid.` twice
+ exact -- Porting note: added `GCDMonoid.` twice
dvd_add (dvd_mul_of_dvd_right (GCDMonoid.gcd_dvd_left _ _) _)
(dvd_mul_of_dvd_right (GCDMonoid.gcd_dvd_right _ _) _)
#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprime
@@ -114,7 +114,7 @@ end Ring
variable [CommRing R] [IsDomain R] [Group G]
--- porting note: Finset doesn't seem to have `{g ∈ univ | g^n = g₀}` notation anymore,
+-- Porting note: Finset doesn't seem to have `{g ∈ univ | g^n = g₀}` notation anymore,
-- so we have to use `Finset.filter` instead
theorem card_nthRoots_subgroup_units [Fintype G] [DecidableEq G] (f : G →* R) (hf : Injective f)
{n : ℕ} (hn : 0 < n) (g₀ : G) :
@@ -152,7 +152,7 @@ variable (S : Subgroup Rˣ) [Finite S]
/-- A finite subgroup of the units of an integral domain is cyclic. -/
instance subgroup_units_cyclic : IsCyclic S := by
- -- porting note: the original proof used a `coe`, but I was not able to get it to work.
+ -- Porting note: the original proof used a `coe`, but I was not able to get it to work.
apply isCyclic_of_subgroup_isDomain (R := R) (G := S) _ _
· exact MonoidHom.mk (OneHom.mk (fun s => ↑s.val) rfl) (by simp)
· exact Units.ext.comp Subtype.val_injective
@@ -175,10 +175,10 @@ theorem div_eq_quo_add_rem_div (f : R[X]) {g : R[X]} (hg : g.Monic) :
refine' ⟨f /ₘ g, f %ₘ g, _, _⟩
· exact degree_modByMonic_lt _ hg
· have hg' : algebraMap R[X] K g ≠ 0 :=
- -- porting note: the proof was `by exact_mod_cast Monic.ne_zero hg`
+ -- Porting note: the proof was `by exact_mod_cast Monic.ne_zero hg`
(map_ne_zero_iff _ (IsFractionRing.injective R[X] K)).mpr (Monic.ne_zero hg)
field_simp [hg']
- -- porting note: `norm_cast` was here, but does nothing.
+ -- Porting note: `norm_cast` was here, but does nothing.
rw [add_comm, mul_comm, ← map_mul, ← map_add, modByMonic_add_div f hg]
#align polynomial.div_eq_quo_add_rem_div Polynomial.div_eq_quo_add_rem_div
@@ -191,7 +191,7 @@ variable [Fintype G]
theorem card_fiber_eq_of_mem_range {H : Type*} [Group H] [DecidableEq H] (f : G →* H) {x y : H}
(hx : x ∈ Set.range f) (hy : y ∈ Set.range f) :
- -- porting note: the `filter` had an index `ₓ` that I removed.
+ -- Porting note: the `filter` had an index `ₓ` that I removed.
(univ.filter fun g => f g = x).card = (univ.filter fun g => f g = y).card := by
rcases hx with ⟨x, rfl⟩
rcases hy with ⟨y, rfl⟩
@@ -199,14 +199,14 @@ theorem card_fiber_eq_of_mem_range {H : Type*} [Group H] [DecidableEq H] (f : G
· simp (config := { contextual := true }) only [*, mem_filter, one_mul, MonoidHom.map_mul,
mem_univ, mul_right_inv, eq_self_iff_true, MonoidHom.map_mul_inv, and_self_iff,
forall_true_iff]
- -- porting note: added the following `simp`
+ -- Porting note: added the following `simp`
simp only [true_and, map_inv, mul_right_inv, one_mul, and_self, implies_true, forall_const]
· simp only [mul_left_inj, imp_self, forall₂_true_iff]
· simp only [true_and_iff, mem_filter, mem_univ] at hg
simp only [hg, mem_filter, one_mul, MonoidHom.map_mul, mem_univ, mul_right_inv,
eq_self_iff_true, exists_prop_of_true, MonoidHom.map_mul_inv, and_self_iff,
mul_inv_cancel_right, inv_mul_cancel_right]
- -- porting note: added the next line. It is weird!
+ -- Porting note: added the next line. It is weird!
simp only [map_inv, mul_right_inv, one_mul, and_self, exists_prop]
#align card_fiber_eq_of_mem_range card_fiber_eq_of_mem_range
@@ -225,7 +225,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0
cases' hx ⟨f.toHomUnits g, g, rfl⟩ with n hn
rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow,
eq_comm] at hn
- replace hx1 : (x.val : R) - 1 ≠ 0 := -- porting note: was `(x : R)`
+ replace hx1 : (x.val : R) - 1 ≠ 0 := -- Porting note: was `(x : R)`
fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
let c := (univ.filter fun g => f.toHomUnits g = 1).card
calc
@@ -276,7 +276,7 @@ theorem sum_hom_units (f : G →* R) [Decidable (f = 1)] :
∑ g : G, f g = if f = 1 then Fintype.card G else 0 := by
split_ifs with h
· simp [h, card_univ]
- · rw [cast_zero] -- porting note: added
+ · rw [cast_zero] -- Porting note: added
exact sum_hom_units_eq_zero f h
#align sum_hom_units sum_hom_units
@@ -214,10 +214,9 @@ theorem card_fiber_eq_of_mem_range {H : Type*} [Group H] [DecidableEq H] (f : G
-/
theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0 := by
classical
- obtain ⟨x, hx⟩ :
- ∃ x : MonoidHom.range f.toHomUnits,
- ∀ y : MonoidHom.range f.toHomUnits, y ∈ Submonoid.powers x
- exact IsCyclic.exists_monoid_generator
+ obtain ⟨x, hx⟩ : ∃ x : MonoidHom.range f.toHomUnits,
+ ∀ y : MonoidHom.range f.toHomUnits, y ∈ Submonoid.powers x :=
+ IsCyclic.exists_monoid_generator
have hx1 : x ≠ 1 := by
rintro rfl
apply hf
have
, replace
and suffices
(#10640)
No changes to tactic file, it's just boring fixes throughout the library.
This follows on from #6964.
Co-authored-by: sgouezel <sebastien.gouezel@univ-rennes1.fr> Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
@@ -226,8 +226,8 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0
cases' hx ⟨f.toHomUnits g, g, rfl⟩ with n hn
rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow,
eq_comm] at hn
- replace hx1 : (x.val : R) - 1 ≠ 0 -- porting note: was `(x : R)`
- exact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
+ replace hx1 : (x.val : R) - 1 ≠ 0 := -- porting note: was `(x : R)`
+ fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
let c := (univ.filter fun g => f.toHomUnits g = 1).card
calc
∑ g : G, f g = ∑ g : G, (f.toHomUnits g : R) := rfl
Lemmas around this were a mess, throth in terms of names, statement and location. This PR standardises everything to be in Algebra.BigOperators.Basic
and changes the lemmas to take in InjOn
and SurjOn
assumptions where possible (and where impossible make sure the hypotheses are taken in the correct order) and moves the equality of functions hypothesis last.
Also add a few lemmas that help fix downstream uses by golfing.
From LeanAPAP and LeanCamCombi
@@ -255,15 +255,14 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0
(∑ b : MonoidHom.range f.toHomUnits, ((b : Rˣ) : R))
= ∑ n in range (orderOf x), ((x : Rˣ) : R) ^ n :=
Eq.symm <|
- sum_bij (fun n _ => x ^ n) (by simp only [mem_univ, forall_true_iff])
- (by simp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow,
- Units.val_pow_eq_pow_val])
- (fun m n hm hn => pow_injOn_Iio_orderOf (by simpa only [mem_range] using hm)
- (by simpa only [mem_range] using hn))
+ sum_nbij (x ^ ·) (by simp only [mem_univ, forall_true_iff])
+ (by simpa using pow_injOn_Iio_orderOf)
(fun b _ => let ⟨n, hn⟩ := hx b
⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)),
-- Porting note: have to use `dsimp` to apply the function
by dsimp at hn ⊢; rw [pow_mod_orderOf, hn]⟩)
+ (by simp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow,
+ Units.val_pow_eq_pow_val])
_ = 0 := ?_
rw [← mul_left_inj' hx1, zero_mul, geom_sum_mul]
@@ -72,7 +72,7 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type*} [CommSemiring R] [IsD
nonrec
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type*} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
- (h : ∀ (i) (_ : i ∈ s) (j) (_ : j ∈ s), i ≠ j → IsCoprime (f i) (f j))
+ (h : ∀ i ∈ s, ∀ j ∈ s, i ≠ j → IsCoprime (f i) (f j))
(hprod : ∏ i in s, f i = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
classical
intro i hi
@@ -19,9 +19,10 @@ Assorted theorems about integral domains.
* `isCyclic_of_subgroup_isDomain`: A finite subgroup of the units of an integral domain is cyclic.
* `Fintype.fieldOfDomain`: A finite integral domain is a field.
-## TODO
+## Notes
-Prove Wedderburn's little theorem, which shows that all finite division rings are actually fields.
+Wedderburn's little theorem, which shows that all finite division rings are actually fields,
+is in `Mathlib.RingTheory.LittleWedderburn`.
## Tags
@@ -91,19 +92,15 @@ section Ring
variable [Ring R] [IsDomain R] [Fintype R]
-/-- Every finite domain is a division ring.
-
-TODO: Prove Wedderburn's little theorem,
-which shows a finite domain is in fact commutative, hence a field. -/
+/-- Every finite domain is a division ring. More generally, they are fields; this can be found in
+`Mathlib.RingTheory.LittleWedderburn`. -/
def Fintype.divisionRingOfIsDomain (R : Type*) [Ring R] [IsDomain R] [DecidableEq R] [Fintype R] :
DivisionRing R :=
{ show GroupWithZero R from Fintype.groupWithZeroOfCancel R, ‹Ring R› with }
#align fintype.division_ring_of_is_domain Fintype.divisionRingOfIsDomain
-/-- Every finite commutative domain is a field.
-
-TODO: Prove Wedderburn's little theorem, which shows a finite domain is automatically commutative,
-dropping one assumption from this theorem. -/
+/-- Every finite commutative domain is a field. More generally, commutativity is not required: this
+can be found in `Mathlib.RingTheory.LittleWedderburn`. -/
def Fintype.fieldOfDomain (R) [CommRing R] [IsDomain R] [DecidableEq R] [Fintype R] : Field R :=
{ Fintype.groupWithZeroOfCancel R, ‹CommRing R› with }
#align fintype.field_of_domain Fintype.fieldOfDomain
Many lemmas in GroupTheory.OrderOfElement
were stated for elements of finite groups even though they work more generally for torsion elements of possibly infinite groups. This PR generalises those lemmas (and leaves convenience lemmas stated for finite groups), and fixes a bunch of names to use dot notation.
Function.eq_of_lt_minimalPeriod_of_iterate_eq
→ Function.iterate_injOn_Iio_minimalPeriod
Function.eq_iff_lt_minimalPeriod_of_iterate_eq
→ Function.iterate_eq_iterate_iff_of_lt_minimalPeriod
isOfFinOrder_iff_coe
→ Submonoid.isOfFinOrder_coe
orderOf_pos'
→ IsOfFinOrder.orderOf_pos
pow_eq_mod_orderOf
→ pow_mod_orderOf
(and turned around)pow_injective_of_lt_orderOf
→ pow_injOn_Iio_orderOf
mem_powers_iff_mem_range_order_of'
→ IsOfFinOrder.mem_powers_iff_mem_range_orderOf
orderOf_pow''
→ IsOfFinOrder.orderOf_pow
orderOf_pow_coprime
→ Nat.Coprime.orderOf_pow
zpow_eq_mod_orderOf
→ zpow_mod_orderOf
(and turned around)exists_pow_eq_one
→ isOfFinOrder_of_finite
pow_apply_eq_pow_mod_orderOf_cycleOf_apply
→ pow_mod_orderOf_cycleOf_apply
IsOfFinOrder.powers_eq_image_range_orderOf
IsOfFinOrder.natCard_powers_le_orderOf
IsOfFinOrder.finite_powers
finite_powers
infinite_powers
Nat.card_submonoidPowers
IsOfFinOrder.mem_powers_iff_mem_zpowers
IsOfFinOrder.powers_eq_zpowers
IsOfFinOrder.mem_zpowers_iff_mem_range_orderOf
IsOfFinOrder.exists_pow_eq_one
decidableMemPowers
/fintypePowers
to GroupTheory.Submonoid.Membership
and decidableMemZpowers
/fintypeZpowers
to GroupTheory.Subgroup.ZPowers
.finEquivPowers
, finEquivZpowers
, powersEquivPowers
and zpowersEquivZpowers
now assume IsOfFinTorsion x
instead of Finite G
.isOfFinOrder_iff_pow_eq_one
now takes one less explicit argument.Equiv.Perm.IsCycle.exists_pow_eq_one
since it was saying that a permutation over a finite type is torsion, but this is trivial since the group of permutation is itself finite, so we can use isOfFinOrder_of_finite
instead.@@ -261,13 +261,12 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0
sum_bij (fun n _ => x ^ n) (by simp only [mem_univ, forall_true_iff])
(by simp only [imp_true_iff, eq_self_iff_true, Subgroup.coe_pow,
Units.val_pow_eq_pow_val])
- (fun m n hm hn =>
- pow_injective_of_lt_orderOf _ (by simpa only [mem_range] using hm)
+ (fun m n hm hn => pow_injOn_Iio_orderOf (by simpa only [mem_range] using hm)
(by simpa only [mem_range] using hn))
(fun b _ => let ⟨n, hn⟩ := hx b
⟨n % orderOf x, mem_range.2 (Nat.mod_lt _ (orderOf_pos _)),
-- Porting note: have to use `dsimp` to apply the function
- by dsimp at hn ⊢; rw [← pow_eq_mod_orderOf, hn]⟩)
+ by dsimp at hn ⊢; rw [pow_mod_orderOf, hn]⟩)
_ = 0 := ?_
rw [← mul_left_inj' hx1, zero_mul, geom_sum_mul]
Removes nonterminal simps on lines looking like simp [...]
@@ -52,7 +52,7 @@ def Fintype.groupWithZeroOfCancel (M : Type*) [CancelMonoidWithZero M] [Decidabl
‹CancelMonoidWithZero M› with
inv := fun a => if h : a = 0 then 0 else Fintype.bijInv (mul_right_bijective_of_finite₀ h) 1
mul_inv_cancel := fun a ha => by
- simp [Inv.inv, dif_neg ha]
+ simp only [Inv.inv, dif_neg ha]
exact Fintype.rightInverse_bijInv _ _
inv_zero := by simp [Inv.inv, dif_pos rfl] }
#align fintype.group_with_zero_of_cancel Fintype.groupWithZeroOfCancel
@@ -120,7 +120,7 @@ variable [CommRing R] [IsDomain R] [Group G]
-- porting note: Finset doesn't seem to have `{g ∈ univ | g^n = g₀}` notation anymore,
-- so we have to use `Finset.filter` instead
theorem card_nthRoots_subgroup_units [Fintype G] [DecidableEq G] (f : G →* R) (hf : Injective f)
- {n : ℕ} (hn : 0 < n) (g₀ : G) :
+ {n : ℕ} (hn : 0 < n) (g₀ : G) :
Finset.card (Finset.univ.filter (fun g ↦ g^n = g₀)) ≤ Multiset.card (nthRoots n (f g₀)) := by
haveI : DecidableEq R := Classical.decEq _
refine' le_trans _ (nthRoots n (f g₀)).toFinset_card_le
MulZeroClass.
in mul_zero
/zero_mul
(#6682)
Search&replace MulZeroClass.mul_zero
-> mul_zero
, MulZeroClass.zero_mul
-> zero_mul
.
These were introduced by Mathport, as the full name of mul_zero
is actually MulZeroClass.mul_zero
(it's exported with the short name).
@@ -270,7 +270,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0
by dsimp at hn ⊢; rw [← pow_eq_mod_orderOf, hn]⟩)
_ = 0 := ?_
- rw [← mul_left_inj' hx1, MulZeroClass.zero_mul, geom_sum_mul]
+ rw [← mul_left_inj' hx1, zero_mul, geom_sum_mul]
norm_cast
simp [pow_orderOf_eq_one]
#align sum_hom_units_eq_zero sum_hom_units_eq_zero
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -35,7 +35,7 @@ open Finset Polynomial Function BigOperators Nat
section CancelMonoidWithZero
-- There doesn't seem to be a better home for these right now
-variable {M : Type _} [CancelMonoidWithZero M] [Finite M]
+variable {M : Type*} [CancelMonoidWithZero M] [Finite M]
theorem mul_right_bijective_of_finite₀ {a : M} (ha : a ≠ 0) : Bijective fun b => a * b :=
Finite.injective_iff_bijective.1 <| mul_right_injective₀ ha
@@ -46,7 +46,7 @@ theorem mul_left_bijective_of_finite₀ {a : M} (ha : a ≠ 0) : Bijective fun b
#align mul_left_bijective_of_finite₀ mul_left_bijective_of_finite₀
/-- Every finite nontrivial cancel_monoid_with_zero is a group_with_zero. -/
-def Fintype.groupWithZeroOfCancel (M : Type _) [CancelMonoidWithZero M] [DecidableEq M] [Fintype M]
+def Fintype.groupWithZeroOfCancel (M : Type*) [CancelMonoidWithZero M] [DecidableEq M] [Fintype M]
[Nontrivial M] : GroupWithZero M :=
{ ‹Nontrivial M›,
‹CancelMonoidWithZero M› with
@@ -57,7 +57,7 @@ def Fintype.groupWithZeroOfCancel (M : Type _) [CancelMonoidWithZero M] [Decidab
inv_zero := by simp [Inv.inv, dif_pos rfl] }
#align fintype.group_with_zero_of_cancel Fintype.groupWithZeroOfCancel
-theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [IsDomain R]
+theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type*} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {a b c : R} {n : ℕ} (cp : IsCoprime a b) (h : a * b = c ^ n) :
∃ d : R, a = d ^ n := by
refine' exists_eq_pow_of_mul_eq_pow (isUnit_of_dvd_one _) h
@@ -69,7 +69,7 @@ theorem exists_eq_pow_of_mul_eq_pow_of_coprime {R : Type _} [CommSemiring R] [Is
#align exists_eq_pow_of_mul_eq_pow_of_coprime exists_eq_pow_of_mul_eq_pow_of_coprime
nonrec
-theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
+theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type*} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
(h : ∀ (i) (_ : i ∈ s) (j) (_ : j ∈ s), i ≠ j → IsCoprime (f i) (f j))
(hprod : ∏ i in s, f i = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
@@ -85,7 +85,7 @@ theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemir
end CancelMonoidWithZero
-variable {R : Type _} {G : Type _}
+variable {R : Type*} {G : Type*}
section Ring
@@ -95,7 +95,7 @@ variable [Ring R] [IsDomain R] [Fintype R]
TODO: Prove Wedderburn's little theorem,
which shows a finite domain is in fact commutative, hence a field. -/
-def Fintype.divisionRingOfIsDomain (R : Type _) [Ring R] [IsDomain R] [DecidableEq R] [Fintype R] :
+def Fintype.divisionRingOfIsDomain (R : Type*) [Ring R] [IsDomain R] [DecidableEq R] [Fintype R] :
DivisionRing R :=
{ show GroupWithZero R from Fintype.groupWithZeroOfCancel R, ‹Ring R› with }
#align fintype.division_ring_of_is_domain Fintype.divisionRingOfIsDomain
@@ -192,7 +192,7 @@ end EuclideanDivision
variable [Fintype G]
-theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G →* H) {x y : H}
+theorem card_fiber_eq_of_mem_range {H : Type*} [Group H] [DecidableEq H] (f : G →* H) {x y : H}
(hx : x ∈ Set.range f) (hy : y ∈ Set.range f) :
-- porting note: the `filter` had an index `ₓ` that I removed.
(univ.filter fun g => f g = x).card = (univ.filter fun g => f g = y).card := by
@@ -2,16 +2,13 @@
Copyright (c) 2020 Johan Commelin. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Johan Commelin, Chris Hughes
-
-! This file was ported from Lean 3 source module ring_theory.integral_domain
-! leanprover-community/mathlib commit 6e70e0d419bf686784937d64ed4bfde866ff229e
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Polynomial.RingDivision
import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.Algebra.GeomSum
+#align_import ring_theory.integral_domain from "leanprover-community/mathlib"@"6e70e0d419bf686784937d64ed4bfde866ff229e"
+
/-!
# Integral domains
This PR is the result of running
find . -type f -name "*.lean" -exec sed -i -E 's/^( +)\. /\1· /' {} \;
find . -type f -name "*.lean" -exec sed -i -E 'N;s/^( +·)\n +(.*)$/\1 \2/;P;D' {} \;
which firstly replaces .
focusing dots with ·
and secondly removes isolated instances of such dots, unifying them with the following line. A new rule is placed in the style linter to verify this.
@@ -160,8 +160,8 @@ variable (S : Subgroup Rˣ) [Finite S]
instance subgroup_units_cyclic : IsCyclic S := by
-- porting note: the original proof used a `coe`, but I was not able to get it to work.
apply isCyclic_of_subgroup_isDomain (R := R) (G := S) _ _
- . exact MonoidHom.mk (OneHom.mk (fun s => ↑s.val) rfl) (by simp)
- . exact Units.ext.comp Subtype.val_injective
+ · exact MonoidHom.mk (OneHom.mk (fun s => ↑s.val) rfl) (by simp)
+ · exact Units.ext.comp Subtype.val_injective
#align subgroup_units_cyclic subgroup_units_cyclic
end
∑'
precedence (#5615)
∑
, ∏
and variants).([^a-zA-Zα-ωΑ-Ω'𝓝ℳ₀𝕂ₛ)]) \(([∑∏][^()∑∏]*,[^()∑∏:]*)\) ([⊂⊆=<≤])
replaced by $1 $2 $3
@@ -75,7 +75,7 @@ nonrec
theorem Finset.exists_eq_pow_of_mul_eq_pow_of_coprime {ι R : Type _} [CommSemiring R] [IsDomain R]
[GCDMonoid R] [Unique Rˣ] {n : ℕ} {c : R} {s : Finset ι} {f : ι → R}
(h : ∀ (i) (_ : i ∈ s) (j) (_ : j ∈ s), i ≠ j → IsCoprime (f i) (f j))
- (hprod : (∏ i in s, f i) = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
+ (hprod : ∏ i in s, f i = c ^ n) : ∀ i ∈ s, ∃ d : R, f i = d ^ n := by
classical
intro i hi
rw [← insert_erase hi, prod_insert (not_mem_erase i s)] at hprod
@@ -218,7 +218,7 @@ theorem card_fiber_eq_of_mem_range {H : Type _} [Group H] [DecidableEq H] (f : G
/-- In an integral domain, a sum indexed by a nontrivial homomorphism from a finite group is zero.
-/
-theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) = 0 := by
+theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : ∑ g : G, f g = 0 := by
classical
obtain ⟨x, hx⟩ :
∃ x : MonoidHom.range f.toHomUnits,
@@ -236,7 +236,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
exact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
let c := (univ.filter fun g => f.toHomUnits g = 1).card
calc
- (∑ g : G, f g) = ∑ g : G, (f.toHomUnits g : R) := rfl
+ ∑ g : G, f g = ∑ g : G, (f.toHomUnits g : R) := rfl
_ = ∑ u : Rˣ in univ.image f.toHomUnits,
(univ.filter fun g => f.toHomUnits g = u).card • (u : R) :=
(sum_comp ((↑) : Rˣ → R) f.toHomUnits)
@@ -282,7 +282,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
unless the homomorphism is trivial, in which case the sum is equal to the cardinality of the group.
-/
theorem sum_hom_units (f : G →* R) [Decidable (f = 1)] :
- (∑ g : G, f g) = if f = 1 then Fintype.card G else 0 := by
+ ∑ g : G, f g = if f = 1 then Fintype.card G else 0 := by
split_ifs with h
· simp [h, card_univ]
· rw [cast_zero] -- porting note: added
I wrote a script to find lines that contain an odd number of backticks
@@ -232,7 +232,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
cases' hx ⟨f.toHomUnits g, g, rfl⟩ with n hn
rwa [Subtype.ext_iff, Units.ext_iff, Subtype.coe_mk, MonoidHom.coe_toHomUnits, one_pow,
eq_comm] at hn
- replace hx1 : (x.val : R) - 1 ≠ 0 -- porting note: was `(x : R)
+ replace hx1 : (x.val : R) - 1 ≠ 0 -- porting note: was `(x : R)`
exact fun h => hx1 (Subtype.eq (Units.ext (sub_eq_zero.1 h)))
let c := (univ.filter fun g => f.toHomUnits g = 1).card
calc
@@ -11,7 +11,6 @@ Authors: Johan Commelin, Chris Hughes
import Mathlib.Data.Polynomial.RingDivision
import Mathlib.GroupTheory.SpecificGroups.Cyclic
import Mathlib.Algebra.GeomSum
-import Mathlib.Tactic.LibrarySearch
/-!
# Integral domains
@@ -20,8 +19,8 @@ Assorted theorems about integral domains.
## Main theorems
-* `is_cyclic_of_subgroup_is_domain`: A finite subgroup of the units of an integral domain is cyclic.
-* `fintype.field_of_domain`: A finite integral domain is a field.
+* `isCyclic_of_subgroup_isDomain`: A finite subgroup of the units of an integral domain is cyclic.
+* `Fintype.fieldOfDomain`: A finite integral domain is a field.
## TODO
@@ -31,14 +30,10 @@ Prove Wedderburn's little theorem, which shows that all finite division rings ar
integral domain, finite integral domain, finite field
-/
-set_option autoImplicit false
-
section
-open Finset Polynomial Function
-
-open BigOperators Nat
+open Finset Polynomial Function BigOperators Nat
section CancelMonoidWithZero
@@ -57,8 +52,7 @@ theorem mul_left_bijective_of_finite₀ {a : M} (ha : a ≠ 0) : Bijective fun b
def Fintype.groupWithZeroOfCancel (M : Type _) [CancelMonoidWithZero M] [DecidableEq M] [Fintype M]
[Nontrivial M] : GroupWithZero M :=
{ ‹Nontrivial M›,
- ‹CancelMonoidWithZero
- M› with
+ ‹CancelMonoidWithZero M› with
inv := fun a => if h : a = 0 then 0 else Fintype.bijInv (mul_right_bijective_of_finite₀ h) 1
mul_inv_cancel := fun a ha => by
simp [Inv.inv, dif_neg ha]
@@ -154,7 +148,7 @@ theorem isCyclic_of_subgroup_isDomain [Finite G] (f : G →* R) (hf : Injective
/-- The unit group of a finite integral domain is cyclic.
To support `ℤˣ` and other infinite monoids with finite groups of units, this requires only
-`finite Rˣ` rather than deducing it from `finite R`. -/
+`Finite Rˣ` rather than deducing it from `Finite R`. -/
instance [Finite Rˣ] : IsCyclic Rˣ :=
isCyclic_of_subgroup_isDomain (Units.coeHom R) <| Units.ext
@@ -179,7 +173,7 @@ namespace Polynomial
open Polynomial
variable (K : Type) [Field K] [Algebra R[X] K] [IsFractionRing R[X] K]
-set_option maxHeartbeats 0
+
theorem div_eq_quo_add_rem_div (f : R[X]) {g : R[X]} (hg : g.Monic) :
∃ q r : R[X], r.degree < g.degree ∧
(algebraMap R[X] K f) / (algebraMap R[X] K g) =
@@ -243,8 +237,7 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
let c := (univ.filter fun g => f.toHomUnits g = 1).card
calc
(∑ g : G, f g) = ∑ g : G, (f.toHomUnits g : R) := rfl
- _ =
- ∑ u : Rˣ in univ.image f.toHomUnits,
+ _ = ∑ u : Rˣ in univ.image f.toHomUnits,
(univ.filter fun g => f.toHomUnits g = u).card • (u : R) :=
(sum_comp ((↑) : Rˣ → R) f.toHomUnits)
_ = ∑ u : Rˣ in univ.image f.toHomUnits, c • (u : R) :=
@@ -257,7 +250,6 @@ theorem sum_hom_units_eq_zero (f : G →* R) (hf : f ≠ 1) : (∑ g : G, f g) =
_ = c • (0 : R) := (congr_arg₂ _ rfl ?_)
-- remaining goal 2, proven below
_ = (0 : R) := smul_zero _
-
· -- remaining goal 1
show (univ.filter fun g : G => f.toHomUnits g = u).card = c
apply card_fiber_eq_of_mem_range f.toHomUnits
Co-authored-by: Vierkantor <vierkantor@vierkantor.com>
The unported dependencies are