File: Mathlib/RingTheory/DedekindDomain/AdicValuation.lean

full_name: IsDedekindDomain.HeightOneSpectrum.intValuationDef
code: /-- The additive `v`-adic valuation of `r ∈ R` is the exponent of `v` in the factorization of the
ideal `(r)`, if `r` is nonzero, or infinity, if `r = 0`. `intValuationDef` is the corresponding
multiplicative valuation. -/
def intValuationDef (r : R) : ℤₘ₀ 
goal: ℤₘ₀

full_name: IsDedekindDomain.HeightOneSpectrum.intValuationDef_if_pos
code: theorem intValuationDef_if_pos {r : R} (hr : r = 0) : v.intValuationDef r = 0 
goal: v.intValuationDef r = 0

full_name: IsDedekindDomain.HeightOneSpectrum.intValuationDef_zero
code: @[simp]
theorem intValuationDef_zero : v.intValuationDef 0 = 0 
goal: v.intValuationDef 0 = 0

full_name: IsDedekindDomain.HeightOneSpectrum.intValuationDef_if_neg
code: theorem intValuationDef_if_neg {r : R} (hr : r ≠ 0) :
    v.intValuationDef r =
      Multiplicative.ofAdd
        (-(Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {r} : Ideal R)).factors : ℤ) 
goal: v.intValuationDef r =
  ↑(Multiplicative.ofAdd (-↑((Associates.mk v.asIdeal).count (Associates.mk (Ideal.span {r})).factors)))

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation_ne_zero
code: /-- Nonzero elements have nonzero adic valuation. -/
theorem intValuation_ne_zero (x : R) (hx : x ≠ 0) : v.intValuationDef x ≠ 0 
goal: v.intValuationDef x ≠ 0

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation_ne_zero'
code: /-- Nonzero divisors have nonzero valuation. -/
theorem intValuation_ne_zero' (x : nonZeroDivisors R) : v.intValuationDef x ≠ 0 
goal: v.intValuationDef ↑x ≠ 0

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation_zero_le
code: /-- Nonzero divisors have valuation greater than zero. -/
theorem intValuation_zero_le (x : nonZeroDivisors R) : 0 < v.intValuationDef x 
goal: 0 < v.intValuationDef ↑x

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation_le_one
code: /-- The `v`-adic valuation on `R` is bounded above by 1. -/
theorem intValuation_le_one (x : R) : v.intValuationDef x ≤ 1 
goal: v.intValuationDef x ≤ 1

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation_lt_one_iff_dvd
code: /-- The `v`-adic valuation of `r ∈ R` is less than 1 if and only if `v` divides the ideal `(r)`. -/
theorem intValuation_lt_one_iff_dvd (r : R) :
    v.intValuationDef r < 1 ↔ v.asIdeal ∣ Ideal.span {r} 
goal: v.intValuationDef r < 1 ↔ v.asIdeal ∣ Ideal.span {r}

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation_le_pow_iff_dvd
code: /-- The `v`-adic valuation of `r ∈ R` is less than `Multiplicative.ofAdd (-n)` if and only if
`vⁿ` divides the ideal `(r)`. -/
theorem intValuation_le_pow_iff_dvd (r : R) (n : ℕ) :
    v.intValuationDef r ≤ Multiplicative.ofAdd (-(n : ℤ)) ↔ v.asIdeal ^ n ∣ Ideal.span {r} 
goal: v.intValuationDef r ≤ ↑(Multiplicative.ofAdd (-↑n)) ↔ v.asIdeal ^ n ∣ Ideal.span {r}

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation.map_zero'
code: /-- The `v`-adic valuation of `0 : R` equals 0. -/
theorem intValuation.map_zero' : v.intValuationDef 0 = 0 
goal: v.intValuationDef 0 = 0

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation.map_one'
code: /-- The `v`-adic valuation of `1 : R` equals 1. -/
theorem intValuation.map_one' : v.intValuationDef 1 = 1 
goal: v.intValuationDef 1 = 1

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation.map_mul'
code: /-- The `v`-adic valuation of a product equals the product of the valuations. -/
theorem intValuation.map_mul' (x y : R) :
    v.intValuationDef (x * y) = v.intValuationDef x * v.intValuationDef y 
