Module

UniqueMemIffAdjoinSupIsAlgebraic.lean

Nyll.AlgebraicCurves.Places.UniqueMemIffAdjoinSupIsAlgebraic
22 declarations indexed from sourceView source ↗

Place exists Unique forall mem iff adjoin sup of is Algebraic of forall exists sub mem

Imports18
Imported by1

Declarations

AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatLayer.isUnit_iff_inv_mem
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatLayer
theorem isUnit_iff_inv_mem {L : Type*} [Field L] (B : ValuationSubring L) (x : B)
    (hx0 : (x : L) ≠ 0) : IsUnit x ↔ (x : L)⁻¹ ∈ B
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatLayer.mem_maximalIdeal_iff_inv_not_mem
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatLayer
theorem mem_maximalIdeal_iff_inv_not_mem {L : Type*} [Field L] (B : ValuationSubring L) (x : B)
    (hx0 : (x : L) ≠ 0) : x ∈ maximalIdeal B ↔ (x : L)⁻¹ ∉ B
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.BDescRatExt.algOver

The algebra structure on an extending valuation ring induced by the base valuation ring.

Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace BDescRatExt
def algOver {K E : Type} [Field K] [Field E] [Algebra K E] (V : ValuationSubring K)
    (W : ValuationSubring E) (hW : ∀ x : K, algebraMap K E x ∈ W ↔ x ∈ V) : Algebra ↥V ↥W
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.BDescRatExt.layer_count
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace BDescRatExt
theorem layer_count {K E : Type} [Field K] [Field E] [Algebra K E] [FiniteDimensional K E]
  [CharZero K]
    (V : ValuationSubring K) [IsDiscreteValuationRing ↥V]
    {n : ℕ} (hn : Module.finrank K E ≤ n)
    (hf : ∀ (W : ValuationSubring E) (hW : ∀ x : K, algebraMap K E x ∈ W ↔ x ∈ V),
      IsDiscreteValuationRing ↥W →
      letI : Algebra ↥V ↥W := algOver V W hW
      n ≤ (maximalIdeal ↥W).inertiaDeg ↥V) :
    ∃ W : ValuationSubring E, ∃ hW : (∀ x : K, algebraMap K E x ∈ W ↔ x ∈ V),
      (∀ W' : ValuationSubring E, (∀ x : K, algebraMap K E x ∈ W' ↔ x ∈ V) → W' = W) ∧
      IsDiscreteValuationRing ↥W ∧
      (letI : Algebra ↥V ↥W := algOver V W hW
       (maximalIdeal ↥V).ramificationIdx' (maximalIdeal ↥W) = 1 ∧ (maximalIdeal ↥W).inertiaDeg ↥V =
         n) ∧
      Module.finrank K E = n := by
  classical
  have : IsScalarTower ↥V K E := IsScalarTower.of_algebraMap_eq (fun (x : ↥V) => rfl)
  have : Module.Finite ↥V ↥(integralClosure ↥V E) := IsIntegralClosure.finite ↥V K E
    ↥(integralClosure ↥V E)
  obtain ⟨hfin, hdvr, hsum⟩ := ValuationSubring.finsum_ramificationIdx_mul_inertiaDeg_eq_finrank (K
    := K) (F := E) V
  set T : Type := {B : ValuationSubring E // ∀ x : K, algebraMap K E x ∈ B ↔ x ∈ V} with hT
  have : Finite T := hfin.to_subtype
  have : Fintype T := Fintype.ofFinite T
  let ef : T → ℕ := fun B =>
    letI : Algebra ↥V ↥B.1 := algOver V B.1 B.2
    (maximalIdeal ↥V).ramificationIdx' (maximalIdeal ↥B.1) * (maximalIdeal ↥B.1).inertiaDeg ↥V
  have hsum' : ∑ B : T, ef B = Module.finrank K E := by
    rw [← hsum, finsum_eq_sum_of_fintype]
  have hpos : 0 < Module.finrank K E := Module.finrank_pos
  have he : ∀ B : T, letI : Algebra ↥V ↥B.1 := algOver V B.1 B.2
      1 ≤ (maximalIdeal ↥V).ramificationIdx' (maximalIdeal ↥B.1) := by
    intro B
    let alg : Algebra ↥V ↥B.1 := algOver V B.1 B.2
    have := hdvr B.1 B.2
    have halg : ∀ a : ↥V, ((algebraMap ↥V ↥B.1 a : ↥B.1) : E) = algebraMap K E (a : K) := fun a =>
      rfl
    have : Module.IsTorsionFree ↥V ↥B.1 := by
      rw [Module.isTorsionFree_iff_smul_eq_zero]
      intro r m h
      rw [Algebra.smul_def, mul_eq_zero] at h
      rcases h with h | h
      · left
        have : ((algebraMap ↥V ↥B.1 r : ↥B.1) : E) = 0 := by rw [h]; rfl
        rw [halg, map_eq_zero] at this
        exact Subtype.ext this
      · exact Or.inr h
    have hunder : (maximalIdeal ↥B.1).under ↥V = maximalIdeal ↥V := by
      ext a
      rw [Ideal.mem_comap, IsLocalRing.mem_maximalIdeal, IsLocalRing.mem_maximalIdeal,
        mem_nonunits_iff, mem_nonunits_iff]
      constructor
      · intro h hu; exact h (hu.map _)
      · intro h hu
        apply h
        have ha0 : (a : K) ≠ 0 := by
          intro h0
          have : a = 0 := Subtype.ext h0
          rw [this, map_zero] at hu; exact not_isUnit_zero hu
        have hinvW : algebraMap K E ((a : K)⁻¹) ∈ B.1 := by
          rw [map_inv₀, ← halg]
          obtain ⟨u, hu'⟩ := hu
          have h1 : (((u⁻¹ : (↥B.1)ˣ) : ↥B.1) : E) * ((u : ↥B.1) : E) = 1 :=
            congrArg Subtype.val u.inv_mul
          have h2 : (((u⁻¹ : (↥B.1)ˣ) : ↥B.1) : E) = (((u : ↥B.1)) : E)⁻¹ :=
            eq_inv_of_mul_eq_one_left h1
          rw [← hu', ← h2]; exact SetLike.coe_mem _
        have hinvV : (a : K)⁻¹ ∈ V := (B.2 _).mp hinvW
        exact ⟨⟨a, ⟨_, hinvV⟩, Subtype.ext (mul_inv_cancel₀ ha0), Subtype.ext (inv_mul_cancel₀
          ha0)⟩, rfl⟩
    have : (maximalIdeal ↥B.1).LiesOver (maximalIdeal ↥V) := ⟨hunder.symm⟩
    exact Nat.one_le_iff_ne_zero.mpr
      (Ideal.IsDedekindDomain.ramificationIdx'_ne_zero_of_liesOver (maximalIdeal ↥B.1)
        (IsDiscreteValuationRing.not_a_field ↥V))
  have hterm : ∀ B : T, n ≤ ef B := by
    intro B
    have h1 := he B
    have h2 := hf B.1 B.2 (hdvr B.1 B.2)
    change n ≤ _ * _
    calc n ≤ 1 * n := by omega
      _ ≤ _ := Nat.mul_le_mul h1 h2
  have hcard : Fintype.card T = 1 := by
    have hle : Fintype.card T * n ≤ Module.finrank K E := by
      rw [← hsum']
      have : ∑ _B : T, n = Fintype.card T * n := by
        rw [Finset.sum_const, Finset.card_univ, nsmul_eq_mul, Nat.cast_id]
      rw [← this]
      exact Finset.sum_le_sum fun B _ => hterm B
    have hn1 : 1 ≤ n := le_trans hpos hn
    rcases Nat.lt_or_ge (Fintype.card T) 2 with hlt | hge
    · rcases Nat.lt_or_ge (Fintype.card T) 1 with h0 | h1
      · exfalso
        have : Fintype.card T = 0 := by omega
        rw [Fintype.card_eq_zero_iff] at this
        rw [Finset.sum_eq_zero (fun B _ => (this.elim B : ef B = 0))] at hsum'
        omega
      · omega
    · exfalso
      have : 2 * n ≤ Module.finrank K E := le_trans (Nat.mul_le_mul_right n hge) hle
      omega
  obtain ⟨B₀, hB₀⟩ := Fintype.card_eq_one_iff.mp hcard
  have hsum1 : ef B₀ = Module.finrank K E := by
    rw [← hsum', Finset.sum_eq_single_of_mem B₀ (Finset.mem_univ _) (fun B _ hB => absurd (hB₀ B)
      hB)]
  refine ⟨B₀.1, B₀.2, fun W' hW' => ?_, hdvr B₀.1 B₀.2, ?_, ?_⟩
  · have := hB₀ ⟨W', hW'⟩
    exact congrArg Subtype.val this
  · have h1 := he B₀
    have h2 := hf B₀.1 B₀.2 (hdvr B₀.1 B₀.2)
    have h3 : ef B₀ ≤ n := by rw [hsum1]; exact hn
    change _ * _ ≤ n at h3
    constructor
    · nlinarith
    · nlinarith
  · have h3 : ef B₀ ≤ n := by rw [hsum1]; exact hn
    have h4 := hterm B₀
    omega
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.BDescRatExt.le_inertiaDeg
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace BDescRatExt
theorem le_inertiaDeg {k₀ K E : Type} [Field k₀] [Field K] [Field E] [Algebra k₀ K] [Algebra k₀ E]
  [Algebra K E]
    [IsScalarTower k₀ K E] [FiniteDimensional K E]
    (W : ValuationSubring E) [IsDiscreteValuationRing ↥W] (hk₀W : ∀ a : k₀, algebraMap k₀ E a ∈ W)
    [IsDiscreteValuationRing ↥(W.comap (algebraMap K E))]
    {n : ℕ} (b : Fin n → E) (hbW : ∀ i, b i ∈ W)
    (hind : ∀ c : Fin n → ↥(W.comap (algebraMap K E)),
      (⟨∑ i, algebraMap K E (c i : K) * b i, sum_mem fun i _ => mul_mem
        ((ValuationSubring.mem_comap).mp (c i).2) (hbW i)⟩ : ↥W)
        ∈ maximalIdeal ↥W → ∀ i, c i ∈ maximalIdeal ↥(W.comap (algebraMap K E))) :
    letI : Algebra ↥(W.comap (algebraMap K E)) ↥W := algOver (W.comap (algebraMap K E)) W (fun _ =>
      (ValuationSubring.mem_comap).symm)
    n ≤ (maximalIdeal ↥W).inertiaDeg ↥(W.comap (algebraMap K E)) := by
  classical
  set V := W.comap (algebraMap K E) with hV
  let alg : Algebra ↥V ↥W := algOver V W (fun x => (ValuationSubring.mem_comap).symm)
  have hWtop : W ≠ ⊤ := by
    intro h
    apply IsDiscreteValuationRing.not_a_field ↥W
    rw [eq_bot_iff]
    intro x hx
    by_contra hx0
    have hx0' : (x : E) ≠ 0 := fun h0 => hx0 (by exact_mod_cast h0)
    have hinv : (x : E)⁻¹ ∈ W := by
      have : ((x : E)⁻¹) ∈ (⊤ : ValuationSubring E) := trivial
      exact h.symm ▸ this
    exact (IsLocalRing.mem_maximalIdeal _).mp hx ⟨⟨x, ⟨_, hinv⟩, Subtype.ext (mul_inv_cancel₀
      hx0'), Subtype.ext (inv_mul_cancel₀ hx0')⟩, rfl⟩
  obtain ⟨w, hwW⟩ : ∃ w : Place k₀ E, w.toValuationSubring = W :=
    ⟨{ toValuationSubring := W, algebraMap_mem' := hk₀W,
       ne_top' := hWtop, isPrincipalIdealRing' := inferInstance }, rfl⟩
  subst hwW
  have hwr : (w.restrict K).toValuationSubring = V := rfl
  have : Algebra.IsIntegral K E := inferInstance
  have hpos := AlgebraicCurve.Place.inertiaDeg_pos_of_finiteDimensional (F := K) w
  have hfin' : Module.Finite (w.restrict K).ResidueField w.ResidueField :=
    FiniteDimensional.of_finrank_pos hpos
  have hunder : (maximalIdeal ↥w.toValuationSubring).under ↥V = maximalIdeal ↥V := by
    ext a
    rw [Ideal.mem_comap, IsLocalRing.mem_maximalIdeal, IsLocalRing.mem_maximalIdeal,
      mem_nonunits_iff, mem_nonunits_iff]
    have halg : ((algebraMap ↥V ↥w.toValuationSubring a : ↥w.toValuationSubring) : E) = algebraMap
      K E (a : K) := rfl
    constructor
    · intro h hu; exact h (hu.map _)
    · intro h hu
      apply h
      have ha0 : (a : K) ≠ 0 := by
        intro h0
        have : a = 0 := Subtype.ext h0
        rw [this, map_zero] at hu; exact not_isUnit_zero hu
      have hinvW : algebraMap K E ((a : K)⁻¹) ∈ w.toValuationSubring := by
        rw [map_inv₀, ← halg]
        obtain ⟨u, hu'⟩ := hu
        have h1 : (((u⁻¹ : (↥w.toValuationSubring)ˣ) : ↥w.toValuationSubring) : E) * ((u :
          ↥w.toValuationSubring) : E) = 1 := congrArg Subtype.val u.inv_mul
        have h2 : (((u⁻¹ : (↥w.toValuationSubring)ˣ) : ↥w.toValuationSubring) : E) = (((u :
          ↥w.toValuationSubring)) : E)⁻¹ := eq_inv_of_mul_eq_one_left h1
        rw [← hu', ← h2]; exact SetLike.coe_mem _
      have hinvV : (a : K)⁻¹ ∈ V := (ValuationSubring.mem_comap).mpr hinvW
      exact ⟨⟨a, ⟨_, hinvV⟩, Subtype.ext (mul_inv_cancel₀ ha0), Subtype.ext (inv_mul_cancel₀ ha0)⟩,
        rfl⟩
  have hlies : (maximalIdeal ↥w.toValuationSubring).LiesOver (maximalIdeal ↥V) := ⟨hunder.symm⟩
  rw [Ideal.inertiaDeg_eq_of_isMaximal (maximalIdeal ↥V) (maximalIdeal ↥w.toValuationSubring)]
  let instT : Algebra (↥V ⧸ maximalIdeal ↥V) (↥w.toValuationSubring ⧸ maximalIdeal
    ↥w.toValuationSubring) :=
    AlgebraicCurve.Place.instAlgebraResidueFieldRestrictPushforward (F := K) (w := w)
  let instO : Algebra (↥V ⧸ maximalIdeal ↥V) (↥w.toValuationSubring ⧸ maximalIdeal
    ↥w.toValuationSubring) :=
    Ideal.Quotient.algebraQuotientOfLEComap (le_of_eq hunder.symm)
  have hinst : instO = instT := by
    refine Algebra.algebra_ext _ _ (fun r => ?_)
    obtain ⟨a, rfl⟩ := Ideal.Quotient.mk_surjective r
    let a' : (w.restrict K).toValuationSubring := a
    change (letI := instO; algebraMap (↥V ⧸ maximalIdeal ↥V) (↥w.toValuationSubring ⧸ maximalIdeal
      ↥w.toValuationSubring) (Ideal.Quotient.mk _ a)) =
      AlgebraicCurve.Place.restrictResidueMap K w (IsLocalRing.residue _ a')
    rw [AlgebraicCurve.Place.restrictResidueMap_residue]
    rfl
  have hfinO : @Module.Finite (↥V ⧸ maximalIdeal ↥V) (↥w.toValuationSubring ⧸ maximalIdeal
    ↥w.toValuationSubring) _ _ instO.toModule := by
    rw [hinst]; exact hfin'
  let : Algebra (↥V ⧸ maximalIdeal ↥V) (↥w.toValuationSubring ⧸ maximalIdeal ↥w.toValuationSubring)
    := instO
  let rb : Fin n → ↥w.toValuationSubring ⧸ maximalIdeal ↥w.toValuationSubring := fun i =>
    Ideal.Quotient.mk _ ⟨b i, hbW i⟩
  have hli : LinearIndependent (↥V ⧸ maximalIdeal ↥V) rb := by
    rw [Fintype.linearIndependent_iff]
    intro g hg i
    choose c hc using fun i => Ideal.Quotient.mk_surjective (g i)
    have hsum : Ideal.Quotient.mk (maximalIdeal ↥w.toValuationSubring) (∑ j, algebraMap ↥V
      ↥w.toValuationSubring (c j) * ⟨b j, hbW j⟩) = 0 := by
      rw [map_sum]
      rw [← hg]
      refine Finset.sum_congr rfl (fun j _ => ?_)
      rw [← hc j, map_mul, Algebra.smul_def]
      rfl
    rw [Ideal.Quotient.eq_zero_iff_mem] at hsum
    have hmem : (⟨∑ j, algebraMap K E (c j : K) * b j, sum_mem fun i _ => mul_mem
      ((ValuationSubring.mem_comap).mp (c i).2) (hbW i)⟩ : ↥w.toValuationSubring) ∈ maximalIdeal
      ↥w.toValuationSubring := by
      convert hsum using 1
      apply Subtype.ext
      simp only [AddSubmonoidClass.coe_finsetSum, MulMemClass.coe_mul]
      rfl
    have := hind c hmem i
    rw [← hc i, Ideal.Quotient.eq_zero_iff_mem]
    exact this
  have := hli.fintype_card_le_finrank
  simpa using this
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.BDescRatExt.post
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace BDescRatExt
theorem post {K E : Type} [Field K] [Field E] [Algebra K E] [FiniteDimensional K E]
    (V : ValuationSubring K) [IsDiscreteValuationRing ↥V]
    (W : ValuationSubring E) (hW : ∀ y : K, algebraMap K E y ∈ W ↔ y ∈ V)
    (hdvrW : IsDiscreteValuationRing ↥W)
    (ϖ : ↥V) (hϖ : maximalIdeal ↥V = Ideal.span {ϖ})
    {n : ℕ} (hn : 0 < n) (b : Fin n → E) (hbW : ∀ i, b i ∈ W)
    (hind : ∀ c : Fin n → ↥V, (∑ i, algebraMap K E (c i : K) * b i) ∈ W.nonunits → ∀ i, c i ∈
      maximalIdeal ↥V)
    (he1 : letI : Algebra ↥V ↥W := BDescRatExt.algOver V W hW; (maximalIdeal ↥V).ramificationIdx'
      (maximalIdeal ↥W) = 1)
    (hfn : letI : Algebra ↥V ↥W := BDescRatExt.algOver V W hW; (maximalIdeal ↥W).inertiaDeg ↥V = n)
      :
    maximalIdeal ↥W = Ideal.span {(⟨algebraMap K E (ϖ : K), (hW _).mpr ϖ.2⟩ : ↥W)} ∧
    ∀ w : ↥W, ∃ c : Fin n → ↥V, ((w : E) - ∑ i, algebraMap K E (c i : K) * b i) ∈ W.nonunits := by
  classical
  let alg : Algebra ↥V ↥W := BDescRatExt.algOver V W hW
  have := hdvrW
  have halg : ∀ v : ↥V, ((algebraMap ↥V ↥W v : ↥W) : E) = algebraMap K E (v : K) := fun v => rfl
  have hunder : (maximalIdeal ↥W).comap (algebraMap ↥V ↥W) = maximalIdeal ↥V := by
    ext v
    rw [Ideal.mem_comap]
    by_cases hv0 : (v : K) = 0
    · have : v = 0 := Subtype.ext hv0
      subst this
      rw [map_zero]
      exact iff_of_true (Ideal.zero_mem _) (Ideal.zero_mem _)
    have hv0' : ((algebraMap ↥V ↥W v : ↥W) : E) ≠ 0 := by
      rw [halg]; exact (map_ne_zero _).mpr hv0
    rw [KFRatLayer.mem_maximalIdeal_iff_inv_not_mem W _ hv0',
      KFRatLayer.mem_maximalIdeal_iff_inv_not_mem V _ hv0, halg,
      ← map_inv₀, hW]
  have hLO : (maximalIdeal ↥W).LiesOver (maximalIdeal ↥V) := ⟨hunder.symm⟩
  obtain ⟨π, hπ⟩ := IsDiscreteValuationRing.exists_irreducible ↥W
  have hπmax : maximalIdeal ↥W = Ideal.span {π} :=
    (IsDiscreteValuationRing.irreducible_iff_uniformizer π).mp hπ
  set ϖ' : ↥W := algebraMap ↥V ↥W ϖ with hϖ'
  have hϖ'0 : ϖ' ≠ 0 := by
    intro h0
    have hϖ0 : ϖ ≠ 0 := ((IsDiscreteValuationRing.irreducible_iff_uniformizer ϖ).mpr hϖ).ne_zero
    apply hϖ0
    have : ((ϖ' : ↥W) : E) = 0 := by rw [h0]; rfl
    rw [hϖ', halg, map_eq_zero] at this
    exact Subtype.ext this
  obtain ⟨m, u, hum⟩ := IsDiscreteValuationRing.eq_unit_mul_pow_irreducible hϖ'0 hπ
  have hmap : Ideal.map (algebraMap ↥V ↥W) (maximalIdeal ↥V) = maximalIdeal ↥W ^ m := by
    rw [hϖ, Ideal.map_span, Set.image_singleton, ← hϖ', hum, hπmax, Ideal.span_singleton_pow,
      Ideal.span_singleton_mul_left_unit u.isUnit]
  have hπ0 : maximalIdeal ↥W ≠ ⊥ := IsDiscreteValuationRing.not_a_field _
  have hem : (maximalIdeal ↥V).ramificationIdx' (maximalIdeal ↥W) = m :=
    Ideal.ramificationIdx'_spec (by rw [hmap]) (by
      rw [hmap]
      exact not_le_of_gt (Ideal.pow_succ_lt_pow hπ0 m))
  have hm1 : m = 1 := hem ▸ he1 |>.symm.symm
  have hunifW : maximalIdeal ↥W = Ideal.span {ϖ'} := by
    rw [hum, hm1, pow_one, Ideal.span_singleton_mul_left_unit u.isUnit, hπmax]
  refine ⟨?_, ?_⟩
  · rw [hunifW, hϖ']
    rfl
  · have : Nonempty (Fin n) := ⟨⟨0, hn⟩⟩
    let : Field (↥V ⧸ maximalIdeal ↥V) := Ideal.Quotient.field _
    have hfin : Module.finrank (↥V ⧸ maximalIdeal ↥V) (↥W ⧸ maximalIdeal ↥W) = n := by
      rw [← Ideal.inertiaDeg_eq_of_isMaximal (maximalIdeal ↥V) (maximalIdeal ↥W)]; exact hfn
    let bW : Fin n → ↥W := fun i => ⟨b i, hbW i⟩
    let rb : Fin n → ↥W ⧸ maximalIdeal ↥W := fun i => Ideal.Quotient.mk _ (bW i)
    have hsmul : ∀ (c : Fin n → ↥V),
        (∑ i, (Ideal.Quotient.mk (maximalIdeal ↥V) (c i)) • rb i) =
          Ideal.Quotient.mk (maximalIdeal ↥W) (∑ i, algebraMap ↥V ↥W (c i) * bW i) := by
      intro c
      simp only [map_sum, map_mul, rb, Algebra.smul_def, Ideal.Quotient.algebraMap_mk_of_liesOver]
    have hcoe : ∀ (c : Fin n → ↥V),
        ((∑ i, algebraMap ↥V ↥W (c i) * bW i : ↥W) : E) = ∑ i, algebraMap K E (c i : K) * b i := by
      intro c
      simp only [AddSubmonoidClass.coe_finsetSum, MulMemClass.coe_mul, halg]
      exact Finset.sum_congr rfl fun i _ => rfl
    have hli : LinearIndependent (↥V ⧸ maximalIdeal ↥V) rb := by
      rw [Fintype.linearIndependent_iff]
      intro g hg i
      choose c hc using fun i => Ideal.Quotient.mk_surjective (g i)
      have hg' : Ideal.Quotient.mk (maximalIdeal ↥W) (∑ i, algebraMap ↥V ↥W (c i) * bW i) = 0 := by
        rw [← hsmul]
        simpa only [hc] using hg
      rw [Ideal.Quotient.eq_zero_iff_mem, ← ValuationSubring.coe_mem_nonunits_iff, hcoe] at hg'
      rw [← hc i, Ideal.Quotient.eq_zero_iff_mem]
      exact hind c hg' i
    have hspan := hli.span_eq_top_of_card_eq_finrank (by rw [hfin, Fintype.card_fin])
    intro w
    have hw : Ideal.Quotient.mk (maximalIdeal ↥W) w ∈ Submodule.span (↥V ⧸ maximalIdeal ↥V)
      (Set.range rb) := by
      rw [hspan]; exact Submodule.mem_top
    obtain ⟨g, hg⟩ := (Submodule.mem_span_range_iff_exists_fun _).mp hw
    choose c hc using fun i => Ideal.Quotient.mk_surjective (g i)
    refine ⟨c, ?_⟩
    have : Ideal.Quotient.mk (maximalIdeal ↥W) (∑ i, algebraMap ↥V ↥W (c i) * bW i) =
        Ideal.Quotient.mk (maximalIdeal ↥W) w := by
      rw [← hsmul, ← hg]
      simp only [hc]
    rw [Ideal.Quotient.eq, ← Ideal.neg_mem_iff, neg_sub] at this
    rw [← hcoe c, show (w : E) - ((∑ i, algebraMap ↥V ↥W (c i) * bW i : ↥W) : E) =
      ((w - ∑ i, algebraMap ↥V ↥W (c i) * bW i : ↥W) : E) from rfl,
      ValuationSubring.coe_mem_nonunits_iff]
    exact this
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.BDescRatExt.layer
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace BDescRatExt
theorem layer {k₀ K E : Type} [Field k₀] [Field K] [Field E] [Algebra k₀ K] [Algebra k₀ E] [Algebra
  K E]
    [IsScalarTower k₀ K E] [FiniteDimensional K E] [CharZero K]
    (V : ValuationSubring K) [IsDiscreteValuationRing ↥V] (hk₀V : ∀ a : k₀, algebraMap k₀ K a ∈ V)
    (ϖ : ↥V) (hϖ : maximalIdeal ↥V = Ideal.span {ϖ})
    {n : ℕ} (b : Fin n → E)
    (hbW : ∀ (W : ValuationSubring E) (_hW : ∀ y : K, algebraMap K E y ∈ W ↔ y ∈ V), ∀ i, b i ∈ W)
    (hind : ∀ (W : ValuationSubring E) (_hW : ∀ y : K, algebraMap K E y ∈ W ↔ y ∈ V) (c : Fin n →
      ↥V),
      (∑ i, algebraMap K E (c i : K) * b i) ∈ W.nonunits → ∀ i, c i ∈ maximalIdeal ↥V)
    (hn : Module.finrank K E ≤ n) :
    ∃ (W : ValuationSubring E) (hW : ∀ y : K, algebraMap K E y ∈ W ↔ y ∈ V),
      (∀ W' : ValuationSubring E, (∀ y : K, algebraMap K E y ∈ W' ↔ y ∈ V) → W' = W) ∧
      IsDiscreteValuationRing ↥W ∧
      maximalIdeal ↥W = Ideal.span {(⟨algebraMap K E (ϖ : K), (hW _).mpr ϖ.2⟩ : ↥W)} ∧
      ∀ w : ↥W, ∃ c : Fin n → ↥V, ((w : E) - ∑ i, algebraMap K E (c i : K) * b i) ∈ W.nonunits
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.exists_of_directed_layers
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem exists_of_directed_layers
    {F : Type*} [Field F] {ι : Type*} [Nonempty ι]
    (E : ι → Subfield F) (V : ι → Set F)
    (_hVE : ∀ i, V i ⊆ E i)
    (hV1 : ∀ i, (1 : F) ∈ V i)
    (hVadd : ∀ i, ∀ x ∈ V i, ∀ y ∈ V i, x + y ∈ V i)
    (hVneg : ∀ i, ∀ x ∈ V i, -x ∈ V i)
    (hVmul : ∀ i, ∀ x ∈ V i, ∀ y ∈ V i, x * y ∈ V i)
    (hVval : ∀ i, ∀ x ∈ E i, x ∈ V i ∨ x⁻¹ ∈ V i)
    (hdir : ∀ i j, ∃ l, E i ≤ E l ∧ E j ≤ E l)
    (hcov : ∀ x : F, ∃ i, x ∈ E i)
    (hcompat : ∀ i j, E i ≤ E j → ∀ x ∈ E i, (x ∈ V i ↔ x ∈ V j)) :
    ∃ W : ValuationSubring F,
      (∀ (x : F) (i : ι), x ∈ E i → (x ∈ W ↔ x ∈ V i)) ∧
      (∀ (x : ↥W) (i : ι), (x : F) ∈ E i → (x ∈ maximalIdeal ↥W ↔ (x : F) = 0 ∨ (x : F)⁻¹ ∉ V i))
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.isUnit_iff_inv_mem
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem isUnit_iff_inv_mem {L : Type*} [Field L] (B : ValuationSubring L) (x : B)
    (hx0 : (x : L) ≠ 0) : IsUnit x ↔ (x : L)⁻¹ ∈ B
KFRatExt.mem_maximalIdeal_iff_inv_not_mem
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem _root_.KFRatExt.mem_maximalIdeal_iff_inv_not_mem {L : Type*} [Field L] (B :
  ValuationSubring L) (x : B)
    (hx0 : (x : L) ≠ 0) : x ∈ maximalIdeal B ↔ (x : L)⁻¹ ∉ B
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.mem_nonunits_iff_eq_zero_or
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem mem_nonunits_iff_eq_zero_or {L : Type*} [Field L] (B : ValuationSubring L) (x : L) :
    x ∈ B.nonunits ↔ x ∈ B ∧ (x = 0 ∨ x⁻¹ ∉ B)
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.mem_iff_of_le_of_unique
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem mem_iff_of_le_of_unique {K F : Type*} [Field K] [Field F] [Algebra K F]
    (V : ValuationSubring K) (E₁ E₂ : IntermediateField K F) (hle : E₁ ≤ E₂)
    (W₁ : ValuationSubring ↥E₁) (W₂ : ValuationSubring ↥E₂)
    (hU₁ : ∀ W' : ValuationSubring ↥E₁, (∀ x : K, algebraMap K ↥E₁ x ∈ W' ↔ x ∈ V) → W' = W₁)
    (htr₂ : ∀ x : K, algebraMap K ↥E₂ x ∈ W₂ ↔ x ∈ V)
    (f : F) (h₁ : f ∈ E₁) : (⟨f, h₁⟩ : ↥E₁) ∈ W₁ ↔ (⟨f, hle h₁⟩ : ↥E₂) ∈ W₂
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.exists_common_generator
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem exists_common_generator {k F : Type*} [Field k] [CharZero k] [Field F] [Algebra k F]
    (K₁ L : IntermediateField k F) (hK₁L : K₁ ≤ L) (halg : ∀ x : ↥L, IsAlgebraic ↥K₁ (x : F))
    (x y : ↥L) : ∃ z : ↥L, (x : F) ∈ IntermediateField.adjoin ↥K₁ {(z : F)} ∧
      (y : F) ∈ IntermediateField.adjoin ↥K₁ {(z : F)}
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.val_mul_pow
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem val_mul_pow {E : Type*} [Field E] (B : ValuationSubring E) (u v : ↥B) (n : ℕ) :
    ((u * v ^ n : ↥B) : E) = (u : E) * (v : E) ^ n
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.val_pow_mul
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem val_pow_mul {E : Type*} [Field E] (B : ValuationSubring E) (u v : ↥B) (n : ℕ) :
    ((v ^ n * u : ↥B) : E) = (v : E) ^ n * (u : E)
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.ifval_mul_pow
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem ifval_mul_pow {K F : Type*} [Field K] [Field F] [Algebra K F] (E : IntermediateField K F)
    (u v : ↥E) (n : ℕ) : ((u * v ^ n : ↥E) : F) = (u : F) * (v : F) ^ n
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.Lay

The simple intermediate field obtained by adjoining an element to the compositum.

Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
abbrev Lay {k F : Type} [Field k] [Field F] [Algebra k F]
    (K₁ F₀ : IntermediateField k F) (x : F) : IntermediateField ↥(K₁ ⊔ F₀) F
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.LayerSpec

A unique valuation extension to the adjoined layer, with the specified uniformizer and residue representatives from L.

Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
def LayerSpec {k F : Type} [Field k] [Field F] [Algebra k F]
    (K₁ L F₀ : IntermediateField k F) (V₁ : ValuationSubring ↥(K₁ ⊔ F₀)) (ϖ : ↥V₁) (x : ↥L) : Prop
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.main_of_layers
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem main_of_layers
    {k F : Type} [Field k] [CharZero k] [Field F] [Algebra k F]
    (K₁ L F₀ : IntermediateField k F) (hK₁L : K₁ ≤ L) (hgen : L ⊔ F₀ = ⊤)
    (halg : ∀ x : ↥L, IsAlgebraic ↥K₁ (x : F))
    (V₁ : ValuationSubring ↥(K₁ ⊔ F₀)) [IsDiscreteValuationRing ↥V₁]
    (ϖ : ↥V₁) (_hϖ : maximalIdeal ↥V₁ = Ideal.span {ϖ})
    (hlayer : ∀ x : ↥L, LayerSpec K₁ L F₀ V₁ ϖ x) :
    (∃! P : Place ↥L F, ∀ f : ↥(K₁ ⊔ F₀), (f : F) ∈ P.toValuationSubring ↔ f ∈ V₁) ∧
    (∀ P : Place ↥L F, (∀ f : ↥(K₁ ⊔ F₀), (f : F) ∈ P.toValuationSubring ↔ f ∈ V₁) →
      P.IsRational)
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.layerSpec_of
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
namespace KFRatExt
theorem layerSpec_of
    {k F : Type} [Field k] [CharZero k] [Field F] [Algebra k F]
    (K₁ L F₀ : IntermediateField k F) (hK₁L : K₁ ≤ L)
    (halg : ∀ x : ↥L, IsAlgebraic ↥K₁ (x : F))
    (V₁ : ValuationSubring ↥(K₁ ⊔ F₀))
    (hK₁V : ∀ x : ↥K₁, (⟨(x : F), (le_sup_left : K₁ ≤ K₁ ⊔ F₀) x.2⟩ : ↥(K₁ ⊔ F₀)) ∈ V₁)
    [IsDiscreteValuationRing ↥V₁]
    (hrat : ∀ v : ↥V₁, ∃ x : ↥K₁,
      v - ⟨⟨(x : F), (le_sup_left : K₁ ≤ K₁ ⊔ F₀) x.2⟩, hK₁V x⟩ ∈ maximalIdeal ↥V₁)
    (ϖ : ↥V₁) (x : ↥L)
    (h_layer : ∀ {n : ℕ} (b : Fin n → ↥(Lay K₁ F₀ (x : F))),
      (∀ (W : ValuationSubring ↥(Lay K₁ F₀ (x : F)))
        (_hW : ∀ y : ↥(K₁ ⊔ F₀), algebraMap ↥(K₁ ⊔ F₀) ↥(Lay K₁ F₀ (x : F)) y ∈ W ↔ y ∈ V₁),
        ∀ i, b i ∈ W) →
      (∀ (W : ValuationSubring ↥(Lay K₁ F₀ (x : F)))
        (_hW : ∀ y : ↥(K₁ ⊔ F₀), algebraMap ↥(K₁ ⊔ F₀) ↥(Lay K₁ F₀ (x : F)) y ∈ W ↔ y ∈ V₁)
        (c : Fin n → ↥V₁),
        (∑ i, algebraMap ↥(K₁ ⊔ F₀) ↥(Lay K₁ F₀ (x : F)) (c i : ↥(K₁ ⊔ F₀)) * b i) ∈ W.nonunits →
        ∀ i, c i ∈ maximalIdeal ↥V₁) →
      Module.finrank ↥(K₁ ⊔ F₀) ↥(Lay K₁ F₀ (x : F)) ≤ n →
      ∃ (W : ValuationSubring ↥(Lay K₁ F₀ (x : F)))
        (hW : ∀ y : ↥(K₁ ⊔ F₀), algebraMap ↥(K₁ ⊔ F₀) ↥(Lay K₁ F₀ (x : F)) y ∈ W ↔ y ∈ V₁),
        (∀ W' : ValuationSubring ↥(Lay K₁ F₀ (x : F)),
          (∀ y : ↥(K₁ ⊔ F₀), algebraMap ↥(K₁ ⊔ F₀) ↥(Lay K₁ F₀ (x : F)) y ∈ W' ↔ y ∈ V₁) → W' = W) ∧
        IsDiscreteValuationRing ↥W ∧
        maximalIdeal ↥W = Ideal.span {(⟨algebraMap ↥(K₁ ⊔ F₀) ↥(Lay K₁ F₀ (x : F)) (ϖ : ↥(K₁ ⊔ F₀)),
          (hW _).mpr ϖ.2⟩ : ↥W)} ∧
        ∀ w : ↥W, ∃ c : Fin n → ↥V₁,
          ((w : ↥(Lay K₁ F₀ (x : F))) -
            ∑ i, algebraMap ↥(K₁ ⊔ F₀) ↥(Lay K₁ F₀ (x : F)) (c i : ↥(K₁ ⊔ F₀)) * b i) ∈ W.nonunits)
              :
    LayerSpec K₁ L F₀ V₁ ϖ x
AlgebraicCurves.Places.Proofs.Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem.KFRatExt.ratext_subfield
Source context 8 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurves.Places.Proofs
namespace Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
open IsLocalRing AlgebraicCurve
open _root_.AlgebraicCurves.Places.Proofs.PlaceResidueFieldCompositum.AlgebraicCurve.Place in
open ResidueCompositumAux in
theorem KFRatExt.ratext_subfield
    {k : Type u₀} {F : Type uF} [Field k] [CharZero k] [Field F] [Algebra k F]
    (K₁ L F₀ : IntermediateField k F) (hK₁L : K₁ ≤ L) (hgen : L ⊔ F₀ = ⊤)
    (halg : ∀ x : ↥L, IsAlgebraic ↥K₁ (x : F))
    (V₁ : ValuationSubring ↥(K₁ ⊔ F₀))
    (hK₁V : ∀ x : ↥K₁, (⟨(x : F), (le_sup_left : K₁ ≤ K₁ ⊔ F₀) x.2⟩ : ↥(K₁ ⊔ F₀)) ∈ V₁)
    [IsDiscreteValuationRing ↥V₁]
    (hrat : ∀ v : ↥V₁, ∃ x : ↥K₁,
      v - ⟨⟨(x : F), (le_sup_left : K₁ ≤ K₁ ⊔ F₀) x.2⟩, hK₁V x⟩ ∈ maximalIdeal ↥V₁) :
    (∃! P : Place ↥L F, ∀ f : ↥(K₁ ⊔ F₀), (f : F) ∈ P.toValuationSubring ↔ f ∈ V₁) ∧
    (∀ P : Place ↥L F, (∀ f : ↥(K₁ ⊔ F₀), (f : F) ∈ P.toValuationSubring ↔ f ∈ V₁) → P.IsRational)
AlgebraicCurve.Place.existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
Source context 7 commands

Surrounding namespaces, section variables, and local commands at this declaration.

@[expose] public section
universe u₀ uL uF
section ProofImplementation
namespace AlgebraicCurve.Place
open _root_.AlgebraicCurves.Places.Proofs in
open Place_existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem in
open IsLocalRing AlgebraicCurve in
theorem existsUnique_forall_mem_iff_adjoin_sup_of_isAlgebraic_of_forall_exists_sub_mem
    {k₀ : Type u₀} {L : Type uL} {F : Type uF}
    [Field k₀] [Field L] [CharZero L] [Field F] [Algebra k₀ L] [Algebra k₀ F]
      [Algebra L F]
    [IsScalarTower k₀ L F]
    (F₀ : IntermediateField k₀ F) (K₁ : IntermediateField k₀ L)
    (hgen : IntermediateField.adjoin k₀ (Set.range (algebraMap L F)) ⊔ F₀ = ⊤)
    (halg : ∀ x : L, IsAlgebraic ↥K₁ x)
    (V₁ : ValuationSubring ↥(IntermediateField.adjoin k₀ (⇑(algebraMap L F) '' (↑K₁ : Set L)) ⊔ F₀))
    (hK₁V : ∀ (x : ↥K₁) (hx : algebraMap L F (x : L) ∈ IntermediateField.adjoin k₀ (⇑(algebraMap L
      F) '' (↑K₁ : Set L)) ⊔ F₀),
      (⟨algebraMap L F (x : L), hx⟩ : ↥(IntermediateField.adjoin k₀ (⇑(algebraMap L F) '' (↑K₁ :
        Set L)) ⊔ F₀)) ∈ V₁)
    [IsDiscreteValuationRing ↥V₁]
    (hrat : ∀ v : ↥V₁, ∃ (x : ↥K₁) (hx : algebraMap L F (x : L) ∈ IntermediateField.adjoin k₀
      (⇑(algebraMap L F) '' (↑K₁ : Set L)) ⊔ F₀),
      v - ⟨⟨algebraMap L F (x : L), hx⟩, hK₁V x hx⟩ ∈ maximalIdeal ↥V₁) :
    (∃! P : Place L F, ∀ f : ↥(IntermediateField.adjoin k₀ (⇑(algebraMap L F) '' (↑K₁ : Set L)) ⊔
      F₀), (f : F) ∈ P.toValuationSubring ↔ f ∈ V₁) ∧
    (∀ P : Place L F, (∀ f : ↥(IntermediateField.adjoin k₀ (⇑(algebraMap L F) '' (↑K₁ : Set L)) ⊔
      F₀), (f : F) ∈ P.toValuationSubring ↔ f ∈ V₁) → P.IsRational)