Module

ConductorDifferentLocalization.lean

Nyll.ClassFieldTheory.GlobalClassFieldTheory.GlobalClassFields.ConductorDifferentLocalization
13 declarations indexed from sourceView source ↗

Localization of the global different in the actual finite Artin completion

Declarations

GlobalClassFieldTheory.GlobalClassFields.map_ideal_eq_maximalIdeal_pow_multiplicity

A map to a local ring retains exactly the power of the prime below its maximal ideal if that prime extends with exponent one.

Source context 9 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
theorem map_ideal_eq_maximalIdeal_pow_multiplicity
    {R S : Type*} [CommRing R] [IsDedekindDomain R] [CommRing S] [IsLocalRing S]
    (j : R →+* S) (P : HeightOneSpectrum R) (I : Ideal R) (hI : I ≠ ⊥)
    (hP : P.asIdeal.map j = IsLocalRing.maximalIdeal S)
    (hpre : (IsLocalRing.maximalIdeal S).comap j = P.asIdeal) :
    I.map j = IsLocalRing.maximalIdeal S ^ multiplicity P.asIdeal I
GlobalClassFieldTheory.GlobalClassFields.ringEquiv_on_subrings
Source context 9 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
def ringEquiv_on_subrings {R S : Type*} [CommRing R] [CommRing S]
    (e : R ≃+* S) (A : Subring R) (B : Subring S)
    (he : ∀ x : R, e x ∈ B ↔ x ∈ A) : A ≃+* B where
  toFun x := ⟨e x.val, (he x.val).mpr x.property⟩
  invFun y := ⟨e.symm y.val, (he (e.symm y.val)).mp
    ((e.apply_symm_apply y.val).symm ▸ y.property)⟩
  left_inv x := Subtype.ext (e.symm_apply_apply x.val)
  right_inv y := Subtype.ext (e.apply_symm_apply y.val)
  map_mul' x y := Subtype.ext (e.map_mul x.val y.val)
  map_add' x y := Subtype.ext (e.map_add x.val y.val)
GlobalClassFieldTheory.GlobalClassFields.map_comap_prime_of_equivalent_targets
Source context 9 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
theorem map_comap_prime_of_equivalent_targets
    {R A B : Type*} [CommRing R] [CommRing A] [CommRing B]
    (j : R →+* A) (k : R →+* B) (e : A ≃+* B)
    (P : Ideal R) (I : Ideal A) (J : Ideal B)
    (hcomp : e.toRingHom.comp j = k) (hIJ : I.map e.toRingHom = J)
    (hmap : P.map k = J) (hback : J.comap k = P) :
    P.map j = I ∧ I.comap j = P
GlobalClassFieldTheory.GlobalClassFields.ramificationIndex_eq_of_integer_maps
Source context 9 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
theorem ramificationIndex_eq_of_integer_maps
    {R S A B E : Type*} [CommRing R] [IsDedekindDomain R] [CommRing S] [IsDedekindDomain S]
    [CommRing A] [IsLocalRing A] [CommRing B] [IsDomain B] [IsDiscreteValuationRing B]
    [Field E] [Algebra B E] [IsFractionRing B E] [Algebra R S] [FaithfulSMul R S]
    (v : HeightOneSpectrum R) (P : HeightOneSpectrum S)
    (jA : R →+* A) (j : S →+* B) (b : A →+* B) (r : ℕ)
    (hsquare : b.comp jA = j.comp (algebraMap R S))
    (hA : v.asIdeal.map jA = IsLocalRing.maximalIdeal A)
    (hP : P.asIdeal.map j = IsLocalRing.maximalIdeal B)
    (hPback : (IsLocalRing.maximalIdeal B).comap j = P.asIdeal)
    (hpow : (IsLocalRing.maximalIdeal A).map b = IsLocalRing.maximalIdeal B ^ r) :
    r = v.asIdeal.ramificationIdx' P.asIdeal
