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

tactic: rcases a with ⟨a⟩
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

tactic: rcases b with ⟨b⟩
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

tactic: obtain ⟨xa, ya, hya, rfl⟩ : ∃ a b : A, _ := IsFractionRing.div_surjective a
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

tactic: obtain ⟨xb, yb, hyb, rfl⟩ : ∃ a b : A, _ := IsFractionRing.div_surjective b
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)

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
⊢ 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
⊢ 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)
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)

tactic: right
state_before: 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)

tactic: use c
state_before: 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)

tactic: rw [Algebra.smul_def]
state_before: 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
⊢ c • (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) = ↑(algebraMap A K) xb / ↑(algebraMap A K) yb

tactic: field_simp
state_before: 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
⊢ ↑(algebraMap A K) c * (↑(algebraMap A K) xa / ↑(algebraMap A K) ya) = ↑(algebraMap A K) xb / ↑(algebraMap A K) yb

tactic: simp only [← RingHom.map_mul, ← h]
state_before: 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
⊢ ↑(algebraMap A K) c * ↑(algebraMap A K) xa * ↑(algebraMap A K) yb = ↑(algebraMap A K) xb * ↑(algebraMap A K) ya

tactic: congr 1
state_before: 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
⊢ ↑(algebraMap A K) (c * xa * yb) = ↑(algebraMap A K) (xa * yb * c)

tactic: ring
state_before: case mk.mk.intro.intro.intro.intro.intro.intro.intro.inl.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

tactic: left
state_before: 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: use c
state_before: 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)

tactic: rw [Algebra.smul_def]
state_before: 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
⊢ c • (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) = ↑(algebraMap A K) xa / ↑(algebraMap A K) ya

tactic: field_simp
state_before: 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
⊢ ↑(algebraMap A K) c * (↑(algebraMap A K) xb / ↑(algebraMap A K) yb) = ↑(algebraMap A K) xa / ↑(algebraMap A K) ya

tactic: simp only [← RingHom.map_mul, ← h]
state_before: 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
⊢ ↑(algebraMap A K) c * ↑(algebraMap A K) xb * ↑(algebraMap A K) ya = ↑(algebraMap A K) xa * ↑(algebraMap A K) yb

tactic: congr 1
state_before: 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
⊢ ↑(algebraMap A K) (c * xb * ya) = ↑(algebraMap A K) (xb * ya * c)

tactic: ring
state_before: case mk.mk.intro.intro.intro.intro.intro.intro.intro.inr.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