/-- Any valuation ring induces a valuation on its fraction field. -/
def valuation : Valuation K (ValueGroup A K) where
  toFun := Quotient.mk''
  map_zero' := rfl
  map_one' := rfl
  map_mul' _ _ := rfl
  map_add_le_max' := by
    intro a b
    obtain ⟨xa, ya, hya, rfl⟩ : ∃ a b : A, _ := IsFractionRing.div_surjective a
    obtain ⟨xb, yb, hyb, rfl⟩ : ∃ a b : A, _ := IsFractionRing.div_surjective b
    

Proof state:
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))

Next tactic:
have : (algebraMap A K) ya ≠ 0 := IsFractionRing.to_map_ne_zero_of_mem_nonZeroDivisors hya