[GOAL]
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
⊢ ∀ (a₁ a₂ b₁ b₂ : K),
    Setoid.r a₁ b₁ → Setoid.r a₂ b₂ → (fun a b => ∃ c, c • b = a) a₁ a₂ = (fun a b => ∃ c, c • b = a) b₁ b₂
[PROOFSTEP]
rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩
[GOAL]
case intro.intro
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ (fun a b => ∃ c, c • b = a) ((fun m => m • a) c) ((fun m => m • b) d) = (fun a b => ∃ c, c • b = a) a b
[PROOFSTEP]
ext
[GOAL]
case intro.intro.a
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ (fun a b => ∃ c, c • b = a) ((fun m => m • a) c) ((fun m => m • b) d) ↔ (fun a b => ∃ c, c • b = a) a b
[PROOFSTEP]
constructor
[GOAL]
case intro.intro.a.mp
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ (fun a b => ∃ c, c • b = a) ((fun m => m • a) c) ((fun m => m • b) d) → (fun a b => ∃ c, c • b = a) a b
[PROOFSTEP]
rintro ⟨e, he⟩
[GOAL]
case intro.intro.a.mp.intro
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • (fun m => m • b) d = (fun m => m • a) c
⊢ ∃ c, c • b = a
[PROOFSTEP]
use(c⁻¹ : Aˣ) * e * d
[GOAL]
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • (fun m => m • b) d = (fun m => m • a) c
⊢ (↑c⁻¹ * e * ↑d) • b = a
[PROOFSTEP]
apply_fun fun t => c⁻¹ • t at he 
[GOAL]
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : c⁻¹ • e • (fun m => m • b) d = c⁻¹ • (fun m => m • a) c
⊢ (↑c⁻¹ * e * ↑d) • b = a
[PROOFSTEP]
simpa [mul_smul] using he
[GOAL]
case intro.intro.a.mpr
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ (fun a b => ∃ c, c • b = a) a b → (fun a b => ∃ c, c • b = a) ((fun m => m • a) c) ((fun m => m • b) d)
[PROOFSTEP]
rintro ⟨e, he⟩
[GOAL]
case intro.intro.a.mpr.intro
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ ∃ c_1, c_1 • (fun m => m • b) d = (fun m => m • a) c
[PROOFSTEP]
dsimp
[GOAL]
case intro.intro.a.mpr.intro
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ ∃ c_1, c_1 • d • b = c • a
[PROOFSTEP]
use(d⁻¹ : Aˣ) * c * e
[GOAL]
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ (↑d⁻¹ * ↑c * e) • d • b = c • a
[PROOFSTEP]
erw [← he, ← mul_smul, ← mul_smul]
[GOAL]
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ (↑d⁻¹ * ↑c * e * ↑d) • b = (↑c * e) • b
[PROOFSTEP]
congr 1
[GOAL]
case h.e_a
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ ↑d⁻¹ * ↑c * e * ↑d = ↑c * e
[PROOFSTEP]
rw [mul_comm]
[GOAL]
case h.e_a
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
e : A
he : e • b = a
⊢ ↑d * (↑d⁻¹ * ↑c * e) = ↑c * e
[PROOFSTEP]
simp only [← mul_assoc, ← Units.val_mul, mul_inv_self, one_mul]
[GOAL]
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
⊢ ∀ (a₁ a₂ b₁ b₂ : K),
    Setoid.r a₁ b₁ →
      Setoid.r a₂ b₂ → (fun a b => Quotient.mk'' (a * b)) a₁ a₂ = (fun a b => Quotient.mk'' (a * b)) b₁ b₂
[PROOFSTEP]
rintro _ _ a b ⟨c, rfl⟩ ⟨d, rfl⟩
[GOAL]
case intro.intro
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ (fun a b => Quotient.mk'' (a * b)) ((fun m => m • a) c) ((fun m => m • b) d) = (fun a b => Quotient.mk'' (a * b)) a b
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case intro.intro.a
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ Setoid.r ((fun m => m • a) c * (fun m => m • b) d) (a * b)
[PROOFSTEP]
dsimp
[GOAL]
case intro.intro.a
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ Setoid.r (c • a * d • b) (a * b)
[PROOFSTEP]
use c * d
[GOAL]
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ (fun m => m • (a * b)) (c * d) = c • a * d • b
[PROOFSTEP]
simp only [mul_smul, Algebra.smul_def, Units.smul_def, RingHom.map_mul, Units.val_mul]
[GOAL]
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x y : ValueGroup A K
a b : K
c d : Aˣ
⊢ ↑(algebraMap A K) ↑c * (↑(algebraMap A K) ↑d * (a * b)) = ↑(algebraMap A K) ↑c * a * (↑(algebraMap A K) ↑d * b)
[PROOFSTEP]
ring
[GOAL]
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x : ValueGroup A K
⊢ ∀ (a b : K), Setoid.r a b → (fun a => Quotient.mk'' a⁻¹) a = (fun a => Quotient.mk'' a⁻¹) b
[PROOFSTEP]
rintro _ a ⟨b, rfl⟩
[GOAL]
case intro
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x : ValueGroup A K
a : K
b : Aˣ
⊢ (fun a => Quotient.mk'' a⁻¹) ((fun m => m • a) b) = (fun a => Quotient.mk'' a⁻¹) a
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case intro.a
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x : ValueGroup A K
a : K
b : Aˣ
⊢ Setoid.r ((fun m => m • a) b)⁻¹ a⁻¹
[PROOFSTEP]
use b⁻¹
[GOAL]
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x : ValueGroup A K
a : K
b : Aˣ
⊢ (fun m => m • a⁻¹) b⁻¹ = ((fun m => m • a) b)⁻¹
[PROOFSTEP]
dsimp
[GOAL]
case h
A : Type u
inst✝² : CommRing A
K : Type v
inst✝¹ : Field K
inst✝ : Algebra A K
x : ValueGroup A K
a : K
b : Aˣ
⊢ b⁻¹ • a⁻¹ = (b • a)⁻¹
[PROOFSTEP]
rw [Units.smul_def, Units.smul_def, Algebra.smul_def, Algebra.smul_def, mul_inv, map_units_inv]
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
⊢ a ≤ b ∨ b ≤ a
[PROOFSTEP]
rcases a with ⟨a⟩
[GOAL]
case mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b : ValueGroup A K
a : K
⊢ Quot.mk Setoid.r a ≤ b ∨ b ≤ Quot.mk Setoid.r a
[PROOFSTEP]
rcases b with ⟨b⟩
[GOAL]
case mk.mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
a b : K
⊢ Quot.mk Setoid.r a ≤ Quot.mk Setoid.r b ∨ Quot.mk Setoid.r b ≤ Quot.mk Setoid.r a
[PROOFSTEP]
obtain ⟨xa, ya, hya, rfl⟩ : ∃ a b : A, _ := IsFractionRing.div_surjective a
[GOAL]
case mk.mk.intro.intro.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b✝ : ValueGroup A K
b : K
xa ya : A
hya : ya ∈ nonZeroDivisors A
⊢ Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) ≤ Quot.mk Setoid.r b ∨
    Quot.mk Setoid.r b ≤ Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya)
[PROOFSTEP]
obtain ⟨xb, yb, hyb, rfl⟩ : ∃ a b : A, _ := IsFractionRing.div_surjective b
[GOAL]
case mk.mk.intro.intro.intro.intro.intro.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
⊢ Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) ≤
      Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ∨
    Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
      Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya)
[PROOFSTEP]
have : (algebraMap A K) ya ≠ 0 := IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors hya
[GOAL]
case mk.mk.intro.intro.intro.intro.intro.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this : ↑(algebraMap A K) ya ≠ 0
⊢ Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) ≤
      Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ∨
    Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
      Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya)
[PROOFSTEP]
have : (algebraMap A K) yb ≠ 0 := IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors hyb
[GOAL]
case mk.mk.intro.intro.intro.intro.intro.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
⊢ Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) ≤
      Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ∨
    Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
      Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya)
[PROOFSTEP]
obtain ⟨c, h | h⟩ := ValuationRing.cond (xa * yb) (xb * ya)
[GOAL]
case mk.mk.intro.intro.intro.intro.intro.intro.intro.inl
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) ≤
      Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ∨
    Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
      Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya)
[PROOFSTEP]
right
[GOAL]
case mk.mk.intro.intro.intro.intro.intro.intro.intro.inl.h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
    Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya)
[PROOFSTEP]
use c
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ c • (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) = ↑(algebraMap A K) xb / ↑(algebraMap A K) yb
[PROOFSTEP]
rw [Algebra.smul_def]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ ↑(algebraMap A K) c * (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) = ↑(algebraMap A K) xb / ↑(algebraMap A K) yb
[PROOFSTEP]
field_simp
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ ↑(algebraMap A K) c * ↑(algebraMap A K) xa * ↑(algebraMap A K) yb = ↑(algebraMap A K) xb * ↑(algebraMap A K) ya
[PROOFSTEP]
simp only [← RingHom.map_mul, ← h]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ ↑(algebraMap A K) (c * xa * yb) = ↑(algebraMap A K) (xa * yb * c)
[PROOFSTEP]
congr 1
[GOAL]
case h.h.e_6.h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ c * xa * yb = xa * yb * c
[PROOFSTEP]
ring
[GOAL]
case mk.mk.intro.intro.intro.intro.intro.intro.intro.inr
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) ≤
      Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ∨
    Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
      Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya)
[PROOFSTEP]
left
[GOAL]
case mk.mk.intro.intro.intro.intro.intro.intro.intro.inr.h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ Quot.mk Setoid.r (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) ≤
    Quot.mk Setoid.r (↑(algebraMap A K) xb / ↑(algebraMap A K) yb)
