Definitions of TypeDensity.Unramified.Extension
DefinitionTypeDensity_Unramified_ExtensionBinary forms, factor cells and unramified extensions
Basic definitions for the factorization-type analysis: binary forms and their products, the
residue, projective and normalized factor cells, the unramified extension O_δ = O[X]/(Φ) with
its Frobenius, and the Frobenius descent maps. Alongside, the algebraic toolkit used throughout:
adic completeness under change of ideal and for finite free modules, lifting idempotents,
locality criteria, coordinates of m_O O_δ, coprimality via residues, Hensel uniqueness for
families of factors, partial fractions for coprime binary forms, and descent of Frobenius orbits
of irreducible factors.
Main results
TypeDensity.base_ideal_coordinates,TypeDensity.base_ideal_pureTypeDensity.finite_free_adic_complete,TypeDensity.complete_domain_finite_quotient_localTypeDensity.coprime_of_coprime_residue_dvr,TypeDensity.hensel_family_uniqueTypeDensity.form_product_maps_to_and_preserves,TypeDensity.forms_linear_bijectiveTypeDensity.invariant_orbit_factors
Provenance: Def_SurfaceBlowupV2_{BinaryForms, FactorCells, ProjectiveCells, HomogeneousCells, UnramifiedExtension, FrobeniusDescent}; Thm_SurfaceBlowupV2_{adic_complete_iff_of_pow_le, adic_idempotent_lift, base_ideal_coordinates, base_ideal_pure, conjugate_irreducible_factors_distinct, coprime_family_linear_injective, coprime_of_coprime_residue_dvr, distinct_monic_irreducible_coprime, dvr_extension_maximalIdeal_map_eq_pow, dvr_maximalIdeal_pow_injective, eval_at_pow_card, factor_product_continuous, finite_field_frobenius_fixed_points, finite_free_adic_complete, finite_free_residue_quotient, finite_monoid_idempotent_power, finite_ring_local_of_idempotents, complete_domain_finite_quotient_local, form_product_maps_to_and_preserves, forms_linear_injective, forms_linear_bijective, hensel_factor_unique_of_dvd, hensel_family_unique, invariant_orbit_factors, local_algEquiv_maximalIdeal}.
-- Generated by the TypeDensity exporter from TypeDensity/Unramified/Extension.lean (namespace TypeDensity); do not edit.
import Definitions.Def_TypeDensity_Basic
import Definitions.Def_TypeDensity_Measure_AdicCylinders
import Definitions.Def_TypeDensity_Measure_HenselProducts
import Mathlib.FieldTheory.RatFunc.Basic
import Mathlib.MeasureTheory.Measure.Haar.Unique
import Mathlib.NumberTheory.ArithmeticFunction.Moebius
import Mathlib.NumberTheory.Padics.PadicIntegers
import Mathlib.RingTheory.IntegralClosure.IntegralRestrict
import Mathlib.RingTheory.MvPowerSeries.Basic
import Mathlib.RingTheory.RamificationInertia.Basic
import Mathlib.Topology.Algebra.Nonarchimedean.AdicTopology
import Mathlib.Topology.Algebra.MvPolynomial
import Mathlib.Algebra.Group.Pi.Units
import Mathlib.Order.CompletePartialOrder
import Mathlib.RingTheory.Henselian
import Mathlib.RingTheory.Polynomial.Resultant.Basic
import Mathlib.RingTheory.RegularLocalRing.Defs
import Mathlib.RingTheory.SimpleRing.Principal
set_option autoImplicit false
noncomputable section
namespace TypeDensity
open Polynomial IsLocalRing MeasureTheory
section
variable {A : Type} [CommRing A]
/-- The dehomogenized polynomial `∑ a_i X^i` of a degree-`n` binary form with coefficient vector
`a` (the form is `∑ a_i X^i Y^(n-i)`; the multiplicity of its zero at infinity is `n − deg`). -/
def formPoly {n : ℕ} (a : Fin (n + 1) → A) : Polynomial A :=
∑ i : Fin (n+1), C (a i) * X ^ (i : ℕ)
/-- Product of a finite family of binary forms of degrees `d i`, as a form of degree `∑ d i`. -/
def formProd {ι : Type} [Fintype ι] (d : ι → ℕ) (a : ∀ i, Fin (d i + 1) → A) :
Fin ((∑ i, d i) + 1) → A :=
fun j => (∏ i, formPoly (a i)).coeff j
/-- Pairwise coprimality of a family of binary forms over a field: the dehomogenized polynomials
are pairwise coprime (no common affine zero) and at most one form vanishes at infinity (has
dehomogenized degree below its form degree). -/
def FormsCoprime {ι : Type} [Fintype ι] (d : ι → ℕ) (g : ∀ i, Fin (d i + 1) → A) : Prop :=
(∀ i j, i ≠ j → IsCoprime (formPoly (g i)) (formPoly (g j))) ∧
∀ i j, i ≠ j → (formPoly (g i)).natDegree = d i ∨ (formPoly (g j)).natDegree = d j
end
section
variable {O : Type} [CommRing O]
/-- The integral monic polynomial `X^n + ∑ a_i X^i` attached to a coefficient vector. -/
def monicPolyO {n : ℕ} (a : Fin n → O) : Polynomial O :=
X ^ n + ∑ i : Fin n, C (a i) * X ^ (i : ℕ)
/-- The first `n` coefficients of a polynomial, as a coefficient vector. -/
def coeffVec (n : ℕ) (F : Polynomial O) : Fin n → O := fun i => F.coeff i
/-- Coefficient vector of the product of the monic polynomials attached to a family of vectors. -/
def factorProduct {ι : Type} [Fintype ι] (d : ι → ℕ) (a : ∀ i, Fin (d i) → O) :
Fin (∑ i, d i) → O :=
coeffVec (∑ i, d i) (∏ i, monicPolyO (a i))
end
section
variable (O : Type) [CommRing O] [IsLocalRing O]
/-- The residue cell: coefficient vectors whose monic polynomial reduces to `G`. -/
def residueCell (n : ℕ) (G : Polynomial (ResidueField O)) : Set (Fin n → O) :=
{a | (monicPolyO a).map (residue O) = G}
end
section
variable (O : Type) [CommRing O] [IsDomain O]
[TopologicalSpace O] [IsTopologicalRing O] [CompactSpace O] [T2Space O]
[SecondCountableTopology O]
[MeasurableSpace O] [BorelSpace O]
/-- The normalized coefficient measure of a cell: restriction of `coefficientMeasure` to `S`,
divided by the mass of `S` (junk when the mass is `0` or `∞`; probability otherwise). -/
noncomputable def cellMeasure (n : ℕ) (S : Set (Fin n → O)) : Measure (Fin n → O) :=
(coefficientMeasure O n S)⁻¹ • (coefficientMeasure O n).restrict S
end
section
variable {k : Type} [CommRing k]
/-- The nonzero scalar multiples of a coefficient vector. -/
def scalarClass {n : ℕ} (v : Fin (n + 1) → k) : Set (Fin (n+1) → k) :=
{w | ∃ c : k, c ≠ 0 ∧ w = c • v}
end
section
variable (O : Type) [CommRing O] [IsLocalRing O]
/-- Coordinatewise reduction of a binary coefficient vector to the residue field. -/
def residueVector {n : ℕ} (a : Fin (n + 1) → O) : Fin (n+1) → ResidueField O :=
fun i => residue O (a i)
/-- The projective residue cell of `v`: primitive vectors whose reduction is a nonzero scalar
multiple of `v`. -/
def projectiveCell (n : ℕ) (v : Fin (n + 1) → ResidueField O) : Set (Fin (n+1) → O) :=
{a | primitive O a ∧ residueVector O a ∈ scalarClass v}
end
section
variable {A : Type} [CommRing A]
/-- Insert the value `1` at coordinate `ν`: the form with normalized `ν`-coefficient and free
coefficients `b`. -/
def insertOne {d : ℕ} (ν : Fin (d + 1)) (b : Fin d → A) : Fin (d+1) → A := Fin.insertNth ν 1 b
/-- Forget coordinate `μ`. -/
def dropCoord {d : ℕ} (μ : Fin (d + 1)) (a : Fin (d + 1) → A) : Fin d → A := Fin.removeNth μ a
/-- Scale a form by the inverse of its `μ`-coordinate (`Ring.inverse`: junk `0` if that coordinate
is not a unit). -/
def normalizeAt {d : ℕ} (μ : Fin (d + 1)) (a : Fin (d + 1) → A) : Fin (d+1) → A :=
Ring.inverse (a μ) • a
end
section
variable (O : Type) [CommRing O] [IsLocalRing O]
/-- Normalized factor cell: forms with `ν`-coordinate `1` reducing to the residue form `g` (so
`g ν = 1` if nonempty). -/
def normalizedFormCell (d : ℕ) (ν : Fin (d + 1)) (g : Fin (d + 1) → ResidueField O) :
Set (Fin (d+1) → O) :=
{a | a ν = 1 ∧ residueVector O a = g}
/-- The same cell in the `d` free coordinates. -/
def reducedFormCell (d : ℕ) (ν : Fin (d + 1)) (g : Fin (d + 1) → ResidueField O) :
Set (Fin d → O) :=
{b | insertOne ν b ∈ normalizedFormCell O d ν g}
open scoped Classical in
/-- The normalized product map in reduced coordinates: multiply the normalized factors, divide by
the `μ`-coordinate of the product, forget coordinate `μ`. Guarded by membership in the product of
the factor cells (junk `0` outside), so that measurability needs no continuity of inversion. -/
def reducedFormProduct {ι : Type} [Fintype ι] (d : ι → ℕ) (ν : ∀ i, Fin (d i + 1))
(g : ∀ i, Fin (d i + 1) → ResidueField O) (μ : Fin ((∑ i, d i) + 1))
(a : ∀ i, Fin (d i) → O) : Fin (∑ i, d i) → O :=
if ∀ i, a i ∈ reducedFormCell O (d i) (ν i) (g i) then
dropCoord μ (normalizeAt μ (formProd d (fun i => insertOne (ν i) (a i)))) else 0
open scoped Classical in
/-- Normalization of a primitive form in the projective chart `μ`, in reduced coordinates (junk `0`
off the projective residue cell of `G`). -/
def projectiveNormalize (n : ℕ) (G : Fin (n + 1) → ResidueField O) (μ : Fin (n + 1))
(a : Fin (n + 1) → O) : Fin n → O :=
if a ∈ projectiveCell O n G then dropCoord μ (normalizeAt μ a) else 0
end
section
variable (O : Type) [CommRing O] [IsLocalRing O]
/-- Number of elements of the residue field of `O` (written q throughout). -/
abbrev residueCard : ℕ := Nat.card (ResidueField O)
/-- Reduction of an integral polynomial to the residue field. -/
abbrev residuePoly (Φ : Polynomial O) : Polynomial (ResidueField O) := Φ.map (residue O)
/-- `Φ` is a monic polynomial over `O` whose reduction is irreducible over the residue field. -/
def IsUnramifiedLift (Φ : Polynomial O) : Prop := Φ.Monic ∧ Irreducible (residuePoly O Φ)
/-- The ideal `m_O · O_δ` generated by the maximal ideal of the base, in `O_δ := O[X]/(Φ)`. -/
def baseIdeal (Φ : Polynomial O) : Ideal (AdjoinRoot Φ) := (maximalIdeal O).map (AdjoinRoot.of Φ)
/-- The residue extension `k_δ := O_δ / m_O O_δ`. -/
abbrev residueExtension (Φ : Polynomial O) : Type := AdjoinRoot Φ ⧸ baseIdeal O Φ
/-- Reduction of `O_δ` to its residue extension. -/
abbrev baseReduce (Φ : Polynomial O) : AdjoinRoot Φ →+* residueExtension O Φ :=
Ideal.Quotient.mk (baseIdeal O Φ)
open scoped Classical in
/-- The Frobenius root: the root of `Φ` in `O_δ` congruent to `θ^q` modulo `m_O O_δ` when such a
root exists, and `θ` itself otherwise. Existence and uniqueness are theorems, not part of the
data. -/
noncomputable def frobeniusRoot (Φ : Polynomial O) : AdjoinRoot Φ :=
if h : ∃ a : AdjoinRoot Φ, (Φ.map (AdjoinRoot.of Φ)).IsRoot a ∧
a - (AdjoinRoot.root Φ) ^ residueCard O ∈ baseIdeal O Φ
then Classical.choose h else AdjoinRoot.root Φ
/-- Both branches of `frobeniusRoot` are roots of `Φ`; this makes the Frobenius a genuine algebra
map. -/
theorem frobeniusRoot_eval₂ (Φ : Polynomial O) :
Φ.eval₂ (AdjoinRoot.of Φ) (frobeniusRoot O Φ) = 0 := by
unfold frobeniusRoot
split_ifs with h
· simpa [Polynomial.IsRoot, Polynomial.eval_map] using (Classical.choose_spec h).1
· exact AdjoinRoot.eval₂_root Φ
/-- The Frobenius `O`-algebra endomorphism of `O_δ`, sending `θ` to the Frobenius root. -/
noncomputable def unramifiedFrobenius (Φ : Polynomial O) : AdjoinRoot Φ →ₐ[O] AdjoinRoot Φ :=
AdjoinRoot.liftAlgHom Φ (Algebra.ofId O (AdjoinRoot Φ)) (frobeniusRoot O Φ)
(frobeniusRoot_eval₂ O Φ)
/-- Iterates `σ^i` of the Frobenius, defined by recursion so that no monoid structure on
endomorphisms is needed. -/
noncomputable def frobeniusIter (Φ : Polynomial O) : ℕ → (AdjoinRoot Φ →ₐ[O] AdjoinRoot Φ)
| 0 => AlgHom.id O (AdjoinRoot Φ)
| i+1 => (unramifiedFrobenius O Φ).comp (frobeniusIter Φ i)
end
section
variable (O : Type) [CommRing O] [IsLocalRing O] (Φ : Polynomial O)
/-- The residue embedding `k → k_δ` induced by `O → O_δ`. -/
noncomputable def residueEmbed : ResidueField O →+* residueExtension O Φ :=
Ideal.quotientMap (I := maximalIdeal O) (baseIdeal O Φ) (AdjoinRoot.of Φ)
(Ideal.map_le_iff_le_comap.mp le_rfl)
/-- The reduction `θ̄` of the root `θ` to `k_δ`. -/
abbrev rootBar : residueExtension O Φ := baseReduce O Φ (AdjoinRoot.root Φ)
/-- The linear residue factor `X − θ̄^(q^i)` above the `i`-th conjugate root. -/
noncomputable def conjugateFactor (i : ℕ) : Polynomial (residueExtension O Φ) :=
X - C (rootBar O Φ ^ residueCard O ^ i)
/-- Block cell: coefficient vectors over `O_δ` whose monic polynomial reduces to `(X − θ̄)^r`. -/
def blockCell (r : ℕ) : Set (Fin r → AdjoinRoot Φ) :=
{b | (monicPolyO b).map (baseReduce O Φ) = conjugateFactor O Φ 0 ^ r}
/-- The `X^r` cell over `O_δ`: coefficient vectors whose monic polynomial reduces to `X^r`. -/
def zeroCell (r : ℕ) : Set (Fin r → AdjoinRoot Φ) :=
{b | (monicPolyO b).map (baseReduce O Φ) = X ^ r}
/-- The product of the `δ` Frobenius conjugates `B^(σ^i)`, `i < δ = deg Φ`. -/
noncomputable def conjugateProduct (B : Polynomial (AdjoinRoot Φ)) : Polynomial (AdjoinRoot Φ) :=
∏ i : Fin Φ.natDegree, B.map (frobeniusIter O Φ i).toRingHom
open scoped Classical in
/-- The element of `O` mapping to `x` when one exists, and `0` otherwise. -/
noncomputable def descendCoeff (x : AdjoinRoot Φ) : O :=
if h : ∃ c : O, algebraMap O (AdjoinRoot Φ) c = x then Classical.choose h else 0
/-- Descent map: a block over `O_δ` goes to the `O`-coefficient vector of its conjugate
product. -/
noncomputable def descendBlock (r : ℕ) (b : Fin r → AdjoinRoot Φ) : Fin (Φ.natDegree * r) → O :=
fun j => descendCoeff O Φ ((conjugateProduct O Φ (monicPolyO b)).coeff j)
open scoped Classical in
/-- Block selection: the monic degree-`r` divisor over `O_δ` of the lifted polynomial that reduces
to `(X − θ̄)^r`, when one exists (uniqueness is a theorem); `0` otherwise. -/
noncomputable def selectBlock (r : ℕ) (a : Fin (Φ.natDegree * r) → O) : Fin r → AdjoinRoot Φ :=
if h : ∃ B : Polynomial (AdjoinRoot Φ), B.Monic ∧ B.natDegree = r ∧
B.map (baseReduce O Φ) = conjugateFactor O Φ 0 ^ r ∧
B ∣ (monicPolyO a).map (AdjoinRoot.of Φ)
then coeffVec r (Classical.choose h) else 0
/-- Translation `X ↦ X + θ` on coefficient vectors over `O_δ`. -/
noncomputable def translateBlock (r : ℕ) (b : Fin r → AdjoinRoot Φ) : Fin r → AdjoinRoot Φ :=
coeffVec r (Polynomial.taylor (AdjoinRoot.root Φ) (monicPolyO b))
end
/-- Idempotents lift along `A → A/I` when `A` is `I`-adically complete (Hensel applied to
`X² − X`). -/
theorem adic_idempotent_lift (A : Type) [CommRing A] (I : Ideal A) [IsAdicComplete I A]
(e : A ⧸ I)
(he : e * e = e) :
∃ x : A, x*x=x ∧ Ideal.Quotient.mk I x = e := by
obtain ⟨x0, rfl⟩ := Ideal.Quotient.mk_surjective e
have hmon : (X ^ 2 - X : A[X]).Monic := by
simpa using monic_X_pow_sub (R := A) (p := X) (n := 2)
(degree_X_le.trans_lt (by exact_mod_cast (by norm_num : 1 < 2)))
have h1 : (X ^ 2 - X : A[X]).eval x0 ∈ I := by
rw [← Ideal.Quotient.eq_zero_iff_mem]
simp [sq, he]
have h2 : IsUnit (Ideal.Quotient.mk I ((X ^ 2 - X : A[X]).derivative.eval x0)) := by
refine IsUnit.of_mul_eq_one (Ideal.Quotient.mk I ((X ^ 2 - X : A[X]).derivative.eval x0)) ?_
simp only [derivative_X_pow, derivative_X, eval_sub, eval_mul, eval_pow,
eval_X, eval_one, eval_natCast, map_sub, map_mul, map_pow, map_one, map_natCast]
norm_num
linear_combination (4 : A ⧸ I) * he
obtain ⟨a, ha, hax⟩ := HenselianRing.is_henselian _ hmon x0 h1 h2
refine ⟨a, ?_, ?_⟩
· have := ha.eq_zero
simp only [eval_sub, eval_pow, eval_X] at this
linear_combination this
· exact Ideal.Quotient.eq.mpr hax
/-- Membership in `J • ⊤` is read off coordinatewise in a finite basis. -/
theorem mem_smul_top_iff_repr {R M ι : Type} [CommRing R] [AddCommGroup M] [Module R M]
[Finite ι] (b : Module.Basis ι R M) (J : Ideal R) (x : M) :
x ∈ (J • ⊤ : Submodule R M) ↔ ∀ i, b.repr x i ∈ J := by
have := Fintype.ofFinite ι
refine ⟨fun hx => Submodule.smul_induction_on hx
(fun r hr m _ i => by simpa using J.mul_mem_right _ hr)
(fun x y hx hy i => by simpa using J.add_mem (hx i) (hy i)), fun h => ?_⟩
rw [← b.sum_repr x]
exact Submodule.sum_mem _ fun i _ => Submodule.smul_mem_smul (h i) trivial
/-- A finite free module over an `I`-adically complete ring is `I`-adically complete. -/
theorem finite_free_adic_complete (O M : Type) [CommRing O] [AddCommGroup M] [Module O M]
[Module.Finite O M] [Module.Free O M] (I : Ideal O) [IsAdicComplete I O] :
IsAdicComplete I M := by
let b := Module.Free.chooseBasis O M
have key := mem_smul_top_iff_repr b
have keyO : ∀ (J : Ideal O) (x : O), x ∈ (J • ⊤ : Submodule O O) ↔ x ∈ J := by
intro J x
rw [smul_eq_mul, Ideal.mul_top]
have hM : ∀ (n : ℕ) (x y : M), x ≡ y [SMOD (I ^ n • ⊤ : Submodule O M)] ↔
∀ i, b.repr x i ≡ b.repr y i [SMOD (I ^ n • ⊤ : Submodule O O)] := by
intro n x y
simp only [SModEq.sub_mem, key, keyO, map_sub, Finsupp.sub_apply]
refine { haus' := ?_, prec' := ?_ }
· intro x hx
apply b.repr.injective
ext i
have := IsHausdorff.haus (I := I) (M := O) inferInstance (b.repr x i) fun n =>
by simpa using (hM n x 0).1 (hx n) i
simpa using this
· intro f hf
have hc : ∀ i, ∃ L : O, ∀ n, b.repr (f n) i ≡ L [SMOD (I ^ n • ⊤ : Submodule O O)] :=
fun i => IsPrecomplete.prec (I := I) inferInstance fun {m n} hmn => (hM m _ _).1 (hf hmn) i
choose L hL using hc
refine ⟨∑ i, L i • b i, fun n => (hM n _ _).2 fun i => ?_⟩
simpa [Finsupp.single_apply] using hL i n
/-- If `O/I` is finite, then so is `M/IM` for a finite free `O`-module `M`. -/
theorem finite_free_residue_quotient (O M : Type) [CommRing O] [AddCommGroup M] [Module O M]
[Module.Finite O M] [Module.Free O M] (I : Ideal O) [Finite (O ⧸ I)] :
Finite (M ⧸ (I • ⊤ : Submodule O M)) := by
have : Module.Finite (O ⧸ I) (M ⧸ (I • ⊤ : Submodule O M)) :=
Module.Finite.of_restrictScalars_finite O _ _
exact Module.finite_of_finite (O ⧸ I)
/-- Every element of a finite monoid has a positive power that is idempotent. -/
theorem finite_monoid_idempotent_power (A : Type) [Monoid A] [Finite A] (a : A) :
∃ n : ℕ, 0 < n ∧ a^n * a^n = a^n := by
have key : ∃ i p : ℕ, 0 < p ∧ a^(i+p) = a^i := by
obtain ⟨x, y, hxy, h⟩ := Finite.exists_ne_map_eq_of_infinite (fun n : ℕ => a^n)
rcases lt_or_gt_of_ne hxy with hlt | hlt
· exact ⟨x, y - x, by omega, by rw [Nat.add_sub_cancel' hlt.le]; exact h.symm⟩
· exact ⟨y, x - y, by omega, by rw [Nat.add_sub_cancel' hlt.le]; exact h⟩
obtain ⟨i, p, hp, h⟩ := key
have per : ∀ m k : ℕ, i ≤ k → a^(k + m*p) = a^k := by
intro m
induction m with
| zero => intro k _; simp
| succ m ih =>
intro k hk
have e : k + (m+1)*p = (k - i) + (i + p) + m*p := by
rw [Nat.add_mul]; omega
rw [e, pow_add, pow_add, h, ← pow_add, Nat.sub_add_cancel hk, ← pow_add, ih k hk]
refine ⟨p*(i+1), Nat.mul_pos hp (Nat.succ_pos _), ?_⟩
rw [← pow_add]
have := per (i+1) (p*(i+1)) (by nlinarith)
rwa [Nat.mul_comm (i+1) p] at this
/-- A nontrivial finite commutative ring whose only idempotents are `0, 1` is local. -/
theorem finite_ring_local_of_idempotents (A : Type) [CommRing A] [Nontrivial A] [Finite A]
(he : ∀ e : A, e*e=e → e=0 ∨ e=1) :
IsLocalRing A := by
refine ⟨fun {a b} hab => ?_⟩
obtain ⟨n, hn, hidem⟩ := finite_monoid_idempotent_power A a
rcases he _ hidem with h | h
· exact Or.inr (eq_sub_of_add_eq' hab ▸ IsNilpotent.isUnit_one_sub ⟨n, h⟩)
· exact Or.inl (IsUnit.of_pow_eq_one h hn.ne')
/-- A domain that is `I`-adically complete with `A/I` finite is local. -/
theorem complete_domain_finite_quotient_local (A : Type) [CommRing A] [IsDomain A] (I : Ideal A)
[IsAdicComplete I A] [Finite (A ⧸ I)] :
IsLocalRing A := by
have hjac : I ≤ (⊥ : Ideal A).jacobson := IsAdicComplete.le_jacobson_bot I
have hI : I ≠ ⊤ := by
intro h
have : (⊥ : Ideal A).jacobson = ⊤ := top_le_iff.mp (h ▸ hjac)
exact bot_ne_top (Ideal.jacobson_eq_top_iff.mp this)
have : Nontrivial (A ⧸ I) := Ideal.Quotient.nontrivial_iff.mpr hI
have : IsLocalRing (A ⧸ I) := by
apply TypeDensity.finite_ring_local_of_idempotents
intro e he
obtain ⟨x, hx, rfl⟩ := TypeDensity.adic_idempotent_lift A I e he
have : x * (x - 1) = 0 := by rw [mul_sub, hx]; ring
rcases mul_eq_zero.mp this with h | h
· left; simp [h]
· right; rw [sub_eq_zero.mp h, map_one]
have := isLocalHom_of_le_jacobson_bot I hjac
refine IsLocalRing.of_isUnit_or_isUnit_one_sub_self fun a => ?_
rcases IsLocalRing.isUnit_or_isUnit_one_sub_self (Ideal.Quotient.mk I a) with h | h
· left; exact isUnit_of_map_unit _ _ h
· right; exact isUnit_of_map_unit (Ideal.Quotient.mk I) _ (by simpa using h)
end TypeDensity