Lean4
/-- A family of ring isomorphisms `∀ j, (R j ≃+* S j)` generates a
ring isomorphisms between `∀ j, R j` and `∀ j, S j`.
This is the `RingEquiv` version of `Equiv.piCongrRight`, and the dependent version of
`RingEquiv.arrowCongr`.
-/
@[simps apply]
def piCongrRight {ι : Type*} {R S : ι → Type*} [∀ i, NonUnitalNonAssocSemiring (R i)]
[∀ i, NonUnitalNonAssocSemiring (S i)] (e : ∀ i, R i ≃+* S i) : (∀ i, R i) ≃+* ∀ i, S i :=
{ @MulEquiv.piCongrRight ι R S _ _ fun i => (e i).toMulEquiv,
@AddEquiv.piCongrRight ι R S _ _ fun i =>
(e i).toAddEquiv with
toFun := fun x j => e j (x j)
invFun := fun x j => (e j).symm (x j) }