GlobalClassFieldTheory.GlobalClassFields.exists_lowerCompletionIntegerMap
Source context 9 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
theorem exists_lowerCompletionIntegerMap
    {K : Type*} [Field K] [NumberField K] (v : HeightOneSpectrum (𝓞 K))
    (base : ValuationTheory.DiscreteValuationField.CompleteDVF
      (HeightOneSpectrum.adicAbv K v).Completion)
    (hbase : ∀ x : (HeightOneSpectrum.adicAbv K v).Completion,
      x ∈ base.valuation.valuationSubring ↔
        x ∈ absoluteValueCompletionIntegers (HeightOneSpectrum.adicAbv K v)
          (HeightOneSpectrum.isNonarchimedean_adicAbv K v)) :
    ∃ j : 𝓞 K →+* base.valuationSubring,
      (∀ x : 𝓞 K, (j x : (HeightOneSpectrum.adicAbv K v).Completion) =
        algebraMap K (HeightOneSpectrum.adicAbv K v).Completion (x : K)) ∧
      v.asIdeal.map j = base.maximalIdeal
GlobalClassFieldTheory.GlobalClassFields.span_eq_traceDual_one_of_algEquiv
Source context 9 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
theorem span_eq_traceDual_one_of_algEquiv
    {A B O F E C : Type*} [CommRing A] [CommRing B] [CommRing O]
    [Field F] [Field E] [Field C] [Algebra F E] [Algebra F C]
    [Algebra A F] [Algebra A B] [Algebra A E] [Algebra B E] [Algebra O C]
    [IsScalarTower A F E] [IsScalarTower A B E]
    (e : E ≃ₐ[F] C) (g : B ≃+* O)
    (h : ∀ b : B, e (algebraMap B E b) = algebraMap O C (g b))
    (s : Set E) (integers : Set F)
    (hA : ∀ z : F, z ∈ (algebraMap A F).range ↔ z ∈ integers)
    (hSpan : ∀ z : C, z ∈ Submodule.span O (e '' s) ↔
      ∀ b : O, Algebra.trace F C (z * algebraMap O C b) ∈ integers) :
    Submodule.span B s = Submodule.traceDual A F (1 : Submodule B E)
GlobalClassFieldTheory.GlobalClassFields.map_differentIdeal_of_span_traceDual
Source context 9 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
theorem map_differentIdeal_of_span_traceDual
    {R S A B K L F E : Type*}
    [CommRing R] [IsDomain R] [IsIntegrallyClosed R] [CommRing S] [IsDedekindDomain S]
    [CommRing A] [IsDomain A] [IsIntegrallyClosed A] [CommRing B] [IsDedekindDomain B]
    [Field K] [Field L] [Field F] [Field E]
    [Algebra R K] [Algebra S L] [Algebra A F] [Algebra B E]
    [IsFractionRing R K] [IsFractionRing S L] [IsFractionRing A F] [IsFractionRing B E]
    [Algebra R S] [Algebra K L] [Algebra R L] [IsScalarTower R K L] [IsScalarTower R S L]
    [Algebra A B] [Algebra F E] [Algebra A E] [IsScalarTower A F E] [IsScalarTower A B E]
    [FiniteDimensional K L] [Algebra.IsSeparable K L]
    [IsIntegralClosure S R L] [Module.IsTorsionFree R S]
    [FiniteDimensional F E] [Algebra.IsSeparable F E]
    [IsIntegralClosure B A E] [Module.IsTorsionFree A B]
    (j : S →+* B) (hj : Function.Injective j) (i : L →+* E)
    (hi : ∀ x : S, i (algebraMap S L x) = algebraMap B E (j x))
    (hSpan : Submodule.span B (i '' (Submodule.traceDual R K (1 : Submodule S L) : Set L)) =
      Submodule.traceDual A F (1 : Submodule B E)) :
    (differentIdeal R S).map j = differentIdeal A B
Source context 17 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
variable {K L : Type*} [Field K] [NumberField K] [Field L] [NumberField L]
  [Algebra K L] [FiniteDimensional K L] [IsAbelianGalois K L]
section LocalizedTrace
variable (v : HeightOneSpectrum (𝓞 K))
  (w : AbsoluteValueExtension (HeightOneSpectrum.adicAbv K v) L)
