l3lab/ntp-mathlib huggingface dataset:
/-- 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 := by
  erw [valuation_def, (IsLocalization.toLocalizationMap (nonZeroDivisors R) K).lift_mk',
    div_eq_mul_inv, mul_eq_mul_left_iff]
  

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
s : ↥(nonZeroDivisors R)
⊢ ↑((IsUnit.liftRight (MonoidHom.restrict (↑(intValuation v).toMonoidWithZeroHom) (nonZeroDivisors R))
              (_ : ∀ (s : ↥(nonZeroDivisors R)), IsUnit (↑(intValuation v).toMonoidWithZeroHom ↑s)))
            s)⁻¹ =
      ((intValuation v) ↑s)⁻¹ ∨
    ↑(intValuation v).toMonoidWithZeroHom r = 0

Next tactic:
left
/-- 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 := by
  erw [valuation_def, (IsLocalization.toLocalizationMap (nonZeroDivisors R) K).lift_mk',
    div_eq_mul_inv, mul_eq_mul_left_iff]
  left
  

Proof state:
case h
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
s : ↥(nonZeroDivisors R)
⊢ ↑((IsUnit.liftRight (MonoidHom.restrict (↑(intValuation v).toMonoidWithZeroHom) (nonZeroDivisors R))
            (_ : ∀ (s : ↥(nonZeroDivisors R)), IsUnit (↑(intValuation v).toMonoidWithZeroHom ↑s)))
          s)⁻¹ =
    ((intValuation v) ↑s)⁻¹

Next tactic:
rw [Units.val_inv_eq_inv_val, inv_inj]
/-- 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 := by
  erw [valuation_def, (IsLocalization.toLocalizationMap (nonZeroDivisors R) K).lift_mk',
    div_eq_mul_inv, mul_eq_mul_left_iff]
  left
  rw [Units.val_inv_eq_inv_val, inv_inj]
  

Proof state:
case h
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
s : ↥(nonZeroDivisors R)
⊢ ↑((IsUnit.liftRight (MonoidHom.restrict (↑(intValuation v).toMonoidWithZeroHom) (nonZeroDivisors R))
          (_ : ∀ (s : ↥(nonZeroDivisors R)), IsUnit (↑(intValuation v).toMonoidWithZeroHom ↑s)))
        s) =
    (intValuation v) ↑s

Next tactic:
rfl
/-- 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 := by
  

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
⊢ (valuation v) ((algebraMap R K) r) = (intValuation v) r

Next tactic:
rw [valuation_def, Valuation.extendToLocalization_apply_map_apply]
/-- The `v`-adic valuation on `R` is bounded above by 1. -/
theorem valuation_le_one (r : R) : v.valuation (algebraMap R K r) ≤ 1 := by
  

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
⊢ (valuation v) ((algebraMap R K) r) ≤ 1

Next tactic:
rw [valuation_of_algebraMap]
/-- The `v`-adic valuation on `R` is bounded above by 1. -/
theorem valuation_le_one (r : R) : v.valuation (algebraMap R K r) ≤ 1 := by
  rw [valuation_of_algebraMap]; 

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
⊢ (intValuation v) r ≤ 1

Next tactic:
exact v.int_valuation_le_one r
/-- 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} := by
  

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
⊢ (valuation v) ((algebraMap R K) r) < 1 ↔ v.asIdeal ∣ Ideal.span {r}

Next tactic:
rw [valuation_of_algebraMap]
/-- 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} := by
  rw [valuation_of_algebraMap]; 

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
⊢ (intValuation v) r < 1 ↔ v.asIdeal ∣ Ideal.span {r}

Next tactic:
exact v.int_valuation_lt_one_iff_dvd r
/-- There exists `π ∈ K` with `v`-adic valuation `Multiplicative.ofAdd (-1)`. -/
theorem valuation_exists_uniformizer : ∃ π : K, v.valuation π = Multiplicative.ofAdd (-1 : ℤ) := by
  

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
⊢ ∃ π, (valuation v) π = ↑(ofAdd (-1))

