/-- For a valuation subring `A`, `A.unitGroup` agrees with the units of `A`. -/
def unitGroupMulEquiv : A.unitGroup ≃* Aˣ where
  toFun x :=
    { val := ⟨(x : Kˣ), mem_of_valuation_le_one A _ x.prop.le⟩
      inv := ⟨((x⁻¹ : A.unitGroup) : Kˣ), mem_of_valuation_le_one _ _ x⁻¹.prop.le⟩
      -- Porting note: was `Units.mul_inv x`
      val_inv := Subtype.ext (by simp)
      -- Porting note: was `Units.inv_mul x`
      inv_val := Subtype.ext (by simp) }
  invFun x := ⟨Units.map A.subtype.toMonoidHom x, A.valuation_unit x⟩
  left_inv a := by ext; rfl
  right_inv a := by ext; rfl
  map_mul' a b := by 

Proof state:
K : Type u
inst✝ : Field K
A : ValuationSubring K
a b : ↥(unitGroup A)
⊢ Equiv.toFun
      {
        toFun := fun x =>
          { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
            val_inv :=
              (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
            inv_val :=
              (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },
        invFun := fun x => { val := (Units.map ↑(subtype A)) x, property := (_ : (valuation A) ↑↑x = 1) },
        left_inv :=
          (_ :
            ∀ (a : ↥(unitGroup A)),
              (fun x => { val := (Units.map ↑(subtype A)) x, property := (_ : (valuation A) ↑↑x = 1) })
                  ((fun x =>
                      { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                        inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                        val_inv :=
                          (_ :
                            { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                              1),
                        inv_val :=
                          (_ :
                            { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                              1) })
                    a) =
                a),
        right_inv :=
          (_ :
            ∀ (a : (↥A)ˣ),
              (fun x =>
                    { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                      inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                      val_inv :=
                        (_ :
                          { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                            1),
                      inv_val :=
                        (_ :
                          { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                            1) })
                  ((fun x => { val := (Units.map ↑(subtype A)) x, property := (_ : (valuation A) ↑↑x = 1) }) a) =
                a) }
      (a * b) =
    Equiv.toFun
        {
          toFun := fun x =>
            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
              val_inv :=
                (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
              inv_val :=
                (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },
          invFun := fun x => { val := (Units.map ↑(subtype A)) x, property := (_ : (valuation A) ↑↑x = 1) },
          left_inv :=
            (_ :
              ∀ (a : ↥(unitGroup A)),
                (fun x => { val := (Units.map ↑(subtype A)) x, property := (_ : (valuation A) ↑↑x = 1) })
                    ((fun x =>
                        { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                          inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                          val_inv :=
                            (_ :
                              { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *
                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                                1),
                          inv_val :=
                            (_ :
                              { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *
                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                                1) })
                      a) =
                  a),
          right_inv :=
            (_ :
              ∀ (a : (↥A)ˣ),
                (fun x =>
                      { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                        inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                        val_inv :=
                          (_ :
                            { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                              1),
                        inv_val :=
                          (_ :
                            { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                              1) })
                    ((fun x => { val := (Units.map ↑(subtype A)) x, property := (_ : (valuation A) ↑↑x = 1) }) a) =
                  a) }
        a *
      Equiv.toFun
        {
          toFun := fun x =>
            { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) }, inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
              val_inv :=
                (_ : { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } = 1),
              inv_val :=
                (_ : { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } = 1) },
          invFun := fun x => { val := (Units.map ↑(subtype A)) x, property := (_ : (valuation A) ↑↑x = 1) },
          left_inv :=
            (_ :
              ∀ (a : ↥(unitGroup A)),
                (fun x => { val := (Units.map ↑(subtype A)) x, property := (_ : (valuation A) ↑↑x = 1) })
                    ((fun x =>
                        { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                          inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                          val_inv :=
                            (_ :
                              { val := ↑↑x, property := (_ : ↑↑x ∈ A) } *
                                  { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                                1),
                          inv_val :=
                            (_ :
                              { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } *
                                  { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                                1) })
                      a) =
                  a),
          right_inv :=
            (_ :
              ∀ (a : (↥A)ˣ),
                (fun x =>
                      { val := { val := ↑↑x, property := (_ : ↑↑x ∈ A) },
                        inv := { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) },
                        val_inv :=
                          (_ :
                            { val := ↑↑x, property := (_ : ↑↑x ∈ A) } * { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } =
                              1),
                        inv_val :=
                          (_ :
                            { val := ↑↑x⁻¹, property := (_ : ↑↑x⁻¹ ∈ A) } * { val := ↑↑x, property := (_ : ↑↑x ∈ A) } =
                              1) })
                    ((fun x => { val := (Units.map ↑(subtype A)) x, property := (_ : (valuation A) ↑↑x = 1) }) a) =
                  a) }
        b

Next tactic:
ext