linear_algebra.free_module.ideal_quotient
⟷
Mathlib.LinearAlgebra.FreeModule.IdealQuotient
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)
@@ -22,17 +22,20 @@ import linear_algebra.quotient_pi
-/
-open_locale big_operators direct_sum
+namespace ideal
-variables {ι R S : Type*} [comm_ring R] [comm_ring S] [algebra R S]
-variables [is_domain R] [is_principal_ideal_ring R] [is_domain S] [fintype ι]
+open_locale big_operators direct_sum polynomial
+
+variables {R S ι : Type*} [comm_ring R] [comm_ring S] [algebra R S]
+variables [is_domain R] [is_principal_ideal_ring R] [is_domain S] [finite ι]
/-- We can write the quotient of an ideal over a PID as a product of quotients by principal ideals.
-/
-noncomputable def ideal.quotient_equiv_pi_span
+noncomputable def quotient_equiv_pi_span
(I : ideal S) (b : basis ι R S) (hI : I ≠ ⊥) :
- (S ⧸ I) ≃ₗ[R] Π i, (R ⧸ ideal.span ({I.smith_coeffs b hI i} : set R)) :=
+ (S ⧸ I) ≃ₗ[R] Π i, (R ⧸ span ({I.smith_coeffs b hI i} : set R)) :=
begin
+ haveI := fintype.of_finite ι,
-- Choose `e : S ≃ₗ I` and a basis `b'` for `S` that turns the map
-- `f := ((submodule.subtype I).restrict_scalars R).comp e` into a diagonal matrix:
-- there is an `a : ι → ℤ` such that `f (b' i) = a i • b' i`.
@@ -57,10 +60,10 @@ begin
-- Now we map everything through the linear equiv `S ≃ₗ (ι → R)`,
-- which maps `I` to `I' := Π i, a i ℤ`.
- let I' : submodule R (ι → R) := submodule.pi set.univ (λ i, ideal.span ({a i} : set R)),
+ let I' : submodule R (ι → R) := submodule.pi set.univ (λ i, span ({a i} : set R)),
have : submodule.map (b'.equiv_fun : S →ₗ[R] (ι → R)) (I.restrict_scalars R) = I',
{ ext x,
- simp only [submodule.mem_map, submodule.mem_pi, ideal.mem_span_singleton, set.mem_univ,
+ simp only [submodule.mem_map, submodule.mem_pi, mem_span_singleton, set.mem_univ,
submodule.restrict_scalars_mem, mem_I_iff, smul_eq_mul, forall_true_left,
linear_equiv.coe_coe, basis.equiv_fun_apply],
split,
@@ -73,18 +76,18 @@ begin
refine (submodule.quotient.equiv (I.restrict_scalars R) I' b'.equiv_fun this).trans _,
any_goals { apply ring_hom.id }, any_goals { apply_instance },
classical,
- let := submodule.quotient_pi (show Π i, submodule R R, from λ i, ideal.span ({a i} : set R)),
+ let := submodule.quotient_pi (show Π i, submodule R R, from λ i, span ({a i} : set R)),
exact this
end
/-- Ideal quotients over a free finite extension of `ℤ` are isomorphic to a direct product of
`zmod`. -/
-noncomputable def ideal.quotient_equiv_pi_zmod
+noncomputable def quotient_equiv_pi_zmod
(I : ideal S) (b : basis ι ℤ S) (hI : I ≠ ⊥) :
(S ⧸ I) ≃+ Π i, (zmod (I.smith_coeffs b hI i).nat_abs) :=
let a := I.smith_coeffs b hI,
e := I.quotient_equiv_pi_span b hI,
- e' : (Π (i : ι), (ℤ ⧸ ideal.span ({a i} : set ℤ))) ≃+ Π (i : ι), zmod (a i).nat_abs :=
+ e' : (Π (i : ι), (ℤ ⧸ span ({a i} : set ℤ))) ≃+ Π (i : ι), zmod (a i).nat_abs :=
add_equiv.Pi_congr_right (λ i, ↑(int.quotient_span_equiv_zmod (a i)))
in (↑(e : (S ⧸ I) ≃ₗ[ℤ] _) : (S ⧸ I ≃+ _)).trans e'
@@ -93,14 +96,14 @@ in (↑(e : (S ⧸ I) ≃ₗ[ℤ] _) : (S ⧸ I ≃+ _)).trans e'
Can't be an instance because of the side condition `I ≠ ⊥`, and more importantly,
because the choice of `fintype` instance is non-canonical.
-/
-noncomputable def ideal.fintype_quotient_of_free_of_ne_bot [module.free ℤ S] [module.finite ℤ S]
+noncomputable def fintype_quotient_of_free_of_ne_bot [module.free ℤ S] [module.finite ℤ S]
(I : ideal S) (hI : I ≠ ⊥) :
fintype (S ⧸ I) :=
let b := module.free.choose_basis ℤ S,
a := I.smith_coeffs b hI,
e := I.quotient_equiv_pi_zmod b hI
in by haveI : ∀ i, ne_zero (a i).nat_abs :=
- (λ i, ⟨int.nat_abs_ne_zero_of_ne_zero (ideal.smith_coeffs_ne_zero b I hI i)⟩); classical;
+ (λ i, ⟨int.nat_abs_ne_zero_of_ne_zero (smith_coeffs_ne_zero b I hI i)⟩); classical;
exact fintype.of_equiv (Π i, zmod (a i).nat_abs) e.symm
variables (F : Type*) [comm_ring F] [algebra F R] [algebra F S] [is_scalar_tower F R S]
@@ -108,9 +111,10 @@ variables (F : Type*) [comm_ring F] [algebra F R] [algebra F S] [is_scalar_tower
/-- Decompose `S⧸I` as a direct sum of cyclic `R`-modules
(quotients by the ideals generated by Smith coefficients of `I`). -/
-noncomputable def ideal.quotient_equiv_direct_sum :
- (S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ ideal.span ({I.smith_coeffs b hI i} : set R) :=
+noncomputable def quotient_equiv_direct_sum :
+ (S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ span ({I.smith_coeffs b hI i} : set R) :=
begin
+ haveI := fintype.of_finite ι,
apply ((I.quotient_equiv_pi_span b _).restrict_scalars F).trans
(direct_sum.linear_equiv_fun_on_fintype _ _ _).symm,
exact linear_map.is_scalar_tower.compatible_smul
@@ -118,13 +122,15 @@ begin
-- even after `change linear_map.compatible_smul _ (Π i, R ⧸ span _) F R`
end
-lemma ideal.finrank_quotient_eq_sum [nontrivial F]
- [∀ i, module.free F (R ⧸ ideal.span ({I.smith_coeffs b hI i} : set R))]
- [∀ i, module.finite F (R ⧸ ideal.span ({I.smith_coeffs b hI i} : set R))] :
+lemma finrank_quotient_eq_sum {ι} [fintype ι] (b : basis ι R S) [nontrivial F]
+ [∀ i, module.free F (R ⧸ span ({I.smith_coeffs b hI i} : set R))]
+ [∀ i, module.finite F (R ⧸ span ({I.smith_coeffs b hI i} : set R))] :
finite_dimensional.finrank F (S ⧸ I)
- = ∑ i, finite_dimensional.finrank F (R ⧸ ideal.span ({I.smith_coeffs b hI i} : set R)) :=
+ = ∑ i, finite_dimensional.finrank F (R ⧸ span ({I.smith_coeffs b hI i} : set R)) :=
begin
- rw [linear_equiv.finrank_eq $ ideal.quotient_equiv_direct_sum F b hI,
+ rw [linear_equiv.finrank_eq $ quotient_equiv_direct_sum F b hI,
finite_dimensional.finrank_direct_sum]
-- slow, and dot notation doesn't work
end
+
+end ideal
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
@@ -5,8 +5,9 @@ Authors: Anne Baanen
-/
import data.zmod.quotient
-import linear_algebra.free_module.finite.basic
+import linear_algebra.free_module.finite.rank
import linear_algebra.free_module.pid
+import linear_algebra.free_module.strong_rank_condition
import linear_algebra.quotient_pi
/-! # Ideals in free modules over PIDs
@@ -21,7 +22,7 @@ import linear_algebra.quotient_pi
-/
-open_locale big_operators
+open_locale big_operators direct_sum
variables {ι R S : Type*} [comm_ring R] [comm_ring S] [algebra R S]
variables [is_domain R] [is_principal_ideal_ring R] [is_domain S] [fintype ι]
@@ -101,3 +102,29 @@ let b := module.free.choose_basis ℤ S,
in by haveI : ∀ i, ne_zero (a i).nat_abs :=
(λ i, ⟨int.nat_abs_ne_zero_of_ne_zero (ideal.smith_coeffs_ne_zero b I hI i)⟩); classical;
exact fintype.of_equiv (Π i, zmod (a i).nat_abs) e.symm
+
+variables (F : Type*) [comm_ring F] [algebra F R] [algebra F S] [is_scalar_tower F R S]
+ (b : basis ι R S) {I : ideal S} (hI : I ≠ ⊥)
+
+/-- Decompose `S⧸I` as a direct sum of cyclic `R`-modules
+ (quotients by the ideals generated by Smith coefficients of `I`). -/
+noncomputable def ideal.quotient_equiv_direct_sum :
+ (S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ ideal.span ({I.smith_coeffs b hI i} : set R) :=
+begin
+ apply ((I.quotient_equiv_pi_span b _).restrict_scalars F).trans
+ (direct_sum.linear_equiv_fun_on_fintype _ _ _).symm,
+ exact linear_map.is_scalar_tower.compatible_smul
+ -- why doesn't it automatically apply?
+ -- even after `change linear_map.compatible_smul _ (Π i, R ⧸ span _) F R`
+end
+
+lemma ideal.finrank_quotient_eq_sum [nontrivial F]
+ [∀ i, module.free F (R ⧸ ideal.span ({I.smith_coeffs b hI i} : set R))]
+ [∀ i, module.finite F (R ⧸ ideal.span ({I.smith_coeffs b hI i} : set R))] :
+ finite_dimensional.finrank F (S ⧸ I)
+ = ∑ i, finite_dimensional.finrank F (R ⧸ ideal.span ({I.smith_coeffs b hI i} : set R)) :=
+begin
+ rw [linear_equiv.finrank_eq $ ideal.quotient_equiv_direct_sum F b hI,
+ finite_dimensional.finrank_direct_sum]
+ -- slow, and dot notation doesn't work
+end
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(first ported)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -3,9 +3,9 @@ Copyright (c) 2022 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen
-/
-import Data.Zmod.Quotient
+import Data.ZMod.Quotient
import LinearAlgebra.FreeModule.Finite.Rank
-import LinearAlgebra.FreeModule.Pid
+import LinearAlgebra.FreeModule.PID
import LinearAlgebra.FreeModule.StrongRankCondition
import LinearAlgebra.QuotientPi
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -81,6 +81,8 @@ noncomputable def quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I
refine' (Submodule.Quotient.equiv (I.restrict_scalars R) I' b'.equiv_fun this).trans _
any_goals apply RingHom.id; any_goals infer_instance
classical
+ let this.1 := Submodule.quotientPi (show ∀ i, Submodule R R from fun i => span ({a i} : Set R))
+ exact this
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
-/
@@ -111,7 +113,7 @@ noncomputable def fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module.Finit
let e := I.quotientEquivPiZMod b hI
haveI : ∀ i, NeZero (a i).natAbs := fun i =>
⟨Int.natAbs_ne_zero_of_ne_zero (smith_coeffs_ne_zero b I hI i)⟩ <;>
- classical <;>
+ classical skip <;>
exact Fintype.ofEquiv (∀ i, ZMod (a i).natAbs) e.symm
#align ideal.fintype_quotient_of_free_of_ne_bot Ideal.fintypeQuotientOfFreeOfNeBot
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -81,8 +81,6 @@ noncomputable def quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I
refine' (Submodule.Quotient.equiv (I.restrict_scalars R) I' b'.equiv_fun this).trans _
any_goals apply RingHom.id; any_goals infer_instance
classical
- let this.1 := Submodule.quotientPi (show ∀ i, Submodule R R from fun i => span ({a i} : Set R))
- exact this
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
-/
@@ -113,7 +111,7 @@ noncomputable def fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module.Finit
let e := I.quotientEquivPiZMod b hI
haveI : ∀ i, NeZero (a i).natAbs := fun i =>
⟨Int.natAbs_ne_zero_of_ne_zero (smith_coeffs_ne_zero b I hI i)⟩ <;>
- classical skip <;>
+ classical <;>
exact Fintype.ofEquiv (∀ i, ZMod (a i).natAbs) e.symm
#align ideal.fintype_quotient_of_free_of_ne_bot Ideal.fintypeQuotientOfFreeOfNeBot
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,11 +3,11 @@ Copyright (c) 2022 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen
-/
-import Mathbin.Data.Zmod.Quotient
-import Mathbin.LinearAlgebra.FreeModule.Finite.Rank
-import Mathbin.LinearAlgebra.FreeModule.Pid
-import Mathbin.LinearAlgebra.FreeModule.StrongRankCondition
-import Mathbin.LinearAlgebra.QuotientPi
+import Data.Zmod.Quotient
+import LinearAlgebra.FreeModule.Finite.Rank
+import LinearAlgebra.FreeModule.Pid
+import LinearAlgebra.FreeModule.StrongRankCondition
+import LinearAlgebra.QuotientPi
#align_import linear_algebra.free_module.ideal_quotient from "leanprover-community/mathlib"@"90b0d53ee6ffa910e5c2a977ce7e2fc704647974"
mathlib commit https://github.com/leanprover-community/mathlib/commit/32a7e535287f9c73f2e4d2aef306a39190f0b504
@@ -57,7 +57,7 @@ noncomputable def quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I
have : ∀ (c : ι → R) (i), b'.repr (∑ j : ι, c j • a j • b' j) i = a i * c i :=
by
intro c i
- simp only [← MulAction.mul_smul, b'.repr_sum_self, mul_comm]
+ simp only [← MulAction.hMul_smul, b'.repr_sum_self, mul_comm]
constructor
· rintro ⟨c, rfl⟩ i; exact ⟨c i, this c i⟩
· rintro ha
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,11 +2,6 @@
Copyright (c) 2022 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen
-
-! This file was ported from Lean 3 source module linear_algebra.free_module.ideal_quotient
-! leanprover-community/mathlib commit 90b0d53ee6ffa910e5c2a977ce7e2fc704647974
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Zmod.Quotient
import Mathbin.LinearAlgebra.FreeModule.Finite.Rank
@@ -14,6 +9,8 @@ import Mathbin.LinearAlgebra.FreeModule.Pid
import Mathbin.LinearAlgebra.FreeModule.StrongRankCondition
import Mathbin.LinearAlgebra.QuotientPi
+#align_import linear_algebra.free_module.ideal_quotient from "leanprover-community/mathlib"@"90b0d53ee6ffa910e5c2a977ce7e2fc704647974"
+
/-! # Ideals in free modules over PIDs
> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -35,6 +35,7 @@ variable {R S ι : Type _} [CommRing R] [CommRing S] [Algebra R S]
variable [IsDomain R] [IsPrincipalIdealRing R] [IsDomain S] [Finite ι]
+#print Ideal.quotientEquivPiSpan /-
/-- We can write the quotient of an ideal over a PID as a product of quotients by principal ideals.
-/
noncomputable def quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I ≠ ⊥) :
@@ -86,7 +87,9 @@ noncomputable def quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I
let this.1 := Submodule.quotientPi (show ∀ i, Submodule R R from fun i => span ({a i} : Set R))
exact this
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
+-/
+#print Ideal.quotientEquivPiZMod /-
/-- Ideal quotients over a free finite extension of `ℤ` are isomorphic to a direct product of
`zmod`. -/
noncomputable def quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (hI : I ≠ ⊥) :
@@ -97,7 +100,9 @@ noncomputable def quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (hI : I
AddEquiv.piCongrRight fun i => ↑(Int.quotientSpanEquivZMod (a i))
(↑(e : (S ⧸ I) ≃ₗ[ℤ] _) : S ⧸ I ≃+ _).trans e'
#align ideal.quotient_equiv_pi_zmod Ideal.quotientEquivPiZMod
+-/
+#print Ideal.fintypeQuotientOfFreeOfNeBot /-
/-- A nonzero ideal over a free finite extension of `ℤ` has a finite quotient.
Can't be an instance because of the side condition `I ≠ ⊥`, and more importantly,
@@ -114,10 +119,12 @@ noncomputable def fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module.Finit
classical skip <;>
exact Fintype.ofEquiv (∀ i, ZMod (a i).natAbs) e.symm
#align ideal.fintype_quotient_of_free_of_ne_bot Ideal.fintypeQuotientOfFreeOfNeBot
+-/
variable (F : Type _) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F R S]
(b : Basis ι R S) {I : Ideal S} (hI : I ≠ ⊥)
+#print Ideal.quotientEquivDirectSum /-
/-- Decompose `S⧸I` as a direct sum of cyclic `R`-modules
(quotients by the ideals generated by Smith coefficients of `I`). -/
noncomputable def quotientEquivDirectSum :
@@ -129,7 +136,9 @@ noncomputable def quotientEquivDirectSum :
(DirectSum.linearEquivFunOnFintype _ _ _).symm
exact LinearMap.IsScalarTower.compatibleSMul
#align ideal.quotient_equiv_direct_sum Ideal.quotientEquivDirectSum
+-/
+#print Ideal.finrank_quotient_eq_sum /-
-- why doesn't it automatically apply?
-- even after `change linear_map.compatible_smul _ (Π i, R ⧸ span _) F R`
theorem finrank_quotient_eq_sum {ι} [Fintype ι] (b : Basis ι R S) [Nontrivial F]
@@ -141,6 +150,7 @@ theorem finrank_quotient_eq_sum {ι} [Fintype ι] (b : Basis ι R S) [Nontrivial
rw [LinearEquiv.finrank_eq <| quotient_equiv_direct_sum F b hI,
FiniteDimensional.finrank_directSum]
#align ideal.finrank_quotient_eq_sum Ideal.finrank_quotient_eq_sum
+-/
-- slow, and dot notation doesn't work
end Ideal
mathlib commit https://github.com/leanprover-community/mathlib/commit/c471da714c044131b90c133701e51b877c246677
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen
! This file was ported from Lean 3 source module linear_algebra.free_module.ideal_quotient
-! leanprover-community/mathlib commit d87199d51218d36a0a42c66c82d147b5a7ff87b3
+! leanprover-community/mathlib commit 90b0d53ee6ffa910e5c2a977ce7e2fc704647974
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -27,17 +27,20 @@ import Mathbin.LinearAlgebra.QuotientPi
-/
-open scoped BigOperators DirectSum
+namespace Ideal
-variable {ι R S : Type _} [CommRing R] [CommRing S] [Algebra R S]
+open scoped BigOperators DirectSum Polynomial
-variable [IsDomain R] [IsPrincipalIdealRing R] [IsDomain S] [Fintype ι]
+variable {R S ι : Type _} [CommRing R] [CommRing S] [Algebra R S]
+
+variable [IsDomain R] [IsPrincipalIdealRing R] [IsDomain S] [Finite ι]
/-- We can write the quotient of an ideal over a PID as a product of quotients by principal ideals.
-/
-noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I ≠ ⊥) :
- (S ⧸ I) ≃ₗ[R] ∀ i, R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R) :=
+noncomputable def quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I ≠ ⊥) :
+ (S ⧸ I) ≃ₗ[R] ∀ i, R ⧸ span ({I.smithCoeffs b hI i} : Set R) :=
by
+ haveI := Fintype.ofFinite ι
-- Choose `e : S ≃ₗ I` and a basis `b'` for `S` that turns the map
-- `f := ((submodule.subtype I).restrict_scalars R).comp e` into a diagonal matrix:
-- there is an `a : ι → ℤ` such that `f (b' i) = a i • b' i`.
@@ -63,11 +66,11 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
choose c hc using ha; exact ⟨c, b'.ext_elem fun i => trans (hc i) (this c i).symm⟩
-- Now we map everything through the linear equiv `S ≃ₗ (ι → R)`,
-- which maps `I` to `I' := Π i, a i ℤ`.
- let I' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => Ideal.span ({a i} : Set R)
+ let I' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span ({a i} : Set R)
have : Submodule.map (b'.equiv_fun : S →ₗ[R] ι → R) (I.restrict_scalars R) = I' :=
by
ext x
- simp only [Submodule.mem_map, Submodule.mem_pi, Ideal.mem_span_singleton, Set.mem_univ,
+ simp only [Submodule.mem_map, Submodule.mem_pi, mem_span_singleton, Set.mem_univ,
Submodule.restrictScalars_mem, mem_I_iff, smul_eq_mul, forall_true_left, LinearEquiv.coe_coe,
Basis.equivFun_apply]
constructor
@@ -80,18 +83,17 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
refine' (Submodule.Quotient.equiv (I.restrict_scalars R) I' b'.equiv_fun this).trans _
any_goals apply RingHom.id; any_goals infer_instance
classical
- let this.1 :=
- Submodule.quotientPi (show ∀ i, Submodule R R from fun i => Ideal.span ({a i} : Set R))
+ let this.1 := Submodule.quotientPi (show ∀ i, Submodule R R from fun i => span ({a i} : Set R))
exact this
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
/-- Ideal quotients over a free finite extension of `ℤ` are isomorphic to a direct product of
`zmod`. -/
-noncomputable def Ideal.quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (hI : I ≠ ⊥) :
+noncomputable def quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (hI : I ≠ ⊥) :
S ⧸ I ≃+ ∀ i, ZMod (I.smithCoeffs b hI i).natAbs :=
let a := I.smithCoeffs b hI
let e := I.quotientEquivPiSpan b hI
- let e' : (∀ i : ι, ℤ ⧸ Ideal.span ({a i} : Set ℤ)) ≃+ ∀ i : ι, ZMod (a i).natAbs :=
+ let e' : (∀ i : ι, ℤ ⧸ span ({a i} : Set ℤ)) ≃+ ∀ i : ι, ZMod (a i).natAbs :=
AddEquiv.piCongrRight fun i => ↑(Int.quotientSpanEquivZMod (a i))
(↑(e : (S ⧸ I) ≃ₗ[ℤ] _) : S ⧸ I ≃+ _).trans e'
#align ideal.quotient_equiv_pi_zmod Ideal.quotientEquivPiZMod
@@ -101,14 +103,14 @@ noncomputable def Ideal.quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (
Can't be an instance because of the side condition `I ≠ ⊥`, and more importantly,
because the choice of `fintype` instance is non-canonical.
-/
-noncomputable def Ideal.fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module.Finite ℤ S]
- (I : Ideal S) (hI : I ≠ ⊥) : Fintype (S ⧸ I) :=
+noncomputable def fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module.Finite ℤ S] (I : Ideal S)
+ (hI : I ≠ ⊥) : Fintype (S ⧸ I) :=
by
let b := Module.Free.chooseBasis ℤ S
let a := I.smithCoeffs b hI
let e := I.quotientEquivPiZMod b hI
haveI : ∀ i, NeZero (a i).natAbs := fun i =>
- ⟨Int.natAbs_ne_zero_of_ne_zero (Ideal.smithCoeffs_ne_zero b I hI i)⟩ <;>
+ ⟨Int.natAbs_ne_zero_of_ne_zero (smith_coeffs_ne_zero b I hI i)⟩ <;>
classical skip <;>
exact Fintype.ofEquiv (∀ i, ZMod (a i).natAbs) e.symm
#align ideal.fintype_quotient_of_free_of_ne_bot Ideal.fintypeQuotientOfFreeOfNeBot
@@ -118,9 +120,10 @@ variable (F : Type _) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F
/-- Decompose `S⧸I` as a direct sum of cyclic `R`-modules
(quotients by the ideals generated by Smith coefficients of `I`). -/
-noncomputable def Ideal.quotientEquivDirectSum :
- (S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R) :=
+noncomputable def quotientEquivDirectSum :
+ (S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ span ({I.smithCoeffs b hI i} : Set R) :=
by
+ haveI := Fintype.ofFinite ι
apply
((I.quotient_equiv_pi_span b _).restrictScalars F).trans
(DirectSum.linearEquivFunOnFintype _ _ _).symm
@@ -129,14 +132,16 @@ noncomputable def Ideal.quotientEquivDirectSum :
-- why doesn't it automatically apply?
-- even after `change linear_map.compatible_smul _ (Π i, R ⧸ span _) F R`
-theorem Ideal.finrank_quotient_eq_sum [Nontrivial F]
- [∀ i, Module.Free F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R))]
- [∀ i, Module.Finite F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R))] :
+theorem finrank_quotient_eq_sum {ι} [Fintype ι] (b : Basis ι R S) [Nontrivial F]
+ [∀ i, Module.Free F (R ⧸ span ({I.smithCoeffs b hI i} : Set R))]
+ [∀ i, Module.Finite F (R ⧸ span ({I.smithCoeffs b hI i} : Set R))] :
FiniteDimensional.finrank F (S ⧸ I) =
- ∑ i, FiniteDimensional.finrank F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R)) :=
+ ∑ i, FiniteDimensional.finrank F (R ⧸ span ({I.smithCoeffs b hI i} : Set R)) :=
by
- rw [LinearEquiv.finrank_eq <| Ideal.quotientEquivDirectSum F b hI,
+ rw [LinearEquiv.finrank_eq <| quotient_equiv_direct_sum F b hI,
FiniteDimensional.finrank_directSum]
#align ideal.finrank_quotient_eq_sum Ideal.finrank_quotient_eq_sum
-- slow, and dot notation doesn't work
+end Ideal
+
mathlib commit https://github.com/leanprover-community/mathlib/commit/7e5137f579de09a059a5ce98f364a04e221aabf0
@@ -80,7 +80,7 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
refine' (Submodule.Quotient.equiv (I.restrict_scalars R) I' b'.equiv_fun this).trans _
any_goals apply RingHom.id; any_goals infer_instance
classical
- let this :=
+ let this.1 :=
Submodule.quotientPi (show ∀ i, Submodule R R from fun i => Ideal.span ({a i} : Set R))
exact this
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
mathlib commit https://github.com/leanprover-community/mathlib/commit/5f25c089cb34db4db112556f23c50d12da81b297
@@ -80,9 +80,9 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
refine' (Submodule.Quotient.equiv (I.restrict_scalars R) I' b'.equiv_fun this).trans _
any_goals apply RingHom.id; any_goals infer_instance
classical
- let this :=
- Submodule.quotientPi (show ∀ i, Submodule R R from fun i => Ideal.span ({a i} : Set R))
- exact this
+ let this :=
+ Submodule.quotientPi (show ∀ i, Submodule R R from fun i => Ideal.span ({a i} : Set R))
+ exact this
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
/-- Ideal quotients over a free finite extension of `ℤ` are isomorphic to a direct product of
mathlib commit https://github.com/leanprover-community/mathlib/commit/88a563b158f59f2983cfad685664da95502e8cdd
@@ -4,13 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen
! This file was ported from Lean 3 source module linear_algebra.free_module.ideal_quotient
-! leanprover-community/mathlib commit 0b7c740e25651db0ba63648fbae9f9d6f941e31b
+! leanprover-community/mathlib commit d87199d51218d36a0a42c66c82d147b5a7ff87b3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Data.Zmod.Quotient
-import Mathbin.LinearAlgebra.FreeModule.Finite.Basic
+import Mathbin.LinearAlgebra.FreeModule.Finite.Rank
import Mathbin.LinearAlgebra.FreeModule.Pid
+import Mathbin.LinearAlgebra.FreeModule.StrongRankCondition
import Mathbin.LinearAlgebra.QuotientPi
/-! # Ideals in free modules over PIDs
@@ -26,7 +27,7 @@ import Mathbin.LinearAlgebra.QuotientPi
-/
-open scoped BigOperators
+open scoped BigOperators DirectSum
variable {ι R S : Type _} [CommRing R] [CommRing S] [Algebra R S]
@@ -112,3 +113,30 @@ noncomputable def Ideal.fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module
exact Fintype.ofEquiv (∀ i, ZMod (a i).natAbs) e.symm
#align ideal.fintype_quotient_of_free_of_ne_bot Ideal.fintypeQuotientOfFreeOfNeBot
+variable (F : Type _) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F R S]
+ (b : Basis ι R S) {I : Ideal S} (hI : I ≠ ⊥)
+
+/-- Decompose `S⧸I` as a direct sum of cyclic `R`-modules
+ (quotients by the ideals generated by Smith coefficients of `I`). -/
+noncomputable def Ideal.quotientEquivDirectSum :
+ (S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R) :=
+ by
+ apply
+ ((I.quotient_equiv_pi_span b _).restrictScalars F).trans
+ (DirectSum.linearEquivFunOnFintype _ _ _).symm
+ exact LinearMap.IsScalarTower.compatibleSMul
+#align ideal.quotient_equiv_direct_sum Ideal.quotientEquivDirectSum
+
+-- why doesn't it automatically apply?
+-- even after `change linear_map.compatible_smul _ (Π i, R ⧸ span _) F R`
+theorem Ideal.finrank_quotient_eq_sum [Nontrivial F]
+ [∀ i, Module.Free F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R))]
+ [∀ i, Module.Finite F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R))] :
+ FiniteDimensional.finrank F (S ⧸ I) =
+ ∑ i, FiniteDimensional.finrank F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R)) :=
+ by
+ rw [LinearEquiv.finrank_eq <| Ideal.quotientEquivDirectSum F b hI,
+ FiniteDimensional.finrank_directSum]
+#align ideal.finrank_quotient_eq_sum Ideal.finrank_quotient_eq_sum
+
+-- slow, and dot notation doesn't work
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -26,7 +26,7 @@ import Mathbin.LinearAlgebra.QuotientPi
-/
-open BigOperators
+open scoped BigOperators
variable {ι R S : Type _} [CommRing R] [CommRing S] [Algebra R S]
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -32,9 +32,6 @@ variable {ι R S : Type _} [CommRing R] [CommRing S] [Algebra R S]
variable [IsDomain R] [IsPrincipalIdealRing R] [IsDomain S] [Fintype ι]
-/- warning: ideal.quotient_equiv_pi_span -> Ideal.quotientEquivPiSpan is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpanₓ'. -/
/-- We can write the quotient of an ideal over a PID as a product of quotients by principal ideals.
-/
noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I ≠ ⊥) :
@@ -87,9 +84,6 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
exact this
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
-/- warning: ideal.quotient_equiv_pi_zmod -> Ideal.quotientEquivPiZMod is a dubious translation:
-<too large>
-Case conversion may be inaccurate. Consider using '#align ideal.quotient_equiv_pi_zmod Ideal.quotientEquivPiZModₓ'. -/
/-- Ideal quotients over a free finite extension of `ℤ` are isomorphic to a direct product of
`zmod`. -/
noncomputable def Ideal.quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (hI : I ≠ ⊥) :
@@ -101,12 +95,6 @@ noncomputable def Ideal.quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (
(↑(e : (S ⧸ I) ≃ₗ[ℤ] _) : S ⧸ I ≃+ _).trans e'
#align ideal.quotient_equiv_pi_zmod Ideal.quotientEquivPiZMod
-/- warning: ideal.fintype_quotient_of_free_of_ne_bot -> Ideal.fintypeQuotientOfFreeOfNeBot is a dubious translation:
-lean 3 declaration is
- forall {S : Type.{u1}} [_inst_2 : CommRing.{u1} S] [_inst_6 : IsDomain.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))] [_inst_8 : Module.Free.{0, u1} Int S Int.semiring (AddCommGroup.toAddCommMonoid.{u1} S (NonUnitalNonAssocRing.toAddCommGroup.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2))))) (AddCommGroup.intModule.{u1} S (NonUnitalNonAssocRing.toAddCommGroup.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2)))))] [_inst_9 : Module.Finite.{0, u1} Int S Int.semiring (AddCommGroup.toAddCommMonoid.{u1} S (NonUnitalNonAssocRing.toAddCommGroup.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2))))) (AddCommGroup.intModule.{u1} S (NonUnitalNonAssocRing.toAddCommGroup.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2)))))] (I : Ideal.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))), (Ne.{succ u1} (Ideal.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))) I (Bot.bot.{u1} (Ideal.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))) (Submodule.hasBot.{u1, u1} S S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))))) (Semiring.toModule.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2)))))) -> (Fintype.{u1} (HasQuotient.Quotient.{u1, u1} S (Ideal.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))) (Ideal.hasQuotient.{u1} S _inst_2) I))
-but is expected to have type
- forall {S : Type.{u1}} [_inst_2 : CommRing.{u1} S] [_inst_6 : IsDomain.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))] [_inst_8 : Module.Free.{0, u1} Int S Int.instSemiringInt (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} S (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2))))) (AddCommGroup.intModule.{u1} S (Ring.toAddCommGroup.{u1} S (CommRing.toRing.{u1} S _inst_2)))] [_inst_9 : Module.Finite.{0, u1} Int S Int.instSemiringInt (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} S (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2))))) (AddCommGroup.intModule.{u1} S (Ring.toAddCommGroup.{u1} S (CommRing.toRing.{u1} S _inst_2)))] (I : Ideal.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))), (Ne.{succ u1} (Ideal.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))) I (Bot.bot.{u1} (Ideal.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))) (Submodule.instBotSubmodule.{u1, u1} S S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))))) (Semiring.toModule.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2)))))) -> (Fintype.{u1} (HasQuotient.Quotient.{u1, u1} S (Ideal.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u1} S _inst_2) I))
-Case conversion may be inaccurate. Consider using '#align ideal.fintype_quotient_of_free_of_ne_bot Ideal.fintypeQuotientOfFreeOfNeBotₓ'. -/
/-- A nonzero ideal over a free finite extension of `ℤ` has a finite quotient.
Can't be an instance because of the side condition `I ≠ ⊥`, and more importantly,
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -50,23 +50,19 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
let e : S ≃ₗ[R] I := b'.equiv ab (Equiv.refl _)
let f : S →ₗ[R] S := (I.subtype.restrict_scalars R).comp (e : S →ₗ[R] I)
let f_apply : ∀ x, f x = b'.equiv ab (Equiv.refl _) x := fun x => rfl
- have ha : ∀ i, f (b' i) = a i • b' i := by
- intro i
+ have ha : ∀ i, f (b' i) = a i • b' i := by intro i;
rw [f_apply, b'.equiv_apply, Equiv.refl_apply, ab_eq]
have mem_I_iff : ∀ x, x ∈ I ↔ ∀ i, a i ∣ b'.repr x i :=
by
- intro x
- simp_rw [ab.mem_ideal_iff', ab_eq]
+ intro x; simp_rw [ab.mem_ideal_iff', ab_eq]
have : ∀ (c : ι → R) (i), b'.repr (∑ j : ι, c j • a j • b' j) i = a i * c i :=
by
intro c i
simp only [← MulAction.mul_smul, b'.repr_sum_self, mul_comm]
constructor
- · rintro ⟨c, rfl⟩ i
- exact ⟨c i, this c i⟩
+ · rintro ⟨c, rfl⟩ i; exact ⟨c i, this c i⟩
· rintro ha
- choose c hc using ha
- exact ⟨c, b'.ext_elem fun i => trans (hc i) (this c i).symm⟩
+ choose c hc using ha; exact ⟨c, b'.ext_elem fun i => trans (hc i) (this c i).symm⟩
-- Now we map everything through the linear equiv `S ≃ₗ (ι → R)`,
-- which maps `I` to `I' := Π i, a i ℤ`.
let I' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => Ideal.span ({a i} : Set R)
@@ -77,17 +73,14 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
Submodule.restrictScalars_mem, mem_I_iff, smul_eq_mul, forall_true_left, LinearEquiv.coe_coe,
Basis.equivFun_apply]
constructor
- · rintro ⟨y, hy, rfl⟩ i
- exact hy i
+ · rintro ⟨y, hy, rfl⟩ i; exact hy i
· rintro hdvd
refine' ⟨∑ i, x i • b' i, fun i => _, _⟩ <;> rwa [b'.repr_sum_self]
· exact hdvd i
refine' ((Submodule.Quotient.restrictScalarsEquiv R I).restrictScalars R).symm.trans _
- any_goals apply RingHom.id
- any_goals infer_instance
+ any_goals apply RingHom.id; any_goals infer_instance
refine' (Submodule.Quotient.equiv (I.restrict_scalars R) I' b'.equiv_fun this).trans _
- any_goals apply RingHom.id
- any_goals infer_instance
+ any_goals apply RingHom.id; any_goals infer_instance
classical
let this :=
Submodule.quotientPi (show ∀ i, Submodule R R from fun i => Ideal.span ({a i} : Set R))
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: Anne Baanen
! This file was ported from Lean 3 source module linear_algebra.free_module.ideal_quotient
-! leanprover-community/mathlib commit 6623e6af705e97002a9054c1c05a980180276fc1
+! 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.LinearAlgebra.QuotientPi
/-! # Ideals in free modules over PIDs
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
## Main results
- `ideal.quotient_equiv_pi_span`: `S ⧸ I`, if `S` is finite free as a module over a PID `R`,
@@ -30,10 +33,7 @@ variable {ι R S : Type _} [CommRing R] [CommRing S] [Algebra R S]
variable [IsDomain R] [IsPrincipalIdealRing R] [IsDomain S] [Fintype ι]
/- warning: ideal.quotient_equiv_pi_span -> Ideal.quotientEquivPiSpan is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {R : Type.{u2}} {S : Type.{u3}} [_inst_1 : CommRing.{u2} R] [_inst_2 : CommRing.{u3} S] [_inst_3 : Algebra.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))] [_inst_4 : IsDomain.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))] [_inst_5 : IsPrincipalIdealRing.{u2} R (CommRing.toRing.{u2} R _inst_1)] [_inst_6 : IsDomain.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))] [_inst_7 : Fintype.{u1} ι] (I : Ideal.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) (b : Basis.{u1, u2, u3} ι R S (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} S (NonUnitalNonAssocRing.toAddCommGroup.{u3} S (NonAssocRing.toNonUnitalNonAssocRing.{u3} S (Ring.toNonAssocRing.{u3} S (CommRing.toRing.{u3} S _inst_2))))) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)) _inst_3)) (hI : Ne.{succ u3} (Ideal.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) I (Bot.bot.{u3} (Ideal.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) (Submodule.hasBot.{u3, u3} S S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))))) (Semiring.toModule.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)))))), LinearEquiv.{u2, u2, u3, max u1 u2} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)))) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)))) (Ideal.quotientEquivPiSpan._proof_1.{u2} R _inst_1) (Ideal.quotientEquivPiSpan._proof_2.{u2} R _inst_1) (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) (Ideal.hasQuotient.{u3} S _inst_2) I) (forall (i : ι), HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (AddCommGroup.toAddCommMonoid.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) (Ideal.hasQuotient.{u3} S _inst_2) I) (Submodule.Quotient.addCommGroup.{u3, u3} S S (CommRing.toRing.{u3} S _inst_2) (NonUnitalNonAssocRing.toAddCommGroup.{u3} S (NonAssocRing.toNonUnitalNonAssocRing.{u3} S (Ring.toNonAssocRing.{u3} S (CommRing.toRing.{u3} S _inst_2)))) (Semiring.toModule.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) I)) (Pi.addCommMonoid.{u1, u2} ι (fun (i : ι) => HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (fun (i : ι) => AddCommGroup.toAddCommMonoid.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonUnitalNonAssocRing.toAddCommGroup.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonAssocRing.toNonUnitalNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ring.toNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ideal.Quotient.commRing.{u2} R _inst_1 (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))))))))) (Submodule.Quotient.module'.{u3, u3, u2} S S (CommRing.toRing.{u3} S _inst_2) (NonUnitalNonAssocRing.toAddCommGroup.{u3} S (NonAssocRing.toNonUnitalNonAssocRing.{u3} S (Ring.toNonAssocRing.{u3} S (CommRing.toRing.{u3} S _inst_2)))) (Semiring.toModule.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (SMulZeroClass.toHasSmul.{u2, u3} R S (AddZeroClass.toHasZero.{u3} S (AddMonoid.toAddZeroClass.{u3} S (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)))))))) (SMulWithZero.toSmulZeroClass.{u2, u3} R S (MulZeroClass.toHasZero.{u2} R (MulZeroOneClass.toMulZeroClass.{u2} R (MonoidWithZero.toMulZeroOneClass.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)))))) (AddZeroClass.toHasZero.{u3} S (AddMonoid.toAddZeroClass.{u3} S (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)))))))) (MulActionWithZero.toSMulWithZero.{u2, u3} R S (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (AddZeroClass.toHasZero.{u3} S (AddMonoid.toAddZeroClass.{u3} S (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)))))))) (Module.toMulActionWithZero.{u2, u3} R S (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))))) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)) _inst_3))))) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)) _inst_3) (Ideal.quotientEquivPiSpan._proof_3.{u2, u3} R S _inst_1 _inst_2 _inst_3) I) (Algebra.toModule.{u2, max u1 u2} R (forall (i : ι), HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toCommSemiring.{u2} R _inst_1) (Pi.semiring.{u1, u2} ι (fun (i : ι) => HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (fun (i : ι) => Ring.toSemiring.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ideal.Quotient.commRing.{u2} R _inst_1 (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i))))))) (Pi.algebra.{u1, u2, u2} ι R (fun (i : ι) => HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toCommSemiring.{u2} R _inst_1) (fun (i : ι) => Ring.toSemiring.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ideal.Quotient.commRing.{u2} R _inst_1 (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))))) (fun (i : ι) => Ideal.Quotient.algebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_1) _inst_1 (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i))))))
-but is expected to have type
- forall {ι : Type.{u1}} {R : Type.{u2}} {S : Type.{u3}} [_inst_1 : CommRing.{u2} R] [_inst_2 : CommRing.{u3} S] [_inst_3 : Algebra.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))] [_inst_4 : IsDomain.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))] [_inst_5 : IsPrincipalIdealRing.{u2} R (CommRing.toRing.{u2} R _inst_1)] [_inst_6 : IsDomain.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))] [_inst_7 : Fintype.{u1} ι] (I : Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (b : Basis.{u1, u2, u3} ι R S (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} S (NonAssocRing.toNonUnitalNonAssocRing.{u3} S (Ring.toNonAssocRing.{u3} S (CommRing.toRing.{u3} S _inst_2))))) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)) _inst_3)) (hI : Ne.{succ u3} (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) I (Bot.bot.{u3} (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Submodule.instBotSubmodule.{u3, u3} S S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))))) (Semiring.toModule.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)))))), LinearEquiv.{u2, u2, u3, max u1 u2} R R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)))) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)))) (RingHomInvPair.ids.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (RingHomInvPair.ids.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (forall (i : ι), HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (NonAssocRing.toNonUnitalNonAssocRing.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (Ring.toNonAssocRing.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (CommRing.toRing.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (Ideal.Quotient.commRing.{u3} S _inst_2 I)))))) (Pi.addCommMonoid.{u1, u2} ι (fun (i : ι) => HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (fun (i : ι) => NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonAssocRing.toNonUnitalNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ring.toNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ideal.Quotient.commRing.{u2} R _inst_1 (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))))))))) (Submodule.Quotient.module'.{u3, u3, u2} S S (CommRing.toRing.{u3} S _inst_2) (Ring.toAddCommGroup.{u3} S (CommRing.toRing.{u3} S _inst_2)) (Semiring.toModule.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Algebra.toSMul.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)) _inst_3) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)) _inst_3) (IsScalarTower.right.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)) _inst_3) I) (Pi.module.{u1, u2, u2} ι (fun (i : ι) => HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (fun (i : ι) => NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonAssocRing.toNonUnitalNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ring.toNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ideal.Quotient.commRing.{u2} R _inst_1 (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i))))))))) (fun (i : ι) => Submodule.Quotient.module.{u2, u2} R R (CommRing.toRing.{u2} R _inst_1) (Ring.toAddCommGroup.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Semiring.toModule.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))))
+<too large>
Case conversion may be inaccurate. Consider using '#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpanₓ'. -/
/-- We can write the quotient of an ideal over a PID as a product of quotients by principal ideals.
-/
@@ -95,10 +95,7 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
/- warning: ideal.quotient_equiv_pi_zmod -> Ideal.quotientEquivPiZMod is a dubious translation:
-lean 3 declaration is
- forall {ι : Type.{u1}} {S : Type.{u2}} [_inst_2 : CommRing.{u2} S] [_inst_6 : IsDomain.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))] [_inst_7 : Fintype.{u1} ι] (I : Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (b : Basis.{u1, 0, u2} ι Int S Int.semiring (AddCommGroup.toAddCommMonoid.{u2} S (NonUnitalNonAssocRing.toAddCommGroup.{u2} S (NonAssocRing.toNonUnitalNonAssocRing.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_2))))) (AddCommGroup.intModule.{u2} S (NonUnitalNonAssocRing.toAddCommGroup.{u2} S (NonAssocRing.toNonUnitalNonAssocRing.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_2)))))) (hI : Ne.{succ u2} (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) I (Bot.bot.{u2} (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (Submodule.hasBot.{u2, u2} S S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))))) (Semiring.toModule.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2)))))), AddEquiv.{u2, u1} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (Ideal.hasQuotient.{u2} S _inst_2) I) (forall (i : ι), ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_1 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (Distrib.toHasAdd.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (Ideal.hasQuotient.{u2} S _inst_2) I) (Ring.toDistrib.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (Ideal.hasQuotient.{u2} S _inst_2) I) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (Ideal.hasQuotient.{u2} S _inst_2) I) (Ideal.Quotient.commRing.{u2} S _inst_2 I)))) (Pi.instAdd.{u1, 0} ι (fun (i : ι) => ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_2 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (fun (i : ι) => Distrib.toHasAdd.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_3 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (Ring.toDistrib.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_3 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (CommRing.toRing.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_3 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (ZMod.commRing (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_3 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))))))
-but is expected to have type
- forall {ι : Type.{u1}} {S : Type.{u2}} [_inst_2 : CommRing.{u2} S] [_inst_6 : IsDomain.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))] [_inst_7 : Fintype.{u1} ι] (I : Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (b : Basis.{u1, 0, u2} ι Int S Int.instSemiringInt (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} S (NonAssocRing.toNonUnitalNonAssocRing.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_2))))) (AddCommGroup.intModule.{u2} S (Ring.toAddCommGroup.{u2} S (CommRing.toRing.{u2} S _inst_2)))) (hI : Ne.{succ u2} (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) I (Bot.bot.{u2} (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Submodule.instBotSubmodule.{u2, u2} S S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))))) (Semiring.toModule.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2)))))), AddEquiv.{u2, u1} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (forall (i : ι), ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (Distrib.toAdd.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (NonUnitalNonAssocSemiring.toDistrib.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (NonAssocRing.toNonUnitalNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (Ring.toNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (Ideal.Quotient.commRing.{u2} S _inst_2 I))))))) (Pi.instAdd.{u1, 0} ι (fun (i : ι) => ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (fun (i : ι) => Distrib.toAdd.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (NonUnitalNonAssocSemiring.toDistrib.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (NonAssocRing.toNonUnitalNonAssocRing.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (Ring.toNonAssocRing.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (CommRing.toRing.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (ZMod.commRing (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))))))))))
+<too large>
Case conversion may be inaccurate. Consider using '#align ideal.quotient_equiv_pi_zmod Ideal.quotientEquivPiZModₓ'. -/
/-- Ideal quotients over a free finite extension of `ℤ` are isomorphic to a direct product of
`zmod`. -/
mathlib commit https://github.com/leanprover-community/mathlib/commit/e1a18cad9cd462973d760af7de36b05776b8811c
@@ -29,6 +29,12 @@ variable {ι R S : Type _} [CommRing R] [CommRing S] [Algebra R S]
variable [IsDomain R] [IsPrincipalIdealRing R] [IsDomain S] [Fintype ι]
+/- warning: ideal.quotient_equiv_pi_span -> Ideal.quotientEquivPiSpan is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {R : Type.{u2}} {S : Type.{u3}} [_inst_1 : CommRing.{u2} R] [_inst_2 : CommRing.{u3} S] [_inst_3 : Algebra.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))] [_inst_4 : IsDomain.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))] [_inst_5 : IsPrincipalIdealRing.{u2} R (CommRing.toRing.{u2} R _inst_1)] [_inst_6 : IsDomain.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))] [_inst_7 : Fintype.{u1} ι] (I : Ideal.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) (b : Basis.{u1, u2, u3} ι R S (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (AddCommGroup.toAddCommMonoid.{u3} S (NonUnitalNonAssocRing.toAddCommGroup.{u3} S (NonAssocRing.toNonUnitalNonAssocRing.{u3} S (Ring.toNonAssocRing.{u3} S (CommRing.toRing.{u3} S _inst_2))))) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)) _inst_3)) (hI : Ne.{succ u3} (Ideal.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) I (Bot.bot.{u3} (Ideal.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) (Submodule.hasBot.{u3, u3} S S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))))) (Semiring.toModule.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)))))), LinearEquiv.{u2, u2, u3, max u1 u2} R R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)))) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)))) (Ideal.quotientEquivPiSpan._proof_1.{u2} R _inst_1) (Ideal.quotientEquivPiSpan._proof_2.{u2} R _inst_1) (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) (Ideal.hasQuotient.{u3} S _inst_2) I) (forall (i : ι), HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (AddCommGroup.toAddCommMonoid.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) (Ideal.hasQuotient.{u3} S _inst_2) I) (Submodule.Quotient.addCommGroup.{u3, u3} S S (CommRing.toRing.{u3} S _inst_2) (NonUnitalNonAssocRing.toAddCommGroup.{u3} S (NonAssocRing.toNonUnitalNonAssocRing.{u3} S (Ring.toNonAssocRing.{u3} S (CommRing.toRing.{u3} S _inst_2)))) (Semiring.toModule.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) I)) (Pi.addCommMonoid.{u1, u2} ι (fun (i : ι) => HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (fun (i : ι) => AddCommGroup.toAddCommMonoid.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonUnitalNonAssocRing.toAddCommGroup.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonAssocRing.toNonUnitalNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ring.toNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ideal.Quotient.commRing.{u2} R _inst_1 (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))))))))) (Submodule.Quotient.module'.{u3, u3, u2} S S (CommRing.toRing.{u3} S _inst_2) (NonUnitalNonAssocRing.toAddCommGroup.{u3} S (NonAssocRing.toNonUnitalNonAssocRing.{u3} S (Ring.toNonAssocRing.{u3} S (CommRing.toRing.{u3} S _inst_2)))) (Semiring.toModule.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))) R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (SMulZeroClass.toHasSmul.{u2, u3} R S (AddZeroClass.toHasZero.{u3} S (AddMonoid.toAddZeroClass.{u3} S (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)))))))) (SMulWithZero.toSmulZeroClass.{u2, u3} R S (MulZeroClass.toHasZero.{u2} R (MulZeroOneClass.toMulZeroClass.{u2} R (MonoidWithZero.toMulZeroOneClass.{u2} R (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)))))) (AddZeroClass.toHasZero.{u3} S (AddMonoid.toAddZeroClass.{u3} S (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)))))))) (MulActionWithZero.toSMulWithZero.{u2, u3} R S (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (AddZeroClass.toHasZero.{u3} S (AddMonoid.toAddZeroClass.{u3} S (AddCommMonoid.toAddMonoid.{u3} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)))))))) (Module.toMulActionWithZero.{u2, u3} R S (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2))))) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)) _inst_3))))) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (Ring.toSemiring.{u3} S (CommRing.toRing.{u3} S _inst_2)) _inst_3) (Ideal.quotientEquivPiSpan._proof_3.{u2, u3} R S _inst_1 _inst_2 _inst_3) I) (Algebra.toModule.{u2, max u1 u2} R (forall (i : ι), HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toCommSemiring.{u2} R _inst_1) (Pi.semiring.{u1, u2} ι (fun (i : ι) => HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (fun (i : ι) => Ring.toSemiring.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ideal.Quotient.commRing.{u2} R _inst_1 (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i))))))) (Pi.algebra.{u1, u2, u2} ι R (fun (i : ι) => HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toCommSemiring.{u2} R _inst_1) (fun (i : ι) => Ring.toSemiring.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1))) (Ideal.hasQuotient.{u2} R _inst_1) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ideal.Quotient.commRing.{u2} R _inst_1 (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))))) (fun (i : ι) => Ideal.Quotient.algebra.{u2, u2} R R (CommRing.toCommSemiring.{u2} R _inst_1) _inst_1 (Algebra.id.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Ideal.span.{u2} R (Ring.toSemiring.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.hasSingleton.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i))))))
+but is expected to have type
+ forall {ι : Type.{u1}} {R : Type.{u2}} {S : Type.{u3}} [_inst_1 : CommRing.{u2} R] [_inst_2 : CommRing.{u3} S] [_inst_3 : Algebra.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))] [_inst_4 : IsDomain.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))] [_inst_5 : IsPrincipalIdealRing.{u2} R (CommRing.toRing.{u2} R _inst_1)] [_inst_6 : IsDomain.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))] [_inst_7 : Fintype.{u1} ι] (I : Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (b : Basis.{u1, u2, u3} ι R S (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} S (NonAssocRing.toNonUnitalNonAssocRing.{u3} S (Ring.toNonAssocRing.{u3} S (CommRing.toRing.{u3} S _inst_2))))) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)) _inst_3)) (hI : Ne.{succ u3} (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) I (Bot.bot.{u3} (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Submodule.instBotSubmodule.{u3, u3} S S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} S (Semiring.toNonAssocSemiring.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))))) (Semiring.toModule.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)))))), LinearEquiv.{u2, u2, u3, max u1 u2} R R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)))) (RingHom.id.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)))) (RingHomInvPair.ids.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (RingHomInvPair.ids.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (forall (i : ι), HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (NonAssocRing.toNonUnitalNonAssocRing.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (Ring.toNonAssocRing.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (CommRing.toRing.{u3} (HasQuotient.Quotient.{u3, u3} S (Ideal.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u3} S _inst_2) I) (Ideal.Quotient.commRing.{u3} S _inst_2 I)))))) (Pi.addCommMonoid.{u1, u2} ι (fun (i : ι) => HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (fun (i : ι) => NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonAssocRing.toNonUnitalNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ring.toNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ideal.Quotient.commRing.{u2} R _inst_1 (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))))))))) (Submodule.Quotient.module'.{u3, u3, u2} S S (CommRing.toRing.{u3} S _inst_2) (Ring.toAddCommGroup.{u3} S (CommRing.toRing.{u3} S _inst_2)) (Semiring.toModule.{u3} S (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2))) R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Algebra.toSMul.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)) _inst_3) (Algebra.toModule.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)) _inst_3) (IsScalarTower.right.{u2, u3} R S (CommRing.toCommSemiring.{u2} R _inst_1) (CommSemiring.toSemiring.{u3} S (CommRing.toCommSemiring.{u3} S _inst_2)) _inst_3) I) (Pi.module.{u1, u2, u2} ι (fun (i : ι) => HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (fun (i : ι) => NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (NonAssocRing.toNonUnitalNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ring.toNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} R (Ideal.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} R _inst_1) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))) (Ideal.Quotient.commRing.{u2} R _inst_1 (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i))))))))) (fun (i : ι) => Submodule.Quotient.module.{u2, u2} R R (CommRing.toRing.{u2} R _inst_1) (Ring.toAddCommGroup.{u2} R (CommRing.toRing.{u2} R _inst_1)) (Semiring.toModule.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1))) (Ideal.span.{u2} R (CommSemiring.toSemiring.{u2} R (CommRing.toCommSemiring.{u2} R _inst_1)) (Singleton.singleton.{u2, u2} R (Set.{u2} R) (Set.instSingletonSet.{u2} R) (Ideal.smithCoeffs.{u1, u2, u3} ι R _inst_1 _inst_4 _inst_5 S _inst_2 _inst_6 _inst_3 (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))))
+Case conversion may be inaccurate. Consider using '#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpanₓ'. -/
/-- We can write the quotient of an ideal over a PID as a product of quotients by principal ideals.
-/
noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I ≠ ⊥) :
@@ -88,17 +94,29 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
exact this
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
+/- warning: ideal.quotient_equiv_pi_zmod -> Ideal.quotientEquivPiZMod is a dubious translation:
+lean 3 declaration is
+ forall {ι : Type.{u1}} {S : Type.{u2}} [_inst_2 : CommRing.{u2} S] [_inst_6 : IsDomain.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))] [_inst_7 : Fintype.{u1} ι] (I : Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (b : Basis.{u1, 0, u2} ι Int S Int.semiring (AddCommGroup.toAddCommMonoid.{u2} S (NonUnitalNonAssocRing.toAddCommGroup.{u2} S (NonAssocRing.toNonUnitalNonAssocRing.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_2))))) (AddCommGroup.intModule.{u2} S (NonUnitalNonAssocRing.toAddCommGroup.{u2} S (NonAssocRing.toNonUnitalNonAssocRing.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_2)))))) (hI : Ne.{succ u2} (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) I (Bot.bot.{u2} (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (Submodule.hasBot.{u2, u2} S S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))))) (Semiring.toModule.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2)))))), AddEquiv.{u2, u1} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (Ideal.hasQuotient.{u2} S _inst_2) I) (forall (i : ι), ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_1 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (Distrib.toHasAdd.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (Ideal.hasQuotient.{u2} S _inst_2) I) (Ring.toDistrib.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (Ideal.hasQuotient.{u2} S _inst_2) I) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (Ring.toSemiring.{u2} S (CommRing.toRing.{u2} S _inst_2))) (Ideal.hasQuotient.{u2} S _inst_2) I) (Ideal.Quotient.commRing.{u2} S _inst_2 I)))) (Pi.instAdd.{u1, 0} ι (fun (i : ι) => ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_2 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (fun (i : ι) => Distrib.toHasAdd.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_3 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (Ring.toDistrib.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_3 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (CommRing.toRing.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_3 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (ZMod.commRing (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.commRing Ideal.quotientEquivPiZMod._proof_3 (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i)))))))
+but is expected to have type
+ forall {ι : Type.{u1}} {S : Type.{u2}} [_inst_2 : CommRing.{u2} S] [_inst_6 : IsDomain.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))] [_inst_7 : Fintype.{u1} ι] (I : Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (b : Basis.{u1, 0, u2} ι Int S Int.instSemiringInt (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} S (NonAssocRing.toNonUnitalNonAssocRing.{u2} S (Ring.toNonAssocRing.{u2} S (CommRing.toRing.{u2} S _inst_2))))) (AddCommGroup.intModule.{u2} S (Ring.toAddCommGroup.{u2} S (CommRing.toRing.{u2} S _inst_2)))) (hI : Ne.{succ u2} (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) I (Bot.bot.{u2} (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Submodule.instBotSubmodule.{u2, u2} S S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))))) (Semiring.toModule.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2)))))), AddEquiv.{u2, u1} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (forall (i : ι), ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (Distrib.toAdd.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (NonUnitalNonAssocSemiring.toDistrib.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (NonAssocRing.toNonUnitalNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (Ring.toNonAssocRing.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (CommRing.toRing.{u2} (HasQuotient.Quotient.{u2, u2} S (Ideal.{u2} S (CommSemiring.toSemiring.{u2} S (CommRing.toCommSemiring.{u2} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u2} S _inst_2) I) (Ideal.Quotient.commRing.{u2} S _inst_2 I))))))) (Pi.instAdd.{u1, 0} ι (fun (i : ι) => ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (fun (i : ι) => Distrib.toAdd.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (NonUnitalNonAssocSemiring.toDistrib.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (NonAssocRing.toNonUnitalNonAssocRing.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (Ring.toNonAssocRing.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (CommRing.toRing.{0} (ZMod (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))) (ZMod.commRing (Int.natAbs (Ideal.smithCoeffs.{u1, 0, u2} ι Int Int.instCommRingInt (LinearOrderedRing.isDomain.{0} Int (LinearOrderedCommRing.toLinearOrderedRing.{0} Int Int.linearOrderedCommRing)) (EuclideanDomain.to_principal_ideal_domain.{0} Int Int.euclideanDomain) S _inst_2 _inst_6 (algebraInt.{u2} S (CommRing.toRing.{u2} S _inst_2)) (Finite.of_fintype.{u1} ι _inst_7) b I hI i))))))))))
+Case conversion may be inaccurate. Consider using '#align ideal.quotient_equiv_pi_zmod Ideal.quotientEquivPiZModₓ'. -/
/-- Ideal quotients over a free finite extension of `ℤ` are isomorphic to a direct product of
`zmod`. -/
-noncomputable def Ideal.quotientEquivPiZmod (I : Ideal S) (b : Basis ι ℤ S) (hI : I ≠ ⊥) :
+noncomputable def Ideal.quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (hI : I ≠ ⊥) :
S ⧸ I ≃+ ∀ i, ZMod (I.smithCoeffs b hI i).natAbs :=
let a := I.smithCoeffs b hI
let e := I.quotientEquivPiSpan b hI
let e' : (∀ i : ι, ℤ ⧸ Ideal.span ({a i} : Set ℤ)) ≃+ ∀ i : ι, ZMod (a i).natAbs :=
AddEquiv.piCongrRight fun i => ↑(Int.quotientSpanEquivZMod (a i))
(↑(e : (S ⧸ I) ≃ₗ[ℤ] _) : S ⧸ I ≃+ _).trans e'
-#align ideal.quotient_equiv_pi_zmod Ideal.quotientEquivPiZmod
+#align ideal.quotient_equiv_pi_zmod Ideal.quotientEquivPiZMod
+/- warning: ideal.fintype_quotient_of_free_of_ne_bot -> Ideal.fintypeQuotientOfFreeOfNeBot is a dubious translation:
+lean 3 declaration is
+ forall {S : Type.{u1}} [_inst_2 : CommRing.{u1} S] [_inst_6 : IsDomain.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))] [_inst_8 : Module.Free.{0, u1} Int S Int.semiring (AddCommGroup.toAddCommMonoid.{u1} S (NonUnitalNonAssocRing.toAddCommGroup.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2))))) (AddCommGroup.intModule.{u1} S (NonUnitalNonAssocRing.toAddCommGroup.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2)))))] [_inst_9 : Module.Finite.{0, u1} Int S Int.semiring (AddCommGroup.toAddCommMonoid.{u1} S (NonUnitalNonAssocRing.toAddCommGroup.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2))))) (AddCommGroup.intModule.{u1} S (NonUnitalNonAssocRing.toAddCommGroup.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2)))))] (I : Ideal.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))), (Ne.{succ u1} (Ideal.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))) I (Bot.bot.{u1} (Ideal.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))) (Submodule.hasBot.{u1, u1} S S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))))) (Semiring.toModule.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2)))))) -> (Fintype.{u1} (HasQuotient.Quotient.{u1, u1} S (Ideal.{u1} S (Ring.toSemiring.{u1} S (CommRing.toRing.{u1} S _inst_2))) (Ideal.hasQuotient.{u1} S _inst_2) I))
+but is expected to have type
+ forall {S : Type.{u1}} [_inst_2 : CommRing.{u1} S] [_inst_6 : IsDomain.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))] [_inst_8 : Module.Free.{0, u1} Int S Int.instSemiringInt (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} S (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2))))) (AddCommGroup.intModule.{u1} S (Ring.toAddCommGroup.{u1} S (CommRing.toRing.{u1} S _inst_2)))] [_inst_9 : Module.Finite.{0, u1} Int S Int.instSemiringInt (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} S (NonUnitalNonAssocRing.toNonUnitalNonAssocSemiring.{u1} S (NonAssocRing.toNonUnitalNonAssocRing.{u1} S (Ring.toNonAssocRing.{u1} S (CommRing.toRing.{u1} S _inst_2))))) (AddCommGroup.intModule.{u1} S (Ring.toAddCommGroup.{u1} S (CommRing.toRing.{u1} S _inst_2)))] (I : Ideal.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))), (Ne.{succ u1} (Ideal.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))) I (Bot.bot.{u1} (Ideal.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))) (Submodule.instBotSubmodule.{u1, u1} S S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))))) (Semiring.toModule.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2)))))) -> (Fintype.{u1} (HasQuotient.Quotient.{u1, u1} S (Ideal.{u1} S (CommSemiring.toSemiring.{u1} S (CommRing.toCommSemiring.{u1} S _inst_2))) (Ideal.instHasQuotientIdealToSemiringToCommSemiring.{u1} S _inst_2) I))
+Case conversion may be inaccurate. Consider using '#align ideal.fintype_quotient_of_free_of_ne_bot Ideal.fintypeQuotientOfFreeOfNeBotₓ'. -/
/-- A nonzero ideal over a free finite extension of `ℤ` has a finite quotient.
Can't be an instance because of the side condition `I ≠ ⊥`, and more importantly,
@@ -109,7 +127,7 @@ noncomputable def Ideal.fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module
by
let b := Module.Free.chooseBasis ℤ S
let a := I.smithCoeffs b hI
- let e := I.quotientEquivPiZmod b hI
+ let e := I.quotientEquivPiZMod b hI
haveI : ∀ i, NeZero (a i).natAbs := fun i =>
⟨Int.natAbs_ne_zero_of_ne_zero (Ideal.smithCoeffs_ne_zero b I hI i)⟩ <;>
classical skip <;>
mathlib commit https://github.com/leanprover-community/mathlib/commit/ef95945cd48c932c9e034872bd25c3c220d9c946
@@ -95,7 +95,7 @@ noncomputable def Ideal.quotientEquivPiZmod (I : Ideal S) (b : Basis ι ℤ S) (
let a := I.smithCoeffs b hI
let e := I.quotientEquivPiSpan b hI
let e' : (∀ i : ι, ℤ ⧸ Ideal.span ({a i} : Set ℤ)) ≃+ ∀ i : ι, ZMod (a i).natAbs :=
- AddEquiv.piCongrRight fun i => ↑(Int.quotientSpanEquivZmod (a i))
+ AddEquiv.piCongrRight fun i => ↑(Int.quotientSpanEquivZMod (a i))
(↑(e : (S ⧸ I) ≃ₗ[ℤ] _) : S ⧸ I ≃+ _).trans e'
#align ideal.quotient_equiv_pi_zmod Ideal.quotientEquivPiZmod
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
RingTheory.Ideal.Operations
; clean imports (#12090)
This is based on seeing the import RingTheory.Ideal.Operations
→ LinearAlgebra.Basis
on the longest pole. It feels like Ideal.Operations
is a bit of a chokepoint for compiling Mathlib since it imports many files and is imported by many files. So splitting out a few obvious parts should help with compile times. Moreover, there are a bunch of imports that I could remove and have the file still compile: presumably these are (were) transitive dependencies that shake does not remove.
The following results and their corollaries were split off:
Ideal.basisSpanSingleton
Basis.mem_ideal_iff
Ideal.colon
In particular, now Ideal.Operations
should no longer need to know about Basis
or submodule quotients.
@@ -7,6 +7,7 @@ import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
import Mathlib.LinearAlgebra.QuotientPi
+import Mathlib.RingTheory.Ideal.Basis
#align_import linear_algebra.free_module.ideal_quotient from "leanprover-community/mathlib"@"90b0d53ee6ffa910e5c2a977ce7e2fc704647974"
Empty lines were removed by executing the following Python script twice
import os
import re
# Loop through each file in the repository
for dir_path, dirs, files in os.walk('.'):
for filename in files:
if filename.endswith('.lean'):
file_path = os.path.join(dir_path, filename)
# Open the file and read its contents
with open(file_path, 'r') as file:
content = file.read()
# Use a regular expression to replace sequences of "variable" lines separated by empty lines
# with sequences without empty lines
modified_content = re.sub(r'(variable.*\n)\n(variable(?! .* in))', r'\1\2', content)
# Write the modified content back to the file
with open(file_path, 'w') as file:
file.write(modified_content)
@@ -24,7 +24,6 @@ namespace Ideal
open scoped BigOperators DirectSum
variable {ι R S : Type*} [CommRing R] [CommRing S] [Algebra R S]
-
variable [IsDomain R] [IsPrincipalIdealRing R] [IsDomain S] [Finite ι]
/-- We can write the quotient of an ideal over a PID as a product of quotients by principal ideals.
Homogenises porting notes via capitalisation and addition of whitespace.
It makes the following changes:
@@ -115,7 +115,7 @@ variable (F : Type*) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F R
noncomputable def quotientEquivDirectSum :
(S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ span ({I.smithCoeffs b hI i} : Set R) := by
haveI := Fintype.ofFinite ι
- -- porting note: manual construction of `CompatibleSMul` typeclass no longer needed
+ -- Porting note: manual construction of `CompatibleSMul` typeclass no longer needed
exact ((I.quotientEquivPiSpan b _).restrictScalars F).trans
(DirectSum.linearEquivFunOnFintype _ _ _).symm
#align ideal.quotient_equiv_direct_sum Ideal.quotientEquivDirectSum
@@ -58,7 +58,7 @@ noncomputable def quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I
let I' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span ({a i} : Set R)
have : Submodule.map (b'.equivFun : S →ₗ[R] ι → R) (I.restrictScalars R) = I' := by
ext x
- simp only [Submodule.mem_map, Submodule.mem_pi, mem_span_singleton, Set.mem_univ,
+ simp only [I', Submodule.mem_map, Submodule.mem_pi, mem_span_singleton, Set.mem_univ,
Submodule.restrictScalars_mem, mem_I_iff, smul_eq_mul, forall_true_left, LinearEquiv.coe_coe,
Basis.equivFun_apply]
constructor
@@ -3,6 +3,7 @@ Copyright (c) 2022 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen
-/
+import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
import Mathlib.LinearAlgebra.QuotientPi
@@ -76,7 +76,7 @@ noncomputable def quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I
· infer_instance
classical
let this :=
- Submodule.quotientPi (show ∀ _, Submodule R R from fun i => span ({a i} : Set R))
+ Submodule.quotientPi (show _ → Submodule R R from fun i => span ({a i} : Set R))
exact this
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
rank
and finrank
. (#9349)
The files Mathlib.LinearAlgebra.FreeModule.Rank
, Mathlib.LinearAlgebra.FreeModule.Finite.Rank
, Mathlib.LinearAlgebra.Dimension
and Mathlib.LinearAlgebra.Finrank
were reorganized into a
folder Mathlib.LinearAlgebra.Dimension
, containing the following files
Basic.lean
: Contains the definition of Module.rank
.Finrank.lean
: Contains the definition of FiniteDimensional.finrank
.StrongRankCondition.lean
: Contains results about rank
and finrank
over rings satisfying strong rank conditionFree.lean
: Contains results about rank
and finrank
of free modulesFinite.lean
: Contains conditions or consequences for rank
to be finite or zeroConstructions.lean
: Contains the calculation of the rank
of various constructions.DivisionRing.lean
: Contains results about rank
and finrank
of spaces over division rings.LinearMap.lean
: Contains results about LinearMap.rank
API changes:
IsNoetherian.rank_lt_aleph0
and FiniteDimensional.rank_lt_aleph0
are replaced with
rank_lt_aleph0
.
Module.Free.finite_basis
was renamed to Module.Finite.finite_basis
.
FiniteDimensional.finrank_eq_rank
was renamed to finrank_eq_rank
.
rank_eq_cardinal_basis
and rank_eq_cardinal_basis'
were removed
in favour of Basis.mk_eq_mk
and Basis.mk_eq_mk''
.
Co-authored-by: Andrew Yang <36414270+erdOne@users.noreply.github.com>
@@ -3,8 +3,6 @@ Copyright (c) 2022 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen
-/
-import Mathlib.Data.ZMod.Quotient
-import Mathlib.LinearAlgebra.FreeModule.Finite.Rank
import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
import Mathlib.LinearAlgebra.QuotientPi
Nsmul
-> NSMul
, Zpow
-> ZPow
, etc (#9067)
Normalising to naming convention rule number 6.
@@ -116,7 +116,7 @@ variable (F : Type*) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F R
noncomputable def quotientEquivDirectSum :
(S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ span ({I.smithCoeffs b hI i} : Set R) := by
haveI := Fintype.ofFinite ι
- -- porting note: manual construction of `CompatibleSmul` typeclass no longer needed
+ -- porting note: manual construction of `CompatibleSMul` typeclass no longer needed
exact ((I.quotientEquivPiSpan b _).restrictScalars F).trans
(DirectSum.linearEquivFunOnFintype _ _ _).symm
#align ideal.quotient_equiv_direct_sum Ideal.quotientEquivDirectSum
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -24,7 +24,7 @@ namespace Ideal
open scoped BigOperators DirectSum
-variable {ι R S : Type _} [CommRing R] [CommRing S] [Algebra R S]
+variable {ι R S : Type*} [CommRing R] [CommRing S] [Algebra R S]
variable [IsDomain R] [IsPrincipalIdealRing R] [IsDomain S] [Finite ι]
@@ -108,7 +108,7 @@ noncomputable def fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module.Finit
classical exact Fintype.ofEquiv (∀ i, ZMod (a i).natAbs) e.symm
#align ideal.fintype_quotient_of_free_of_ne_bot Ideal.fintypeQuotientOfFreeOfNeBot
-variable (F : Type _) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F R S]
+variable (F : Type*) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F R S]
(b : Basis ι R S) {I : Ideal S} (hI : I ≠ ⊥)
/-- Decompose `S⧸I` as a direct sum of cyclic `R`-modules
@@ -2,11 +2,6 @@
Copyright (c) 2022 Anne Baanen. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen
-
-! This file was ported from Lean 3 source module linear_algebra.free_module.ideal_quotient
-! leanprover-community/mathlib commit 90b0d53ee6ffa910e5c2a977ce7e2fc704647974
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.ZMod.Quotient
import Mathlib.LinearAlgebra.FreeModule.Finite.Rank
@@ -14,6 +9,8 @@ import Mathlib.LinearAlgebra.FreeModule.PID
import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
import Mathlib.LinearAlgebra.QuotientPi
+#align_import linear_algebra.free_module.ideal_quotient from "leanprover-community/mathlib"@"90b0d53ee6ffa910e5c2a977ce7e2fc704647974"
+
/-! # Ideals in free modules over PIDs
## Main results
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen
! This file was ported from Lean 3 source module linear_algebra.free_module.ideal_quotient
-! leanprover-community/mathlib commit d87199d51218d36a0a42c66c82d147b5a7ff87b3
+! leanprover-community/mathlib commit 90b0d53ee6ffa910e5c2a977ce7e2fc704647974
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -23,17 +23,19 @@ import Mathlib.LinearAlgebra.QuotientPi
-/
+namespace Ideal
open scoped BigOperators DirectSum
variable {ι R S : Type _} [CommRing R] [CommRing S] [Algebra R S]
-variable [IsDomain R] [IsPrincipalIdealRing R] [IsDomain S] [Fintype ι]
+variable [IsDomain R] [IsPrincipalIdealRing R] [IsDomain S] [Finite ι]
/-- We can write the quotient of an ideal over a PID as a product of quotients by principal ideals.
-/
-noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I ≠ ⊥) :
- (S ⧸ I) ≃ₗ[R] ∀ i, R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R) := by
+noncomputable def quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI : I ≠ ⊥) :
+ (S ⧸ I) ≃ₗ[R] ∀ i, R ⧸ span ({I.smithCoeffs b hI i} : Set R) := by
+ haveI := Fintype.ofFinite ι
-- Choose `e : S ≃ₗ I` and a basis `b'` for `S` that turns the map
-- `f := ((Submodule.subtype I).restrictScalars R).comp e` into a diagonal matrix:
-- there is an `a : ι → ℤ` such that `f (b' i) = a i • b' i`.
@@ -57,10 +59,10 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
exact ⟨c, b'.ext_elem fun i => Eq.trans (hc i) (this c i).symm⟩
-- Now we map everything through the linear equiv `S ≃ₗ (ι → R)`,
-- which maps `I` to `I' := Π i, a i ℤ`.
- let I' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => Ideal.span ({a i} : Set R)
+ let I' : Submodule R (ι → R) := Submodule.pi Set.univ fun i => span ({a i} : Set R)
have : Submodule.map (b'.equivFun : S →ₗ[R] ι → R) (I.restrictScalars R) = I' := by
ext x
- simp only [Submodule.mem_map, Submodule.mem_pi, Ideal.mem_span_singleton, Set.mem_univ,
+ simp only [Submodule.mem_map, Submodule.mem_pi, mem_span_singleton, Set.mem_univ,
Submodule.restrictScalars_mem, mem_I_iff, smul_eq_mul, forall_true_left, LinearEquiv.coe_coe,
Basis.equivFun_apply]
constructor
@@ -79,17 +81,17 @@ noncomputable def Ideal.quotientEquivPiSpan (I : Ideal S) (b : Basis ι R S) (hI
· infer_instance
classical
let this :=
- Submodule.quotientPi (show ∀ _, Submodule R R from fun i => Ideal.span ({a i} : Set R))
+ Submodule.quotientPi (show ∀ _, Submodule R R from fun i => span ({a i} : Set R))
exact this
#align ideal.quotient_equiv_pi_span Ideal.quotientEquivPiSpan
/-- Ideal quotients over a free finite extension of `ℤ` are isomorphic to a direct product of
`ZMod`. -/
-noncomputable def Ideal.quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (hI : I ≠ ⊥) :
+noncomputable def quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (hI : I ≠ ⊥) :
S ⧸ I ≃+ ∀ i, ZMod (I.smithCoeffs b hI i).natAbs :=
let a := I.smithCoeffs b hI
let e := I.quotientEquivPiSpan b hI
- let e' : (∀ i : ι, ℤ ⧸ Ideal.span ({a i} : Set ℤ)) ≃+ ∀ i : ι, ZMod (a i).natAbs :=
+ let e' : (∀ i : ι, ℤ ⧸ span ({a i} : Set ℤ)) ≃+ ∀ i : ι, ZMod (a i).natAbs :=
AddEquiv.piCongrRight fun i => ↑(Int.quotientSpanEquivZMod (a i))
(↑(e : (S ⧸ I) ≃ₗ[ℤ] _) : S ⧸ I ≃+ _).trans e'
#align ideal.quotient_equiv_pi_zmod Ideal.quotientEquivPiZMod
@@ -99,13 +101,13 @@ noncomputable def Ideal.quotientEquivPiZMod (I : Ideal S) (b : Basis ι ℤ S) (
Can't be an instance because of the side condition `I ≠ ⊥`, and more importantly,
because the choice of `Fintype` instance is non-canonical.
-/
-noncomputable def Ideal.fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module.Finite ℤ S]
+noncomputable def fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module.Finite ℤ S]
(I : Ideal S) (hI : I ≠ ⊥) : Fintype (S ⧸ I) := by
let b := Module.Free.chooseBasis ℤ S
let a := I.smithCoeffs b hI
let e := I.quotientEquivPiZMod b hI
haveI : ∀ i, NeZero (a i).natAbs := fun i =>
- ⟨Int.natAbs_ne_zero.mpr (Ideal.smithCoeffs_ne_zero b I hI i)⟩
+ ⟨Int.natAbs_ne_zero.mpr (smithCoeffs_ne_zero b I hI i)⟩
classical exact Fintype.ofEquiv (∀ i, ZMod (a i).natAbs) e.symm
#align ideal.fintype_quotient_of_free_of_ne_bot Ideal.fintypeQuotientOfFreeOfNeBot
@@ -114,19 +116,21 @@ variable (F : Type _) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F
/-- Decompose `S⧸I` as a direct sum of cyclic `R`-modules
(quotients by the ideals generated by Smith coefficients of `I`). -/
-noncomputable def Ideal.quotientEquivDirectSum :
- (S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R) :=
+noncomputable def quotientEquivDirectSum :
+ (S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ span ({I.smithCoeffs b hI i} : Set R) := by
+ haveI := Fintype.ofFinite ι
-- porting note: manual construction of `CompatibleSmul` typeclass no longer needed
- ((I.quotientEquivPiSpan b _).restrictScalars F).trans
+ exact ((I.quotientEquivPiSpan b _).restrictScalars F).trans
(DirectSum.linearEquivFunOnFintype _ _ _).symm
#align ideal.quotient_equiv_direct_sum Ideal.quotientEquivDirectSum
-theorem Ideal.finrank_quotient_eq_sum [Nontrivial F]
- [∀ i, Module.Free F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R))]
- [∀ i, Module.Finite F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R))] :
+theorem finrank_quotient_eq_sum {ι} [Fintype ι] (b : Basis ι R S) [Nontrivial F]
+ [∀ i, Module.Free F (R ⧸ span ({I.smithCoeffs b hI i} : Set R))]
+ [∀ i, Module.Finite F (R ⧸ span ({I.smithCoeffs b hI i} : Set R))] :
FiniteDimensional.finrank F (S ⧸ I) =
- ∑ i, FiniteDimensional.finrank F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R)) := by
+ ∑ i, FiniteDimensional.finrank F (R ⧸ span ({I.smithCoeffs b hI i} : Set R)) := by
-- slow, and dot notation doesn't work
- rw [LinearEquiv.finrank_eq <| Ideal.quotientEquivDirectSum F b hI,
- FiniteDimensional.finrank_directSum]
+ rw [LinearEquiv.finrank_eq <| quotientEquivDirectSum F b hI, FiniteDimensional.finrank_directSum]
#align ideal.finrank_quotient_eq_sum Ideal.finrank_quotient_eq_sum
+
+end Ideal
@@ -4,13 +4,14 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Anne Baanen
! This file was ported from Lean 3 source module linear_algebra.free_module.ideal_quotient
-! leanprover-community/mathlib commit 6623e6af705e97002a9054c1c05a980180276fc1
+! leanprover-community/mathlib commit d87199d51218d36a0a42c66c82d147b5a7ff87b3
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathlib.Data.ZMod.Quotient
-import Mathlib.LinearAlgebra.FreeModule.Finite.Basic
+import Mathlib.LinearAlgebra.FreeModule.Finite.Rank
import Mathlib.LinearAlgebra.FreeModule.PID
+import Mathlib.LinearAlgebra.FreeModule.StrongRankCondition
import Mathlib.LinearAlgebra.QuotientPi
/-! # Ideals in free modules over PIDs
@@ -23,7 +24,7 @@ import Mathlib.LinearAlgebra.QuotientPi
-/
-open BigOperators
+open scoped BigOperators DirectSum
variable {ι R S : Type _} [CommRing R] [CommRing S] [Algebra R S]
@@ -107,3 +108,25 @@ noncomputable def Ideal.fintypeQuotientOfFreeOfNeBot [Module.Free ℤ S] [Module
⟨Int.natAbs_ne_zero.mpr (Ideal.smithCoeffs_ne_zero b I hI i)⟩
classical exact Fintype.ofEquiv (∀ i, ZMod (a i).natAbs) e.symm
#align ideal.fintype_quotient_of_free_of_ne_bot Ideal.fintypeQuotientOfFreeOfNeBot
+
+variable (F : Type _) [CommRing F] [Algebra F R] [Algebra F S] [IsScalarTower F R S]
+ (b : Basis ι R S) {I : Ideal S} (hI : I ≠ ⊥)
+
+/-- Decompose `S⧸I` as a direct sum of cyclic `R`-modules
+ (quotients by the ideals generated by Smith coefficients of `I`). -/
+noncomputable def Ideal.quotientEquivDirectSum :
+ (S ⧸ I) ≃ₗ[F] ⨁ i, R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R) :=
+ -- porting note: manual construction of `CompatibleSmul` typeclass no longer needed
+ ((I.quotientEquivPiSpan b _).restrictScalars F).trans
+ (DirectSum.linearEquivFunOnFintype _ _ _).symm
+#align ideal.quotient_equiv_direct_sum Ideal.quotientEquivDirectSum
+
+theorem Ideal.finrank_quotient_eq_sum [Nontrivial F]
+ [∀ i, Module.Free F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R))]
+ [∀ i, Module.Finite F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R))] :
+ FiniteDimensional.finrank F (S ⧸ I) =
+ ∑ i, FiniteDimensional.finrank F (R ⧸ Ideal.span ({I.smithCoeffs b hI i} : Set R)) := by
+ -- slow, and dot notation doesn't work
+ rw [LinearEquiv.finrank_eq <| Ideal.quotientEquivDirectSum F b hI,
+ FiniteDimensional.finrank_directSum]
+#align ideal.finrank_quotient_eq_sum Ideal.finrank_quotient_eq_sum
The unported dependencies are