Next tactic:
obtain ⟨r, hr⟩ := v.int_valuation_exists_uniformizer
/-- There exists `π ∈ K` with `v`-adic valuation `Multiplicative.ofAdd (-1)`. -/
theorem valuation_exists_uniformizer : ∃ π : K, v.valuation π = Multiplicative.ofAdd (-1 : ℤ) := by
  obtain ⟨r, hr⟩ := v.int_valuation_exists_uniformizer
  

Proof state:
case intro
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
hr : intValuationDef v r = ↑(ofAdd (-1))
⊢ ∃ π, (valuation v) π = ↑(ofAdd (-1))

Next tactic:
use algebraMap R K r
/-- There exists `π ∈ K` with `v`-adic valuation `Multiplicative.ofAdd (-1)`. -/
theorem valuation_exists_uniformizer : ∃ π : K, v.valuation π = Multiplicative.ofAdd (-1 : ℤ) := by
  obtain ⟨r, hr⟩ := v.int_valuation_exists_uniformizer
  use algebraMap R K r
  

Proof state:
case h
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
hr : intValuationDef v r = ↑(ofAdd (-1))
⊢ (valuation v) ((algebraMap R K) r) = ↑(ofAdd (-1))

Next tactic:
rw [valuation_def, Valuation.extendToLocalization_apply_map_apply]
/-- There exists `π ∈ K` with `v`-adic valuation `Multiplicative.ofAdd (-1)`. -/
theorem valuation_exists_uniformizer : ∃ π : K, v.valuation π = Multiplicative.ofAdd (-1 : ℤ) := by
  obtain ⟨r, hr⟩ := v.int_valuation_exists_uniformizer
  use algebraMap R K r
  rw [valuation_def, Valuation.extendToLocalization_apply_map_apply]
  

Proof state:
case h
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
hr : intValuationDef v r = ↑(ofAdd (-1))
⊢ (intValuation v) r = ↑(ofAdd (-1))

Next tactic:
exact hr
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
x : ↥(adicCompletionIntegers K v)
⊢ r • ↑x ∈ adicCompletionIntegers K v

Next tactic:
have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
x : ↥(adicCompletionIntegers K v)
h : (algebraMap R (adicCompletion K v)) r = ↑K ((algebraMap R K) r)
⊢ r • ↑x ∈ adicCompletionIntegers K v

Next tactic:
rw [Algebra.smul_def]
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
x : ↥(adicCompletionIntegers K v)
h : (algebraMap R (adicCompletion K v)) r = ↑K ((algebraMap R K) r)
⊢ (algebraMap R (adicCompletion K v)) r * ↑x ∈ adicCompletionIntegers K v

Next tactic:
refine' ValuationSubring.mul_mem _ _ _ _ x.2
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
x : ↥(adicCompletionIntegers K v)
h : (algebraMap R (adicCompletion K v)) r = ↑K ((algebraMap R K) r)
⊢ (algebraMap R (adicCompletion K v)) r ∈ adicCompletionIntegers K v

Next tactic:
letI : Valued K ℤₘ₀ := adicValued v
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
x : ↥(adicCompletionIntegers K v)
h : (algebraMap R (adicCompletion K v)) r = ↑K ((algebraMap R K) r)
this : Valued K ℤₘ₀ := adicValued v
⊢ (algebraMap R (adicCompletion K v)) r ∈ adicCompletionIntegers K v

Next tactic:
erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
x : ↥(adicCompletionIntegers K v)
h : (algebraMap R (adicCompletion K v)) r = ↑K ((algebraMap R K) r)
this : Valued K ℤₘ₀ := adicValued v
⊢ Valued.v ((algebraMap R K) r) ≤ 1

Next tactic:
exact v.valuation_le_one _
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
⊢ ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v

Next tactic:
letI : Valued K ℤₘ₀ := adicValued v
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
this : Valued K ℤₘ₀ := adicValued v
⊢ ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v

