[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ Function.Injective fun A => ↑A.toSubring
[PROOFSTEP]
intro ⟨_, _⟩ ⟨_, _⟩ h
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
toSubring✝¹ : Subring K
mem_or_inv_mem'✝¹ : ∀ (x : K), x ∈ toSubring✝¹.carrier ∨ x⁻¹ ∈ toSubring✝¹.carrier
toSubring✝ : Subring K
mem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier
h :
  (fun A => ↑A.toSubring) { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ } =
    (fun A => ↑A.toSubring) { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }
⊢ { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ } =
    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }
[PROOFSTEP]
replace h := SetLike.coe_injective' h
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
toSubring✝¹ : Subring K
mem_or_inv_mem'✝¹ : ∀ (x : K), x ∈ toSubring✝¹.carrier ∨ x⁻¹ ∈ toSubring✝¹.carrier
toSubring✝ : Subring K
mem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier
h :
  { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ }.toSubring =
    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }.toSubring
⊢ { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ } =
    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }
[PROOFSTEP]
congr
[GOAL]
K : Type u
inst✝ : Field K
A x y : ValuationSubring K
h : x.toSubring = y.toSubring
⊢ x = y
[PROOFSTEP]
cases x
[GOAL]
case mk
K : Type u
inst✝ : Field K
A y : ValuationSubring K
toSubring✝ : Subring K
mem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier
h : { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }.toSubring = y.toSubring
⊢ { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ } = y
[PROOFSTEP]
cases y
[GOAL]
case mk.mk
K : Type u
inst✝ : Field K
A : ValuationSubring K
toSubring✝¹ : Subring K
mem_or_inv_mem'✝¹ : ∀ (x : K), x ∈ toSubring✝¹.carrier ∨ x⁻¹ ∈ toSubring✝¹.carrier
toSubring✝ : Subring K
mem_or_inv_mem'✝ : ∀ (x : K), x ∈ toSubring✝.carrier ∨ x⁻¹ ∈ toSubring✝.carrier
h :
  { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ }.toSubring =
    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }.toSubring
⊢ { toSubring := toSubring✝¹, mem_or_inv_mem' := mem_or_inv_mem'✝¹ } =
    { toSubring := toSubring✝, mem_or_inv_mem' := mem_or_inv_mem'✝ }