local notation "vK" => HeightOneSpectrum.adicAbv K v
local notation "hvK" => HeightOneSpectrum.isNonarchimedean_adicAbv K v
local notation "Fv" => AbsoluteValue.Completion (HeightOneSpectrum.adicAbv K v)
local notation "Cw" => AbsoluteValue.Completion (Subtype.val w)
local notation "Ow" => absoluteValueCompletionIntegers (Subtype.val w)
  (absoluteValueExtension_isNonarchimedean vK hvK w)
instance : Algebra Fv Cw
GlobalClassFieldTheory.GlobalClassFields.span_globalTraceDual_eq_localizedTraceDual
Source context 19 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
variable {K L : Type*} [Field K] [NumberField K] [Field L] [NumberField L]
  [Algebra K L] [FiniteDimensional K L] [IsAbelianGalois K L]
section LocalizedTrace
variable (v : HeightOneSpectrum (𝓞 K))
  (w : AbsoluteValueExtension (HeightOneSpectrum.adicAbv K v) L)
local notation "vK" => HeightOneSpectrum.adicAbv K v
local notation "hvK" => HeightOneSpectrum.isNonarchimedean_adicAbv K v
local notation "Fv" => AbsoluteValue.Completion (HeightOneSpectrum.adicAbv K v)
local notation "Cw" => AbsoluteValue.Completion (Subtype.val w)
local notation "Ow" => absoluteValueCompletionIntegers (Subtype.val w)
  (absoluteValueExtension_isNonarchimedean vK hvK w)
noncomputable local instance : Algebra Fv Cw := AbsoluteValue.completionAlgebra vK w.1 w.2
omit [IsAbelianGalois K L] in
theorem span_globalTraceDual_eq_localizedTraceDual
    {E : Type*} [Field E] [Algebra Fv E]
    (A : ValuationSubring Fv) (B : ValuationSubring E)
    [Algebra A B] [Algebra A E] [IsScalarTower A Fv E] [IsScalarTower A B E]
    (i : L →+* E) (e : E ≃ₐ[Fv] Cw)
    (hi : ∀ x : L, e (i x) = AbsoluteValue.toCompletion w.1 x)
    (hbase : ∀ x : Fv, x ∈ A ↔ x ∈ absoluteValueCompletionIntegers vK hvK)
    (htop : ∀ x : E, x ∈ B ↔ e x ∈ Ow) :
    Submodule.span B
        (i '' (Submodule.traceDual (𝓞 K) K (1 : Submodule (𝓞 L) L) : Set L)) =
      Submodule.traceDual A Fv (1 : Submodule B E)
GlobalClassFieldTheory.GlobalClassFields.ramificationIndex_eq_of_localizedIntegerMap
Source context 19 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
variable {K L : Type*} [Field K] [NumberField K] [Field L] [NumberField L]
  [Algebra K L] [FiniteDimensional K L] [IsAbelianGalois K L]
section LocalizedTrace
variable (v : HeightOneSpectrum (𝓞 K))
  (w : AbsoluteValueExtension (HeightOneSpectrum.adicAbv K v) L)
local notation "vK" => HeightOneSpectrum.adicAbv K v
local notation "hvK" => HeightOneSpectrum.isNonarchimedean_adicAbv K v
local notation "Fv" => AbsoluteValue.Completion (HeightOneSpectrum.adicAbv K v)
local notation "Cw" => AbsoluteValue.Completion (Subtype.val w)
local notation "Ow" => absoluteValueCompletionIntegers (Subtype.val w)
  (absoluteValueExtension_isNonarchimedean vK hvK w)