[PROOFSTEP]
use c
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ c • (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) = ↑(algebraMap A K) xa / ↑(algebraMap A K) ya
[PROOFSTEP]
rw [Algebra.smul_def]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ ↑(algebraMap A K) c * (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) = ↑(algebraMap A K) xa / ↑(algebraMap A K) ya
[PROOFSTEP]
field_simp
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ ↑(algebraMap A K) c * ↑(algebraMap A K) xb * ↑(algebraMap A K) ya = ↑(algebraMap A K) xa * ↑(algebraMap A K) yb
[PROOFSTEP]
simp only [← RingHom.map_mul, ← h]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ ↑(algebraMap A K) (c * xb * ya) = ↑(algebraMap A K) (xb * ya * c)
[PROOFSTEP]
congr 1
[GOAL]
case h.h.e_6.h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : ValueGroup A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ c * xb * ya = xb * ya * c
[PROOFSTEP]
ring
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a : ValueGroup A K), a ≤ a
[PROOFSTEP]
rintro ⟨⟩
[GOAL]
case mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝¹ : ValueGroup A K
a✝ : K
⊢ Quot.mk Setoid.r a✝ ≤ Quot.mk Setoid.r a✝
[PROOFSTEP]
use 1
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝¹ : ValueGroup A K
a✝ : K
⊢ 1 • a✝ = a✝
[PROOFSTEP]
rw [one_smul]
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a b c : ValueGroup A K), a ≤ b → b ≤ c → a ≤ c
[PROOFSTEP]
rintro ⟨a⟩ ⟨b⟩ ⟨c⟩ ⟨e, rfl⟩ ⟨f, rfl⟩
[GOAL]
case mk.mk.mk.intro.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ c✝ : ValueGroup A K
c : K
e f : A
⊢ Quot.mk Setoid.r (e • f • c) ≤ Quot.mk Setoid.r c
[PROOFSTEP]
use e * f
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ c✝ : ValueGroup A K
c : K
e f : A
⊢ (e * f) • c = e • f • c
[PROOFSTEP]
rw [mul_smul]
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a b : ValueGroup A K), a ≤ b → b ≤ a → a = b
[PROOFSTEP]
rintro ⟨a⟩ ⟨b⟩ ⟨e, rfl⟩ ⟨f, hf⟩
[GOAL]
case mk.mk.intro.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : f • e • b = b
⊢ Quot.mk Setoid.r (e • b) = Quot.mk Setoid.r b
[PROOFSTEP]
by_cases hb : b = 0
[GOAL]
case pos
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : f • e • b = b
hb : b = 0
⊢ Quot.mk Setoid.r (e • b) = Quot.mk Setoid.r b
[PROOFSTEP]
simp [hb]
[GOAL]
case neg
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : f • e • b = b
hb : ¬b = 0
⊢ Quot.mk Setoid.r (e • b) = Quot.mk Setoid.r b
[PROOFSTEP]
have : IsUnit e := by
  apply isUnit_of_dvd_one
  use f
  rw [mul_comm]
  rw [← mul_smul, Algebra.smul_def] at hf 
  nth_rw 2 [← one_mul b] at hf 
  rw [← (algebraMap A K).map_one] at hf 
  exact IsFractionRing.injective _ _ (mul_right_cancel₀ hb hf).symm
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : f • e • b = b
hb : ¬b = 0
⊢ IsUnit e
[PROOFSTEP]
apply isUnit_of_dvd_one
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : f • e • b = b
hb : ¬b = 0
⊢ e ∣ 1
[PROOFSTEP]
use f
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : f • e • b = b
hb : ¬b = 0
⊢ 1 = e * f
[PROOFSTEP]
rw [mul_comm]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : f • e • b = b
hb : ¬b = 0
⊢ 1 = f * e
[PROOFSTEP]
rw [← mul_smul, Algebra.smul_def] at hf 
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : ↑(algebraMap A K) (f * e) * b = b
hb : ¬b = 0
⊢ 1 = f * e
[PROOFSTEP]
nth_rw 2 [← one_mul b] at hf 
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : ↑(algebraMap A K) (f * e) * b = 1 * b
hb : ¬b = 0
⊢ 1 = f * e
[PROOFSTEP]
rw [← (algebraMap A K).map_one] at hf 
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : ↑(algebraMap A K) (f * e) * b = ↑(algebraMap A K) 1 * b
hb : ¬b = 0
⊢ 1 = f * e
[PROOFSTEP]
exact IsFractionRing.injective _ _ (mul_right_cancel₀ hb hf).symm
[GOAL]
case neg
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : f • e • b = b
hb : ¬b = 0
this : IsUnit e
⊢ Quot.mk Setoid.r (e • b) = Quot.mk Setoid.r b
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case neg.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
e f : A
hf : f • e • b = b
hb : ¬b = 0
this : IsUnit e
⊢ Setoid.r (e • b) b
[PROOFSTEP]
exact ⟨this.unit, rfl⟩
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ DecidableRel fun x x_1 => x ≤ x_1
[PROOFSTEP]
classical infer_instance
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ DecidableRel fun x x_1 => x ≤ x_1
[PROOFSTEP]
infer_instance
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a b c : ValueGroup A K), a * b * c = a * (b * c)
[PROOFSTEP]
rintro ⟨a⟩ ⟨b⟩ ⟨c⟩
[GOAL]
case mk.mk.mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
b✝ : ValueGroup A K
b : K
c✝ : ValueGroup A K
c : K
⊢ Quot.mk Setoid.r a * Quot.mk Setoid.r b * Quot.mk Setoid.r c =
    Quot.mk Setoid.r a * (Quot.mk Setoid.r b * Quot.mk Setoid.r c)
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case mk.mk.mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
b✝ : ValueGroup A K
b : K
c✝ : ValueGroup A K
c : K
⊢ Setoid.r (a * b * c) (a * (b * c))
[PROOFSTEP]
rw [mul_assoc]
[GOAL]
case mk.mk.mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
b✝ : ValueGroup A K
b : K
c✝ : ValueGroup A K
c : K
⊢ Setoid.r (a * (b * c)) (a * (b * c))
[PROOFSTEP]
apply Setoid.refl'
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a : ValueGroup A K), 1 * a = a
[PROOFSTEP]
rintro ⟨a⟩
[GOAL]
case mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ 1 * Quot.mk Setoid.r a = Quot.mk Setoid.r a
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ Setoid.r (1 * a) a
[PROOFSTEP]
rw [one_mul]
[GOAL]
case mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ Setoid.r a a
[PROOFSTEP]
apply Setoid.refl'
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a : ValueGroup A K), a * 1 = a
[PROOFSTEP]
rintro ⟨a⟩
[GOAL]
case mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ Quot.mk Setoid.r a * 1 = Quot.mk Setoid.r a
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ Setoid.r (a * 1) a
[PROOFSTEP]
rw [mul_one]
[GOAL]
case mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ Setoid.r a a
[PROOFSTEP]
apply Setoid.refl'
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a b : ValueGroup A K), a * b = b * a
[PROOFSTEP]
rintro ⟨a⟩ ⟨b⟩
[GOAL]
case mk.mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
b✝ : ValueGroup A K
b : K
⊢ Quot.mk Setoid.r a * Quot.mk Setoid.r b = Quot.mk Setoid.r b * Quot.mk Setoid.r a
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case mk.mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
b✝ : ValueGroup A K
b : K
⊢ Setoid.r (a * b) (b * a)
[PROOFSTEP]
rw [mul_comm]
[GOAL]
case mk.mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
b✝ : ValueGroup A K
b : K
⊢ Setoid.r (b * a) (b * a)
[PROOFSTEP]
apply Setoid.refl'
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a b : ValueGroup A K), a ≤ b → ∀ (c : ValueGroup A K), c * a ≤ c * b
[PROOFSTEP]
rintro ⟨a⟩ ⟨b⟩ ⟨c, rfl⟩ ⟨d⟩
[GOAL]
case mk.mk.intro.mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
c : A
c✝ : ValueGroup A K
d : K
⊢ Quot.mk Setoid.r d * Quot.mk Setoid.r (c • b) ≤ Quot.mk Setoid.r d * Quot.mk Setoid.r b
[PROOFSTEP]
use c
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
c : A
c✝ : ValueGroup A K
d : K
⊢ c • (d * b) = d * c • b
[PROOFSTEP]
simp only [Algebra.smul_def]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ b✝ : ValueGroup A K
b : K
c : A
c✝ : ValueGroup A K
d : K
⊢ ↑(algebraMap A K) c * (d * b) = d * (↑(algebraMap A K) c * b)
[PROOFSTEP]
ring
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a : ValueGroup A K), 0 * a = 0
[PROOFSTEP]
rintro ⟨a⟩
[GOAL]
case mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ 0 * Quot.mk Setoid.r a = 0
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ Setoid.r (0 * a) 0
[PROOFSTEP]
rw [zero_mul]
[GOAL]
case mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ Setoid.r 0 0
[PROOFSTEP]
apply Setoid.refl'
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a : ValueGroup A K), a * 0 = 0
[PROOFSTEP]
rintro ⟨a⟩
[GOAL]
case mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ Quot.mk Setoid.r a * 0 = 0
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ Setoid.r (a * 0) 0
[PROOFSTEP]
rw [mul_zero]
[GOAL]
case mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
⊢ Setoid.r 0 0
[PROOFSTEP]
apply Setoid.refl'
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ 0 • 1 = 0
[PROOFSTEP]
rw [zero_smul]
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∃ x y, x ≠ y
[PROOFSTEP]
use 0, 1
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ 0 ≠ 1
[PROOFSTEP]
intro c
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
c : 0 = 1
⊢ False
[PROOFSTEP]
obtain ⟨d, hd⟩ := Quotient.exact' c
[GOAL]
case h.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
c : 0 = 1
d : Aˣ
hd : (fun m => m • 1) d = 0
⊢ False
[PROOFSTEP]
apply_fun fun t => d⁻¹ • t at hd 
[GOAL]
case h.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
c : 0 = 1
d : Aˣ
hd : d⁻¹ • (fun m => m • 1) d = d⁻¹ • 0
⊢ False
[PROOFSTEP]
simp only [inv_smul_smul, smul_zero, one_ne_zero] at hd 
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ 0⁻¹ = 0
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ Setoid.r 0⁻¹ 0
[PROOFSTEP]
rw [inv_zero]
[GOAL]
case a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ Setoid.r 0 0
[PROOFSTEP]
apply Setoid.refl'
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (a : ValueGroup A K), a ≠ 0 → a * a⁻¹ = 1
[PROOFSTEP]
rintro ⟨a⟩ ha
[GOAL]
case mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
ha : Quot.mk Setoid.r a ≠ 0
⊢ Quot.mk Setoid.r a * (Quot.mk Setoid.r a)⁻¹ = 1
[PROOFSTEP]
apply Quotient.sound'
[GOAL]
case mk.a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
ha : Quot.mk Setoid.r a ≠ 0
⊢ Setoid.r (a * a⁻¹) 1
[PROOFSTEP]
use 1
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
ha : Quot.mk Setoid.r a ≠ 0
⊢ (fun m => m • 1) 1 = a * a⁻¹
[PROOFSTEP]
simp only [one_smul, ne_eq]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
ha : Quot.mk Setoid.r a ≠ 0
⊢ 1 = a * a⁻¹
[PROOFSTEP]
apply (mul_inv_cancel _).symm
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
ha : Quot.mk Setoid.r a ≠ 0
⊢ a ≠ 0
[PROOFSTEP]
contrapose ha
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
ha : ¬a ≠ 0
⊢ ¬Quot.mk Setoid.r a ≠ 0
[PROOFSTEP]
simp only [Classical.not_not] at ha ⊢
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
ha : a = 0
⊢ Quot.mk Setoid.r a = 0
[PROOFSTEP]
rw [ha]
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a✝ : ValueGroup A K
a : K
ha : a = 0
⊢ Quot.mk Setoid.r 0 = 0
[PROOFSTEP]
rfl
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ∀ (x y : K),
    ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (x + y) ≤
      max
        (ZeroHom.toFun
          (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
              map_one' :=
                (_ :
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
              map_mul' :=
                (_ :
                  ∀ (x x_1 : K),
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                        (x * x_1) =
                      ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                        (x * x_1)) })
          x)
        (ZeroHom.toFun
          (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
              map_one' :=
                (_ :
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
              map_mul' :=
                (_ :
                  ∀ (x x_1 : K),
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                        (x * x_1) =
                      ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                        (x * x_1)) })
          y)