goal: v.intValuationDef (x * y) = v.intValuationDef x * v.intValuationDef y

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation.le_max_iff_min_le
code: theorem intValuation.le_max_iff_min_le {a b c : ℕ} :
    Multiplicative.ofAdd (-c : ℤ) ≤
      max (Multiplicative.ofAdd (-a : ℤ)) (Multiplicative.ofAdd (-b : ℤ)) ↔
      min a b ≤ c 
goal: Multiplicative.ofAdd (-↑c) ≤ max (Multiplicative.ofAdd (-↑a)) (Multiplicative.ofAdd (-↑b)) ↔ min a b ≤ c

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation.map_add_le_max'
code: /-- The `v`-adic valuation of a sum is bounded above by the maximum of the valuations. -/
theorem intValuation.map_add_le_max' (x y : R) :
    v.intValuationDef (x + y) ≤ max (v.intValuationDef x) (v.intValuationDef y) 
goal: v.intValuationDef (x + y) ≤ max (v.intValuationDef x) (v.intValuationDef y)

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation_toFun
code: /-- The `v`-adic valuation on `R`. -/
@[simps]
def intValuation : Valuation R ℤₘ₀ 
goal: v.intValuation r = v.intValuationDef r

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation
code: /-- The `v`-adic valuation on `R`. -/
@[simps]
def intValuation : Valuation R ℤₘ₀ 
goal: Valuation R ℤₘ₀

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation_apply
code: theorem intValuation_apply {r : R} (v : IsDedekindDomain.HeightOneSpectrum R) :
    intValuation v r = intValuationDef v r 
goal: v.intValuation r = v.intValuationDef r

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation_exists_uniformizer
code: /-- There exists `π ∈ R` with `v`-adic valuation `Multiplicative.ofAdd (-1)`. -/
theorem intValuation_exists_uniformizer :
    ∃ π : R, v.intValuationDef π = Multiplicative.ofAdd (-1 : ℤ) 
goal: ∃ π, v.intValuationDef π = ↑(Multiplicative.ofAdd (-1))

full_name: IsDedekindDomain.HeightOneSpectrum.intValuation_singleton
code: /-- The `I`-adic valuation of a generator of `I` equals `(-1 : ℤₘ₀)` -/
theorem intValuation_singleton {r : R} (hr : r ≠ 0) (hv : v.asIdeal = Ideal.span {r}) :
    v.intValuation r = Multiplicative.ofAdd (-1 : ℤ) 
goal: v.intValuation r = ↑(Multiplicative.ofAdd (-1))

full_name: IsDedekindDomain.HeightOneSpectrum.valuation
code: /-- The `v`-adic valuation of `x ∈ K` is the valuation of `r` divided by the valuation of `s`,
where `r` and `s` are chosen so that `x = r/s`. -/
def valuation (v : HeightOneSpectrum R) : Valuation K ℤₘ₀ 
goal: Valuation K ℤₘ₀