noncomputable local instance : Algebra Fv Cw := AbsoluteValue.completionAlgebra vK w.1 w.2
omit [FiniteDimensional K L] [IsAbelianGalois K L] in
theorem ramificationIndex_eq_of_localizedIntegerMap
    {E : Type*} [Field E] [Algebra Fv E]
    (base : ValuationTheory.DiscreteValuationField.CompleteDVF Fv)
    (B : ValuationSubring E) [IsDiscreteValuationRing B] [IsFractionRing B E]
    (P : HeightOneSpectrum (𝓞 L))
    (i : L →+* E) (e : E ≃ₐ[Fv] Cw)
    (j : 𝓞 L →+* B) (b : base.valuationSubring →+* B)
    (hj : ∀ x : 𝓞 L, (j x : E) = i (x : L))
    (hb : ∀ x : base.valuationSubring, (b x : E) = algebraMap Fv E (x : Fv))
    (hi : ∀ x : L, e (i x) = AbsoluteValue.toCompletion w.1 x)
    (hbase : ∀ x : Fv, x ∈ base.valuation.valuationSubring ↔
      x ∈ absoluteValueCompletionIntegers vK hvK)
    (hP : P.asIdeal.map j = IsLocalRing.maximalIdeal B)
    (hPback : (IsLocalRing.maximalIdeal B).comap j = P.asIdeal)
    (r : ℕ) (hpow : base.maximalIdeal.map b = IsLocalRing.maximalIdeal B ^ r) :
    r = v.asIdeal.ramificationIdx' P.asIdeal
GlobalClassFieldTheory.GlobalClassFields.exists_map_comap_localizedPrime
Source context 19 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
variable {K L : Type*} [Field K] [NumberField K] [Field L] [NumberField L]
  [Algebra K L] [FiniteDimensional K L] [IsAbelianGalois K L]
section LocalizedTrace
variable (v : HeightOneSpectrum (𝓞 K))
  (w : AbsoluteValueExtension (HeightOneSpectrum.adicAbv K v) L)
local notation "vK" => HeightOneSpectrum.adicAbv K v
local notation "hvK" => HeightOneSpectrum.isNonarchimedean_adicAbv K v
local notation "Fv" => AbsoluteValue.Completion (HeightOneSpectrum.adicAbv K v)
local notation "Cw" => AbsoluteValue.Completion (Subtype.val w)
local notation "Ow" => absoluteValueCompletionIntegers (Subtype.val w)
  (absoluteValueExtension_isNonarchimedean vK hvK w)
noncomputable local instance : Algebra Fv Cw := AbsoluteValue.completionAlgebra vK w.1 w.2
omit [FiniteDimensional K L] [IsAbelianGalois K L] in
theorem exists_map_comap_localizedPrime
    {E : Type*} [Field E] [Algebra Fv E]
    (B : ValuationSubring E) [IsDiscreteValuationRing B]
    (i : L →+* E) (e : E ≃ₐ[Fv] Cw)
    (hi : ∀ x : L, e (i x) = AbsoluteValue.toCompletion w.1 x)
    (htop : ∀ x : E, x ∈ B ↔ e x ∈ Ow) :
    ∃ j : 𝓞 L →+* B, (∀ a : 𝓞 L, (j a : E) = i (a : L)) ∧
      (finitePlaceExtensionCentre v w).asIdeal.map j = IsLocalRing.maximalIdeal B ∧
      (IsLocalRing.maximalIdeal B).comap j = (finitePlaceExtensionCentre v w).asIdeal
GlobalClassFieldTheory.GlobalClassFields.map_globalDifferent_eq_localDifferent
Source context 19 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
variable {K L : Type*} [Field K] [NumberField K] [Field L] [NumberField L]
  [Algebra K L] [FiniteDimensional K L] [IsAbelianGalois K L]
section LocalizedTrace
variable (v : HeightOneSpectrum (𝓞 K))
  (w : AbsoluteValueExtension (HeightOneSpectrum.adicAbv K v) L)
local notation "vK" => HeightOneSpectrum.adicAbv K v
local notation "hvK" => HeightOneSpectrum.isNonarchimedean_adicAbv K v
local notation "Fv" => AbsoluteValue.Completion (HeightOneSpectrum.adicAbv K v)
local notation "Cw" => AbsoluteValue.Completion (Subtype.val w)
local notation "Ow" => absoluteValueCompletionIntegers (Subtype.val w)
  (absoluteValueExtension_isNonarchimedean vK hvK w)
