AlgebraicCurves.Geometry.Schemes.Proofs.Scheme_Hom_ord_eq_of_ker_pow_ideal_eq_span.AlgebraicGeometry.Scheme.Hom.ord_eq_of_ker_pow_ideal_eq_span'
Source context 15 commands
Surrounding namespaces, section variables, and local commands at this declaration.
@[expose] public section
open _root_.AlgebraicGeometry.Scheme.Modules.LocalTrivialization (rM rO rM_rM rO_rO rM_self rO_self
rM_smul hat_eq le_hat hat_le eApp eInv eInv_eApp eApp_eInv eApp_zero eApp_injective
restrict_smul_eq eApp_smul eApp_res ψ ψinv rM_roundtrip rM_roundtrip' rO_roundtrip rO_roundtrip'
ψ_ψinv ψinv_ψ ψ_injective ψ_zero ψ_smul ψ_res)
section ProofImplementation
open _root_.AlgebraicGeometry.Scheme.Modules.LocalTrivialization
(frame ψ_frame ψ_rM_frame eq_smul_frame IsGeneratorAt isGeneratorAt_frame isGeneratorAt_rM)
namespace AlgebraicCurves.Geometry.Schemes.Proofs
namespace Scheme_Hom_ord_eq_of_ker_pow_ideal_eq_span
attribute [-instance]
AlgebraicCurve.Place.instIsRankOneDiscreteWithZeroMultiplicativeIntAdicValuation
AlgebraicCurve.Place.instIsTrivialOnWithZeroMultiplicativeIntAdicValuation
attribute [-simp]
AlgebraicCurve.Place.congrEquiv_symm_apply
AlgebraicCurve.RationalFunctionField.heightOneSpectrumOfIrreducible_asIdeal
AlgebraicCurve.Place.congrRingEquiv_toValuationSubring
AlgebraicCurve.Place.congrEquiv_apply
AlgebraicCurve.Place.coe_comapSymmRingEquiv_apply
AlgebraicCurve.RationalFunctionField.deg_placeOfPoint
universe u
open _root_.CategoryTheory
open _root_.AlgebraicGeometry
open _root_.Opposite
open _root_.TopologicalSpace
open scoped _root_.AlgebraicGeometry _root_.AlgebraicGeometry.Scheme
_root_.AlgebraicGeometry.Scheme.Hom in
open AlgebraicGeometry.Scheme.Modules.RatSec AlgebraicCurve WithZero in
Lean source · full declarationtheorem AlgebraicGeometry.Scheme.Hom.ord_eq_of_ker_pow_ideal_eq_span'
{K : Type u} [Field K] {X : Scheme.{u}} (x : X ⟶ Spec (CommRingCat.of K))
[IsIntegral X] [IsSeparated x]
(P : Spec (CommRingCat.of K) ⟶ X) (hP : P ≫ x = 𝟙 _) (n : ℕ)
(U : X.Opens) (hU : IsAffineOpen U) (g : Γ(X, U)) (hg : (P.ker ^ n).ideal ⟨U, hU⟩ =
Ideal.span {g})
(y : X) (hyU : y ∈ U) (hy : IsClosed ({y} : Set X))
(v : letI := (AlgebraicCurve.baseToFunctionField x).toAlgebra
AlgebraicCurve.Place K X.functionField)
(hv : letI := (AlgebraicCurve.baseToFunctionField x).toAlgebra
(algebraMap (X.presheaf.stalk y) X.functionField).range = v.toValuationSubring.toSubring) :
let := (AlgebraicCurve.baseToFunctionField x).toAlgebra
haveI : Nonempty U := ⟨⟨y, hyU⟩⟩
(P.base (IsLocalRing.closedPoint K) = y → v.ord (algebraMap Γ(X, U) X.functionField g) = n) ∧
(P.base (IsLocalRing.closedPoint K) ≠ y → v.ord (algebraMap Γ(X, U) X.functionField g) =
0) := by
intro sharedOwner1
classical
have : Nonempty U := ⟨⟨y, hyU⟩⟩
set pt : X := P.base (IsLocalRing.closedPoint K) with hpt
have : IsClosedImmersion P := by
have : IsClosedImmersion (P ≫ x) := by rw [hP]; infer_instance
exact IsClosedImmersion.of_comp P x
have hrange : Set.range P.base = {pt} := by
ext z
simp only [Set.mem_range, Set.mem_singleton_iff]
constructor
· rintro ⟨w, rfl⟩
rw [Subsingleton.elim w (IsLocalRing.closedPoint K)]
· rintro rfl
exact ⟨_, rfl⟩
have hptc : IsClosed ({pt} : Set X) := hrange ▸ P.isClosedEmbedding.isClosed_range
have hsupp : ((P.ker).support : Set X) = {pt} := by
rw [Scheme.Hom.support_ker, hrange, hptc.closure_eq]
have hval1 : ∀ (a : Γ(X, U)), IsUnit (X.presheaf.germ U y hyU a) → v.adicValuation (alg U a) =
1 := by
intro a ha
rw [alg_eq_algebraMap_germ U y hyU a]
exact adicValuation_algebraMap_stalk_eq_one x y v hv _ ha
have hval2 : ∀ (a : Γ(X, U)), ¬ IsUnit (X.presheaf.germ U y hyU a) →
v.adicValuation (alg U a) ≤ exp (-1 : ℤ) := by
intro a ha
rw [alg_eq_algebraMap_germ U y hyU a]
exact le_exp_neg_one_of_lt_one (adicValuation_algebraMap_stalk_lt_one x y v hv _ ha)
let J : ℕ → Ideal Γ(X, U) := fun m =>
{ carrier := {a | v.adicValuation (alg U a) ≤ exp (-(m : ℤ))}
add_mem' := fun {a b} ha hb => by
simp only [Set.mem_ofPred_eq] at ha hb ⊢
rw [alg_add]
exact (Valuation.map_add _ _ _).trans (max_le ha hb)
zero_mem' := by simp only [Set.mem_ofPred_eq, alg_zero, Valuation.map_zero]; exact zero_le
smul_mem' := fun c a ha => by
simp only [Set.mem_ofPred_eq, smul_eq_mul] at ha ⊢
rw [alg_mul, Valuation.map_mul]
calc _ ≤ 1 * v.adicValuation (alg U a) :=
mul_le_mul_left (adicValuation_alg_le_one' x U y hyU v hv c) _
_ ≤ exp (-(m : ℤ)) := by rw [one_mul]; exact ha }
have hJ : ∀ a m, a ∈ J m ↔ v.adicValuation (alg U a) ≤ exp (-(m : ℤ)) := fun a m => Iff.rfl
have hJmul : ∀ m k, J m * J k ≤ J (m + k) := by
intro m k
rw [Ideal.mul_le]
intro a ha b hb
rw [hJ] at ha hb ⊢
rw [alg_mul, Valuation.map_mul, Nat.cast_add, neg_add, WithZero.exp_add]
exact mul_le_mul' ha hb
by_cases hyp : pt = y
· subst hyp
refine ⟨fun _ => ?_, fun h => (h rfl).elim⟩
change v.ord (alg U g) = (n : ℤ)
let Q : Ideal Γ(X, U) := (hU.primeIdealOf ⟨pt, hyU⟩).asIdeal
have hQp : Q.IsPrime := (hU.primeIdealOf ⟨pt, hyU⟩).isPrime
let algSt : Algebra Γ(X, U) (X.presheaf.stalk pt) := (X.presheaf.germ U pt hyU).hom.toAlgebra
have : IsLocalization.AtPrime (X.presheaf.stalk pt) Q := hU.isLocalization_stalk ⟨pt, hyU⟩
have halgSt : ∀ a : Γ(X, U), algebraMap Γ(X, U) (X.presheaf.stalk pt) a = X.presheaf.germ U
pt hyU a :=
fun a => rfl
have hQmem : ∀ a : Γ(X, U), a ∈ Q ↔ ¬ IsUnit (X.presheaf.germ U pt hyU a) := by
intro a
rw [← IsLocalization.AtPrime.to_map_mem_maximal_iff (X.presheaf.stalk pt) Q a,
IsLocalRing.mem_maximalIdeal,
mem_nonunits_iff]
rfl
have hker : P.ker.ideal ⟨U, hU⟩ = RingHom.ker (P.app U).hom := Scheme.Hom.ker_apply P ⟨U, hU⟩
have hle : P.ker.ideal ⟨U, hU⟩ ≤ Q := by
intro a ha
rw [hker, RingHom.mem_ker] at ha
rw [hQmem]
intro hu
have hmem : pt ∈ X.basicOpen a := (X.mem_basicOpen a pt hyU).mpr hu
have : IsLocalRing.closedPoint K ∈ P ⁻¹ᵁ X.basicOpen a := hmem
rw [Scheme.Hom.preimage_basicOpen, ha, Scheme.basicOpen_zero] at this
exact this
have hge : Q ≤ P.ker.ideal ⟨U, hU⟩ := by
intro a ha
rw [hQmem] at ha
rw [hker, RingHom.mem_ker]
have hcp : IsLocalRing.closedPoint K = genericPoint (Spec (CommRingCat.of K)) :=
Subsingleton.elim _ _
have hfield : ∀ z : (Spec (CommRingCat.of K)).presheaf.stalk (IsLocalRing.closedPoint K),
z ≠ 0 → IsUnit z := by
rw [hcp]
intro z hz
obtain ⟨w, hw⟩ := (Field.toIsField (Spec (CommRingCat.of
K)).functionField).mul_inv_cancel hz
exact isUnit_iff_exists_inv.mpr ⟨w, hw⟩
have key := Scheme.Hom.germ_stalkMap_apply P U (IsLocalRing.closedPoint K) hyU a
have hnu : ¬ IsUnit ((P.stalkMap (IsLocalRing.closedPoint K)).hom
(X.presheaf.germ U pt hyU a)) := by
let : IsLocalHom (P.stalkMap (IsLocalRing.closedPoint K)).hom :=
P.prop (IsLocalRing.closedPoint K)
exact fun h => ha ((isUnit_map_iff
(P.stalkMap (IsLocalRing.closedPoint K)).hom _).mp h)
have hzero : (Spec (CommRingCat.of K)).presheaf.germ (P ⁻¹ᵁ U) (IsLocalRing.closedPoint K)
hyU (P.app U a) = 0 := by
by_contra hne
apply hnu
have hu := hfield _ hne
rw [← key] at hu
exact hu
exact germ_injective_of_isIntegral _ (IsLocalRing.closedPoint K) hyU (by rw [hzero, map_zero])
have hQeq : P.ker.ideal ⟨U, hU⟩ = Q := le_antisymm hle hge
have hpow : (P.ker ^ n).ideal ⟨U, hU⟩ = Q ^ n := by
rw [Scheme.IdealSheafData.ideal_pow, Pi.pow_apply, hQeq]
rw [hpow] at hg
have hQJ : ∀ m, Q ^ m ≤ J m := by
intro m
induction m with
| zero =>
intro a _
rw [hJ]
simp only [Nat.cast_zero, neg_zero, WithZero.exp_zero]
exact adicValuation_alg_le_one' x U pt hyU v hv a
| succ m ih =>
rw [pow_succ]
refine le_trans (Ideal.mul_mono ih ?_) (hJmul m 1)
intro a ha
rw [hJ, Nat.cast_one]
exact hval2 a ((hQmem a).mp ha)
have hg_le : v.adicValuation (alg U g) ≤ exp (-(n : ℤ)) := by
rw [← hJ]
exact hQJ n (hg ▸ Ideal.mem_span_singleton_self g)
obtain ⟨ϖ, hϖ⟩ := IsDiscreteValuationRing.exists_irreducible v.toValuationSubring
have hϖmem : (ϖ : X.functionField) ∈ (algebraMap (X.presheaf.stalk pt)
X.functionField).range := by
rw [hv]; exact ϖ.2
obtain ⟨q, hq⟩ := hϖmem
obtain ⟨⟨a, b⟩, hab⟩ := IsLocalization.mk'_surjective Q.primeCompl q
have hspec : q * algebraMap Γ(X, U) (X.presheaf.stalk pt) b = algebraMap Γ(X, U)
(X.presheaf.stalk pt) a := by
rw [← hab]; exact IsLocalization.mk'_spec _ a b
have hbunit : IsUnit (X.presheaf.germ U pt hyU b) := by
have := (IsLocalization.AtPrime.isUnit_to_map_iff (X.presheaf.stalk pt) Q (b : Γ(X,
U))).mpr b.2
exact this
have hb1 : v.adicValuation (alg U b) = 1 := hval1 b hbunit
have halga : alg U a = (ϖ : X.functionField) * alg U b := by
rw [alg_eq_algebraMap_germ U pt hyU a, alg_eq_algebraMap_germ U pt hyU b, ← hq, ← map_mul]
congr 1
exact hspec.symm
have hϖ0 : (ϖ : X.functionField) ≠ 0 := by
intro h; exact hϖ.ne_zero (Subtype.ext h)
have hb0 : alg U b ≠ 0 := by
intro h; rw [h, Valuation.map_zero] at hb1; exact zero_ne_one hb1
have horda : v.ord (alg U a) = 1 := by
rw [halga, Place.ord_mul _ hϖ0 hb0, Place.ord_coe_irreducible _ hϖ]
simp only [Place.ord, hb1, WithZero.log_one, neg_zero, add_zero]
have haQ : a ∈ Q := by
rw [hQmem]
intro hu
have hqu : IsUnit q := by
have h2 : IsUnit (q * algebraMap Γ(X, U) (X.presheaf.stalk pt) b) := by rw [hspec]; exact hu
exact isUnit_of_mul_isUnit_left h2
have := adicValuation_algebraMap_stalk_eq_one x pt v hv q hqu
rw [hq, Place.adicValuation_coe_irreducible _ hϖ] at this
exact absurd this (by decide)
have han : a ^ n ∈ Ideal.span {g} := hg ▸ Ideal.pow_mem_pow haQ n
obtain ⟨c, hc⟩ := Ideal.mem_span_singleton'.mp han
have ha0 : alg U a ≠ 0 := by
intro h
have := horda
rw [h, Place.ord_zero] at this
exact zero_ne_one this
have hg0 : alg U g ≠ 0 := by
intro h0
have : alg U (a ^ n) = 0 := by rw [← hc, alg_mul, h0, mul_zero]
rw [alg_pow] at this
exact pow_ne_zero n ha0 this
have hc0 : alg U c ≠ 0 := by
intro h0
have : alg U (a ^ n) = 0 := by rw [← hc, alg_mul, h0, zero_mul]
rw [alg_pow] at this
exact pow_ne_zero n ha0 this
have hordan : v.ord (alg U (a ^ n)) = n := by
rw [alg_pow, ← zpow_natCast, Place.ord_zpow, horda, mul_one]
have hup : v.ord (alg U g) ≤ n := by
have e1 : v.ord (alg U (a ^ n)) = v.ord (alg U c) + v.ord (alg U g) := by
rw [← hc, alg_mul, Place.ord_mul _ hc0 hg0]
have e2 : 0 ≤ v.ord (alg U c) := by
have h1 := adicValuation_alg_le_one' x U pt hyU v hv c
have h2 : v.adicValuation (alg U c) = exp (-(v.ord (alg U c))) := by
simp only [Place.ord, neg_neg, WithZero.exp_log (Place.adicValuation_ne_zero _ hc0)]
rw [h2, ← WithZero.exp_zero, WithZero.exp_le_exp] at h1
omega
omega
have hdown : (n : ℤ) ≤ v.ord (alg U g) := by
have h1 : v.adicValuation (alg U g) = exp (-(v.ord (alg U g))) := by
simp only [Place.ord, neg_neg, WithZero.exp_log (Place.adicValuation_ne_zero _ hg0)]
rw [h1, WithZero.exp_le_exp] at hg_le
omega
exact le_antisymm hup hdown
· refine ⟨fun h => (hyp h).elim, fun _ => ?_⟩
have hy' : y ∉ (P.ker).support := by
rw [← SetLike.mem_coe, hsupp, Set.mem_singleton_iff]
exact fun h => hyp h.symm
rw [Scheme.IdealSheafData.mem_support_iff_of_mem (U := ⟨U, hU⟩) hyU,
Scheme.mem_zeroLocus_iff] at hy'
simp only [not_forall, not_not, exists_prop] at hy'
obtain ⟨a, ha, hya⟩ := hy'
have han : a ^ n ∈ (P.ker ^ n).ideal ⟨U, hU⟩ := by
rw [Scheme.IdealSheafData.ideal_pow, Pi.pow_apply]
exact Ideal.pow_mem_pow ha n
rw [hg] at han
obtain ⟨c, hc⟩ := Ideal.mem_span_singleton'.mp han
have hau : IsUnit (X.presheaf.germ U y hyU a) := (X.mem_basicOpen a y hyU).mp hya
have hgu : IsUnit (X.presheaf.germ U y hyU g) := by
have : IsUnit (X.presheaf.germ U y hyU (a ^ n)) := by rw [map_pow]; exact hau.pow n
rw [← hc, map_mul] at this
exact isUnit_of_mul_isUnit_right this
have h1 := hval1 g hgu
change v.ord (alg U g) = 0
simp only [Place.ord, h1, WithZero.log_one, neg_zero]