∀ {R : Type uR} {A₁ : Type uA₁} {A₂ : Type uA₂} [inst : CommSemiring R] [inst_1 : Semiring A₁] [inst_2 : Semiring A₂]
  [inst_3 : Algebra R A₁] [inst_4 : Algebra R A₂] (f f_1 : A₁ →ₐ[R] A₂) (e_f : f = f_1) (g g_1 : A₂ →ₐ[R] A₁)
  (e_g : g = g_1) (h₁ : f.comp g = AlgHom.id R A₂) (h₂ : g.comp f = AlgHom.id R A₁),
  AlgEquiv.ofAlgHom f g h₁ h₂ = AlgEquiv.ofAlgHom f_1 g_1 ⋯ ⋯