noncomputable local instance : Algebra Fv Cw := AbsoluteValue.completionAlgebra vK w.1 w.2
omit [IsAbelianGalois K L] in
theorem map_globalDifferent_eq_localDifferent
    {E : Type*} [Field E] [Algebra Fv E] [FiniteDimensional Fv E] [Algebra.IsSeparable Fv E]
    (A : ValuationSubring Fv) (B : ValuationSubring E)
    [IsFractionRing A Fv] [IsFractionRing B E]
    [IsDiscreteValuationRing A] [IsDiscreteValuationRing B]
    [Algebra A B] [Algebra A E] [IsScalarTower A Fv E] [IsScalarTower A B E]
    [IsIntegralClosure B A E] [Module.IsTorsionFree A B]
    (i : L →+* E) (e : E ≃ₐ[Fv] Cw) (j : 𝓞 L →+* B)
    (hi : ∀ x : L, e (i x) = AbsoluteValue.toCompletion w.1 x)
    (hj : ∀ a : 𝓞 L, (j a : E) = i (a : L))
    (hbase : ∀ x : Fv, x ∈ A ↔ x ∈ absoluteValueCompletionIntegers vK hvK)
    (htop : ∀ x : E, x ∈ B ↔ e x ∈ Ow) :
    (differentIdeal (𝓞 K) (𝓞 L)).map j = differentIdeal A B
GlobalClassFieldTheory.GlobalClassFields.exists_map_differentIdeal_eq_completedDifferent

The actual number-field different extends to the actual different of the localized complete fields via the original integer embedding.

Source context 10 commands

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

@[expose] public section
open scoped NumberField ValuativeRel nonZeroDivisors
open NumberField IsDedekindDomain AlgebraicNumberTheory AlgebraicNumberTheory.Valuations
open LocalFieldTheory ValuationTheory.DiscreteValuationField.ValuedExtension
open _root_.LocalFieldTheory.DiscreteValuationField.ValuedExtension
open _root_.RamificationTheory.DiscreteValuationField.ValuedExtension
noncomputable section
namespace GlobalClassFieldTheory.GlobalClassFields
open Reciprocity
variable {K L : Type*} [Field K] [NumberField K] [Field L] [NumberField L]
  [Algebra K L] [FiniteDimensional K L] [IsAbelianGalois K L]
