Theorem: ValuationRing.le_total
File: Mathlib/RingTheory/Valuation/ValuationRing.lean

Proof steps:
state_before: 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
state_after: 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
tactic: rcases a with ⟨a⟩
state_before: 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
state_after: 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
tactic: rcases b with ⟨b⟩
state_before: 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
state_after: 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)
tactic: obtain ⟨xa, ya, hya, rfl⟩ : ∃ a b : A, _ := IsFractionRing.div_surjective a
state_before: 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)
state_after: 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)
tactic: obtain ⟨xb, yb, hyb, rfl⟩ : ∃ a b : A, _ := IsFractionRing.div_surjective b
state_before: 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)
state_after: 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)
tactic: have : (algebraMap A K) ya ≠ 0 := IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors hya
state_before: 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)
state_after: 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)
tactic: have : (algebraMap A K) yb ≠ 0 := IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors hyb
state_before: 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)
state_after: 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)

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)
tactic: obtain ⟨c, h | h⟩ := ValuationRing.cond (xa * yb) (xb * ya)