R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
⊢ IsLocalization (Submonoid.map (RingEquiv.toMonoidHom h) M) S
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
⊢ IsLocalization (Submonoid.map (RingEquiv.toMonoidHom h) M) S
letI : Algebra P S := ((algebraMap R S).comp h.symm.toRingHom).toAlgebra
case map_units'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
⊢ ∀ (y : { x // x ∈ Submonoid.map (RingEquiv.toMonoidHom h) M }), IsUnit (↑(algebraMap P S) ↑y)

case surj'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
⊢ ∀ (z : S), ∃ x, z * ↑(algebraMap P S) ↑x.snd = ↑(algebraMap P S) x.fst

case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
⊢ ∀ {x y : P}, ↑(algebraMap P S) x = ↑(algebraMap P S) y ↔ ∃ c, ↑c * x = ↑c * y
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
⊢ IsLocalization (Submonoid.map (RingEquiv.toMonoidHom h) M) S
constructor
case map_units'.mk.intro.intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : R
hy : y ∈ ↑M
⊢ IsUnit
    (↑(algebraMap P S)
      ↑{ val := ↑(RingEquiv.toMonoidHom h) y,
          property := (_ : ∃ a, a ∈ ↑M ∧ ↑(RingEquiv.toMonoidHom h) a = ↑(RingEquiv.toMonoidHom h) y) })
case map_units'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
⊢ ∀ (y : { x // x ∈ Submonoid.map (RingEquiv.toMonoidHom h) M }), IsUnit (↑(algebraMap P S) ↑y)
rintro ⟨_, ⟨y, hy, rfl⟩⟩
case h.e'_3
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : R
hy : y ∈ ↑M
⊢ ↑(algebraMap P S)
      ↑{ val := ↑(RingEquiv.toMonoidHom h) y,
          property := (_ : ∃ a, a ∈ ↑M ∧ ↑(RingEquiv.toMonoidHom h) a = ↑(RingEquiv.toMonoidHom h) y) } =
    ↑(algebraMap R S) ↑{ val := y, property := hy }
case map_units'.mk.intro.intro
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : R
hy : y ∈ ↑M
⊢ IsUnit
    (↑(algebraMap P S)
      ↑{ val := ↑(RingEquiv.toMonoidHom h) y,
          property := (_ : ∃ a, a ∈ ↑M ∧ ↑(RingEquiv.toMonoidHom h) a = ↑(RingEquiv.toMonoidHom h) y) })
convert IsLocalization.map_units S ⟨y, hy⟩
case h.e'_3
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : R
hy : y ∈ ↑M
⊢ ↑(algebraMap R S) (↑(RingEquiv.toRingHom (RingEquiv.symm h)) (↑(RingEquiv.toMonoidHom h) y)) = ↑(algebraMap R S) y
case h.e'_3
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : R
hy : y ∈ ↑M
⊢ ↑(algebraMap P S)
      ↑{ val := ↑(RingEquiv.toMonoidHom h) y,
          property := (_ : ∃ a, a ∈ ↑M ∧ ↑(RingEquiv.toMonoidHom h) a = ↑(RingEquiv.toMonoidHom h) y) } =
    ↑(algebraMap R S) ↑{ val := y, property := hy }
dsimp only [RingHom.algebraMap_toAlgebra, RingHom.comp_apply]
no goals
case h.e'_3
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : R
hy : y ∈ ↑M
⊢ ↑(algebraMap R S) (↑(RingEquiv.toRingHom (RingEquiv.symm h)) (↑(RingEquiv.toMonoidHom h) y)) = ↑(algebraMap R S) y
exact congr_arg _ (h.symm_apply_apply _)
case surj'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : S
⊢ ∃ x, y * ↑(algebraMap P S) ↑x.snd = ↑(algebraMap P S) x.fst
case surj'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
⊢ ∀ (z : S), ∃ x, z * ↑(algebraMap P S) ↑x.snd = ↑(algebraMap P S) x.fst
intro y
case surj'.intro.mk
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : S
x : R
s : { x // x ∈ M }
e : y * ↑(algebraMap R S) ↑(x, s).snd = ↑(algebraMap R S) (x, s).fst
⊢ ∃ x, y * ↑(algebraMap P S) ↑x.snd = ↑(algebraMap P S) x.fst
case surj'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : S
⊢ ∃ x, y * ↑(algebraMap P S) ↑x.snd = ↑(algebraMap P S) x.fst
obtain ⟨⟨x, s⟩, e⟩ := IsLocalization.surj M y
case surj'.intro.mk
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : S
x : R
s : { x // x ∈ M }
e : y * ↑(algebraMap R S) ↑(x, s).snd = ↑(algebraMap R S) (x, s).fst
⊢ y *
      ↑(algebraMap P S)
        ↑(↑h x,
              { val := ↑(RingEquiv.toMonoidHom h) ↑s,
                property := (_ : ∃ a, a ∈ ↑M ∧ ↑(RingEquiv.toMonoidHom h) a = ↑(RingEquiv.toMonoidHom h) ↑s) }).snd =
    ↑(algebraMap P S)
      (↑h x,
          { val := ↑(RingEquiv.toMonoidHom h) ↑s,
            property := (_ : ∃ a, a ∈ ↑M ∧ ↑(RingEquiv.toMonoidHom h) a = ↑(RingEquiv.toMonoidHom h) ↑s) }).fst
case surj'.intro.mk
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : S
x : R
s : { x // x ∈ M }
e : y * ↑(algebraMap R S) ↑(x, s).snd = ↑(algebraMap R S) (x, s).fst
⊢ ∃ x, y * ↑(algebraMap P S) ↑x.snd = ↑(algebraMap P S) x.fst
refine' ⟨⟨h x, _, _, s.prop, rfl⟩, _⟩
case surj'.intro.mk
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : S
x : R
s : { x // x ∈ M }
e : y * ↑(algebraMap R S) ↑s = ↑(algebraMap R S) x
⊢ y * ↑(algebraMap R S) (↑(RingEquiv.toRingHom (RingEquiv.symm h)) (↑(RingEquiv.toMonoidHom h) ↑s)) =
    ↑(algebraMap R S) (↑(RingEquiv.toRingHom (RingEquiv.symm h)) (↑h x))
case surj'.intro.mk
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : S
x : R
s : { x // x ∈ M }
e : y * ↑(algebraMap R S) ↑(x, s).snd = ↑(algebraMap R S) (x, s).fst
⊢ y *
      ↑(algebraMap P S)
        ↑(↑h x,
              { val := ↑(RingEquiv.toMonoidHom h) ↑s,
                property := (_ : ∃ a, a ∈ ↑M ∧ ↑(RingEquiv.toMonoidHom h) a = ↑(RingEquiv.toMonoidHom h) ↑s) }).snd =
    ↑(algebraMap P S)
      (↑h x,
          { val := ↑(RingEquiv.toMonoidHom h) ↑s,
            property := (_ : ∃ a, a ∈ ↑M ∧ ↑(RingEquiv.toMonoidHom h) a = ↑(RingEquiv.toMonoidHom h) ↑s) }).fst
dsimp only [RingHom.algebraMap_toAlgebra, RingHom.comp_apply] at e⊢
no goals
case surj'.intro.mk
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
y : S
x : R
s : { x // x ∈ M }
e : y * ↑(algebraMap R S) ↑s = ↑(algebraMap R S) x
⊢ y * ↑(algebraMap R S) (↑(RingEquiv.toRingHom (RingEquiv.symm h)) (↑(RingEquiv.toMonoidHom h) ↑s)) =
    ↑(algebraMap R S) (↑(RingEquiv.toRingHom (RingEquiv.symm h)) (↑h x))
convert e <;> exact h.symm_apply_apply _
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
x y : P
⊢ ↑(algebraMap P S) x = ↑(algebraMap P S) y ↔ ∃ c, ↑c * x = ↑c * y
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
⊢ ∀ {x y : P}, ↑(algebraMap P S) x = ↑(algebraMap P S) y ↔ ∃ c, ↑c * x = ↑c * y
intro x y
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
x y : P
⊢ (∃ c, ↑c * ↑(RingEquiv.toRingHom (RingEquiv.symm h)) x = ↑c * ↑(RingEquiv.toRingHom (RingEquiv.symm h)) y) ↔
    ∃ c, ↑c * x = ↑c * y
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
x y : P
⊢ ↑(algebraMap P S) x = ↑(algebraMap P S) y ↔ ∃ c, ↑c * x = ↑c * y
rw [RingHom.algebraMap_toAlgebra, RingHom.comp_apply, RingHom.comp_apply,
  IsLocalization.eq_iff_exists M S]
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
x y : P
⊢ (∃ c,
      ↑h.toEquiv (↑c * ↑(RingEquiv.toRingHom (RingEquiv.symm h)) x) =
        ↑h.toEquiv (↑c * ↑(RingEquiv.toRingHom (RingEquiv.symm h)) y)) ↔
    ∃ c, ↑c * x = ↑c * y
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
x y : P
⊢ (∃ c, ↑c * ↑(RingEquiv.toRingHom (RingEquiv.symm h)) x = ↑c * ↑(RingEquiv.toRingHom (RingEquiv.symm h)) y) ↔
    ∃ c, ↑c * x = ↑c * y
simp_rw [← h.toEquiv.apply_eq_iff_eq]
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
x y : P
⊢ (∃ c, ↑h (↑c * ↑(RingEquiv.symm h) x) = ↑h (↑c * ↑(RingEquiv.symm h) y)) ↔ ∃ c, ↑c * x = ↑c * y
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
x y : P
⊢ (∃ c,
      ↑h.toEquiv (↑c * ↑(RingEquiv.toRingHom (RingEquiv.symm h)) x) =
        ↑h.toEquiv (↑c * ↑(RingEquiv.toRingHom (RingEquiv.symm h)) y)) ↔
    ∃ c, ↑c * x = ↑c * y
change (∃ c : M, h (c * h.symm x) = h (c * h.symm y)) ↔ _
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
x y : P
⊢ (∃ c, ↑h ↑c * x = ↑h ↑c * y) ↔ ∃ c, ↑c * x = ↑c * y
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
x y : P
⊢ (∃ c, ↑h (↑c * ↑(RingEquiv.symm h) x) = ↑h (↑c * ↑(RingEquiv.symm h) y)) ↔ ∃ c, ↑c * x = ↑c * y
simp only [RingEquiv.apply_symm_apply, RingEquiv.map_mul]
no goals
case eq_iff_exists'
R : Type u_1
inst✝⁴ : CommSemiring R
M : Submonoid R
S : Type u_2
inst✝³ : CommSemiring S
inst✝² : Algebra R S
P : Type u_3
inst✝¹ : CommSemiring P
inst✝ : IsLocalization M S
h : R ≃+* P
this : Algebra P S := RingHom.toAlgebra (RingHom.comp (algebraMap R S) (RingEquiv.toRingHom (RingEquiv.symm h)))
x y : P
⊢ (∃ c, ↑h ↑c * x = ↑h ↑c * y) ↔ ∃ c, ↑c * x = ↑c * y
exact
  ⟨fun ⟨c, e⟩ => ⟨⟨_, _, c.prop, rfl⟩, e⟩, fun ⟨⟨_, c, h, e₁⟩, e₂⟩ => ⟨⟨_, h⟩, e₁.symm ▸ e₂⟩⟩