theorem exists_map_differentIdeal_eq_completedDifferent
    (v : HeightOneSpectrum (𝓞 K))
    (w : AbsoluteValueExtension (HeightOneSpectrum.adicAbv K v) L) :
    let vK := HeightOneSpectrum.adicAbv K v
    let E := LocalizedCompletion vK w
    let : Algebra vK.Completion E := finitePlaceLocalArtinLocalizedAlgebra v w
    let : FiniteDimensional vK.Completion E := finitePlaceLocalArtinFiniteDimensional v w
    let : IsAbelianGalois vK.Completion E := finitePlaceLocalArtinIsAbelianGalois v w
      (inferInstance : FiniteDimensional K L)
    let : ValuativeRel vK.Completion := finitePlaceLocalArtinCompletionValuativeRel v
    let : IsNonarchimedeanLocalField vK.Completion :=
      finitePlaceLocalArtinCompletionIsNonarchimedeanLocalField v
    let base := localCompleteDVF vK.Completion
    let target := chosenLocalExtensionCompleteDVF vK.Completion E
    let : IsScalarTower base.valuationSubring target.valuationSubring E :=
      IsScalarTower.of_algebraMap_eq' rfl
    ∃ j : 𝓞 L →+* target.valuationSubring,
      (∀ a : 𝓞 L, (j a : E) = AbsoluteValue.toAlgebraicLocalization vK w.1 w.2 (a : L)) ∧
      (finitePlaceExtensionCentre v w).asIdeal.map j = target.maximalIdeal ∧
      target.maximalIdeal.comap j = (finitePlaceExtensionCentre v w).asIdeal ∧
      ramificationIndex base.toDVF target.toDVF =
        v.asIdeal.ramificationIdx' (finitePlaceExtensionCentre v w).asIdeal ∧
      (differentIdeal (𝓞 K) (𝓞 L)).map j =
        RamificationTheory.DiscreteValuationField.ValuedExtension.differentIdealOfFiniteSeparable
          base target := by
  intro vK E algebraOwner finiteOwner abelianOwner valuationOwner localFieldOwner
    base target towerOwner
  classical
  let F := vK.Completion
  let : Algebra.IsSeparable F E := abelianOwner.toIsGalois.to_isSeparable
  let A := base.valuation.valuationSubring
  let B := target.valuation.valuationSubring
  let C := w.1.Completion
  let _ : Algebra B E := Algebra.ofSubsemiring B
  let : IsScalarTower A F E := IsScalarTower.of_algebraMap_eq' rfl
  let : IsFractionRing A F := base.toDVF.valuationSubring_isFractionRing
  let : IsFractionRing B E := target.toDVF.valuationSubring_isFractionRing
  let : IsDiscreteValuationRing A := base.toDVF.valuationSubring_isDiscreteValuationRing
  let : IsDiscreteValuationRing B := target.toDVF.valuationSubring_isDiscreteValuationRing
  let : IsIntegralClosure B A E := chosenLocalExtensionCompleteDVF_isIntegralClosure F E
  let : Module.IsTorsionFree A B := moduleIsTorsionFree_target_valuationSubring_of_finite_separable
    (base := base) (target := target)
  let hvK := HeightOneSpectrum.isNonarchimedean_adicAbv K v
  let hvK0 : vK.IsNontrivial := RayClass.adicAbv_isNontrivial v
  let : Algebra F C := AbsoluteValue.completionAlgebra vK w.1 w.2
  let e : E ≃ₐ[F] C := localizedCompletionEquivCompletion vK hvK0 w
  let i : L →+* E := AbsoluteValue.toAlgebraicLocalization vK w.1 w.2
  have hi (x : L) : e (i x) = AbsoluteValue.toCompletion w.1 x := rfl
  let : ValuativeRel E := localizedCompletionFinitePlaceValuativeRel vK w hvK
  let : base.valuation.HasExtension (ValuativeRel.valuation E) :=
    localizedCompletionValuationHasExtension vK w hvK
  let huniq : RamificationTheory.DiscreteValuationField.DVF.HasUniqueValuationExtension
      base.toDVF target.toDVF := chosenLocalExtensionCompleteDVF_hasUniqueDVFValuationExtension F E
  have hB : B = (ValuativeRel.valuation E).valuationSubring :=
    (Valuation.isEquiv_iff_valuationSubring _ _).mp (huniq (ValuativeRel.valuation E))
  have hbase (x : F) : x ∈ A ↔ x ∈ absoluteValueCompletionIntegers vK hvK := by
    rw [mem_absoluteValueCompletionIntegers_iff]
    exact finitePlaceCompletion_mem_integers_iff_norm_le_one vK hvK x
  have htop (x : E) : x ∈ B ↔ e x ∈ absoluteValueCompletionIntegers w.1
      (absoluteValueExtension_isNonarchimedean vK hvK w) := by
    rw [hB, mem_absoluteValueCompletionIntegers_iff]
    exact localizedCompletion_mem_integers_iff_norm_le_one vK w hvK x
  obtain ⟨j, hj, hP, hPback⟩ := exists_map_comap_localizedPrime v w B i e hi htop
  let P := finitePlaceExtensionCentre v w
  let b : A →+* B := integerMap base.toDVF target.toDVF
  have hpow := maximalIdeal_map_eq_target_maximalIdeal_pow_ramificationIndex base target
  have hram := ramificationIndex_eq_of_localizedIntegerMap v w base B P i e j b
    hj (fun _ => rfl) hi hbase hP hPback
    (ramificationIndex base.toDVF target.toDVF) hpow
  refine ⟨j, hj, hP, hPback, hram, ?_⟩
  exact (map_globalDifferent_eq_localDifferent v w A B i e j hi hj hbase htop).trans
    (differentIdealOfFiniteSeparable_eq_differentIdeal base target).symm