full_name: IsDedekindDomain.HeightOneSpectrum.valuation_def
code: theorem valuation_def (x : K) :
    v.valuation x =
      v.intValuation.extendToLocalization
        (fun r hr => Set.mem_compl (v.intValuation_ne_zero' ⟨r, hr⟩)) K x 
goal: v.valuation x = (v.intValuation.extendToLocalization ⋯ K) x

full_name: IsDedekindDomain.HeightOneSpectrum.valuation_of_mk'
code: /-- The `v`-adic valuation of `r/s ∈ K` is the valuation of `r` divided by the valuation of `s`. -/
theorem valuation_of_mk' {r : R} {s : nonZeroDivisors R} :
    v.valuation (IsLocalization.mk' K r s) = v.intValuation r / v.intValuation s 
goal: v.valuation (IsLocalization.mk' K r s) = v.intValuation r / v.intValuation ↑s

full_name: IsDedekindDomain.HeightOneSpectrum.valuation_of_algebraMap
code: /-- The `v`-adic valuation on `K` extends the `v`-adic valuation on `R`. -/
theorem valuation_of_algebraMap (r : R) : v.valuation (algebraMap R K r) = v.intValuation r 
goal: v.valuation ((algebraMap R K) r) = v.intValuation r

full_name: IsDedekindDomain.HeightOneSpectrum.valuation_eq_intValuationDef
code: lemma valuation_eq_intValuationDef (r : R) : v.valuation (r : K) = v.intValuationDef r 
goal: v.valuation ↑r = v.intValuationDef r

full_name: IsDedekindDomain.HeightOneSpectrum.valuation_le_one
code: /-- The `v`-adic valuation on `R` is bounded above by 1. -/
theorem valuation_le_one (r : R) : v.valuation (algebraMap R K r) ≤ 1 
goal: v.valuation ((algebraMap R K) r) ≤ 1

full_name: IsDedekindDomain.HeightOneSpectrum.valuation_lt_one_iff_dvd
code: /-- The `v`-adic valuation of `r ∈ R` is less than 1 if and only if `v` divides the ideal `(r)`. -/
theorem valuation_lt_one_iff_dvd (r : R) :
    v.valuation (algebraMap R K r) < 1 ↔ v.asIdeal ∣ Ideal.span {r} 
goal: v.valuation ((algebraMap R K) r) < 1 ↔ v.asIdeal ∣ Ideal.span {r}

full_name: IsDedekindDomain.HeightOneSpectrum.valuation_exists_uniformizer
code: /-- There exists `π ∈ K` with `v`-adic valuation `Multiplicative.ofAdd (-1)`. -/
theorem valuation_exists_uniformizer : ∃ π : K, v.valuation π = Multiplicative.ofAdd (-1 : ℤ) 
goal: ∃ π, v.valuation π = ↑(Multiplicative.ofAdd (-1))

full_name: IsDedekindDomain.HeightOneSpectrum.valuation_uniformizer_ne_zero
code: /-- Uniformizers are nonzero. -/
theorem valuation_uniformizer_ne_zero : Classical.choose (v.valuation_exists_uniformizer K) ≠ 0 
goal: Classical.choose ⋯ ≠ 0

full_name: IsDedekindDomain.HeightOneSpectrum.adicValued
code: /-- `K` as a valued field with the `v`-adic valuation. -/
def adicValued : Valued K ℤₘ₀ 
goal: Valued K ℤₘ₀

full_name: IsDedekindDomain.HeightOneSpectrum.adicValued_apply
code: theorem adicValued_apply {x : K} : (v.adicValued.v : _) x = v.valuation x 
goal: Valued.v x = v.valuation x

full_name: IsDedekindDomain.HeightOneSpectrum.adicCompletion
code: /-- The completion of `K` with respect to its `v`-adic valuation. -/
abbrev adicCompletion 
goal: Type u_2

full_name: IsDedekindDomain.HeightOneSpectrum.instFieldAdicCompletion
code: instance : Field (v.adicCompletion K) 
goal: Field (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)

full_name: IsDedekindDomain.HeightOneSpectrum.instInhabitedAdicCompletion
code: instance : Inhabited (v.adicCompletion K) 
goal: Inhabited (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)

full_name: IsDedekindDomain.HeightOneSpectrum.valuedAdicCompletion
code: instance valuedAdicCompletion : Valued (v.adicCompletion K) ℤₘ₀ 
goal: Valued (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v) ℤₘ₀

full_name: IsDedekindDomain.HeightOneSpectrum.valuedAdicCompletion_def
code: theorem valuedAdicCompletion_def {x : v.adicCompletion K} :
    Valued.v x = @Valued.extension K _ _ _ (adicValued v) x 
goal: Valued.v x = Valued.extension x

full_name: IsDedekindDomain.HeightOneSpectrum.adicCompletion_completeSpace
code: instance adicCompletion_completeSpace : CompleteSpace (v.adicCompletion K) 
goal: CompleteSpace (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)

full_name: IsDedekindDomain.HeightOneSpectrum.adicCompletion.instCoe
code: instance adicCompletion.instCoe : Coe K (v.adicCompletion K) 
goal: Coe K (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)

full_name: IsDedekindDomain.HeightOneSpectrum.adicCompletionIntegers
code: /-- The ring of integers of `adicCompletion`. -/
def adicCompletionIntegers : ValuationSubring (v.adicCompletion K) 
goal: ValuationSubring (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)

full_name: IsDedekindDomain.HeightOneSpectrum.instInhabitedSubtypeAdicCompletionMemValuationSubringAdicCompletionIntegers
code: instance : Inhabited (adicCompletionIntegers K v) 
goal: Inhabited ↥(IsDedekindDomain.HeightOneSpectrum.adicCompletionIntegers K v)

full_name: IsDedekindDomain.HeightOneSpectrum.mem_adicCompletionIntegers
code: theorem mem_adicCompletionIntegers {x : v.adicCompletion K} :
    x ∈ v.adicCompletionIntegers K ↔ (Valued.v x : ℤₘ₀) ≤ 1 
goal: x ∈ IsDedekindDomain.HeightOneSpectrum.adicCompletionIntegers K v ↔ Valued.v x ≤ 1

full_name: IsDedekindDomain.HeightOneSpectrum.not_mem_adicCompletionIntegers
code: theorem not_mem_adicCompletionIntegers {x : v.adicCompletion K} :
    x ∉ v.adicCompletionIntegers K ↔ 1 < (Valued.v x : ℤₘ₀) 
goal: x ∉ IsDedekindDomain.HeightOneSpectrum.adicCompletionIntegers K v ↔ 1 < Valued.v x

full_name: IsDedekindDomain.HeightOneSpectrum.adicValued.has_uniform_continuous_const_smul'
code: instance (priority := 100) adicValued.has_uniform_continuous_const_smul' :
    @UniformContinuousConstSMul R K v.adicValued.toUniformSpace _ 
goal: UniformContinuousConstSMul R K

full_name: IsDedekindDomain.HeightOneSpectrum.adicValued.uniformContinuousConstSMul
code: instance adicValued.uniformContinuousConstSMul :
    @UniformContinuousConstSMul K K v.adicValued.toUniformSpace _ 
goal: UniformContinuousConstSMul K K

full_name: IsDedekindDomain.HeightOneSpectrum.adicCompletion.algebra'
code: instance adicCompletion.algebra' : Algebra R (v.adicCompletion K) 
goal: Algebra R (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)

full_name: IsDedekindDomain.HeightOneSpectrum.coe_smul_adicCompletion
code: theorem coe_smul_adicCompletion (r : R) (x : K) :
    (↑(r • x) : v.adicCompletion K) = r • (↑x : v.adicCompletion K) 
goal: ↑K (r • x) = r • ↑K x

full_name: IsDedekindDomain.HeightOneSpectrum.instAlgebraAdicCompletion
code: instance : Algebra K (v.adicCompletion K) 
goal: Algebra K (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)

full_name: IsDedekindDomain.HeightOneSpectrum.algebraMap_adicCompletion'
code: theorem algebraMap_adicCompletion' :
    ⇑(algebraMap R <| v.adicCompletion K) = (↑) ∘ algebraMap R K 
goal: ⇑(algebraMap R (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)) = ↑K ∘ ⇑(algebraMap R K)

full_name: IsDedekindDomain.HeightOneSpectrum.algebraMap_adicCompletion
code: theorem algebraMap_adicCompletion :
    ⇑(algebraMap K <| v.adicCompletion K) = ((↑) : K → adicCompletion K v) 
goal: ⇑(algebraMap K (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)) = ↑K

full_name: IsDedekindDomain.HeightOneSpectrum.instIsScalarTowerAdicCompletion
code: instance : IsScalarTower R K (v.adicCompletion K) 
goal: IsScalarTower R K (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)

full_name: IsDedekindDomain.HeightOneSpectrum.instAlgebraSubtypeAdicCompletionMemValuationSubringAdicCompletionIntegers
code: instance : Algebra R (v.adicCompletionIntegers K) 
goal: Algebra R ↥(IsDedekindDomain.HeightOneSpectrum.adicCompletionIntegers K v)

full_name: IsDedekindDomain.HeightOneSpectrum.valuedAdicCompletion_eq_valuation
code: /-- The valuation on the completion agrees with the global valuation on elements of the
integer ring. -/
theorem valuedAdicCompletion_eq_valuation (r : R) :
    Valued.v (r : v.adicCompletion K) = v.valuation (r : K) 
goal: Valued.v ↑r = v.valuation ↑r

full_name: IsDedekindDomain.HeightOneSpectrum.valuedAdicCompletion_eq_valuation'
code: /-- The valuation on the completion agrees with the global valuation on elements of the field. -/
theorem valuedAdicCompletion_eq_valuation' (k : K) :
    Valued.v (k : v.adicCompletion K) = v.valuation k 
goal: Valued.v (↑K k) = v.valuation k

full_name: IsDedekindDomain.HeightOneSpectrum.coe_mem_adicCompletionIntegers
code: /-- A global integer is in the local integers. -/
lemma coe_mem_adicCompletionIntegers (r : R) :
    (r : adicCompletion K v) ∈ adicCompletionIntegers K v 
goal: ↑r ∈ IsDedekindDomain.HeightOneSpectrum.adicCompletionIntegers K v

full_name: IsDedekindDomain.HeightOneSpectrum.coe_smul_adicCompletionIntegers
code: @[simp]
theorem coe_smul_adicCompletionIntegers (r : R) (x : v.adicCompletionIntegers K) :
    (↑(r • x) : v.adicCompletion K) = r • (x : v.adicCompletion K) 
goal: ↑(r • x) = r • ↑x

full_name: IsDedekindDomain.HeightOneSpectrum.instNoZeroSMulDivisorsSubtypeAdicCompletionMemValuationSubringAdicCompletionIntegers
code: instance : NoZeroSMulDivisors R (v.adicCompletionIntegers K) 
goal: NoZeroSMulDivisors R ↥(IsDedekindDomain.HeightOneSpectrum.adicCompletionIntegers K v)

full_name: IsDedekindDomain.HeightOneSpectrum.adicCompletion.instIsScalarTower'
code: instance adicCompletion.instIsScalarTower' :
    IsScalarTower R (v.adicCompletionIntegers K) (v.adicCompletion K) 
goal: IsScalarTower R (↥(IsDedekindDomain.HeightOneSpectrum.adicCompletionIntegers K v))
  (IsDedekindDomain.HeightOneSpectrum.adicCompletion K v)

full_name: IsDedekindDomain.HeightOneSpectrum.adicCompletion.mul_nonZeroDivisor_mem_adicCompletionIntegers
code: lemma adicCompletion.mul_nonZeroDivisor_mem_adicCompletionIntegers (v : HeightOneSpectrum R)
    (a : v.adicCompletion K) : ∃ b ∈ R⁰, a * b ∈ v.adicCompletionIntegers K 
goal: ∃ b ∈ nonZeroDivisors R, a * ↑b ∈ IsDedekindDomain.HeightOneSpectrum.adicCompletionIntegers K v