[PROOFSTEP]
intro a b
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a b : K
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
          map_one' :=
            (_ :
              ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
          map_mul' :=
            (_ :
              ∀ (x x_1 : K),
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1) =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1)) })
      (a + b) ≤
    max
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        a)
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        b)
[PROOFSTEP]
obtain ⟨xa, ya, hya, rfl⟩ : ∃ a b : A, _ := IsFractionRing.div_surjective a
[GOAL]
case intro.intro.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
b : K
xa ya : A
hya : ya ∈ nonZeroDivisors A
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
          map_one' :=
            (_ :
              ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
          map_mul' :=
            (_ :
              ∀ (x x_1 : K),
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1) =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1)) })
      (↑(algebraMap A K) xa / ↑(algebraMap A K) ya + b) ≤
    max
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xa / ↑(algebraMap A K) ya))
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        b)
[PROOFSTEP]
obtain ⟨xb, yb, hyb, rfl⟩ : ∃ a b : A, _ := IsFractionRing.div_surjective b
[GOAL]
case intro.intro.intro.intro.intro.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
          map_one' :=
            (_ :
              ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
          map_mul' :=
            (_ :
              ∀ (x x_1 : K),
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1) =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1)) })
      (↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
    max
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xa / ↑(algebraMap A K) ya))
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xb / ↑(algebraMap A K) yb))
[PROOFSTEP]
have : (algebraMap A K) ya ≠ 0 := IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors hya
[GOAL]
case intro.intro.intro.intro.intro.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this : ↑(algebraMap A K) ya ≠ 0
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
          map_one' :=
            (_ :
              ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
          map_mul' :=
            (_ :
              ∀ (x x_1 : K),
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1) =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1)) })
      (↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
    max
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xa / ↑(algebraMap A K) ya))
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xb / ↑(algebraMap A K) yb))
[PROOFSTEP]
have : (algebraMap A K) yb ≠ 0 := IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors hyb
[GOAL]
case intro.intro.intro.intro.intro.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
          map_one' :=
            (_ :
              ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
          map_mul' :=
            (_ :
              ∀ (x x_1 : K),
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1) =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1)) })
      (↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
    max
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xa / ↑(algebraMap A K) ya))
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xb / ↑(algebraMap A K) yb))
[PROOFSTEP]
obtain ⟨c, h | h⟩ := ValuationRing.cond (xa * yb) (xb * ya)
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.inl
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
          map_one' :=
            (_ :
              ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
          map_mul' :=
            (_ :
              ∀ (x x_1 : K),
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1) =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1)) })
      (↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
    max
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xa / ↑(algebraMap A K) ya))
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xb / ↑(algebraMap A K) yb))
case intro.intro.intro.intro.intro.intro.intro.inr
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
          map_one' :=
            (_ :
              ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
          map_mul' :=
            (_ :
              ∀ (x x_1 : K),
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1) =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1)) })
      (↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
    max
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xa / ↑(algebraMap A K) ya))
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xb / ↑(algebraMap A K) yb))
[PROOFSTEP]
dsimp
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.inl
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ Quotient.mk'' (↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
    max (Quotient.mk'' (↑(algebraMap A K) xa / ↑(algebraMap A K) ya))
      (Quotient.mk'' (↑(algebraMap A K) xb / ↑(algebraMap A K) yb))
[PROOFSTEP]
apply le_trans _ (le_max_left _ _)
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ Quotient.mk'' (↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
    Quotient.mk'' (↑(algebraMap A K) xa / ↑(algebraMap A K) ya)
[PROOFSTEP]
use c + 1
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ (c + 1) • (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) =
    ↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb
[PROOFSTEP]
rw [Algebra.smul_def]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ ↑(algebraMap A K) (c + 1) * (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) =
    ↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb
[PROOFSTEP]
field_simp
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ (↑(algebraMap A K) c + 1) * ↑(algebraMap A K) xa * (↑(algebraMap A K) ya * ↑(algebraMap A K) yb) =
    (↑(algebraMap A K) xa * ↑(algebraMap A K) yb + ↑(algebraMap A K) xb * ↑(algebraMap A K) ya) * ↑(algebraMap A K) ya
[PROOFSTEP]
simp only [← RingHom.map_mul, ← RingHom.map_add, ← (algebraMap A K).map_one, ← h]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ ↑(algebraMap A K) ((c + 1) * xa * (ya * yb)) = ↑(algebraMap A K) ((xa * yb + xa * yb * c) * ya)
[PROOFSTEP]
congr 1
[GOAL]
case h.h.e_6.h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xa * yb * c = xb * ya
⊢ (c + 1) * xa * (ya * yb) = (xa * yb + xa * yb * c) * ya
[PROOFSTEP]
ring
[GOAL]
case intro.intro.intro.intro.intro.intro.intro.inr
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
          map_one' :=
            (_ :
              ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
          map_mul' :=
            (_ :
              ∀ (x x_1 : K),
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1) =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1)) })
      (↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
    max
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xa / ↑(algebraMap A K) ya))
      (ZeroHom.toFun
        (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
            map_one' :=
              (_ :
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
            map_mul' :=
              (_ :
                ∀ (x x_1 : K),
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1) =
                    ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                      (x * x_1)) })
        (↑(algebraMap A K) xb / ↑(algebraMap A K) yb))
[PROOFSTEP]
apply le_trans _ (le_max_right _ _)
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ ZeroHom.toFun
      (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
          map_one' :=
            (_ :
              ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
          map_mul' :=
            (_ :
              ∀ (x x_1 : K),
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1) =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1)) })
      (↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb) ≤
    ZeroHom.toFun
      (↑{ toZeroHom := { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) },
          map_one' :=
            (_ :
              ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1 =
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) } 1),
          map_mul' :=
            (_ :
              ∀ (x x_1 : K),
                ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1) =
                  ZeroHom.toFun { toFun := Quotient.mk'', map_zero' := (_ : Quotient.mk'' 0 = Quotient.mk'' 0) }
                    (x * x_1)) })
      (↑(algebraMap A K) xb / ↑(algebraMap A K) yb)
[PROOFSTEP]
use c + 1
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ (c + 1) • (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) =
    ↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb
[PROOFSTEP]
rw [Algebra.smul_def]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ ↑(algebraMap A K) (c + 1) * (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) =
    ↑(algebraMap A K) xa / ↑(algebraMap A K) ya + ↑(algebraMap A K) xb / ↑(algebraMap A K) yb
[PROOFSTEP]
field_simp
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ (↑(algebraMap A K) c + 1) * ↑(algebraMap A K) xb * (↑(algebraMap A K) ya * ↑(algebraMap A K) yb) =
    (↑(algebraMap A K) xa * ↑(algebraMap A K) yb + ↑(algebraMap A K) xb * ↑(algebraMap A K) ya) * ↑(algebraMap A K) yb