[PROOFSTEP]
congr
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ CommRing { x // x ∈ A.toSubring }
[PROOFSTEP]
infer_instance
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ IsDomain { x // x ∈ A.toSubring }
[PROOFSTEP]
infer_instance
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
by_cases (b : K) = 0
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
by_cases (b : K) = 0
[GOAL]
case pos
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h : ↑b = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
use 0
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h : ↑b = 0
⊢ a * 0 = b ∨ b * 0 = a
[PROOFSTEP]
left
[GOAL]
case h.h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h : ↑b = 0
⊢ a * 0 = b
[PROOFSTEP]
ext
[GOAL]
case h.h.a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h : ↑b = 0
⊢ ↑(a * 0) = ↑b
[PROOFSTEP]
simp [h]
[GOAL]
case neg
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h : ¬↑b = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
by_cases (a : K) = 0
[GOAL]
case neg
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h : ¬↑b = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
by_cases (a : K) = 0
[GOAL]
case pos
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ↑a = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
use 0
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ↑a = 0
⊢ a * 0 = b ∨ b * 0 = a
[PROOFSTEP]
right
[GOAL]
case h.h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ↑a = 0
⊢ b * 0 = a
[PROOFSTEP]
ext
[GOAL]
case h.h.a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ↑a = 0
⊢ ↑(b * 0) = ↑a
[PROOFSTEP]
simp [h]
[GOAL]
case neg
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
cases' A.mem_or_inv_mem (a / b) with hh hh
[GOAL]
case neg.inl
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : ↑a / ↑b ∈ A
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
use⟨a / b, hh⟩
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : ↑a / ↑b ∈ A
⊢ a * { val := ↑a / ↑b, property := hh } = b ∨ b * { val := ↑a / ↑b, property := hh } = a
[PROOFSTEP]
right
[GOAL]
case h.h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : ↑a / ↑b ∈ A
⊢ b * { val := ↑a / ↑b, property := hh } = a
[PROOFSTEP]
ext
[GOAL]
case h.h.a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : ↑a / ↑b ∈ A
⊢ ↑(b * { val := ↑a / ↑b, property := hh }) = ↑a
[PROOFSTEP]
field_simp
[GOAL]
case h.h.a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : ↑a / ↑b ∈ A
⊢ ↑b * ↑a = ↑a * ↑b
[PROOFSTEP]
ring
[GOAL]
case neg.inr
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : (↑a / ↑b)⁻¹ ∈ A
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
rw [show (a / b : K)⁻¹ = b / a by field_simp] at hh 
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : (↑a / ↑b)⁻¹ ∈ A
⊢ (↑a / ↑b)⁻¹ = ↑b / ↑a
[PROOFSTEP]
field_simp
[GOAL]
case neg.inr
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : ↑b / ↑a ∈ A
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
use⟨b / a, hh⟩
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : ↑b / ↑a ∈ A
⊢ a * { val := ↑b / ↑a, property := hh } = b ∨ b * { val := ↑b / ↑a, property := hh } = a
[PROOFSTEP]
left
[GOAL]
case h.h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : ↑b / ↑a ∈ A
⊢ a * { val := ↑b / ↑a, property := hh } = b
[PROOFSTEP]
ext
[GOAL]
case h.h.a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : ↑b / ↑a ∈ A
⊢ ↑(a * { val := ↑b / ↑a, property := hh }) = ↑b
[PROOFSTEP]
field_simp
[GOAL]
case h.h.a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h✝ : ¬↑b = 0
h : ¬↑a = 0
hh : ↑b / ↑a ∈ A
⊢ ↑a * ↑b = ↑b * ↑a
[PROOFSTEP]
ring
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ Algebra { x // x ∈ A.toSubring } K
[PROOFSTEP]
infer_instance
  -- Porting note: Somehow it cannot find this instance and I'm too lazy to debug. wrong prio?
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
z : K
⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst
[PROOFSTEP]
by_cases z = 0
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
z : K
⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst
[PROOFSTEP]
by_cases z = 0
[GOAL]
case pos
K : Type u
inst✝ : Field K
A : ValuationSubring K
z : K
h : z = 0
⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst
[PROOFSTEP]
use(0, 1)
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
z : K
h : z = 0
⊢ z * ↑(algebraMap { x // x ∈ A } K) ↑(0, 1).snd = ↑(algebraMap { x // x ∈ A } K) (0, 1).fst
[PROOFSTEP]
simp [h]
[GOAL]
case neg
K : Type u
inst✝ : Field K
A : ValuationSubring K
z : K
h : ¬z = 0
⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst
[PROOFSTEP]
cases' A.mem_or_inv_mem z with hh hh
[GOAL]
case neg.inl
K : Type u
inst✝ : Field K
A : ValuationSubring K
z : K
h : ¬z = 0
hh : z ∈ A
⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst
[PROOFSTEP]
use(⟨z, hh⟩, 1)
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
z : K
h : ¬z = 0
hh : z ∈ A
⊢ z * ↑(algebraMap { x // x ∈ A } K) ↑({ val := z, property := hh }, 1).snd =
    ↑(algebraMap { x // x ∈ A } K) ({ val := z, property := hh }, 1).fst
[PROOFSTEP]
simp
[GOAL]
case neg.inr
K : Type u
inst✝ : Field K
A : ValuationSubring K
z : K
h : ¬z = 0
hh : z⁻¹ ∈ A
⊢ ∃ x, z * ↑(algebraMap { x // x ∈ A } K) ↑x.snd = ↑(algebraMap { x // x ∈ A } K) x.fst
[PROOFSTEP]
refine ⟨⟨1, ⟨⟨_, hh⟩, ?_⟩⟩, mul_inv_cancel h⟩
[GOAL]
case neg.inr
K : Type u
inst✝ : Field K
A : ValuationSubring K
z : K
h : ¬z = 0
hh : z⁻¹ ∈ A
⊢ { val := z⁻¹, property := hh } ∈ nonZeroDivisors { x // x ∈ A }
[PROOFSTEP]
exact mem_nonZeroDivisors_iff_ne_zero.2 fun c => h (inv_eq_zero.mp (congr_arg Subtype.val c))
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h : ↑(algebraMap { x // x ∈ A } K) a = ↑(algebraMap { x // x ∈ A } K) b
⊢ ↑1 * a = ↑1 * b
[PROOFSTEP]
ext
[GOAL]
case a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ A }
h : ↑(algebraMap { x // x ∈ A } K) a = ↑(algebraMap { x // x ∈ A } K) b
⊢ ↑(↑1 * a) = ↑(↑1 * b)
[PROOFSTEP]
simpa using h
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ LinearOrderedCommGroupWithZero (ValueGroup A)
[PROOFSTEP]
unfold ValueGroup
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ LinearOrderedCommGroupWithZero (ValuationRing.ValueGroup { x // x ∈ A } K)
[PROOFSTEP]
infer_instance
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }ˣ
⊢ ↑(valuation A) ↑↑a = 1
[PROOFSTEP]
rw [← A.valuation.map_one, valuation_eq_iff]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }ˣ
⊢ ∃ a_1, ↑↑a_1 * 1 = ↑↑a
[PROOFSTEP]
use a
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }ˣ
⊢ ↑↑a * 1 = ↑↑a
[PROOFSTEP]
simp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
h : ↑(valuation A) ↑a = 1
⊢ IsUnit a
[PROOFSTEP]
have ha : (a : K) ≠ 0
[GOAL]
case ha
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
h : ↑(valuation A) ↑a = 1
⊢ ↑a ≠ 0
[PROOFSTEP]
intro c
[GOAL]
case ha
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
h : ↑(valuation A) ↑a = 1
c : ↑a = 0
⊢ False
[PROOFSTEP]
rw [c, A.valuation.map_zero] at h 
[GOAL]
case ha
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
h : 0 = 1
c : ↑a = 0
⊢ False
[PROOFSTEP]
exact zero_ne_one h
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
h : ↑(valuation A) ↑a = 1
ha : ↑a ≠ 0
⊢ IsUnit a
[PROOFSTEP]
have ha' : (a : K)⁻¹ ∈ A := by rw [← valuation_le_one_iff, map_inv₀, h, inv_one]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
h : ↑(valuation A) ↑a = 1
ha : ↑a ≠ 0
⊢ (↑a)⁻¹ ∈ A
[PROOFSTEP]
rw [← valuation_le_one_iff, map_inv₀, h, inv_one]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
h : ↑(valuation A) ↑a = 1
ha : ↑a ≠ 0
ha' : (↑a)⁻¹ ∈ A
⊢ IsUnit a
[PROOFSTEP]
apply isUnit_of_mul_eq_one a ⟨a⁻¹, ha'⟩
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
h : ↑(valuation A) ↑a = 1
ha : ↑a ≠ 0
ha' : (↑a)⁻¹ ∈ A
⊢ a * { val := (↑a)⁻¹, property := ha' } = 1
[PROOFSTEP]
ext
[GOAL]
case a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
h : ↑(valuation A) ↑a = 1
ha : ↑a ≠ 0
ha' : (↑a)⁻¹ ∈ A
⊢ ↑(a * { val := (↑a)⁻¹, property := ha' }) = ↑1
[PROOFSTEP]
field_simp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
⊢ a ∈ LocalRing.maximalIdeal { x // x ∈ A } ↔ ↑(valuation A) ↑a < 1
[PROOFSTEP]
rw [LocalRing.mem_maximalIdeal]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
⊢ a ∈ nonunits { x // x ∈ A } ↔ ↑(valuation A) ↑a < 1
[PROOFSTEP]
dsimp [nonunits]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
⊢ ¬IsUnit a ↔ ↑(valuation A) ↑a < 1
[PROOFSTEP]
rw [valuation_eq_one_iff]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }
⊢ ¬↑(valuation A) ↑a = 1 ↔ ↑(valuation A) ↑a < 1
[PROOFSTEP]
exact (A.valuation_le_one a).lt_iff_ne.symm
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
⊢ ∀ (x y : ValueGroup R),
    ZeroHom.toFun
        { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),
          map_zero' :=
            (_ :
              Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =
                Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }
        (x * y) =
      ZeroHom.toFun
          { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),
            map_zero' :=
              (_ :
                Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =
                  Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }
          x *
        ZeroHom.toFun
          { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),
            map_zero' :=
              (_ :
                Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =
                  Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }
          y
[PROOFSTEP]
rintro ⟨⟩ ⟨⟩
[GOAL]
case mk.mk
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x✝ : ValueGroup R
a✝¹ : K
y✝ : ValueGroup R
a✝ : K
⊢ ZeroHom.toFun
      { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),
        map_zero' :=
          (_ :
            Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =
              Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }
      (Quot.mk Setoid.r a✝¹ * Quot.mk Setoid.r a✝) =
    ZeroHom.toFun
        { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),
          map_zero' :=
            (_ :
              Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =
                Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }
        (Quot.mk Setoid.r a✝¹) *
      ZeroHom.toFun
        { toFun := Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)),
          map_zero' :=
            (_ :
              Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0 =
                Quotient.map' id (_ : ∀ (x y : K), Setoid.r x y → Setoid.r (id x) (id y)) 0) }
        (Quot.mk Setoid.r a✝)
[PROOFSTEP]
rfl
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
⊢ Monotone ↑(mapOfLE R S h)
[PROOFSTEP]
rintro ⟨⟩ ⟨⟩ ⟨a, ha⟩
[GOAL]
case mk.mk.intro
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a✝² : ValueGroup R
a✝¹ : K
b✝ : ValueGroup R
a✝ : K
a : { x // x ∈ R }
ha : a • a✝ = a✝¹
⊢ ↑(mapOfLE R S h) (Quot.mk Setoid.r a✝¹) ≤ ↑(mapOfLE R S h) (Quot.mk Setoid.r a✝)
[PROOFSTEP]
exact ⟨R.inclusion S h a, ha⟩
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
⊢ ↑(mapOfLE R S h) ∘ ↑(valuation R) = ↑(valuation S)
[PROOFSTEP]
ext
[GOAL]
case h
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x✝ : K
⊢ (↑(mapOfLE R S h) ∘ ↑(valuation R)) x✝ = ↑(valuation S) x✝
[PROOFSTEP]
rfl
[GOAL]
K : Type u
inst✝¹ : Field K
A✝ A : ValuationSubring K
P : Ideal { x // x ∈ A }
inst✝ : Ideal.IsPrime P
⊢ IsLocalization.AtPrime { x // x ∈ ofPrime A P } P
[PROOFSTEP]
apply Localization.subalgebra.isLocalization_ofField K P.primeCompl P.primeCompl_le_nonZeroDivisors
[GOAL]
K : Type u
inst✝¹ : Field K
A✝ A : ValuationSubring K
P : Ideal { x // x ∈ A }
inst✝ : Ideal.IsPrime P
x : { x // x ∈ A }
⊢ ↑(valuation (ofPrime A P)) ↑x = 1 ↔ x ∈ Ideal.primeCompl P
[PROOFSTEP]
rw [← IsLocalization.AtPrime.isUnit_to_map_iff (A.ofPrime P) P x, valuation_eq_one_iff]
[GOAL]
K : Type u
inst✝¹ : Field K
A✝ A : ValuationSubring K
P : Ideal { x // x ∈ A }
inst✝ : Ideal.IsPrime P
x : { x // x ∈ A }
⊢ ↑(valuation (ofPrime A P)) ↑x = 1 ↔
    ↑(valuation (ofPrime A P)) ↑(↑(algebraMap { x // x ∈ A } { x // x ∈ ofPrime A P }) x) = 1
[PROOFSTEP]
rfl
[GOAL]
K : Type u
inst✝¹ : Field K
A✝ A : ValuationSubring K
P : Ideal { x // x ∈ A }
inst✝ : Ideal.IsPrime P
⊢ idealOfLE A (ofPrime A P) (_ : A ≤ ofPrime A P) = P
[PROOFSTEP]
refine Ideal.ext (fun x => ?_)
[GOAL]
K : Type u
inst✝¹ : Field K
A✝ A : ValuationSubring K
P : Ideal { x // x ∈ A }
inst✝ : Ideal.IsPrime P
x : { x // x ∈ A }
⊢ x ∈ idealOfLE A (ofPrime A P) (_ : A ≤ ofPrime A P) ↔ x ∈ P
[PROOFSTEP]
apply IsLocalization.AtPrime.to_map_mem_maximal_iff
[GOAL]
case h
K : Type u
inst✝¹ : Field K
A✝ A : ValuationSubring K
P : Ideal { x // x ∈ A }
inst✝ : Ideal.IsPrime P
x : { x // x ∈ A }
⊢ optParam (LocalRing { x // x ∈ ofPrime A P }) (_ : LocalRing { x // x ∈ ofPrime A P })
[PROOFSTEP]
exact localRing (ofPrime A P)
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
⊢ ofPrime R (idealOfLE R S h) = S
[PROOFSTEP]
ext x
[GOAL]
case h
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
⊢ x ∈ ofPrime R (idealOfLE R S h) ↔ x ∈ S
[PROOFSTEP]
constructor
[GOAL]
case h.mp
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
⊢ x ∈ ofPrime R (idealOfLE R S h) → x ∈ S
[PROOFSTEP]
rintro ⟨a, r, hr, rfl⟩
[GOAL]
case h.mp.intro.intro.intro
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a r : { x // x ∈ R }
hr : r ∈ Ideal.primeCompl (idealOfLE R S h)
⊢ ↑(algebraMap { x // x ∈ R } K) a * (↑(algebraMap { x // x ∈ R } K) r)⁻¹ ∈ S
[PROOFSTEP]
apply mul_mem
[GOAL]
case h.mp.intro.intro.intro.a
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a r : { x // x ∈ R }
hr : r ∈ Ideal.primeCompl (idealOfLE R S h)
⊢ ↑(algebraMap { x // x ∈ R } K) a ∈ S
[PROOFSTEP]
exact h a.2
[GOAL]
case h.mp.intro.intro.intro.a
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a r : { x // x ∈ R }
hr : r ∈ Ideal.primeCompl (idealOfLE R S h)
⊢ (↑(algebraMap { x // x ∈ R } K) r)⁻¹ ∈ S
[PROOFSTEP]
rw [← valuation_le_one_iff, map_inv₀, ← inv_one, inv_le_inv₀]
[GOAL]
case h.mp.intro.intro.intro.a
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a r : { x // x ∈ R }
hr : r ∈ Ideal.primeCompl (idealOfLE R S h)
⊢ 1 ≤ ↑(valuation S) (↑(algebraMap { x // x ∈ R } K) r)
[PROOFSTEP]
exact not_lt.1 ((not_iff_not.2 <| valuation_lt_one_iff S _).1 hr)
[GOAL]
case h.mp.intro.intro.intro.a.ha
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a r : { x // x ∈ R }
hr : r ∈ Ideal.primeCompl (idealOfLE R S h)
⊢ ↑(valuation S) (↑(algebraMap { x // x ∈ R } K) r) ≠ 0
[PROOFSTEP]
intro hh
[GOAL]
case h.mp.intro.intro.intro.a.ha
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a r : { x // x ∈ R }
hr : r ∈ Ideal.primeCompl (idealOfLE R S h)
hh : ↑(valuation S) (↑(algebraMap { x // x ∈ R } K) r) = 0
⊢ False
[PROOFSTEP]
erw [Valuation.zero_iff, Subring.coe_eq_zero_iff] at hh 
[GOAL]
case h.mp.intro.intro.intro.a.ha
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a r : { x // x ∈ R }
hr : r ∈ Ideal.primeCompl (idealOfLE R S h)
hh : r = 0
⊢ False
[PROOFSTEP]
apply hr
[GOAL]
case h.mp.intro.intro.intro.a.ha
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a r : { x // x ∈ R }
hr : r ∈ Ideal.primeCompl (idealOfLE R S h)
hh : r = 0
⊢ r ∈ ↑(idealOfLE R S h)
[PROOFSTEP]
rw [hh]
[GOAL]
case h.mp.intro.intro.intro.a.ha
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a r : { x // x ∈ R }
hr : r ∈ Ideal.primeCompl (idealOfLE R S h)
hh : r = 0
⊢ 0 ∈ ↑(idealOfLE R S h)
[PROOFSTEP]
apply Ideal.zero_mem (R.idealOfLE S h)
[GOAL]
case h.mp.intro.intro.intro.a.hb
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
a r : { x // x ∈ R }
hr : r ∈ Ideal.primeCompl (idealOfLE R S h)
⊢ 1 ≠ 0
[PROOFSTEP]
exact one_ne_zero
[GOAL]
case h.mpr
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
⊢ x ∈ S → x ∈ ofPrime R (idealOfLE R S h)
[PROOFSTEP]
intro hx
[GOAL]
case h.mpr
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
⊢ x ∈ ofPrime R (idealOfLE R S h)
[PROOFSTEP]
by_cases hr : x ∈ R
[GOAL]
case pos
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
hr : x ∈ R
⊢ x ∈ ofPrime R (idealOfLE R S h)
[PROOFSTEP]
exact R.le_ofPrime _ hr
[GOAL]
case neg
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
hr : ¬x ∈ R
⊢ x ∈ ofPrime R (idealOfLE R S h)
[PROOFSTEP]
have : x ≠ 0 := fun h => hr (by rw [h]; exact R.zero_mem)
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h✝ : R ≤ S
x : K
hx : x ∈ S
hr : ¬x ∈ R
h : x = 0
⊢ x ∈ R
[PROOFSTEP]
rw [h]
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h✝ : R ≤ S
x : K
hx : x ∈ S
hr : ¬x ∈ R
h : x = 0
⊢ 0 ∈ R
[PROOFSTEP]
exact R.zero_mem
[GOAL]
case neg
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
hr : ¬x ∈ R
this : x ≠ 0
⊢ x ∈ ofPrime R (idealOfLE R S h)
[PROOFSTEP]
replace hr := (R.mem_or_inv_mem x).resolve_left hr
[GOAL]
case neg
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
this : x ≠ 0
hr : x⁻¹ ∈ R
⊢ x ∈ ofPrime R (idealOfLE R S h)
[PROOFSTEP]
use 1, ⟨x⁻¹, hr⟩
[GOAL]
case h
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
this : x ≠ 0
hr : x⁻¹ ∈ R
⊢ ∃ x_1, x = ↑(algebraMap { x // x ∈ R } K) 1 * (↑(algebraMap { x // x ∈ R } K) { val := x⁻¹, property := hr })⁻¹
[PROOFSTEP]
constructor
[GOAL]
case h.h
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
this : x ≠ 0
hr : x⁻¹ ∈ R
⊢ x = ↑(algebraMap { x // x ∈ R } K) 1 * (↑(algebraMap { x // x ∈ R } K) { val := x⁻¹, property := hr })⁻¹
[PROOFSTEP]
field_simp
[GOAL]
case h.w
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
this : x ≠ 0
hr : x⁻¹ ∈ R
⊢ { val := x⁻¹, property := hr } ∈ Ideal.primeCompl (idealOfLE R S h)
[PROOFSTEP]
change (⟨x⁻¹, h hr⟩ : S) ∉ nonunits S
[GOAL]
case h.w
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
this : x ≠ 0
hr : x⁻¹ ∈ R
⊢ ¬{ val := x⁻¹, property := (_ : x⁻¹ ∈ S) } ∈ nonunits { x // x ∈ S }
[PROOFSTEP]
rw [mem_nonunits_iff, Classical.not_not]
[GOAL]
case h.w
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
this : x ≠ 0
hr : x⁻¹ ∈ R
⊢ IsUnit { val := x⁻¹, property := (_ : x⁻¹ ∈ S) }
[PROOFSTEP]
apply isUnit_of_mul_eq_one _ (⟨x, hx⟩ : S)
[GOAL]
case h.w
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
this : x ≠ 0
hr : x⁻¹ ∈ R
⊢ { val := x⁻¹, property := (_ : x⁻¹ ∈ S) } * { val := x, property := hx } = 1
[PROOFSTEP]
ext
[GOAL]
case h.w.a
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
h : R ≤ S
x : K
hx : x ∈ S
this : x ≠ 0
hr : x⁻¹ ∈ R
⊢ ↑({ val := x⁻¹, property := (_ : x⁻¹ ∈ S) } * { val := x, property := hx }) = ↑1
[PROOFSTEP]
field_simp
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
hR : A ≤ R
hS : A ≤ S
h : R ≤ S
x : { x // x ∈ A }
hx : x ∈ idealOfLE A S hS
⊢ ↑(valuation R) ↑(↑(inclusion A R hR) x) < 1
[PROOFSTEP]
by_contra c
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
hR : A ≤ R
hS : A ≤ S
h : R ≤ S
x : { x // x ∈ A }
hx : x ∈ idealOfLE A S hS
c : ¬↑(valuation R) ↑(↑(inclusion A R hR) x) < 1
⊢ False
[PROOFSTEP]
push_neg at c 
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
hR : A ≤ R
hS : A ≤ S
h : R ≤ S
x : { x // x ∈ A }
hx : x ∈ idealOfLE A S hS
c : 1 ≤ ↑(valuation R) ↑(↑(inclusion A R hR) x)
⊢ False
[PROOFSTEP]
replace c := monotone_mapOfLE R S h c
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
hR : A ≤ R
hS : A ≤ S
h : R ≤ S
x : { x // x ∈ A }
hx : x ∈ idealOfLE A S hS
c : ↑(mapOfLE R S h) 1 ≤ ↑(mapOfLE R S h) (↑(valuation R) ↑(↑(inclusion A R hR) x))
⊢ False
[PROOFSTEP]
rw [(mapOfLE _ _ _).map_one, mapOfLE_valuation_apply] at c 
[GOAL]
K : Type u
inst✝ : Field K
A R S : ValuationSubring K
hR : A ≤ R
hS : A ≤ S
h : R ≤ S
x : { x // x ∈ A }
hx : x ∈ idealOfLE A S hS
c : 1 ≤ ↑(valuation S) ↑(↑(inclusion A R hR) x)
⊢ False
[PROOFSTEP]
apply not_le_of_lt ((valuation_lt_one_iff S _).1 hx) c
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
P : PrimeSpectrum { x // x ∈ A }
⊢ (fun S =>
        { asIdeal := idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}),
          IsPrime := (_ : Ideal.IsPrime (idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}))) })
      ((fun P => { val := ofPrime A P.asIdeal, property := (_ : A ≤ ofPrime A P.asIdeal) }) P) =
    P
[PROOFSTEP]
ext1
[GOAL]
case asIdeal
K : Type u
inst✝ : Field K
A : ValuationSubring K
P : PrimeSpectrum { x // x ∈ A }
⊢ ((fun S =>
          { asIdeal := idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}),
            IsPrime := (_ : Ideal.IsPrime (idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}))) })
        ((fun P => { val := ofPrime A P.asIdeal, property := (_ : A ≤ ofPrime A P.asIdeal) }) P)).asIdeal =
    P.asIdeal
[PROOFSTEP]
simp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
S : ↑{S | A ≤ S}
⊢ (fun P => { val := ofPrime A P.asIdeal, property := (_ : A ≤ ofPrime A P.asIdeal) })
      ((fun S =>
          { asIdeal := idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}),
            IsPrime := (_ : Ideal.IsPrime (idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}))) })
        S) =
    S
[PROOFSTEP]
ext1
[GOAL]
case a
K : Type u
inst✝ : Field K
A : ValuationSubring K
S : ↑{S | A ≤ S}
⊢ ↑((fun P => { val := ofPrime A P.asIdeal, property := (_ : A ≤ ofPrime A P.asIdeal) })
        ((fun S =>
            { asIdeal := idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}),
              IsPrime := (_ : Ideal.IsPrime (idealOfLE A ↑S (_ : ↑S ∈ {S | A ≤ S}))) })
          S)) =
    ↑S
[PROOFSTEP]
simp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h :
  ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
      a✝ ≤
    ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
      b✝
⊢ a✝ ≤ b✝
[PROOFSTEP]
dsimp at h 
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ a✝ ≤ b✝
[PROOFSTEP]
have := idealOfLE_le_of_le A _ _ ?_ ?_ h
[GOAL]
case refine_3
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
this : idealOfLE A ↑(↑(primeSpectrumEquiv A) b✝) ?refine_2 ≤ idealOfLE A ↑(↑(primeSpectrumEquiv A) a✝) ?refine_1
⊢ a✝ ≤ b✝
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
case refine_2
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)
[PROOFSTEP]
iterate 2 erw [idealOfLE_ofPrime] at this 
[GOAL]
case refine_3
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
this : idealOfLE A ↑(↑(primeSpectrumEquiv A) b✝) ?refine_2 ≤ idealOfLE A ↑(↑(primeSpectrumEquiv A) a✝) ?refine_1
⊢ a✝ ≤ b✝
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
case refine_2
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)
[PROOFSTEP]
erw [idealOfLE_ofPrime] at this 
[GOAL]
case refine_3
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
this : b✝.asIdeal ≤ idealOfLE A ↑(↑(primeSpectrumEquiv A) a✝) ?refine_1
⊢ a✝ ≤ b✝
case refine_2
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
case refine_2
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)
[PROOFSTEP]
erw [idealOfLE_ofPrime] at this 
[GOAL]
case refine_3
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
this : b✝.asIdeal ≤ a✝.asIdeal
⊢ a✝ ≤ b✝
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
case refine_2
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
case refine_2
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)
[PROOFSTEP]
exact this
[GOAL]
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
case refine_2
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
case refine_2
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)
[PROOFSTEP]
all_goals exact le_ofPrime A (PrimeSpectrum.asIdeal _)
[GOAL]
case refine_1
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) a✝)
[PROOFSTEP]
exact le_ofPrime A (PrimeSpectrum.asIdeal _)
[GOAL]
case refine_2
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : ↑(primeSpectrumEquiv A) a✝ ≤ ↑(primeSpectrumEquiv A) b✝
⊢ A ≤ ↑(↑(primeSpectrumEquiv A) b✝)
[PROOFSTEP]
exact le_ofPrime A (PrimeSpectrum.asIdeal _)
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : a✝ ≤ b✝
⊢ ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
      a✝ ≤
    ↑{ toFun := src✝.toFun, invFun := src✝.invFun, left_inv := (_ : Function.LeftInverse src✝.invFun src✝.toFun),
          right_inv := (_ : Function.RightInverse src✝.invFun src✝.toFun) }
      b✝
[PROOFSTEP]
apply ofPrime_le_of_le
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
src✝ : PrimeSpectrum { x // x ∈ A } ≃ ↑{S | A ≤ S} := primeSpectrumEquiv A
a✝ b✝ : (PrimeSpectrum { x // x ∈ A })ᵒᵈ
h : a✝ ≤ b✝
⊢ b✝.asIdeal ≤ a✝.asIdeal
[PROOFSTEP]
exact h
[GOAL]
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
⊢ ∀ (x : K),
    x ∈
        { toSubsemiring := src✝.toSubsemiring,
                  neg_mem' :=
                    (_ :
                      ∀ {x : K},
                        x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier ∨
      x⁻¹ ∈
        { toSubsemiring := src✝.toSubsemiring,
                  neg_mem' :=
                    (_ :
                      ∀ {x : K},
                        x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
intro x
[GOAL]
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
x : K
⊢ x ∈
      { toSubsemiring := src✝.toSubsemiring,
                neg_mem' :=
                  (_ :
                    ∀ {x : K},
                      x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier ∨
    x⁻¹ ∈
      { toSubsemiring := src✝.toSubsemiring,
                neg_mem' :=
                  (_ :
                    ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
cases' le_or_lt (v x) 1 with h h
[GOAL]
case inl
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
x : K
h : ↑v x ≤ 1
⊢ x ∈
      { toSubsemiring := src✝.toSubsemiring,
                neg_mem' :=
                  (_ :
                    ∀ {x : K},
                      x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier ∨
    x⁻¹ ∈
      { toSubsemiring := src✝.toSubsemiring,
                neg_mem' :=
                  (_ :
                    ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
left
[GOAL]
case inl.h
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
x : K
h : ↑v x ≤ 1
⊢ x ∈
    { toSubsemiring := src✝.toSubsemiring,
              neg_mem' :=
                (_ : ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
exact h
[GOAL]
case inr
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
x : K
h : 1 < ↑v x
⊢ x ∈
      { toSubsemiring := src✝.toSubsemiring,
                neg_mem' :=
                  (_ :
                    ∀ {x : K},
                      x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier ∨
    x⁻¹ ∈
      { toSubsemiring := src✝.toSubsemiring,
                neg_mem' :=
                  (_ :
                    ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
right
[GOAL]
case inr.h
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
x : K
h : 1 < ↑v x
⊢ x⁻¹ ∈
    { toSubsemiring := src✝.toSubsemiring,
              neg_mem' :=
                (_ : ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
change v x⁻¹ ≤ 1
[GOAL]
case inr.h
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
x : K
h : 1 < ↑v x
⊢ ↑v x⁻¹ ≤ 1
[PROOFSTEP]
rw [map_inv₀ v, ← inv_one, inv_le_inv₀]
[GOAL]
case inr.h
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
x : K
h : 1 < ↑v x
⊢ 1 ≤ ↑v x
[PROOFSTEP]
exact le_of_lt h
[GOAL]
case inr.h.ha
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
x : K
h : 1 < ↑v x
⊢ ↑v x ≠ 0
[PROOFSTEP]
intro c
[GOAL]
case inr.h.ha
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
x : K
h : 1 < ↑v x
c : ↑v x = 0
⊢ False
[PROOFSTEP]
simp [c] at h 
[GOAL]
case inr.h.hb
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
src✝ : Subring K := integer v
x : K
h : 1 < ↑v x
⊢ 1 ≠ 0
[PROOFSTEP]
exact one_ne_zero
[GOAL]
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
⊢ IsEquiv v₁ v₂ ↔ valuationSubring v₁ = valuationSubring v₂
[PROOFSTEP]
constructor
[GOAL]
case mp
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
⊢ IsEquiv v₁ v₂ → valuationSubring v₁ = valuationSubring v₂
[PROOFSTEP]
intro h
[GOAL]
case mp
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
h : IsEquiv v₁ v₂
⊢ valuationSubring v₁ = valuationSubring v₂
[PROOFSTEP]
ext x
[GOAL]
case mp.h
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
h : IsEquiv v₁ v₂
x : K
⊢ x ∈ valuationSubring v₁ ↔ x ∈ valuationSubring v₂
[PROOFSTEP]
specialize h x 1
[GOAL]
case mp.h
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
x : K
h : ↑v₁ x ≤ ↑v₁ 1 ↔ ↑v₂ x ≤ ↑v₂ 1
⊢ x ∈ valuationSubring v₁ ↔ x ∈ valuationSubring v₂
[PROOFSTEP]
simpa using h
[GOAL]
case mpr
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
⊢ valuationSubring v₁ = valuationSubring v₂ → IsEquiv v₁ v₂
[PROOFSTEP]
intro h
[GOAL]
case mpr
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
h : valuationSubring v₁ = valuationSubring v₂
⊢ IsEquiv v₁ v₂
[PROOFSTEP]
apply isEquiv_of_val_le_one
[GOAL]
case mpr.h
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
h : valuationSubring v₁ = valuationSubring v₂
⊢ ∀ {x : K}, ↑v₁ x ≤ 1 ↔ ↑v₂ x ≤ 1
[PROOFSTEP]
intro x
[GOAL]
case mpr.h
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
h : valuationSubring v₁ = valuationSubring v₂
x : K
⊢ ↑v₁ x ≤ 1 ↔ ↑v₂ x ≤ 1
[PROOFSTEP]
have : x ∈ v₁.valuationSubring ↔ x ∈ v₂.valuationSubring := by rw [h]
[GOAL]
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
h : valuationSubring v₁ = valuationSubring v₂
x : K
⊢ x ∈ valuationSubring v₁ ↔ x ∈ valuationSubring v₂
[PROOFSTEP]
rw [h]
[GOAL]
case mpr.h
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
h : valuationSubring v₁ = valuationSubring v₂
x : K
this : x ∈ valuationSubring v₁ ↔ x ∈ valuationSubring v₂
⊢ ↑v₁ x ≤ 1 ↔ ↑v₂ x ≤ 1
[PROOFSTEP]
simpa using this
[GOAL]
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
⊢ IsEquiv v (ValuationSubring.valuation (valuationSubring v))
[PROOFSTEP]
rw [isEquiv_iff_val_le_one]
[GOAL]
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
⊢ ∀ {x : K}, ↑v x ≤ 1 ↔ ↑(ValuationSubring.valuation (valuationSubring v)) x ≤ 1
[PROOFSTEP]
intro x
[GOAL]
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
x : K
⊢ ↑v x ≤ 1 ↔ ↑(ValuationSubring.valuation (valuationSubring v)) x ≤ 1
[PROOFSTEP]
rw [ValuationSubring.valuation_le_one_iff]
[GOAL]
K : Type u
inst✝³ : Field K
Γ : Type u_1
Γ₁ : Type u_2
Γ₂ : Type u_3
inst✝² : LinearOrderedCommGroupWithZero Γ
inst✝¹ : LinearOrderedCommGroupWithZero Γ₁
inst✝ : LinearOrderedCommGroupWithZero Γ₂
v : Valuation K Γ
v₁ : Valuation K Γ₁
v₂ : Valuation K Γ₂
x : K
⊢ ↑v x ≤ 1 ↔ x ∈ valuationSubring v
[PROOFSTEP]
rfl
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ Valuation.valuationSubring (valuation A) = A
[PROOFSTEP]
ext
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
x✝ : K
⊢ x✝ ∈ Valuation.valuationSubring (valuation A) ↔ x✝ ∈ A
[PROOFSTEP]
rw [← A.valuation_le_one_iff]
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
x✝ : K
⊢ x✝ ∈ Valuation.valuationSubring (valuation A) ↔ ↑(valuation A) x✝ ≤ 1
[PROOFSTEP]
rfl
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ unitGroup A }
⊢ ↑({ val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) }) = ↑1
[PROOFSTEP]
simp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ unitGroup A }
⊢ ↑({ val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) }) = ↑1
[PROOFSTEP]
simp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ unitGroup A }
⊢ (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })
      ((fun x =>
          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
            val_inv :=
              (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
            inv_val :=
              (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) })
        a) =
    a
[PROOFSTEP]
ext
[GOAL]
case a.a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ unitGroup A }
⊢ ↑↑((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })
          ((fun x =>
              { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                val_inv :=
                  (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
                inv_val :=
                  (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) })
            a)) =
    ↑↑a
[PROOFSTEP]
rfl
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }ˣ
⊢ (fun x =>
        { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
          val_inv :=
            (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
          inv_val :=
            (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) })
      ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a) =
    a
[PROOFSTEP]
ext
[GOAL]
case a.a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : { x // x ∈ A }ˣ
⊢ ↑↑((fun x =>
            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
              val_inv :=
                (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
              inv_val :=
                (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) })
          ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a)) =
    ↑↑a
[PROOFSTEP]
rfl
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ unitGroup A }
⊢ Equiv.toFun
      {
        toFun := fun x =>
          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
            val_inv :=
              (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
            inv_val :=
              (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },
        invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },
        left_inv :=
          (_ :
            ∀ (a : { x // x ∈ unitGroup A }),
              (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })
                  ((fun x =>
                      { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                        inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                        val_inv :=
                          (_ :
                            { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                              1),
                        inv_val :=
                          (_ :
                            { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                              1) })
                    a) =
                a),
        right_inv :=
          (_ :
            ∀ (a : { x // x ∈ A }ˣ),
              (fun x =>
                    { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                      inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                      val_inv :=
                        (_ :
                          { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                            1),
                      inv_val :=
                        (_ :
                          { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                            1) })
                  ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a) =
                a) }
      (a * b) =
    Equiv.toFun
        {
          toFun := fun x =>
            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
              val_inv :=
                (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
              inv_val :=
                (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },
          invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },
          left_inv :=
            (_ :
              ∀ (a : { x // x ∈ unitGroup A }),
                (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })
                    ((fun x =>
                        { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                          inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                          val_inv :=
                            (_ :
                              { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *
                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                                1),
                          inv_val :=
                            (_ :
                              { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *
                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                                1) })
                      a) =
                  a),
          right_inv :=
            (_ :
              ∀ (a : { x // x ∈ A }ˣ),
                (fun x =>
                      { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                        inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                        val_inv :=
                          (_ :
                            { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                              1),
                        inv_val :=
                          (_ :
                            { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                              1) })
                    ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a) =
                  a) }
        a *
      Equiv.toFun
        {
          toFun := fun x =>
            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
              val_inv :=
                (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
              inv_val :=
                (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },
          invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },
          left_inv :=
            (_ :
              ∀ (a : { x // x ∈ unitGroup A }),
                (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })
                    ((fun x =>
                        { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                          inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                          val_inv :=
                            (_ :
                              { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *
                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                                1),
                          inv_val :=
                            (_ :
                              { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *
                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                                1) })
                      a) =
                  a),
          right_inv :=
            (_ :
              ∀ (a : { x // x ∈ A }ˣ),
                (fun x =>
                      { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                        inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                        val_inv :=
                          (_ :
                            { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                              1),
                        inv_val :=
                          (_ :
                            { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                              1) })
                    ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a) =
                  a) }
        b
[PROOFSTEP]
ext
[GOAL]
case a.a
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : { x // x ∈ unitGroup A }
⊢ ↑↑(Equiv.toFun
          {
            toFun := fun x =>
              { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                val_inv :=
                  (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
                inv_val :=
                  (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },
            invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },
            left_inv :=
              (_ :
                ∀ (a : { x // x ∈ unitGroup A }),
                  (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })
                      ((fun x =>
                          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                            inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                            val_inv :=
                              (_ :
                                { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *
                                    { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                                  1),
                            inv_val :=
                              (_ :
                                { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *
                                    { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                                  1) })
                        a) =
                    a),
            right_inv :=
              (_ :
                ∀ (a : { x // x ∈ A }ˣ),
                  (fun x =>
                        { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                          inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                          val_inv :=
                            (_ :
                              { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *
                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                                1),
                          inv_val :=
                            (_ :
                              { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *
                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                                1) })
                      ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) }) a) =
                    a) }
          (a * b)) =
    ↑↑(Equiv.toFun
            {
              toFun := fun x =>
                { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                  inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                  val_inv :=
                    (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
                  inv_val :=
                    (_ :
                      { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },
              invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },
              left_inv :=
                (_ :
                  ∀ (a : { x // x ∈ unitGroup A }),
                    (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })
                        ((fun x =>
                            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                              inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                              val_inv :=
                                (_ :
                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *
                                      { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                                    1),
                              inv_val :=
                                (_ :
                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *
                                      { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                                    1) })
                          a) =
                      a),
              right_inv :=
                (_ :
                  ∀ (a : { x // x ∈ A }ˣ),
                    (fun x =>
                          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                            inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                            val_inv :=
                              (_ :
                                { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *
                                    { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                                  1),
                            inv_val :=
                              (_ :
                                { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *
                                    { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                                  1) })
                        ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })
                          a) =
                      a) }
            a *
          Equiv.toFun
            {
              toFun := fun x =>
                { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                  inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                  val_inv :=
                    (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
                  inv_val :=
                    (_ :
                      { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },
              invFun := fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) },
              left_inv :=
                (_ :
                  ∀ (a : { x // x ∈ unitGroup A }),
                    (fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })
                        ((fun x =>
                            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                              inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                              val_inv :=
                                (_ :
                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *
                                      { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                                    1),
                              inv_val :=
                                (_ :
                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *
                                      { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                                    1) })
                          a) =
                      a),
              right_inv :=
                (_ :
                  ∀ (a : { x // x ∈ A }ˣ),
                    (fun x =>
                          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                            inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                            val_inv :=
                              (_ :
                                { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *
                                    { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                                  1),
                            inv_val :=
                              (_ :
                                { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *
                                    { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                                  1) })
                        ((fun x => { val := ↑(Units.map ↑(subtype A)) x, property := (_ : ↑(valuation A) ↑↑x = 1) })
                          a) =
                      a) }
            b)
[PROOFSTEP]
rfl
[GOAL]
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ unitGroup A ≤ unitGroup B ↔ A ≤ B
[PROOFSTEP]
constructor
[GOAL]
case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ unitGroup A ≤ unitGroup B → A ≤ B
[PROOFSTEP]
intro h x hx
[GOAL]
case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A ≤ unitGroup B
x : K
hx : x ∈ A
⊢ x ∈ B
[PROOFSTEP]
rw [← A.valuation_le_one_iff x, le_iff_lt_or_eq] at hx 
[GOAL]
case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A ≤ unitGroup B
x : K
hx : ↑(valuation A) x < 1 ∨ ↑(valuation A) x = 1
⊢ x ∈ B
[PROOFSTEP]
by_cases h_1 : x = 0
[GOAL]
case pos
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A ≤ unitGroup B
x : K
hx : ↑(valuation A) x < 1 ∨ ↑(valuation A) x = 1
h_1 : x = 0
⊢ x ∈ B
[PROOFSTEP]
simp only [h_1, zero_mem]
[GOAL]
case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A ≤ unitGroup B
x : K
hx : ↑(valuation A) x < 1 ∨ ↑(valuation A) x = 1
h_1 : ¬x = 0
⊢ x ∈ B
[PROOFSTEP]
by_cases h_2 : 1 + x = 0
[GOAL]
case pos
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A ≤ unitGroup B
x : K
hx : ↑(valuation A) x < 1 ∨ ↑(valuation A) x = 1
h_1 : ¬x = 0
h_2 : 1 + x = 0
⊢ x ∈ B
[PROOFSTEP]
simp only [← add_eq_zero_iff_neg_eq.1 h_2, neg_mem _ _ (one_mem _)]
[GOAL]
case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A ≤ unitGroup B
x : K
hx : ↑(valuation A) x < 1 ∨ ↑(valuation A) x = 1
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
⊢ x ∈ B
[PROOFSTEP]
cases' hx with hx hx
[GOAL]
case neg.inl
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A ≤ unitGroup B
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : ↑(valuation A) x < 1
⊢ x ∈ B
[PROOFSTEP]
have := h (show Units.mk0 _ h_2 ∈ A.unitGroup from A.valuation.map_one_add_of_lt hx)
[GOAL]
case neg.inl
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A ≤ unitGroup B
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : ↑(valuation A) x < 1
this : Units.mk0 (1 + x) h_2 ∈ unitGroup B
⊢ x ∈ B
[PROOFSTEP]
simpa using
  B.add_mem _ _ (show 1 + x ∈ B from SetLike.coe_mem (B.unitGroupMulEquiv ⟨_, this⟩ : B)) (B.neg_mem _ B.one_mem)
[GOAL]
case neg.inr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A ≤ unitGroup B
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : ↑(valuation A) x = 1
⊢ x ∈ B
[PROOFSTEP]
have := h (show Units.mk0 x h_1 ∈ A.unitGroup from hx)
[GOAL]
case neg.inr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A ≤ unitGroup B
x : K
h_1 : ¬x = 0
h_2 : ¬1 + x = 0
hx : ↑(valuation A) x = 1
this : Units.mk0 x h_1 ∈ unitGroup B
⊢ x ∈ B
[PROOFSTEP]
refine' SetLike.coe_mem (B.unitGroupMulEquiv ⟨_, this⟩ : B)
[GOAL]
case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ A ≤ B → unitGroup A ≤ unitGroup B
[PROOFSTEP]
rintro h x (hx : A.valuation x = 1)
[GOAL]
case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A ≤ B
x : Kˣ
hx : ↑(valuation A) ↑x = 1
⊢ x ∈ unitGroup B
[PROOFSTEP]
apply_fun A.mapOfLE B h at hx 
[GOAL]
case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A ≤ B
x : Kˣ
hx : ↑(mapOfLE A B h) (↑(valuation A) ↑x) = ↑(mapOfLE A B h) 1
⊢ x ∈ unitGroup B
[PROOFSTEP]
simpa using hx
[GOAL]
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : unitGroup A = unitGroup B
⊢ A = B
[PROOFSTEP]
simpa only [le_antisymm_iff, unitGroup_le_unitGroup] using h
[GOAL]
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ nonunits B ≤ nonunits A ↔ A ≤ B
[PROOFSTEP]
constructor
[GOAL]
case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ nonunits B ≤ nonunits A → A ≤ B
[PROOFSTEP]
intro h x hx
[GOAL]
case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : nonunits B ≤ nonunits A
x : K
hx : x ∈ A
⊢ x ∈ B
[PROOFSTEP]
by_cases h_1 : x = 0
[GOAL]
case pos
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : nonunits B ≤ nonunits A
x : K
hx : x ∈ A
h_1 : x = 0
⊢ x ∈ B
[PROOFSTEP]
simp only [h_1, zero_mem]
[GOAL]
case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : nonunits B ≤ nonunits A
x : K
hx : x ∈ A
h_1 : ¬x = 0
⊢ x ∈ B
[PROOFSTEP]
rw [← valuation_le_one_iff, ← not_lt, Valuation.one_lt_val_iff _ h_1] at hx ⊢
[GOAL]
case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : nonunits B ≤ nonunits A
x : K
hx : ¬↑(valuation A) x⁻¹ < 1
h_1 : ¬x = 0
⊢ ¬↑(valuation B) x⁻¹ < 1
[PROOFSTEP]
by_contra h_2
[GOAL]
case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : nonunits B ≤ nonunits A
x : K
hx : ¬↑(valuation A) x⁻¹ < 1
h_1 : ¬x = 0
h_2 : ↑(valuation B) x⁻¹ < 1
⊢ False
[PROOFSTEP]
exact hx (h h_2)
[GOAL]
case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ A ≤ B → nonunits B ≤ nonunits A
[PROOFSTEP]
intro h x hx
[GOAL]
case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A ≤ B
x : K
hx : x ∈ nonunits B
⊢ x ∈ nonunits A
[PROOFSTEP]
by_contra h_1
[GOAL]
case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A ≤ B
x : K
hx : x ∈ nonunits B
h_1 : ¬x ∈ nonunits A
⊢ False
[PROOFSTEP]
exact not_lt.2 (monotone_mapOfLE _ _ h (not_lt.1 h_1)) hx
[GOAL]
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : nonunits A = nonunits B
⊢ A = B
[PROOFSTEP]
simpa only [le_antisymm_iff, nonunits_le_nonunits] using h.symm
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ Subtype.val '' ↑(LocalRing.maximalIdeal { x // x ∈ A }) = ↑(nonunits A)
[PROOFSTEP]
ext a
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : K
⊢ a ∈ Subtype.val '' ↑(LocalRing.maximalIdeal { x // x ∈ A }) ↔ a ∈ ↑(nonunits A)
[PROOFSTEP]
simp only [Set.mem_image, SetLike.mem_coe, mem_nonunits_iff_exists_mem_maximalIdeal]
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : K
⊢ (∃ x, x ∈ LocalRing.maximalIdeal { x // x ∈ A } ∧ ↑x = a) ↔
    ∃ ha, { val := a, property := ha } ∈ LocalRing.maximalIdeal { x // x ∈ A }
[PROOFSTEP]
erw [Subtype.exists]
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : K
⊢ (∃ a_1 b,
      { val := a_1, property := b } ∈ LocalRing.maximalIdeal { x // x ∈ A } ∧ ↑{ val := a_1, property := b } = a) ↔
    ∃ ha, { val := a, property := ha } ∈ LocalRing.maximalIdeal { x // x ∈ A }
[PROOFSTEP]
simp_rw [exists_and_right, exists_eq_right]
  -- Porting note: added
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : K
⊢ (∃ x, { val := a, property := (_ : a ∈ ↑A) } ∈ LocalRing.maximalIdeal { x // x ∈ A }) ↔
    ∃ ha, { val := a, property := ha } ∈ LocalRing.maximalIdeal { x // x ∈ A }
[PROOFSTEP]
simp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ ∀ {a b : Kˣ},
    a ∈ {x | ↑(valuation A) (↑x - 1) < 1} →
      b ∈ {x | ↑(valuation A) (↑x - 1) < 1} → a * b ∈ {x | ↑(valuation A) (↑x - 1) < 1}
[PROOFSTEP]
intro a b ha hb
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : Kˣ
ha : a ∈ {x | ↑(valuation A) (↑x - 1) < 1}
hb : b ∈ {x | ↑(valuation A) (↑x - 1) < 1}
⊢ a * b ∈ {x | ↑(valuation A) (↑x - 1) < 1}
[PROOFSTEP]
rw [Set.mem_setOf] at ha hb 
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : Kˣ
ha : ↑(valuation A) (↑a - 1) < 1
hb : ↑(valuation A) (↑b - 1) < 1
⊢ a * b ∈ {x | ↑(valuation A) (↑x - 1) < 1}
[PROOFSTEP]
refine'
  lt_of_le_of_lt _
    (max_lt hb ha)
      -- Porting note: `sub_add_sub_cancel` needed some help
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : Kˣ
ha : ↑(valuation A) (↑a - 1) < 1
hb : ↑(valuation A) (↑b - 1) < 1
⊢ ↑(valuation A) (↑(a * b) - 1) ≤ max (↑(valuation A) (↑b - 1)) (↑(valuation A) (↑a - 1))
[PROOFSTEP]
rw [← one_mul (A.valuation (b - 1)), ← A.valuation.map_one_add_of_lt ha, add_sub_cancel'_right, ← Valuation.map_mul,
  mul_sub_one, ← sub_add_sub_cancel (↑(a * b) : K) _ 1]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : Kˣ
ha : ↑(valuation A) (↑a - 1) < 1
hb : ↑(valuation A) (↑b - 1) < 1
⊢ ↑(valuation A) (↑(a * b) - ?m.1681005 + (?m.1681005 - 1)) ≤
    max (↑(valuation A) (↑a * ↑b - ↑a)) (↑(valuation A) (↑a - 1))
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : Kˣ
ha : ↑(valuation A) (↑a - 1) < 1
hb : ↑(valuation A) (↑b - 1) < 1
⊢ K
[PROOFSTEP]
exact A.valuation.map_add _ _
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ 1 ∈
    { carrier := {x | ↑(valuation A) (↑x - 1) < 1},
        mul_mem' :=
          (_ :
            ∀ {a b : Kˣ},
              a ∈ {x | ↑(valuation A) (↑x - 1) < 1} →
                b ∈ {x | ↑(valuation A) (↑x - 1) < 1} → ↑(valuation A) (↑(a * b) - 1) < 1) }.carrier
[PROOFSTEP]
simp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ ∀ {x : Kˣ},
    x ∈
        {
              toSubsemigroup :=
                { carrier := {x | ↑(valuation A) (↑x - 1) < 1},
                  mul_mem' :=
                    (_ :
                      ∀ {a b : Kˣ},
                        a ∈ {x | ↑(valuation A) (↑x - 1) < 1} →
                          b ∈ {x | ↑(valuation A) (↑x - 1) < 1} → ↑(valuation A) (↑(a * b) - 1) < 1) },
              one_mem' := (_ : ↑(valuation A) (1 - 1) < 1) }.toSubsemigroup.carrier →
      x⁻¹ ∈
        {
              toSubsemigroup :=
                { carrier := {x | ↑(valuation A) (↑x - 1) < 1},
                  mul_mem' :=
                    (_ :
                      ∀ {a b : Kˣ},
                        a ∈ {x | ↑(valuation A) (↑x - 1) < 1} →
                          b ∈ {x | ↑(valuation A) (↑x - 1) < 1} → ↑(valuation A) (↑(a * b) - 1) < 1) },
              one_mem' := (_ : ↑(valuation A) (1 - 1) < 1) }.toSubsemigroup.carrier
[PROOFSTEP]
dsimp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ ∀ {x : Kˣ}, ↑(valuation A) (↑x - 1) < 1 → ↑(valuation A) (↑x⁻¹ - 1) < 1
[PROOFSTEP]
intro a ha
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : Kˣ
ha : ↑(valuation A) (↑a - 1) < 1
⊢ ↑(valuation A) (↑a⁻¹ - 1) < 1
[PROOFSTEP]
conv =>
  lhs
  rw [← mul_one (A.valuation _), ← A.valuation.map_one_add_of_lt ha]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : Kˣ
ha : ↑(valuation A) (↑a - 1) < 1
| ↑(valuation A) (↑a⁻¹ - 1) < 1
[PROOFSTEP]
  lhs
  rw [← mul_one (A.valuation _), ← A.valuation.map_one_add_of_lt ha]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : Kˣ
ha : ↑(valuation A) (↑a - 1) < 1
| ↑(valuation A) (↑a⁻¹ - 1) < 1
[PROOFSTEP]
  lhs
  rw [← mul_one (A.valuation _), ← A.valuation.map_one_add_of_lt ha]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : Kˣ
ha : ↑(valuation A) (↑a - 1) < 1
| ↑(valuation A) (↑a⁻¹ - 1) < 1
[PROOFSTEP]
lhs
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : Kˣ
ha : ↑(valuation A) (↑a - 1) < 1
| ↑(valuation A) (↑a⁻¹ - 1)
[PROOFSTEP]
rw [← mul_one (A.valuation _), ← A.valuation.map_one_add_of_lt ha]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : Kˣ
ha : ↑(valuation A) (↑a - 1) < 1
⊢ ↑(valuation A) (↑a⁻¹ - 1) * ↑(valuation A) (1 + (↑a - 1)) < 1
[PROOFSTEP]
rwa [add_sub_cancel'_right, ← Valuation.map_mul, sub_mul, Units.inv_mul, ← neg_sub, one_mul, Valuation.map_neg]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
a : Kˣ
h : a ∈ principalUnitGroup A
⊢ a ∈ unitGroup A
[PROOFSTEP]
simpa only [add_sub_cancel'_right] using A.valuation.map_one_add_of_lt h
[GOAL]
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ principalUnitGroup B ≤ principalUnitGroup A ↔ A ≤ B
[PROOFSTEP]
constructor
[GOAL]
case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ principalUnitGroup B ≤ principalUnitGroup A → A ≤ B
[PROOFSTEP]
intro h x hx
[GOAL]
case mp
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : principalUnitGroup B ≤ principalUnitGroup A
x : K
hx : x ∈ A
⊢ x ∈ B
[PROOFSTEP]
by_cases h_1 : x = 0
[GOAL]
case pos
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : principalUnitGroup B ≤ principalUnitGroup A
x : K
hx : x ∈ A
h_1 : x = 0
⊢ x ∈ B
[PROOFSTEP]
simp only [h_1, zero_mem]
[GOAL]
case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : principalUnitGroup B ≤ principalUnitGroup A
x : K
hx : x ∈ A
h_1 : ¬x = 0
⊢ x ∈ B
[PROOFSTEP]
by_cases h_2 : x⁻¹ + 1 = 0
[GOAL]
case pos
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : principalUnitGroup B ≤ principalUnitGroup A
x : K
hx : x ∈ A
h_1 : ¬x = 0
h_2 : x⁻¹ + 1 = 0
⊢ x ∈ B
[PROOFSTEP]
rw [add_eq_zero_iff_eq_neg, inv_eq_iff_eq_inv, inv_neg, inv_one] at h_2 
[GOAL]
case pos
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : principalUnitGroup B ≤ principalUnitGroup A
x : K
hx : x ∈ A
h_1 : ¬x = 0
h_2 : x = -1
⊢ x ∈ B
[PROOFSTEP]
simpa only [h_2] using B.neg_mem _ B.one_mem
[GOAL]
case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : principalUnitGroup B ≤ principalUnitGroup A
x : K
hx : x ∈ A
h_1 : ¬x = 0
h_2 : ¬x⁻¹ + 1 = 0
⊢ x ∈ B
[PROOFSTEP]
rw [← valuation_le_one_iff, ← not_lt, Valuation.one_lt_val_iff _ h_1, ← add_sub_cancel x⁻¹, ← Units.val_mk0 h_2, ←
  mem_principalUnitGroup_iff] at hx ⊢
[GOAL]
case neg
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : principalUnitGroup B ≤ principalUnitGroup A
x : K
hx✝¹ : ¬↑(valuation A) x⁻¹ < 1
hx✝ : ¬↑(valuation A) (x⁻¹ + 1 - 1) < 1
h_1 : ¬x = 0
h_2 : ¬x⁻¹ + 1 = 0
hx : ¬Units.mk0 (x⁻¹ + 1) h_2 ∈ principalUnitGroup A
⊢ ¬Units.mk0 (x⁻¹ + 1) h_2 ∈ principalUnitGroup B
[PROOFSTEP]
simpa only [hx] using @h (Units.mk0 (x⁻¹ + 1) h_2)
[GOAL]
case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
⊢ A ≤ B → principalUnitGroup B ≤ principalUnitGroup A
[PROOFSTEP]
intro h x hx
[GOAL]
case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A ≤ B
x : Kˣ
hx : x ∈ principalUnitGroup B
⊢ x ∈ principalUnitGroup A
[PROOFSTEP]
by_contra h_1
[GOAL]
case mpr
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : A ≤ B
x : Kˣ
hx : x ∈ principalUnitGroup B
h_1 : ¬x ∈ principalUnitGroup A
⊢ False
[PROOFSTEP]
exact not_lt.2 (monotone_mapOfLE _ _ h (not_lt.1 h_1)) hx
[GOAL]
K : Type u
inst✝ : Field K
A✝ A B : ValuationSubring K
h : principalUnitGroup A = principalUnitGroup B
⊢ A = B
[PROOFSTEP]
simpa [le_antisymm_iff, principalUnitGroup_le_principalUnitGroup] using h.symm
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ unitGroup A }
⊢ ↑x ∈ principalUnitGroup A ↔ ↑(unitGroupMulEquiv A) x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))
[PROOFSTEP]
rw [MonoidHom.mem_ker, Units.ext_iff]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ unitGroup A }
⊢ ↑x ∈ principalUnitGroup A ↔ ↑(↑(Units.map ↑(LocalRing.residue { x // x ∈ A })) (↑(unitGroupMulEquiv A) x)) = ↑1
[PROOFSTEP]
let π := Ideal.Quotient.mk (LocalRing.maximalIdeal A)
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ unitGroup A }
π : { x // x ∈ A } →+* { x // x ∈ A } ⧸ LocalRing.maximalIdeal { x // x ∈ A } :=
  Ideal.Quotient.mk (LocalRing.maximalIdeal { x // x ∈ A })
⊢ ↑x ∈ principalUnitGroup A ↔ ↑(↑(Units.map ↑(LocalRing.residue { x // x ∈ A })) (↑(unitGroupMulEquiv A) x)) = ↑1
[PROOFSTEP]
convert_to _ ↔ π _ = 1
[GOAL]
case convert_3
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ unitGroup A }
π : { x // x ∈ A } →+* { x // x ∈ A } ⧸ LocalRing.maximalIdeal { x // x ∈ A } :=
  Ideal.Quotient.mk (LocalRing.maximalIdeal { x // x ∈ A })
⊢ ↑x ∈ principalUnitGroup A ↔ ↑π ↑(↑(unitGroupMulEquiv A) x) = 1
[PROOFSTEP]
rw [← π.map_one, ← sub_eq_zero, ← π.map_sub, Ideal.Quotient.eq_zero_iff_mem, valuation_lt_one_iff]
[GOAL]
case convert_3
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ unitGroup A }
π : { x // x ∈ A } →+* { x // x ∈ A } ⧸ LocalRing.maximalIdeal { x // x ∈ A } :=
  Ideal.Quotient.mk (LocalRing.maximalIdeal { x // x ∈ A })
⊢ ↑x ∈ principalUnitGroup A ↔ ↑(valuation A) ↑(↑(↑(unitGroupMulEquiv A) x) - 1) < 1
[PROOFSTEP]
simp [mem_principalUnitGroup_iff]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }
⊢ ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A
[PROOFSTEP]
rw [A.coe_mem_principalUnitGroup_iff]
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }
⊢ ↑(unitGroupMulEquiv A) (↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈
    MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))
[PROOFSTEP]
simpa using SetLike.coe_mem x
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ principalUnitGroup A }
⊢ (fun x =>
        { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
          property := (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
      ((fun x =>
          { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
            property :=
              (_ :
                ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                  MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })
        x) =
    x
[PROOFSTEP]
simp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
x : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }
⊢ (fun x =>
        { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
          property :=
            (_ :
              ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })
      ((fun x =>
          { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
            property := (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
        x) =
    x
[PROOFSTEP]
simp
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
x y : { x // x ∈ principalUnitGroup A }
⊢ Equiv.toFun
      {
        toFun := fun x =>
          { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
            property :=
              (_ :
                ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                  MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) },
        invFun := fun x =>
          { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
            property := (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) },
        left_inv :=
          (_ :
            ∀ (x : { x // x ∈ principalUnitGroup A }),
              {
                  val :=
                    ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))
                        ↑((fun x =>
                              { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
                                property :=
                                  (_ :
                                    ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                                      MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })
                            x)),
                  property :=
                    (_ :
                      ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))
                            ↑((fun x =>
                                  { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
                                    property :=
                                      (_ :
                                        ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                                          MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })
                                x)) ∈
                        principalUnitGroup A) } =
                x),
        right_inv :=
          (_ :
            ∀ (x : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }),
              {
                  val :=
                    ↑(unitGroupMulEquiv A)
                      {
                        val :=
                          ↑((fun x =>
                                { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                  property :=
                                    (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                              x),
                        property :=
                          (_ :
                            ↑((fun x =>
                                    { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                      property :=
                                        (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                  x) ∈
                              unitGroup A) },
                  property :=
                    (_ :
                      ↑(unitGroupMulEquiv A)
                          {
                            val :=
                              ↑((fun x =>
                                    { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                      property :=
                                        (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                  x),
                            property :=
                              (_ :
                                ↑((fun x =>
                                        { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                          property :=
                                            (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                      x) ∈
                                  unitGroup A) } ∈
                        MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) } =
                x) }
      (x * y) =
    Equiv.toFun
        {
          toFun := fun x =>
            { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
              property :=
                (_ :
                  ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                    MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) },
          invFun := fun x =>
            { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
              property := (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) },
          left_inv :=
            (_ :
              ∀ (x : { x // x ∈ principalUnitGroup A }),
                {
                    val :=
                      ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))
                          ↑((fun x =>
                                { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
                                  property :=
                                    (_ :
                                      ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                                        MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })
                              x)),
                    property :=
                      (_ :
                        ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))
                              ↑((fun x =>
                                    { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
                                      property :=
                                        (_ :
                                          ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                                            MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })
                                  x)) ∈
                          principalUnitGroup A) } =
                  x),
          right_inv :=
            (_ :
              ∀ (x : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }),
                {
                    val :=
                      ↑(unitGroupMulEquiv A)
                        {
                          val :=
                            ↑((fun x =>
                                  { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                    property :=
                                      (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                x),
                          property :=
                            (_ :
                              ↑((fun x =>
                                      { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                        property :=
                                          (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                    x) ∈
                                unitGroup A) },
                    property :=
                      (_ :
                        ↑(unitGroupMulEquiv A)
                            {
                              val :=
                                ↑((fun x =>
                                      { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                        property :=
                                          (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                    x),
                              property :=
                                (_ :
                                  ↑((fun x =>
                                          { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                            property :=
                                              (_ :
                                                ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                        x) ∈
                                    unitGroup A) } ∈
                          MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) } =
                  x) }
        x *
      Equiv.toFun
        {
          toFun := fun x =>
            { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
              property :=
                (_ :
                  ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                    MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) },
          invFun := fun x =>
            { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
              property := (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) },
          left_inv :=
            (_ :
              ∀ (x : { x // x ∈ principalUnitGroup A }),
                {
                    val :=
                      ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))
                          ↑((fun x =>
                                { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
                                  property :=
                                    (_ :
                                      ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                                        MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })
                              x)),
                    property :=
                      (_ :
                        ↑(↑(MulEquiv.symm (unitGroupMulEquiv A))
                              ↑((fun x =>
                                    { val := ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) },
                                      property :=
                                        (_ :
                                          ↑(unitGroupMulEquiv A) { val := ↑x, property := (_ : ↑x ∈ unitGroup A) } ∈
                                            MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) })
                                  x)) ∈
                          principalUnitGroup A) } =
                  x),
          right_inv :=
            (_ :
              ∀ (x : { x // x ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A })) }),
                {
                    val :=
                      ↑(unitGroupMulEquiv A)
                        {
                          val :=
                            ↑((fun x =>
                                  { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                    property :=
                                      (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                x),
                          property :=
                            (_ :
                              ↑((fun x =>
                                      { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                        property :=
                                          (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                    x) ∈
                                unitGroup A) },
                    property :=
                      (_ :
                        ↑(unitGroupMulEquiv A)
                            {
                              val :=
                                ↑((fun x =>
                                      { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                        property :=
                                          (_ : ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                    x),
                              property :=
                                (_ :
                                  ↑((fun x =>
                                          { val := ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x),
                                            property :=
                                              (_ :
                                                ↑(↑(MulEquiv.symm (unitGroupMulEquiv A)) ↑x) ∈ principalUnitGroup A) })
                                        x) ∈
                                    unitGroup A) } ∈
                          MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))) } =
                  x) }
        y
[PROOFSTEP]
rfl
[GOAL]
K : Type u
inst✝ : Field K
A : ValuationSubring K
⊢ MonoidHom.ker (unitGroupToResidueFieldUnits A) =
    Subgroup.comap (Subgroup.subtype (unitGroup A)) (principalUnitGroup A)
[PROOFSTEP]
ext
  -- Porting note: simp fails but rw works
    -- See https://github.com/leanprover-community/mathlib4/issues/5026
    -- simp [Subgroup.mem_comap, Subgroup.coeSubtype, coe_mem_principalUnitGroup_iff]
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
x✝ : { x // x ∈ unitGroup A }
⊢ x✝ ∈ MonoidHom.ker (unitGroupToResidueFieldUnits A) ↔
    x✝ ∈ Subgroup.comap (Subgroup.subtype (unitGroup A)) (principalUnitGroup A)
[PROOFSTEP]
rw [Subgroup.mem_comap, Subgroup.coeSubtype, coe_mem_principalUnitGroup_iff]
[GOAL]
case h
K : Type u
inst✝ : Field K
A : ValuationSubring K
x✝ : { x // x ∈ unitGroup A }
⊢ x✝ ∈ MonoidHom.ker (unitGroupToResidueFieldUnits A) ↔
    ↑(unitGroupMulEquiv A) x✝ ∈ MonoidHom.ker (Units.map ↑(LocalRing.residue { x // x ∈ A }))
[PROOFSTEP]
rfl
  -- simp [Subgroup.mem_comap, Subgroup.coeSubtype, coe_mem_principalUnitGroup_iff]
[GOAL]
K : Type u
inst✝² : Field K
A : ValuationSubring K
G : Type u_1
inst✝¹ : Group G
inst✝ : MulSemiringAction G K
g : G
S : ValuationSubring K
src✝ : Subring K := g • S.toSubring
x : K
h : (g⁻¹ • x)⁻¹ ∈ S
⊢ g⁻¹ • x⁻¹ ∈ S.toSubring
[PROOFSTEP]
rwa [smul_inv'']
[GOAL]
K : Type u
inst✝² : Field K
A✝ : ValuationSubring K
L : Type u_1
J : Type u_2
inst✝¹ : Field L
inst✝ : Field J
A : ValuationSubring L
f : K →+* L
src✝ : Subring K := Subring.comap f A.toSubring
k : K
⊢ k ∈
      { toSubsemiring := src✝.toSubsemiring,
                neg_mem' :=
                  (_ :
                    ∀ {x : K},
                      x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier ∨
    k⁻¹ ∈
      { toSubsemiring := src✝.toSubsemiring,
                neg_mem' :=
                  (_ :
                    ∀ {x : K}, x ∈ src✝.carrier → -x ∈ src✝.carrier) }.toSubsemiring.toSubmonoid.toSubsemigroup.carrier
[PROOFSTEP]
simp [ValuationSubring.mem_or_inv_mem]