Next tactic:
erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
r : R
this : Valued K ℤₘ₀ := adicValued v
⊢ Valued.v ((algebraMap R K) r) ≤ 1

Next tactic:
exact v.valuation_le_one _
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  map_one' := by 

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
⊢ (fun r => { val := ↑K ((algebraMap R K) r), property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) })
      1 =
    1

Next tactic:
simp only [map_one]
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  map_one' := by simp only [map_one]; 

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
⊢ { val := ↑K 1, property := (_ : (fun x => x ∈ adicCompletionIntegers K v) (↑K 1)) } = 1

Next tactic:
rfl
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  map_one' := by simp only [map_one]; rfl
  map_mul' x y := by
    

Proof state:
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
x y : R
⊢ OneHom.toFun
      {
        toFun := fun r =>
          { val := ↑K ((algebraMap R K) r), property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) },
        map_one' :=
          (_ :
            (fun r =>
                  { val := ↑K ((algebraMap R K) r),
                    property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) })
                1 =
              1) }
      (x * y) =
    OneHom.toFun
        {
          toFun := fun r =>
            { val := ↑K ((algebraMap R K) r), property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) },
          map_one' :=
            (_ :
              (fun r =>
                    { val := ↑K ((algebraMap R K) r),
                      property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) })
                  1 =
                1) }
        x *
      OneHom.toFun
        {
          toFun := fun r =>
            { val := ↑K ((algebraMap R K) r), property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) },
          map_one' :=
            (_ :
              (fun r =>
                    { val := ↑K ((algebraMap R K) r),
                      property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) })
                  1 =
                1) }
        y

Next tactic:
ext
instance : Algebra R (v.adicCompletionIntegers K) where
  smul r x :=
    ⟨r • (x : v.adicCompletion K), by
      have h :
        (algebraMap R (adicCompletion K v)) r = (algebraMap R K r : adicCompletion K v) := rfl
      rw [Algebra.smul_def]
      refine' ValuationSubring.mul_mem _ _ _ _ x.2
      --Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, h, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  toFun r :=
    ⟨(algebraMap R K r : adicCompletion K v), by
      -- Porting note: added instance
      letI : Valued K ℤₘ₀ := adicValued v
      --Porting note: rest of proof was `simpa only
      --   [mem_adicCompletionIntegers, Valued.valuedCompletion_apply] using
      --   v.valuation_le_one _
      -- This used to be `rw`, but we need `erw` after leanprover/lean4#2644
      erw [mem_adicCompletionIntegers, Valued.valuedCompletion_apply]
      exact v.valuation_le_one _⟩
  map_one' := by simp only [map_one]; rfl
  map_mul' x y := by
    ext
    --Porting note: added instance
    

Proof state:
case a
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
inst✝³ : IsDedekindDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
v : HeightOneSpectrum R
x y : R
⊢ ↑(OneHom.toFun
        {
          toFun := fun r =>
            { val := ↑K ((algebraMap R K) r), property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) },
          map_one' :=
            (_ :
              (fun r =>
                    { val := ↑K ((algebraMap R K) r),
                      property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) })
                  1 =
                1) }
        (x * y)) =
    ↑(OneHom.toFun
          {
            toFun := fun r =>
              { val := ↑K ((algebraMap R K) r),
                property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) },
            map_one' :=
              (_ :
                (fun r =>
                      { val := ↑K ((algebraMap R K) r),
                        property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) })
                    1 =
                  1) }
          x *
        OneHom.toFun
          {
            toFun := fun r =>
              { val := ↑K ((algebraMap R K) r),
                property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) },
            map_one' :=
              (_ :
                (fun r =>
                      { val := ↑K ((algebraMap R K) r),
                        property := (_ : ↑K ((algebraMap R K) r) ∈ adicCompletionIntegers K v) })
                    1 =
                  1) }
          y)

Next tactic:
letI : Valued K ℤₘ₀ := adicValued v