import Mathlib.RingTheory.AdicCompletion.Completeness import Mathlib.RingTheory.PowerSeries.Evaluation import Mathlib.RingTheory.PowerSeries.Ideal /-! # Power Series Presentation -/ namespace OAI.AlgebraicGeometry.HilbertScheme.Presentations.PowerSeriesPresentation noncomputable section /-! A complete principal-adic algebra whose residue quotient is generated by the coefficient ring is a quotient of a one-variable power-series ring. -/ universe u v variable (R : Type u) [CommRing R] (A : Type v) [CommRing A] [Algebra R A] theorem complete_principal_powerSeries_presentation (s : R) (J : Ideal A) (hJ : J = Ideal.span {algebraMap R A s}) [IsAdicComplete J A] (hsurj : Function.Surjective ((Ideal.Quotient.mk J).comp (algebraMap R A))) : ∃ f : PowerSeries R →+* A, Function.Surjective f ∧ (∀ r : R, f (PowerSeries.C r) = algebraMap R A r) ∧ f PowerSeries.X = algebraMap R A s := by let : WithIdeal R := ⟨⊥⟩ let : WithIdeal A := ⟨J⟩ have htop : IsAdic J := rfl let : CompleteSpace A := htop.isPrecomplete_iff.mp inferInstance let : T2Space A := htop.isHausdorff_iff.mp inferInstance have hc : Continuous (algebraMap R A) := (WithIdeal.uniformContinuous_of_map_le (by change (⊥ : Ideal R).map (algebraMap R A) ≤ J simp)).continuous have hs : PowerSeries.HasEval (algebraMap R A s) := WithIdeal.isTopologicallyNilpotent_of_mem (by change algebraMap R A s ∈ J rw [hJ] exact Ideal.subset_span (Set.mem_singleton _)) let f := PowerSeries.eval₂Hom hc hs have hfC (r : R) : f (PowerSeries.C r) = algebraMap R A r := by dsimp only [f] rw [PowerSeries.coe_eval₂Hom, PowerSeries.eval₂_C] have hfX : f PowerSeries.X = algebraMap R A s := by dsimp only [f] rw [PowerSeries.coe_eval₂Hom, PowerSeries.eval₂_X] let K : Ideal (PowerSeries R) := Ideal.span {PowerSeries.X} have hK : K.map f = J := by simp only [K, Ideal.map_span, Set.image_singleton, hfX, hJ] let : IsHausdorff (K.map f) A := hK.symm ▸ inferInstance refine ⟨f, surjective_of_mk_map_comp_surjective (I := K) f ?_, hfC, hfX⟩ rw [hK] intro y obtain ⟨r, hr⟩ := hsurj y exact ⟨PowerSeries.C r, by simpa only [RingHom.comp_apply, hfC] using hr⟩ theorem complete_principal_isNoetherian [IsNoetherianRing R] (s : R) (J : Ideal A) (hJ : J = Ideal.span {algebraMap R A s}) [IsAdicComplete J A] (hsurj : Function.Surjective ((Ideal.Quotient.mk J).comp (algebraMap R A))) : IsNoetherianRing A := by obtain ⟨f, hf, _, _⟩ := complete_principal_powerSeries_presentation R A s J hJ hsurj exact isNoetherianRing_of_surjective (PowerSeries R) A f hf end end OAI.AlgebraicGeometry.HilbertScheme.Presentations.PowerSeriesPresentation