/-- The valuation ring `A` is isomorphic to the ring of integers of its associated valuation. -/
noncomputable def equivInteger : A ≃+* (valuation A K).integer :=
  RingEquiv.ofBijective
    (show A →ₙ+* (valuation A K).integer from
      { toFun := fun a => ⟨algebraMap A K a, (mem_integer_iff _ _ _).mpr ⟨a, rfl⟩⟩
        map_mul' := fun _ _ => by ext1; exact (algebraMap A K).map_mul _ _
        map_zero' := by ext1; exact (algebraMap A K).map_zero
        map_add' := fun _ _ => by ext1; exact (algebraMap A K).map_add _ _ })
    (by
      constructor
      · intro x y h
        apply_fun (algebraMap (valuation A K).integer K) at h
        exact IsFractionRing.injective _ _ h
      · rintro ⟨-, ha⟩
        rw [mem_integer_iff] at ha
        

Proof state:
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✝ }

Next tactic:
obtain ⟨a, rfl⟩ := ha