[PROOFSTEP]
simp only [← RingHom.map_mul, ← RingHom.map_add, ← (algebraMap A K).map_one, ← h]
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ ↑(algebraMap A K) ((c + 1) * xb * (ya * yb)) = ↑(algebraMap A K) ((xb * ya * c + xb * ya) * yb)
[PROOFSTEP]
congr 1
[GOAL]
case h.h.e_6.h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
xa ya : A
hya : ya ∈ nonZeroDivisors A
xb yb : A
hyb : yb ∈ nonZeroDivisors A
this✝ : ↑(algebraMap A K) ya ≠ 0
this : ↑(algebraMap A K) yb ≠ 0
c : A
h : xb * ya * c = xa * yb
⊢ (c + 1) * xb * (ya * yb) = (xb * ya * c + xb * ya) * yb
[PROOFSTEP]
ring
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
x : K
⊢ x ∈ Valuation.integer (valuation A K) ↔ ∃ a, ↑(algebraMap A K) a = x
[PROOFSTEP]
constructor
[GOAL]
case mp
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
x : K
⊢ x ∈ Valuation.integer (valuation A K) → ∃ a, ↑(algebraMap A K) a = x
[PROOFSTEP]
rintro ⟨c, rfl⟩
[GOAL]
case mp.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
c : A
⊢ ∃ a, ↑(algebraMap A K) a = c • 1
[PROOFSTEP]
use c
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
c : A
⊢ ↑(algebraMap A K) c = c • 1
[PROOFSTEP]
rw [Algebra.smul_def, mul_one]
[GOAL]
case mpr
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
x : K
⊢ (∃ a, ↑(algebraMap A K) a = x) → x ∈ Valuation.integer (valuation A K)
[PROOFSTEP]
rintro ⟨c, rfl⟩
[GOAL]
case mpr.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
c : A
⊢ ↑(algebraMap A K) c ∈ Valuation.integer (valuation A K)
[PROOFSTEP]
use c
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
c : A
⊢ c • 1 = ↑(algebraMap A K) c
[PROOFSTEP]
rw [Algebra.smul_def, mul_one]
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
x✝¹ x✝ : A
⊢ (fun a => { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
      (x✝¹ * x✝) =
    (fun a => { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
        x✝¹ *
      (fun a =>
          { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
        x✝
[PROOFSTEP]
ext1
[GOAL]
case a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
x✝¹ x✝ : A
⊢ ↑((fun a => { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
        (x✝¹ * x✝)) =
    ↑((fun a =>
            { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
          x✝¹ *
        (fun a =>
            { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
          x✝)
[PROOFSTEP]
exact (algebraMap A K).map_mul _ _
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ MulHom.toFun
      {
        toFun := fun a =>
          { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
        map_mul' :=
          (_ :
            ∀ (x x_1 : A),
              (fun a =>
                    { val := ↑(algebraMap A K) a,
                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                  (x * x_1) =
                (fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                    x *
                  (fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                    x_1) }
      0 =
    0
[PROOFSTEP]
ext1
[GOAL]
case a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ ↑(MulHom.toFun
        {
          toFun := fun a =>
            { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
          map_mul' :=
            (_ :
              ∀ (x x_1 : A),
                (fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                    (x * x_1) =
                  (fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                      x *
                    (fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                      x_1) }
        0) =
    ↑0
[PROOFSTEP]
exact (algebraMap A K).map_zero
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
x✝¹ x✝ : A
⊢ MulHom.toFun
      {
        toFun := fun a =>
          { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
        map_mul' :=
          (_ :
            ∀ (x x_1 : A),
              (fun a =>
                    { val := ↑(algebraMap A K) a,
                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                  (x * x_1) =
                (fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                    x *
                  (fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                    x_1) }
      (x✝¹ + x✝) =
    MulHom.toFun
        {
          toFun := fun a =>
            { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
          map_mul' :=
            (_ :
              ∀ (x x_1 : A),
                (fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                    (x * x_1) =
                  (fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                      x *
                    (fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                      x_1) }
        x✝¹ +
      MulHom.toFun
        {
          toFun := fun a =>
            { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
          map_mul' :=
            (_ :
              ∀ (x x_1 : A),
                (fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                    (x * x_1) =
                  (fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                      x *
                    (fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                      x_1) }
        x✝
[PROOFSTEP]
ext1
[GOAL]
case a
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
x✝¹ x✝ : A
⊢ ↑(MulHom.toFun
        {
          toFun := fun a =>
            { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
          map_mul' :=
            (_ :
              ∀ (x x_1 : A),
                (fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                    (x * x_1) =
                  (fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                      x *
                    (fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                      x_1) }
        (x✝¹ + x✝)) =
    ↑(MulHom.toFun
          {
            toFun := fun a =>
              { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
            map_mul' :=
              (_ :
                ∀ (x x_1 : A),
                  (fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                      (x * x_1) =
                    (fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                        x *
                      (fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                        x_1) }
          x✝¹ +
        MulHom.toFun
          {
            toFun := fun a =>
              { val := ↑(algebraMap A K) a, property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
            map_mul' :=
              (_ :
                ∀ (x x_1 : A),
                  (fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                      (x * x_1) =
                    (fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                        x *
                      (fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                        x_1) }
          x✝)
[PROOFSTEP]
exact (algebraMap A K).map_add _ _
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ Function.Bijective
    ↑(let_fun this :=
        {
          toMulHom :=
            {
              toFun := fun a =>
                { val := ↑(algebraMap A K) a,
                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
              map_mul' :=
                (_ :
                  ∀ (x x_1 : A),
                    (fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                        (x * x_1) =
                      (fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                          x *
                        (fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                          x_1) },
          map_zero' :=
            (_ :
              MulHom.toFun
                  {
                    toFun := fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                    map_mul' :=
                      (_ :
                        ∀ (x x_1 : A),
                          (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              (x * x_1) =
                            (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                x *
                              (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                x_1) }
                  0 =
                0),
          map_add' :=
            (_ :
              ∀ (x x_1 : A),
                MulHom.toFun
                    {
                      toFun := fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                      map_mul' :=
                        (_ :
                          ∀ (x x_2 : A),
                            (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                (x * x_2) =
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  x *
                                (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  x_2) }
                    (x + x_1) =
                  MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_2 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_2) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_2) }
                      x +
                    MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_2 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_2) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_2) }
                      x_1) };
      this)
[PROOFSTEP]
constructor
[GOAL]
case left
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ Function.Injective
    ↑(let_fun this :=
        {
          toMulHom :=
            {
              toFun := fun a =>
                { val := ↑(algebraMap A K) a,
                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
              map_mul' :=
                (_ :
                  ∀ (x x_1 : A),
                    (fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                        (x * x_1) =
                      (fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                          x *
                        (fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                          x_1) },
          map_zero' :=
            (_ :
              MulHom.toFun
                  {
                    toFun := fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                    map_mul' :=
                      (_ :
                        ∀ (x x_1 : A),
                          (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              (x * x_1) =
                            (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                x *
                              (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                x_1) }
                  0 =
                0),
          map_add' :=
            (_ :
              ∀ (x x_1 : A),
                MulHom.toFun
                    {
                      toFun := fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                      map_mul' :=
                        (_ :
                          ∀ (x x_2 : A),
                            (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                (x * x_2) =
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  x *
                                (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  x_2) }
                    (x + x_1) =
                  MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_2 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_2) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_2) }
                      x +
                    MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_2 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_2) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_2) }
                      x_1) };
      this)
[PROOFSTEP]
intro x y h
[GOAL]
case left
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
x y : A
h :
  ↑(let_fun this :=
          {
            toMulHom :=
              {
                toFun := fun a =>
                  { val := ↑(algebraMap A K) a,
                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                map_mul' :=
                  (_ :
                    ∀ (x x_1 : A),
                      (fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                          (x * x_1) =
                        (fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                            x *
                          (fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                            x_1) },
            map_zero' :=
              (_ :
                MulHom.toFun
                    {
                      toFun := fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                      map_mul' :=
                        (_ :
                          ∀ (x x_1 : A),
                            (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                (x * x_1) =
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  x *
                                (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  x_1) }
                    0 =
                  0),
            map_add' :=
              (_ :
                ∀ (x x_1 : A),
                  MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_2 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_2) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_2) }
                      (x + x_1) =
                    MulHom.toFun
                        {
                          toFun := fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_2 : A),
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    (x * x_2) =
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x *
                                    (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x_2) }
                        x +
                      MulHom.toFun
                        {
                          toFun := fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_2 : A),
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    (x * x_2) =
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x *
                                    (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x_2) }
                        x_1) };
        this)
      x =
    ↑(let_fun this :=
          {
            toMulHom :=
              {
                toFun := fun a =>
                  { val := ↑(algebraMap A K) a,
                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                map_mul' :=
                  (_ :
                    ∀ (x x_1 : A),
                      (fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                          (x * x_1) =
                        (fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                            x *
                          (fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                            x_1) },
            map_zero' :=
              (_ :
                MulHom.toFun
                    {
                      toFun := fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                      map_mul' :=
                        (_ :
                          ∀ (x x_1 : A),
                            (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                (x * x_1) =
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  x *
                                (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  x_1) }
                    0 =
                  0),
            map_add' :=
              (_ :
                ∀ (x x_1 : A),
                  MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_2 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_2) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_2) }
                      (x + x_1) =
                    MulHom.toFun
                        {
                          toFun := fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_2 : A),
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    (x * x_2) =
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x *
                                    (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x_2) }
                        x +
                      MulHom.toFun
                        {
                          toFun := fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_2 : A),
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    (x * x_2) =
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x *
                                    (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x_2) }
                        x_1) };
        this)
      y
⊢ x = y
[PROOFSTEP]
apply_fun (algebraMap (valuation A K).integer K) at h 
[GOAL]
case left
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
x y : A
h :
  ↑(algebraMap { x // x ∈ Valuation.integer (valuation A K) } K)
      (↑(let_fun this :=
            {
              toMulHom :=
                {
                  toFun := fun a =>
                    { val := ↑(algebraMap A K) a,
                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                  map_mul' :=
                    (_ :
                      ∀ (x x_1 : A),
                        (fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                            (x * x_1) =
                          (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              x *
                            (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              x_1) },
              map_zero' :=
                (_ :
                  MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_1 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_1) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_1) }
                      0 =
                    0),
              map_add' :=
                (_ :
                  ∀ (x x_1 : A),
                    MulHom.toFun
                        {
                          toFun := fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_2 : A),
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    (x * x_2) =
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x *
                                    (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x_2) }
                        (x + x_1) =
                      MulHom.toFun
                          {
                            toFun := fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                            map_mul' :=
                              (_ :
                                ∀ (x x_2 : A),
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      (x * x_2) =
                                    (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x *
                                      (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x_2) }
                          x +
                        MulHom.toFun
                          {
                            toFun := fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                            map_mul' :=
                              (_ :
                                ∀ (x x_2 : A),
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      (x * x_2) =
                                    (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x *
                                      (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x_2) }
                          x_1) };
          this)
        x) =
    ↑(algebraMap { x // x ∈ Valuation.integer (valuation A K) } K)
      (↑(let_fun this :=
            {
              toMulHom :=
                {
                  toFun := fun a =>
                    { val := ↑(algebraMap A K) a,
                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                  map_mul' :=
                    (_ :
                      ∀ (x x_1 : A),
                        (fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                            (x * x_1) =
                          (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              x *
                            (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              x_1) },
              map_zero' :=
                (_ :
                  MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_1 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_1) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_1) }
                      0 =
                    0),
              map_add' :=
                (_ :
                  ∀ (x x_1 : A),
                    MulHom.toFun
                        {
                          toFun := fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_2 : A),
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    (x * x_2) =
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x *
                                    (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x_2) }
                        (x + x_1) =
                      MulHom.toFun
                          {
                            toFun := fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                            map_mul' :=
                              (_ :
                                ∀ (x x_2 : A),
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      (x * x_2) =
                                    (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x *
                                      (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x_2) }
                          x +
                        MulHom.toFun
                          {
                            toFun := fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                            map_mul' :=
                              (_ :
                                ∀ (x x_2 : A),
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      (x * x_2) =
                                    (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x *
                                      (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x_2) }
                          x_1) };
          this)
        y)
⊢ x = y
[PROOFSTEP]
exact IsFractionRing.injective _ _ h
[GOAL]
case right
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ Function.Surjective
    ↑(let_fun this :=
        {
          toMulHom :=
            {
              toFun := fun a =>
                { val := ↑(algebraMap A K) a,
                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
              map_mul' :=
                (_ :
                  ∀ (x x_1 : A),
                    (fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                        (x * x_1) =
                      (fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                          x *
                        (fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                          x_1) },
          map_zero' :=
            (_ :
              MulHom.toFun
                  {
                    toFun := fun a =>
                      { val := ↑(algebraMap A K) a,
                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                    map_mul' :=
                      (_ :
                        ∀ (x x_1 : A),
                          (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              (x * x_1) =
                            (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                x *
                              (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                x_1) }
                  0 =
                0),
          map_add' :=
            (_ :
              ∀ (x x_1 : A),
                MulHom.toFun
                    {
                      toFun := fun a =>
                        { val := ↑(algebraMap A K) a,
                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                      map_mul' :=
                        (_ :
                          ∀ (x x_2 : A),
                            (fun a =>
                                  { val := ↑(algebraMap A K) a,
                                    property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                (x * x_2) =
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  x *
                                (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  x_2) }
                    (x + x_1) =
                  MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_2 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_2) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_2) }
                      x +
                    MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_2 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_2) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_2) }
                      x_1) };
      this)
[PROOFSTEP]
rintro ⟨-, ha⟩
[GOAL]
case right.mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
val✝ : K
ha : val✝ ∈ Valuation.integer (valuation A K)
⊢ ∃ a,
    ↑(let_fun this :=
            {
              toMulHom :=
                {
                  toFun := fun a =>
                    { val := ↑(algebraMap A K) a,
                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                  map_mul' :=
                    (_ :
                      ∀ (x x_1 : A),
                        (fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                            (x * x_1) =
                          (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              x *
                            (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              x_1) },
              map_zero' :=
                (_ :
                  MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_1 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_1) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_1) }
                      0 =
                    0),
              map_add' :=
                (_ :
                  ∀ (x x_1 : A),
                    MulHom.toFun
                        {
                          toFun := fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_2 : A),
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    (x * x_2) =
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x *
                                    (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x_2) }
                        (x + x_1) =
                      MulHom.toFun
                          {
                            toFun := fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                            map_mul' :=
                              (_ :
                                ∀ (x x_2 : A),
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      (x * x_2) =
                                    (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x *
                                      (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x_2) }
                          x +
                        MulHom.toFun
                          {
                            toFun := fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                            map_mul' :=
                              (_ :
                                ∀ (x x_2 : A),
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      (x * x_2) =
                                    (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x *
                                      (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x_2) }
                          x_1) };
          this)
        a =
      { val := val✝, property := ha }
[PROOFSTEP]
rw [mem_integer_iff] at ha 
[GOAL]
case right.mk
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
val✝ : K
ha✝ : val✝ ∈ Valuation.integer (valuation A K)
ha : ∃ a, ↑(algebraMap A K) a = val✝
⊢ ∃ a,
    ↑(let_fun this :=
            {
              toMulHom :=
                {
                  toFun := fun a =>
                    { val := ↑(algebraMap A K) a,
                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                  map_mul' :=
                    (_ :
                      ∀ (x x_1 : A),
                        (fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                            (x * x_1) =
                          (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              x *
                            (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              x_1) },
              map_zero' :=
                (_ :
                  MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_1 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_1) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_1) }
                      0 =
                    0),
              map_add' :=
                (_ :
                  ∀ (x x_1 : A),
                    MulHom.toFun
                        {
                          toFun := fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_2 : A),
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    (x * x_2) =
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x *
                                    (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x_2) }
                        (x + x_1) =
                      MulHom.toFun
                          {
                            toFun := fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                            map_mul' :=
                              (_ :
                                ∀ (x x_2 : A),
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      (x * x_2) =
                                    (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x *
                                      (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x_2) }
                          x +
                        MulHom.toFun
                          {
                            toFun := fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                            map_mul' :=
                              (_ :
                                ∀ (x x_2 : A),
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      (x * x_2) =
                                    (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x *
                                      (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x_2) }
                          x_1) };
          this)
        a =
      { val := val✝, property := ha✝ }
[PROOFSTEP]
obtain ⟨a, rfl⟩ := ha
[GOAL]
case right.mk.intro
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
a : A
ha : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)
⊢ ∃ a_1,
    ↑(let_fun this :=
            {
              toMulHom :=
                {
                  toFun := fun a =>
                    { val := ↑(algebraMap A K) a,
                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                  map_mul' :=
                    (_ :
                      ∀ (x x_1 : A),
                        (fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                            (x * x_1) =
                          (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              x *
                            (fun a =>
                                { val := ↑(algebraMap A K) a,
                                  property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                              x_1) },
              map_zero' :=
                (_ :
                  MulHom.toFun
                      {
                        toFun := fun a =>
                          { val := ↑(algebraMap A K) a,
                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                        map_mul' :=
                          (_ :
                            ∀ (x x_1 : A),
                              (fun a =>
                                    { val := ↑(algebraMap A K) a,
                                      property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                  (x * x_1) =
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x *
                                  (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    x_1) }
                      0 =
                    0),
              map_add' :=
                (_ :
                  ∀ (x x_1 : A),
                    MulHom.toFun
                        {
                          toFun := fun a =>
                            { val := ↑(algebraMap A K) a,
                              property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                          map_mul' :=
                            (_ :
                              ∀ (x x_2 : A),
                                (fun a =>
                                      { val := ↑(algebraMap A K) a,
                                        property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                    (x * x_2) =
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x *
                                    (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      x_2) }
                        (x + x_1) =
                      MulHom.toFun
                          {
                            toFun := fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                            map_mul' :=
                              (_ :
                                ∀ (x x_2 : A),
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      (x * x_2) =
                                    (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x *
                                      (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x_2) }
                          x +
                        MulHom.toFun
                          {
                            toFun := fun a =>
                              { val := ↑(algebraMap A K) a,
                                property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) },
                            map_mul' :=
                              (_ :
                                ∀ (x x_2 : A),
                                  (fun a =>
                                        { val := ↑(algebraMap A K) a,
                                          property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                      (x * x_2) =
                                    (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x *
                                      (fun a =>
                                          { val := ↑(algebraMap A K) a,
                                            property := (_ : ↑(algebraMap A K) a ∈ Valuation.integer (valuation A K)) })
                                        x_2) }
                          x_1) };
          this)
        a_1 =
      { val := ↑(algebraMap A K) a, property := ha }
[PROOFSTEP]
exact ⟨a, rfl⟩
[GOAL]
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
⊢ Valuation.integer (valuation A K) = RingHom.range (algebraMap A K)
[PROOFSTEP]
ext
[GOAL]
case h
A : Type u
inst✝⁵ : CommRing A
K : Type v
inst✝⁴ : Field K
inst✝³ : Algebra A K
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : IsFractionRing A K
x✝ : K
⊢ x✝ ∈ Valuation.integer (valuation A K) ↔ x✝ ∈ RingHom.range (algebraMap A K)
[PROOFSTEP]
exact mem_integer_iff _ _ _
[GOAL]
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : ValuationRing A
⊢ ∀ (a : A), IsUnit a ∨ IsUnit (1 - a)
[PROOFSTEP]
intro a
[GOAL]
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : ValuationRing A
a : A
⊢ IsUnit a ∨ IsUnit (1 - a)
[PROOFSTEP]
obtain ⟨c, h | h⟩ := ValuationRing.cond a (1 - a)
[GOAL]
case intro.inl
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : ValuationRing A
a c : A
h : a * c = 1 - a
⊢ IsUnit a ∨ IsUnit (1 - a)
[PROOFSTEP]
left
[GOAL]
case intro.inl.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : ValuationRing A
a c : A
h : a * c = 1 - a
⊢ IsUnit a
[PROOFSTEP]
apply isUnit_of_mul_eq_one _ (c + 1)
[GOAL]
case intro.inl.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : ValuationRing A
a c : A
h : a * c = 1 - a
⊢ a * (c + 1) = 1
[PROOFSTEP]
simp [mul_add, h]
[GOAL]
case intro.inr
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : ValuationRing A
a c : A
h : (1 - a) * c = a
⊢ IsUnit a ∨ IsUnit (1 - a)
[PROOFSTEP]
right
[GOAL]
case intro.inr.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : ValuationRing A
a c : A
h : (1 - a) * c = a
⊢ IsUnit (1 - a)
[PROOFSTEP]
apply isUnit_of_mul_eq_one _ (c + 1)
[GOAL]
case intro.inr.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : ValuationRing A
a c : A
h : (1 - a) * c = a
⊢ (1 - a) * (c + 1) = 1
[PROOFSTEP]
simp [mul_add, h]
[GOAL]
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
⊢ ∀ (a b : Ideal A), a ≤ b ∨ b ≤ a
[PROOFSTEP]
intro α β
[GOAL]
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
⊢ α ≤ β ∨ β ≤ α
[PROOFSTEP]
by_cases h : α ≤ β
[GOAL]
case pos
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
h : α ≤ β
⊢ α ≤ β ∨ β ≤ α
[PROOFSTEP]
exact Or.inl h
[GOAL]
case neg
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
h : ¬α ≤ β
⊢ α ≤ β ∨ β ≤ α
[PROOFSTEP]
erw [not_forall] at h 
[GOAL]
case neg
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
h : ∃ x, ¬(x ∈ α → x ∈ β)
⊢ α ≤ β ∨ β ≤ α
[PROOFSTEP]
push_neg at h 
[GOAL]
case neg
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
h : ∃ x, x ∈ α ∧ ¬x ∈ β
⊢ α ≤ β ∨ β ≤ α
[PROOFSTEP]
obtain ⟨a, h₁, h₂⟩ := h
[GOAL]
case neg.intro.intro
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
a : A
h₁ : a ∈ α
h₂ : ¬a ∈ β
⊢ α ≤ β ∨ β ≤ α
[PROOFSTEP]
right
[GOAL]
case neg.intro.intro.h
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
a : A
h₁ : a ∈ α
h₂ : ¬a ∈ β
⊢ β ≤ α
[PROOFSTEP]
intro b hb
[GOAL]
case neg.intro.intro.h
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
a : A
h₁ : a ∈ α
h₂ : ¬a ∈ β
b : A
hb : b ∈ β
⊢ b ∈ α
[PROOFSTEP]
obtain ⟨c, h | h⟩ := ValuationRing.cond a b
[GOAL]
case neg.intro.intro.h.intro.inl
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
a : A
h₁ : a ∈ α
h₂ : ¬a ∈ β
b : A
hb : b ∈ β
c : A
h : a * c = b
⊢ b ∈ α
[PROOFSTEP]
rw [← h]
[GOAL]
case neg.intro.intro.h.intro.inl
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
a : A
h₁ : a ∈ α
h₂ : ¬a ∈ β
b : A
hb : b ∈ β
c : A
h : a * c = b
⊢ a * c ∈ α
[PROOFSTEP]
exact Ideal.mul_mem_right _ _ h₁
[GOAL]
case neg.intro.intro.h.intro.inr
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
a : A
h₁ : a ∈ α
h₂ : ¬a ∈ β
b : A
hb : b ∈ β
c : A
h : b * c = a
⊢ b ∈ α
[PROOFSTEP]
exfalso
[GOAL]
case neg.intro.intro.h.intro.inr.h
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
a : A
h₁ : a ∈ α
h₂ : ¬a ∈ β
b : A
hb : b ∈ β
c : A
h : b * c = a
⊢ False
[PROOFSTEP]
apply h₂
[GOAL]
case neg.intro.intro.h.intro.inr.h
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
a : A
h₁ : a ∈ α
h₂ : ¬a ∈ β
b : A
hb : b ∈ β
c : A
h : b * c = a
⊢ a ∈ β
[PROOFSTEP]
rw [← h]
[GOAL]
case neg.intro.intro.h.intro.inr.h
A : Type u
inst✝³ : CommRing A
inst✝² : IsDomain A
inst✝¹ : ValuationRing A
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
src✝ : CompleteLattice (Ideal A) := inferInstance
α β : Ideal A
a : A
h₁ : a ∈ α
h₂ : ¬a ∈ β
b : A
hb : b ∈ β
c : A
h : b * c = a
⊢ b * c ∈ β
[PROOFSTEP]
apply Ideal.mul_mem_right _ _ hb
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ ValuationRing R ↔ IsTotal R fun x x_1 => x ∣ x_1
[PROOFSTEP]
classical
refine ⟨fun H => ⟨fun a b => ?_⟩, fun H => ⟨fun a b => ?_⟩⟩
· obtain ⟨c, rfl | rfl⟩ := ValuationRing.cond a b <;> simp
· obtain ⟨c, rfl⟩ | ⟨c, rfl⟩ := @IsTotal.total _ _ H a b <;> use c <;> simp
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ ValuationRing R ↔ IsTotal R fun x x_1 => x ∣ x_1
[PROOFSTEP]
refine ⟨fun H => ⟨fun a b => ?_⟩, fun H => ⟨fun a b => ?_⟩⟩
[GOAL]
case refine_1
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ValuationRing R
a b : R
⊢ a ∣ b ∨ b ∣ a
[PROOFSTEP]
obtain ⟨c, rfl | rfl⟩ := ValuationRing.cond a b
[GOAL]
case refine_1.intro.inl
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ValuationRing R
a c : R
⊢ a ∣ a * c ∨ a * c ∣ a
[PROOFSTEP]
simp
[GOAL]
case refine_1.intro.inr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ValuationRing R
b c : R
⊢ b * c ∣ b ∨ b ∣ b * c
[PROOFSTEP]
simp
[GOAL]
case refine_2
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : IsTotal R fun x x_1 => x ∣ x_1
a b : R
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
obtain ⟨c, rfl⟩ | ⟨c, rfl⟩ := @IsTotal.total _ _ H a b
[GOAL]
case refine_2.inl.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : IsTotal R fun x x_1 => x ∣ x_1
a c : R
⊢ ∃ c_1, a * c_1 = a * c ∨ a * c * c_1 = a
[PROOFSTEP]
use c
[GOAL]
case refine_2.inr.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : IsTotal R fun x x_1 => x ∣ x_1
b c : R
⊢ ∃ c_1, b * c * c_1 = b ∨ b * c_1 = b * c
[PROOFSTEP]
use c
[GOAL]
case h
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : IsTotal R fun x x_1 => x ∣ x_1
a c : R
⊢ a * c = a * c ∨ a * c * c = a
[PROOFSTEP]
simp
[GOAL]
case h
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : IsTotal R fun x x_1 => x ∣ x_1
b c : R
⊢ b * c * c = b ∨ b * c = b * c
[PROOFSTEP]
simp
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ ValuationRing R ↔ IsTotal (Ideal R) fun x x_1 => x ≤ x_1
[PROOFSTEP]
classical
refine' ⟨fun _ => ⟨le_total⟩, fun H => iff_dvd_total.mpr ⟨fun a b => _⟩⟩
have := @IsTotal.total _ _ H (Ideal.span { a }) (Ideal.span { b })
simp_rw [Ideal.span_singleton_le_span_singleton] at this 
exact this.symm
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ ValuationRing R ↔ IsTotal (Ideal R) fun x x_1 => x ≤ x_1
[PROOFSTEP]
refine' ⟨fun _ => ⟨le_total⟩, fun H => iff_dvd_total.mpr ⟨fun a b => _⟩⟩
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : IsTotal (Ideal R) fun x x_1 => x ≤ x_1
a b : R
⊢ a ∣ b ∨ b ∣ a
[PROOFSTEP]
have := @IsTotal.total _ _ H (Ideal.span { a }) (Ideal.span { b })
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : IsTotal (Ideal R) fun x x_1 => x ≤ x_1
a b : R
this : Ideal.span {a} ≤ Ideal.span {b} ∨ Ideal.span {b} ≤ Ideal.span {a}
⊢ a ∣ b ∨ b ∣ a
[PROOFSTEP]
simp_rw [Ideal.span_singleton_le_span_singleton] at this 
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : IsTotal (Ideal R) fun x x_1 => x ≤ x_1
a b : R
this : b ∣ a ∨ a ∣ b
⊢ a ∣ b ∨ b ∣ a
[PROOFSTEP]
exact this.symm
[GOAL]
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
p q : R
hp : Irreducible p
hq : Irreducible q
⊢ Associated p q
[PROOFSTEP]
have := dvd_total p q
[GOAL]
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
p q : R
hp : Irreducible p
hq : Irreducible q
this : p ∣ q ∨ q ∣ p
⊢ Associated p q
[PROOFSTEP]
rw [Irreducible.dvd_comm hp hq, or_self_iff] at this 
[GOAL]
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
p q : R
hp : Irreducible p
hq : Irreducible q
this : q ∣ p
⊢ Associated p q
[PROOFSTEP]
exact associated_of_dvd_dvd (Irreducible.dvd_symm hq hp this) this
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ ValuationRing R ↔ ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
[PROOFSTEP]
constructor
[GOAL]
case mp
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ ValuationRing R → ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
[PROOFSTEP]
intro H x
[GOAL]
case mp
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ValuationRing R
x : K
⊢ IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
[PROOFSTEP]
obtain ⟨x : R, y, hy, rfl⟩ := IsFractionRing.div_surjective (A := R) x
[GOAL]
case mp.intro.intro.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ValuationRing R
x y : R
hy : y ∈ nonZeroDivisors R
⊢ IsLocalization.IsInteger R (↑(algebraMap R K) x / ↑(algebraMap R K) y) ∨
    IsLocalization.IsInteger R (↑(algebraMap R K) x / ↑(algebraMap R K) y)⁻¹
[PROOFSTEP]
have := (map_ne_zero_iff _ (IsFractionRing.injective R K)).mpr (nonZeroDivisors.ne_zero hy)
[GOAL]
case mp.intro.intro.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ValuationRing R
x y : R
hy : y ∈ nonZeroDivisors R
this : ↑(algebraMap R K) y ≠ 0
⊢ IsLocalization.IsInteger R (↑(algebraMap R K) x / ↑(algebraMap R K) y) ∨
    IsLocalization.IsInteger R (↑(algebraMap R K) x / ↑(algebraMap R K) y)⁻¹
[PROOFSTEP]
obtain ⟨s, rfl | rfl⟩ := ValuationRing.cond x y
[GOAL]
case mp.intro.intro.intro.intro.inl
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ValuationRing R
x s : R
hy : x * s ∈ nonZeroDivisors R
this : ↑(algebraMap R K) (x * s) ≠ 0
⊢ IsLocalization.IsInteger R (↑(algebraMap R K) x / ↑(algebraMap R K) (x * s)) ∨
    IsLocalization.IsInteger R (↑(algebraMap R K) x / ↑(algebraMap R K) (x * s))⁻¹
[PROOFSTEP]
exact Or.inr ⟨s, eq_inv_of_mul_eq_one_left <| by rwa [mul_div, div_eq_one_iff_eq, map_mul, mul_comm]⟩
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ValuationRing R
x s : R
hy : x * s ∈ nonZeroDivisors R
this : ↑(algebraMap R K) (x * s) ≠ 0
⊢ ↑(algebraMap R K) s * (↑(algebraMap R K) x / ↑(algebraMap R K) (x * s)) = 1
[PROOFSTEP]
rwa [mul_div, div_eq_one_iff_eq, map_mul, mul_comm]
[GOAL]
case mp.intro.intro.intro.intro.inr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ValuationRing R
y : R
hy : y ∈ nonZeroDivisors R
this : ↑(algebraMap R K) y ≠ 0
s : R
⊢ IsLocalization.IsInteger R (↑(algebraMap R K) (y * s) / ↑(algebraMap R K) y) ∨
    IsLocalization.IsInteger R (↑(algebraMap R K) (y * s) / ↑(algebraMap R K) y)⁻¹
[PROOFSTEP]
exact Or.inl ⟨s, by rwa [eq_div_iff, map_mul, mul_comm]⟩
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ValuationRing R
y : R
hy : y ∈ nonZeroDivisors R
this : ↑(algebraMap R K) y ≠ 0
s : R
⊢ ↑(algebraMap R K) s = ↑(algebraMap R K) (y * s) / ↑(algebraMap R K) y
[PROOFSTEP]
rwa [eq_div_iff, map_mul, mul_comm]
[GOAL]
case mpr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ (∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹) → ValuationRing R
[PROOFSTEP]
intro H
[GOAL]
case mpr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
⊢ ValuationRing R
[PROOFSTEP]
constructor
[GOAL]
case mpr.cond'
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
⊢ ∀ (a b : R), ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
intro a b
[GOAL]
case mpr.cond'
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
by_cases ha : a = 0
[GOAL]
case pos
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
ha : a = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
subst ha
[GOAL]
case pos
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
b : R
⊢ ∃ c, 0 * c = b ∨ b * c = 0
[PROOFSTEP]
exact ⟨0, Or.inr <| mul_zero b⟩
[GOAL]
case neg
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
ha : ¬a = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
by_cases hb : b = 0
[GOAL]
case pos
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
ha : ¬a = 0
hb : b = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
subst hb
[GOAL]
case pos
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a : R
ha : ¬a = 0
⊢ ∃ c, a * c = 0 ∨ 0 * c = a
[PROOFSTEP]
exact ⟨0, Or.inl <| mul_zero a⟩
[GOAL]
case neg
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
ha : ¬a = 0
hb : ¬b = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
replace ha := (map_ne_zero_iff _ (IsFractionRing.injective R K)).mpr ha
[GOAL]
case neg
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
hb : ¬b = 0
ha : ↑(algebraMap R K) a ≠ 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
replace hb := (map_ne_zero_iff _ (IsFractionRing.injective R K)).mpr hb
[GOAL]
case neg
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
ha : ↑(algebraMap R K) a ≠ 0
hb : ↑(algebraMap R K) b ≠ 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
obtain ⟨c, e⟩ | ⟨c, e⟩ := H (algebraMap R K a / algebraMap R K b)
[GOAL]
case neg.inl.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
ha : ↑(algebraMap R K) a ≠ 0
hb : ↑(algebraMap R K) b ≠ 0
c : R
e : ↑(algebraMap R K) c = ↑(algebraMap R K) a / ↑(algebraMap R K) b
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
rw [eq_div_iff hb, ← map_mul, (IsFractionRing.injective R K).eq_iff, mul_comm] at e 
[GOAL]
case neg.inl.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
ha : ↑(algebraMap R K) a ≠ 0
hb : ↑(algebraMap R K) b ≠ 0
c : R
e : b * c = a
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
exact ⟨c, Or.inr e⟩
[GOAL]
case neg.inr.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
ha : ↑(algebraMap R K) a ≠ 0
hb : ↑(algebraMap R K) b ≠ 0
c : R
e : ↑(algebraMap R K) c = (↑(algebraMap R K) a / ↑(algebraMap R K) b)⁻¹
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
rw [inv_div, eq_div_iff ha, ← map_mul, (IsFractionRing.injective R K).eq_iff, mul_comm c] at e 
[GOAL]
case neg.inr.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
H : ∀ (x : K), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
a b : R
ha : ↑(algebraMap R K) a ≠ 0
hb : ↑(algebraMap R K) b ≠ 0
c : R
e : a * c = b
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
exact ⟨c, Or.inl e⟩
[GOAL]
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
⊢ IsBezout R
[PROOFSTEP]
classical
rw [IsBezout.iff_span_pair_isPrincipal]
intro x y
rw [Ideal.span_insert]
cases' le_total (Ideal.span { x } : Ideal R) (Ideal.span { y }) with h h
· erw [sup_eq_right.mpr h]; exact ⟨⟨_, rfl⟩⟩
· erw [sup_eq_left.mpr h]; exact ⟨⟨_, rfl⟩⟩
[GOAL]
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
⊢ IsBezout R
[PROOFSTEP]
rw [IsBezout.iff_span_pair_isPrincipal]
[GOAL]
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
⊢ ∀ (x y : R), Submodule.IsPrincipal (Ideal.span {x, y})
[PROOFSTEP]
intro x y
[GOAL]
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
x y : R
⊢ Submodule.IsPrincipal (Ideal.span {x, y})
[PROOFSTEP]
rw [Ideal.span_insert]
[GOAL]
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
x y : R
⊢ Submodule.IsPrincipal (Ideal.span {x} ⊔ Ideal.span {y})
[PROOFSTEP]
cases' le_total (Ideal.span { x } : Ideal R) (Ideal.span { y }) with h h
[GOAL]
case inl
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
x y : R
h : Ideal.span {x} ≤ Ideal.span {y}
⊢ Submodule.IsPrincipal (Ideal.span {x} ⊔ Ideal.span {y})
[PROOFSTEP]
erw [sup_eq_right.mpr h]
[GOAL]
case inl
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
x y : R
h : Ideal.span {x} ≤ Ideal.span {y}
⊢ Submodule.IsPrincipal (Ideal.span {y})
[PROOFSTEP]
exact ⟨⟨_, rfl⟩⟩
[GOAL]
case inr
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
x y : R
h : Ideal.span {y} ≤ Ideal.span {x}
⊢ Submodule.IsPrincipal (Ideal.span {x} ⊔ Ideal.span {y})
[PROOFSTEP]
erw [sup_eq_left.mpr h]
[GOAL]
case inr
R : Type u_1
inst✝⁵ : CommRing R
inst✝⁴ : IsDomain R
K : Type u_2
inst✝³ : Field K
inst✝² : Algebra R K
inst✝¹ : IsFractionRing R K
inst✝ : ValuationRing R
x y : R
h : Ideal.span {y} ≤ Ideal.span {x}
⊢ Submodule.IsPrincipal (Ideal.span {x})
[PROOFSTEP]
exact ⟨⟨_, rfl⟩⟩
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ ValuationRing R ↔ LocalRing R ∧ IsBezout R
[PROOFSTEP]
classical
refine ⟨fun H => ⟨inferInstance, inferInstance⟩, ?_⟩
rintro ⟨h₁, h₂⟩
refine iff_dvd_total.mpr ⟨fun a b => ?_⟩
obtain ⟨g, e : _ = Ideal.span _⟩ := IsBezout.span_pair_isPrincipal a b
obtain ⟨a, rfl⟩ :=
  Ideal.mem_span_singleton'.mp (show a ∈ Ideal.span { g } by rw [← e]; exact Ideal.subset_span (by simp))
obtain ⟨b, rfl⟩ :=
  Ideal.mem_span_singleton'.mp (show b ∈ Ideal.span { g } by rw [← e]; exact Ideal.subset_span (by simp))
obtain ⟨x, y, e'⟩ :=
  Ideal.mem_span_pair.mp (show g ∈ Ideal.span {a * g, b * g} by rw [e]; exact Ideal.subset_span (by simp))
cases' eq_or_ne g 0 with h h
· simp [h]
have : x * a + y * b = 1 := by apply mul_left_injective₀ h; convert e' using 1 <;> ring
cases' LocalRing.isUnit_or_isUnit_of_add_one this with h' h'
left
swap
right
all_goals exact mul_dvd_mul_right (isUnit_iff_forall_dvd.mp (isUnit_of_mul_isUnit_right h') _) _
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ ValuationRing R ↔ LocalRing R ∧ IsBezout R
[PROOFSTEP]
refine ⟨fun H => ⟨inferInstance, inferInstance⟩, ?_⟩
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
⊢ LocalRing R ∧ IsBezout R → ValuationRing R
[PROOFSTEP]
rintro ⟨h₁, h₂⟩
[GOAL]
case intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
⊢ ValuationRing R
[PROOFSTEP]
refine iff_dvd_total.mpr ⟨fun a b => ?_⟩
[GOAL]
case intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
a b : R
⊢ a ∣ b ∨ b ∣ a
[PROOFSTEP]
obtain ⟨g, e : _ = Ideal.span _⟩ := IsBezout.span_pair_isPrincipal a b
[GOAL]
case intro.mk.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
a b g : R
e : Ideal.span {a, b} = Ideal.span {g}
⊢ a ∣ b ∨ b ∣ a
[PROOFSTEP]
obtain ⟨a, rfl⟩ :=
  Ideal.mem_span_singleton'.mp (show a ∈ Ideal.span { g } by rw [← e]; exact Ideal.subset_span (by simp))
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
a b g : R
e : Ideal.span {a, b} = Ideal.span {g}
⊢ a ∈ Ideal.span {g}
[PROOFSTEP]
rw [← e]
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
a b g : R
e : Ideal.span {a, b} = Ideal.span {g}
⊢ a ∈ Ideal.span {a, b}
[PROOFSTEP]
exact Ideal.subset_span (by simp)
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
a b g : R
e : Ideal.span {a, b} = Ideal.span {g}
⊢ a ∈ {a, b}
[PROOFSTEP]
simp
[GOAL]
case intro.mk.intro.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
b g a : R
e : Ideal.span {a * g, b} = Ideal.span {g}
⊢ a * g ∣ b ∨ b ∣ a * g
[PROOFSTEP]
obtain ⟨b, rfl⟩ :=
  Ideal.mem_span_singleton'.mp (show b ∈ Ideal.span { g } by rw [← e]; exact Ideal.subset_span (by simp))
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
b g a : R
e : Ideal.span {a * g, b} = Ideal.span {g}
⊢ b ∈ Ideal.span {g}
[PROOFSTEP]
rw [← e]
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
b g a : R
e : Ideal.span {a * g, b} = Ideal.span {g}
⊢ b ∈ Ideal.span {a * g, b}
[PROOFSTEP]
exact Ideal.subset_span (by simp)
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
b g a : R
e : Ideal.span {a * g, b} = Ideal.span {g}
⊢ b ∈ {a * g, b}
[PROOFSTEP]
simp
[GOAL]
case intro.mk.intro.intro.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
⊢ a * g ∣ b * g ∨ b * g ∣ a * g
[PROOFSTEP]
obtain ⟨x, y, e'⟩ :=
  Ideal.mem_span_pair.mp (show g ∈ Ideal.span {a * g, b * g} by rw [e]; exact Ideal.subset_span (by simp))
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
⊢ g ∈ Ideal.span {a * g, b * g}
[PROOFSTEP]
rw [e]
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
⊢ g ∈ Ideal.span {g}
[PROOFSTEP]
exact Ideal.subset_span (by simp)
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
⊢ g ∈ {g}
[PROOFSTEP]
simp
[GOAL]
case intro.mk.intro.intro.intro.intro.intro
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
⊢ a * g ∣ b * g ∨ b * g ∣ a * g
[PROOFSTEP]
cases' eq_or_ne g 0 with h h
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.inl
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g = 0
⊢ a * g ∣ b * g ∨ b * g ∣ a * g
[PROOFSTEP]
simp [h]
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.inr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
⊢ a * g ∣ b * g ∨ b * g ∣ a * g
[PROOFSTEP]
have : x * a + y * b = 1 := by apply mul_left_injective₀ h; convert e' using 1 <;> ring
[GOAL]
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
⊢ x * a + y * b = 1
[PROOFSTEP]
apply mul_left_injective₀ h
[GOAL]
case a
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
⊢ (fun a => a * g) (x * a + y * b) = (fun a => a * g) 1
[PROOFSTEP]
convert e' using 1
[GOAL]
case h.e'_2
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
⊢ (fun a => a * g) (x * a + y * b) = x * (a * g) + y * (b * g)
[PROOFSTEP]
ring
[GOAL]
case h.e'_3
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
⊢ (fun a => a * g) 1 = g
[PROOFSTEP]
ring
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.inr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
⊢ a * g ∣ b * g ∨ b * g ∣ a * g
[PROOFSTEP]
cases' LocalRing.isUnit_or_isUnit_of_add_one this with h' h'
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.inr.inl
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
h' : IsUnit (x * a)
⊢ a * g ∣ b * g ∨ b * g ∣ a * g
case intro.mk.intro.intro.intro.intro.intro.inr.inr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
h' : IsUnit (y * b)
⊢ a * g ∣ b * g ∨ b * g ∣ a * g
[PROOFSTEP]
left
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.inr.inl.h
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
h' : IsUnit (x * a)
⊢ a * g ∣ b * g
case intro.mk.intro.intro.intro.intro.intro.inr.inr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
h' : IsUnit (y * b)
⊢ a * g ∣ b * g ∨ b * g ∣ a * g
[PROOFSTEP]
swap
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.inr.inr
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
h' : IsUnit (y * b)
⊢ a * g ∣ b * g ∨ b * g ∣ a * g
case intro.mk.intro.intro.intro.intro.intro.inr.inl.h
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
h' : IsUnit (x * a)
⊢ a * g ∣ b * g
[PROOFSTEP]
right
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.inr.inr.h
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
h' : IsUnit (y * b)
⊢ b * g ∣ a * g
case intro.mk.intro.intro.intro.intro.intro.inr.inl.h
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
h' : IsUnit (x * a)
⊢ a * g ∣ b * g
[PROOFSTEP]
all_goals exact mul_dvd_mul_right (isUnit_iff_forall_dvd.mp (isUnit_of_mul_isUnit_right h') _) _
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.inr.inr.h
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
h' : IsUnit (y * b)
⊢ b * g ∣ a * g
[PROOFSTEP]
exact mul_dvd_mul_right (isUnit_iff_forall_dvd.mp (isUnit_of_mul_isUnit_right h') _) _
[GOAL]
case intro.mk.intro.intro.intro.intro.intro.inr.inl.h
R : Type u_1
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
K : Type u_2
inst✝² : Field K
inst✝¹ : Algebra R K
inst✝ : IsFractionRing R K
h₁ : LocalRing R
h₂ : IsBezout R
g a b : R
e : Ideal.span {a * g, b * g} = Ideal.span {g}
x y : R
e' : x * (a * g) + y * (b * g) = g
h : g ≠ 0
this : x * a + y * b = 1
h' : IsUnit (x * a)
⊢ a * g ∣ b * g
[PROOFSTEP]
exact mul_dvd_mul_right (isUnit_iff_forall_dvd.mp (isUnit_of_mul_isUnit_right h') _) _
[GOAL]
R✝ : Type u_1
inst✝⁶ : CommRing R✝
inst✝⁵ : IsDomain R✝
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R✝ K
inst✝² : IsFractionRing R✝ K
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
⊢ List.TFAE
    [ValuationRing R, ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹,
      IsTotal R fun x x_1 => x ∣ x_1, IsTotal (Ideal R) fun x x_1 => x ≤ x_1, LocalRing R ∧ IsBezout R]
[PROOFSTEP]
tfae_have 1 ↔ 2
[GOAL]
case tfae_1_iff_2
R✝ : Type u_1
inst✝⁶ : CommRing R✝
inst✝⁵ : IsDomain R✝
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R✝ K
inst✝² : IsFractionRing R✝ K
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
⊢ ValuationRing R ↔ ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
[PROOFSTEP]
exact iff_isInteger_or_isInteger R _
[GOAL]
R✝ : Type u_1
inst✝⁶ : CommRing R✝
inst✝⁵ : IsDomain R✝
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R✝ K
inst✝² : IsFractionRing R✝ K
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
tfae_1_iff_2 : ValuationRing R ↔ ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
⊢ List.TFAE
    [ValuationRing R, ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹,
      IsTotal R fun x x_1 => x ∣ x_1, IsTotal (Ideal R) fun x x_1 => x ≤ x_1, LocalRing R ∧ IsBezout R]
[PROOFSTEP]
tfae_have 1 ↔ 3
[GOAL]
case tfae_1_iff_3
R✝ : Type u_1
inst✝⁶ : CommRing R✝
inst✝⁵ : IsDomain R✝
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R✝ K
inst✝² : IsFractionRing R✝ K
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
tfae_1_iff_2 : ValuationRing R ↔ ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
⊢ ValuationRing R ↔ IsTotal R fun x x_1 => x ∣ x_1
[PROOFSTEP]
exact iff_dvd_total
[GOAL]
R✝ : Type u_1
inst✝⁶ : CommRing R✝
inst✝⁵ : IsDomain R✝
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R✝ K
inst✝² : IsFractionRing R✝ K
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
tfae_1_iff_2 : ValuationRing R ↔ ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
tfae_1_iff_3 : ValuationRing R ↔ IsTotal R fun x x_1 => x ∣ x_1
⊢ List.TFAE
    [ValuationRing R, ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹,
      IsTotal R fun x x_1 => x ∣ x_1, IsTotal (Ideal R) fun x x_1 => x ≤ x_1, LocalRing R ∧ IsBezout R]
[PROOFSTEP]
tfae_have 1 ↔ 4
[GOAL]
case tfae_1_iff_4
R✝ : Type u_1
inst✝⁶ : CommRing R✝
inst✝⁵ : IsDomain R✝
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R✝ K
inst✝² : IsFractionRing R✝ K
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
tfae_1_iff_2 : ValuationRing R ↔ ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
tfae_1_iff_3 : ValuationRing R ↔ IsTotal R fun x x_1 => x ∣ x_1
⊢ ValuationRing R ↔ IsTotal (Ideal R) fun x x_1 => x ≤ x_1
[PROOFSTEP]
exact iff_ideal_total
[GOAL]
R✝ : Type u_1
inst✝⁶ : CommRing R✝
inst✝⁵ : IsDomain R✝
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R✝ K
inst✝² : IsFractionRing R✝ K
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
tfae_1_iff_2 : ValuationRing R ↔ ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
tfae_1_iff_3 : ValuationRing R ↔ IsTotal R fun x x_1 => x ∣ x_1
tfae_1_iff_4 : ValuationRing R ↔ IsTotal (Ideal R) fun x x_1 => x ≤ x_1
⊢ List.TFAE
    [ValuationRing R, ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹,
      IsTotal R fun x x_1 => x ∣ x_1, IsTotal (Ideal R) fun x x_1 => x ≤ x_1, LocalRing R ∧ IsBezout R]
[PROOFSTEP]
tfae_have 1 ↔ 5
[GOAL]
case tfae_1_iff_5
R✝ : Type u_1
inst✝⁶ : CommRing R✝
inst✝⁵ : IsDomain R✝
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R✝ K
inst✝² : IsFractionRing R✝ K
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
tfae_1_iff_2 : ValuationRing R ↔ ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
tfae_1_iff_3 : ValuationRing R ↔ IsTotal R fun x x_1 => x ∣ x_1
tfae_1_iff_4 : ValuationRing R ↔ IsTotal (Ideal R) fun x x_1 => x ≤ x_1
⊢ ValuationRing R ↔ LocalRing R ∧ IsBezout R
[PROOFSTEP]
exact iff_local_bezout_domain
[GOAL]
R✝ : Type u_1
inst✝⁶ : CommRing R✝
inst✝⁵ : IsDomain R✝
K : Type u_2
inst✝⁴ : Field K
inst✝³ : Algebra R✝ K
inst✝² : IsFractionRing R✝ K
R : Type u
inst✝¹ : CommRing R
inst✝ : IsDomain R
tfae_1_iff_2 : ValuationRing R ↔ ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹
tfae_1_iff_3 : ValuationRing R ↔ IsTotal R fun x x_1 => x ∣ x_1
tfae_1_iff_4 : ValuationRing R ↔ IsTotal (Ideal R) fun x x_1 => x ≤ x_1
tfae_1_iff_5 : ValuationRing R ↔ LocalRing R ∧ IsBezout R
⊢ List.TFAE
    [ValuationRing R, ∀ (x : FractionRing R), IsLocalization.IsInteger R x ∨ IsLocalization.IsInteger R x⁻¹,
      IsTotal R fun x x_1 => x ∣ x_1, IsTotal (Ideal R) fun x x_1 => x ≤ x_1, LocalRing R ∧ IsBezout R]
[PROOFSTEP]
tfae_finish
[GOAL]
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : ValuationRing R
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hf : Function.Surjective ↑f
a b : S
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
obtain ⟨⟨a, rfl⟩, ⟨b, rfl⟩⟩ := hf a, hf b
[GOAL]
case intro.intro
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : ValuationRing R
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hf : Function.Surjective ↑f
a b : R
⊢ ∃ c, ↑f a * c = ↑f b ∨ ↑f b * c = ↑f a
[PROOFSTEP]
obtain ⟨c, rfl | rfl⟩ := ValuationRing.cond a b
[GOAL]
case intro.intro.intro.inl
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : ValuationRing R
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hf : Function.Surjective ↑f
a c : R
⊢ ∃ c_1, ↑f a * c_1 = ↑f (a * c) ∨ ↑f (a * c) * c_1 = ↑f a
case intro.intro.intro.inr
R : Type u_1
S : Type u_2
inst✝⁴ : CommRing R
inst✝³ : IsDomain R
inst✝² : ValuationRing R
inst✝¹ : CommRing S
inst✝ : IsDomain S
f : R →+* S
hf : Function.Surjective ↑f
b c : R
⊢ ∃ c_1, ↑f (b * c) * c_1 = ↑f b ∨ ↑f b * c_1 = ↑f (b * c)
[PROOFSTEP]
exacts [⟨f c, Or.inl <| (map_mul _ _ _).symm⟩, ⟨f c, Or.inr <| (map_mul _ _ _).symm⟩]
[GOAL]
𝒪 : Type u
K : Type v
Γ : Type w
inst✝⁴ : CommRing 𝒪
inst✝³ : IsDomain 𝒪
inst✝² : Field K
inst✝¹ : Algebra 𝒪 K
inst✝ : LinearOrderedCommGroupWithZero Γ
v : Valuation K Γ
hh : Valuation.Integers v 𝒪
⊢ ValuationRing 𝒪
[PROOFSTEP]
constructor
[GOAL]
case cond'
𝒪 : Type u
K : Type v
Γ : Type w
inst✝⁴ : CommRing 𝒪
inst✝³ : IsDomain 𝒪
inst✝² : Field K
inst✝¹ : Algebra 𝒪 K
inst✝ : LinearOrderedCommGroupWithZero Γ
v : Valuation K Γ
hh : Valuation.Integers v 𝒪
⊢ ∀ (a b : 𝒪), ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
intro a b
[GOAL]
case cond'
𝒪 : Type u
K : Type v
Γ : Type w
inst✝⁴ : CommRing 𝒪
inst✝³ : IsDomain 𝒪
inst✝² : Field K
inst✝¹ : Algebra 𝒪 K
inst✝ : LinearOrderedCommGroupWithZero Γ
v : Valuation K Γ
hh : Valuation.Integers v 𝒪
a b : 𝒪
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
cases' le_total (v (algebraMap 𝒪 K a)) (v (algebraMap 𝒪 K b)) with h h
[GOAL]
case cond'.inl
𝒪 : Type u
K : Type v
Γ : Type w
inst✝⁴ : CommRing 𝒪
inst✝³ : IsDomain 𝒪
inst✝² : Field K
inst✝¹ : Algebra 𝒪 K
inst✝ : LinearOrderedCommGroupWithZero Γ
v : Valuation K Γ
hh : Valuation.Integers v 𝒪
a b : 𝒪
h : ↑v (↑(algebraMap 𝒪 K) a) ≤ ↑v (↑(algebraMap 𝒪 K) b)
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
obtain ⟨c, hc⟩ := Valuation.Integers.dvd_of_le hh h
[GOAL]
case cond'.inl.intro
𝒪 : Type u
K : Type v
Γ : Type w
inst✝⁴ : CommRing 𝒪
inst✝³ : IsDomain 𝒪
inst✝² : Field K
inst✝¹ : Algebra 𝒪 K
inst✝ : LinearOrderedCommGroupWithZero Γ
v : Valuation K Γ
hh : Valuation.Integers v 𝒪
a b : 𝒪
h : ↑v (↑(algebraMap 𝒪 K) a) ≤ ↑v (↑(algebraMap 𝒪 K) b)
c : 𝒪
hc : a = b * c
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
use c
[GOAL]
case h
𝒪 : Type u
K : Type v
Γ : Type w
inst✝⁴ : CommRing 𝒪
inst✝³ : IsDomain 𝒪
inst✝² : Field K
inst✝¹ : Algebra 𝒪 K
inst✝ : LinearOrderedCommGroupWithZero Γ
v : Valuation K Γ
hh : Valuation.Integers v 𝒪
a b : 𝒪
h : ↑v (↑(algebraMap 𝒪 K) a) ≤ ↑v (↑(algebraMap 𝒪 K) b)
c : 𝒪
hc : a = b * c
⊢ a * c = b ∨ b * c = a
[PROOFSTEP]
exact Or.inr hc.symm
[GOAL]
case cond'.inr
𝒪 : Type u
K : Type v
Γ : Type w
inst✝⁴ : CommRing 𝒪
inst✝³ : IsDomain 𝒪
inst✝² : Field K
inst✝¹ : Algebra 𝒪 K
inst✝ : LinearOrderedCommGroupWithZero Γ
v : Valuation K Γ
hh : Valuation.Integers v 𝒪
a b : 𝒪
h : ↑v (↑(algebraMap 𝒪 K) b) ≤ ↑v (↑(algebraMap 𝒪 K) a)
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
obtain ⟨c, hc⟩ := Valuation.Integers.dvd_of_le hh h
[GOAL]
case cond'.inr.intro
𝒪 : Type u
K : Type v
Γ : Type w
inst✝⁴ : CommRing 𝒪
inst✝³ : IsDomain 𝒪
inst✝² : Field K
inst✝¹ : Algebra 𝒪 K
inst✝ : LinearOrderedCommGroupWithZero Γ
v : Valuation K Γ
hh : Valuation.Integers v 𝒪
a b : 𝒪
h : ↑v (↑(algebraMap 𝒪 K) b) ≤ ↑v (↑(algebraMap 𝒪 K) a)
c : 𝒪
hc : b = a * c
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
use c
[GOAL]
case h
𝒪 : Type u
K : Type v
Γ : Type w
inst✝⁴ : CommRing 𝒪
inst✝³ : IsDomain 𝒪
inst✝² : Field K
inst✝¹ : Algebra 𝒪 K
inst✝ : LinearOrderedCommGroupWithZero Γ
v : Valuation K Γ
hh : Valuation.Integers v 𝒪
a b : 𝒪
h : ↑v (↑(algebraMap 𝒪 K) b) ≤ ↑v (↑(algebraMap 𝒪 K) a)
c : 𝒪
hc : b = a * c
⊢ a * c = b ∨ b * c = a
[PROOFSTEP]
exact Or.inl hc.symm
[GOAL]
K : Type u
inst✝ : Field K
⊢ ValuationRing K
[PROOFSTEP]
constructor
[GOAL]
case cond'
K : Type u
inst✝ : Field K
⊢ ∀ (a b : K), ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
intro a b
[GOAL]
case cond'
K : Type u
inst✝ : Field K
a b : K
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
by_cases b = 0
[GOAL]
case cond'
K : Type u
inst✝ : Field K
a b : K
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
by_cases b = 0
[GOAL]
case pos
K : Type u
inst✝ : Field K
a b : K
h : b = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
use 0
[GOAL]
case h
K : Type u
inst✝ : Field K
a b : K
h : b = 0
⊢ a * 0 = b ∨ b * 0 = a
[PROOFSTEP]
left
[GOAL]
case h.h
K : Type u
inst✝ : Field K
a b : K
h : b = 0
⊢ a * 0 = b
[PROOFSTEP]
simp [h]
[GOAL]
case neg
K : Type u
inst✝ : Field K
a b : K
h : ¬b = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
use a * b⁻¹
[GOAL]
case h
K : Type u
inst✝ : Field K
a b : K
h : ¬b = 0
⊢ a * (a * b⁻¹) = b ∨ b * (a * b⁻¹) = a
[PROOFSTEP]
right
[GOAL]
case h.h
K : Type u
inst✝ : Field K
a b : K
h : ¬b = 0
⊢ b * (a * b⁻¹) = a
[PROOFSTEP]
field_simp
[GOAL]
case h.h
K : Type u
inst✝ : Field K
a b : K
h : ¬b = 0
⊢ b * a = a * b
[PROOFSTEP]
rw [mul_comm]
[GOAL]
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
⊢ ValuationRing A
[PROOFSTEP]
constructor
[GOAL]
case cond'
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
⊢ ∀ (a b : A), ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
intro a b
[GOAL]
case cond'
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
a b : A
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
by_cases ha : a = 0
[GOAL]
case pos
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
a b : A
ha : a = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
use 0
[GOAL]
case h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
a b : A
ha : a = 0
⊢ a * 0 = b ∨ b * 0 = a
[PROOFSTEP]
right
[GOAL]
case h.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
a b : A
ha : a = 0
⊢ b * 0 = a
[PROOFSTEP]
simp [ha]
[GOAL]
case neg
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
a b : A
ha : ¬a = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
by_cases hb : b = 0
[GOAL]
case pos
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
a b : A
ha : ¬a = 0
hb : b = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
use 0
[GOAL]
case h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
a b : A
ha : ¬a = 0
hb : b = 0
⊢ a * 0 = b ∨ b * 0 = a
[PROOFSTEP]
left
[GOAL]
case h.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
a b : A
ha : ¬a = 0
hb : b = 0
⊢ a * 0 = b
[PROOFSTEP]
simp [hb]
[GOAL]
case neg
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
a b : A
ha : ¬a = 0
hb : ¬b = 0
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
obtain ⟨ϖ, hϖ⟩ := DiscreteValuationRing.exists_irreducible A
[GOAL]
case neg.intro
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
a b : A
ha : ¬a = 0
hb : ¬b = 0
ϖ : A
hϖ : Irreducible ϖ
⊢ ∃ c, a * c = b ∨ b * c = a
[PROOFSTEP]
obtain ⟨m, u, rfl⟩ := DiscreteValuationRing.eq_unit_mul_pow_irreducible ha hϖ
[GOAL]
case neg.intro.intro.intro
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
b : A
hb : ¬b = 0
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
⊢ ∃ c, ↑u * ϖ ^ m * c = b ∨ b * c = ↑u * ϖ ^ m
[PROOFSTEP]
obtain ⟨n, v, rfl⟩ := DiscreteValuationRing.eq_unit_mul_pow_irreducible hb hϖ
[GOAL]
case neg.intro.intro.intro.intro.intro
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
⊢ ∃ c, ↑u * ϖ ^ m * c = ↑v * ϖ ^ n ∨ ↑v * ϖ ^ n * c = ↑u * ϖ ^ m
[PROOFSTEP]
cases' le_total m n with h h
[GOAL]
case neg.intro.intro.intro.intro.intro.inl
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : m ≤ n
⊢ ∃ c, ↑u * ϖ ^ m * c = ↑v * ϖ ^ n ∨ ↑v * ϖ ^ n * c = ↑u * ϖ ^ m
[PROOFSTEP]
use(u⁻¹ * v : Aˣ) * ϖ ^ (n - m)
[GOAL]
case h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : m ≤ n
⊢ ↑u * ϖ ^ m * (↑(u⁻¹ * v) * ϖ ^ (n - m)) = ↑v * ϖ ^ n ∨ ↑v * ϖ ^ n * (↑(u⁻¹ * v) * ϖ ^ (n - m)) = ↑u * ϖ ^ m
[PROOFSTEP]
left
[GOAL]
case h.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : m ≤ n
⊢ ↑u * ϖ ^ m * (↑(u⁻¹ * v) * ϖ ^ (n - m)) = ↑v * ϖ ^ n
[PROOFSTEP]
simp_rw [mul_comm (u : A), Units.val_mul, ← mul_assoc, mul_assoc _ (u : A)]
[GOAL]
case h.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : m ≤ n
⊢ ϖ ^ m * (↑u * ↑u⁻¹) * ↑v * ϖ ^ (n - m) = ↑v * ϖ ^ n
[PROOFSTEP]
simp only [Units.mul_inv, mul_one, mul_comm _ (v : A), mul_assoc, ← pow_add]
[GOAL]
case h.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : m ≤ n
⊢ ↑v * ϖ ^ (m + (n - m)) = ↑v * ϖ ^ n
[PROOFSTEP]
congr 2
[GOAL]
case h.h.e_a.e_a
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : m ≤ n
⊢ m + (n - m) = n
[PROOFSTEP]
exact Nat.add_sub_of_le h
[GOAL]
case neg.intro.intro.intro.intro.intro.inr
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : n ≤ m
⊢ ∃ c, ↑u * ϖ ^ m * c = ↑v * ϖ ^ n ∨ ↑v * ϖ ^ n * c = ↑u * ϖ ^ m
[PROOFSTEP]
use(v⁻¹ * u : Aˣ) * ϖ ^ (m - n)
[GOAL]
case h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : n ≤ m
⊢ ↑u * ϖ ^ m * (↑(v⁻¹ * u) * ϖ ^ (m - n)) = ↑v * ϖ ^ n ∨ ↑v * ϖ ^ n * (↑(v⁻¹ * u) * ϖ ^ (m - n)) = ↑u * ϖ ^ m
[PROOFSTEP]
right
[GOAL]
case h.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : n ≤ m
⊢ ↑v * ϖ ^ n * (↑(v⁻¹ * u) * ϖ ^ (m - n)) = ↑u * ϖ ^ m
[PROOFSTEP]
simp_rw [mul_comm (v : A), Units.val_mul, ← mul_assoc, mul_assoc _ (v : A)]
[GOAL]
case h.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : n ≤ m
⊢ ϖ ^ n * (↑v * ↑v⁻¹) * ↑u * ϖ ^ (m - n) = ↑u * ϖ ^ m
[PROOFSTEP]
simp only [Units.mul_inv, mul_one, mul_comm _ (u : A), mul_assoc, ← pow_add]
[GOAL]
case h.h
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : n ≤ m
⊢ ↑u * ϖ ^ (n + (m - n)) = ↑u * ϖ ^ m
[PROOFSTEP]
congr 2
[GOAL]
case h.h.e_a.e_a
A : Type u
inst✝² : CommRing A
inst✝¹ : IsDomain A
inst✝ : DiscreteValuationRing A
ϖ : A
hϖ : Irreducible ϖ
m : ℕ
u : Aˣ
ha : ¬↑u * ϖ ^ m = 0
n : ℕ
v : Aˣ
hb : ¬↑v * ϖ ^ n = 0
h : n ≤ m
⊢ n + (m - n) = m
[PROOFSTEP]
exact Nat.add_sub_of_le h
