/-
Copyright (c) 2018 Kenny Lau. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Kenny Lau, Yury Kudryashov

! This file was ported from Lean 3 source module algebra.algebra.restrict_scalars
! leanprover-community/mathlib commit f47581155c818e6361af4e4fda60d27d020c226b
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
import Mathbin.Algebra.Algebra.Tower

/-!

# The `restrict_scalars` type alias

> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
> Any changes to this file require a corresponding PR to mathlib4.

See the documentation attached to the `restrict_scalars` definition for advice on how and when to
use this type alias. As described there, it is often a better choice to use the `is_scalar_tower`
typeclass instead.

## Main definitions

* `restrict_scalars R S M`: the `S`-module `M` viewed as an `R` module when `S` is an `R`-algebra.
  Note that by default we do *not* have a `module S (restrict_scalars R S M)` instance
  for the original action.
  This is available as a def `restrict_scalars.module_orig` if really needed.
* `restrict_scalars.add_equiv : restrict_scalars R S M ≃+ M`: the additive equivalence
  between the restricted and original space (in fact, they are definitionally equal,
  but sometimes it is helpful to avoid using this fact, to keep instances from leaking).
* `restrict_scalars.ring_equiv : restrict_scalars R S A ≃+* A`: the ring equivalence
   between the restricted and original space when the module is an algebra.

## See also

There are many similarly-named definitions elsewhere which do not refer to this type alias. These
refer to restricting the scalar type in a bundled type, such as from `A →ₗ[R] B` to `A →ₗ[S] B`:

* `linear_map.restrict_scalars`
* `linear_equiv.restrict_scalars`
* `alg_hom.restrict_scalars`
* `alg_equiv.restrict_scalars`
* `submodule.restrict_scalars`
* `subalgebra.restrict_scalars`
-/


variable (R S M A : Type _)

#print RestrictScalars /-
/-- If we put an `R`-algebra structure on a semiring `S`, we get a natural equivalence from the
category of `S`-modules to the category of representations of the algebra `S` (over `R`). The type
synonym `restrict_scalars` is essentially this equivalence.

Warning: use this type synonym judiciously! Consider an example where we want to construct an
`R`-linear map from `M` to `S`, given:
```lean
variables (R S M : Type*)
variables [comm_semiring R] [semiring S] [algebra R S] [add_comm_monoid M] [module S M]
```
With the assumptions above we can't directly state our map as we have no `module R M` structure, but
`restrict_scalars` permits it to be written as:
```lean
-- an `R`-module structure on `M` is provided by `restrict_scalars` which is compatible
example : restrict_scalars R S M →ₗ[R] S := sorry
```
However, it is usually better just to add this extra structure as an argument:
```lean
-- an `R`-module structure on `M` and proof of its compatibility is provided by the user
example [module R M] [is_scalar_tower R S M] : M →ₗ[R] S := sorry
```
The advantage of the second approach is that it defers the duty of providing the missing typeclasses
`[module R M] [is_scalar_tower R S M]`. If some concrete `M` naturally carries these (as is often
the case) then we have avoided `restrict_scalars` entirely. If not, we can pass
`restrict_scalars R S M` later on instead of `M`.

Note that this means we almost always want to state definitions and lemmas in the language of
`is_scalar_tower` rather than `restrict_scalars`.

An example of when one might want to use `restrict_scalars` would be if one has a vector space
over a field of characteristic zero and wishes to make use of the `ℚ`-algebra structure. -/
@[nolint unused_arguments]
def RestrictScalars (R S M : Type _) : Type _ :=
  M
#align restrict_scalars RestrictScalars
-/

instance [I : Inhabited M] : Inhabited (RestrictScalars R S M) :=
  I

instance [I : AddCommMonoid M] : AddCommMonoid (RestrictScalars R S M) :=
  I

instance [I : AddCommGroup M] : AddCommGroup (RestrictScalars R S M) :=
  I

section Module

section

variable [Semiring S] [AddCommMonoid M]

#print RestrictScalars.moduleOrig /-
/-- We temporarily install an action of the original ring on `restrict_sclars R S M`. -/
def RestrictScalars.moduleOrig [I : Module S M] : Module S (RestrictScalars R S M) :=
  I
#align restrict_scalars.module_orig RestrictScalars.moduleOrig
-/

variable [CommSemiring R] [Algebra R S]

section

attribute [local instance] RestrictScalars.moduleOrig

/-- When `M` is a module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a
module structure over `R`.

The preferred way of setting this up is `[module R M] [module S M] [is_scalar_tower R S M]`.
-/
instance [Module S M] : Module R (RestrictScalars R S M) :=
  Module.compHom M (algebraMap R S)

/-- This instance is only relevant when `restrict_scalars.module_orig` is available as an instance.
-/
instance [Module S M] : IsScalarTower R S (RestrictScalars R S M) :=
  ⟨fun r S M => by
    rw [Algebra.smul_def, mul_smul]
    rfl⟩

end

#print RestrictScalars.opModule /-
/-- When `M` is a right-module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a
right-module structure over `R`.
The preferred way of setting this up is
`[module Rᵐᵒᵖ M] [module Sᵐᵒᵖ M] [is_scalar_tower Rᵐᵒᵖ Sᵐᵒᵖ M]`.
-/
instance RestrictScalars.opModule [Module Sᵐᵒᵖ M] : Module Rᵐᵒᵖ (RestrictScalars R S M) :=
  letI : Module Sᵐᵒᵖ (RestrictScalars R S M) := ‹Module Sᵐᵒᵖ M›
  Module.compHom M (algebraMap R S).op
#align restrict_scalars.op_module RestrictScalars.opModule
-/

#print RestrictScalars.isCentralScalar /-
instance RestrictScalars.isCentralScalar [Module S M] [Module Sᵐᵒᵖ M] [IsCentralScalar S M] :
    IsCentralScalar R (RestrictScalars R S M)
    where op_smul_eq_smul r x := (op_smul_eq_smul (algebraMap R S r) (_ : M) : _)
#align restrict_scalars.is_central_scalar RestrictScalars.isCentralScalar
-/

/- warning: restrict_scalars.lsmul -> RestrictScalars.lsmul is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (M : Type.{u3}) [_inst_1 : Semiring.{u2} S] [_inst_2 : AddCommMonoid.{u3} M] [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Algebra.{u1, u2} R S _inst_3 _inst_1] [_inst_5 : Module.{u2, u3} S M _inst_1 _inst_2], AlgHom.{u1, u2, u3} R S (Module.End.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_3) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_2) (RestrictScalars.module.{u1, u2, u3} R S M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) _inst_3 _inst_1 (Module.End.semiring.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_3) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_2) (RestrictScalars.module.{u1, u2, u3} R S M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) _inst_4 (Module.End.algebra.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) _inst_3 (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_2) (RestrictScalars.module.{u1, u2, u3} R S M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))
but is expected to have type
  forall (R : Type.{u1}) (S : Type.{u2}) (M : Type.{u3}) [_inst_1 : Semiring.{u2} S] [_inst_2 : AddCommMonoid.{u3} M] [_inst_3 : CommSemiring.{u1} R] [_inst_4 : Algebra.{u1, u2} R S _inst_3 _inst_1] [_inst_5 : Module.{u2, u3} S M _inst_1 _inst_2], AlgHom.{u1, u2, u3} R S (Module.End.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_3) (instAddCommMonoidRestrictScalars.{u1, u2, u3} R S M _inst_2) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u1, u2, u3} R S M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) _inst_3 _inst_1 (Module.End.semiring.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_3) (instAddCommMonoidRestrictScalars.{u1, u2, u3} R S M _inst_2) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u1, u2, u3} R S M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) _inst_4 (Module.instAlgebraEndToSemiringSemiring.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) _inst_3 (instAddCommMonoidRestrictScalars.{u1, u2, u3} R S M _inst_2) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u1, u2, u3} R S M _inst_1 _inst_2 _inst_3 _inst_4 _inst_5))
Case conversion may be inaccurate. Consider using '#align restrict_scalars.lsmul RestrictScalars.lsmulₓ'. -/
/-- The `R`-algebra homomorphism from the original coefficient algebra `S` to endomorphisms
of `restrict_scalars R S M`.
-/
def RestrictScalars.lsmul [Module S M] : S →ₐ[R] Module.End R (RestrictScalars R S M) :=
  letI-- We use `restrict_scalars.module_orig` in the implementation,
  -- but not in the type.
   : Module S (RestrictScalars R S M) := RestrictScalars.moduleOrig R S M
  Algebra.lsmul R (RestrictScalars R S M)
#align restrict_scalars.lsmul RestrictScalars.lsmul

end

variable [AddCommMonoid M]

/- warning: restrict_scalars.add_equiv -> RestrictScalars.addEquiv is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (M : Type.{u3}) [_inst_1 : AddCommMonoid.{u3} M], AddEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))
but is expected to have type
  forall (R : Type.{u1}) (S : Type.{u2}) (M : Type.{u3}) [_inst_1 : AddCommMonoid.{u3} M], AddEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (instAddCommMonoidRestrictScalars.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))
Case conversion may be inaccurate. Consider using '#align restrict_scalars.add_equiv RestrictScalars.addEquivₓ'. -/
/-- `restrict_scalars.add_equiv` is the additive equivalence with the original module. -/
def RestrictScalars.addEquiv : RestrictScalars R S M ≃+ M :=
  AddEquiv.refl M
#align restrict_scalars.add_equiv RestrictScalars.addEquiv

variable [CommSemiring R] [Semiring S] [Algebra R S] [Module S M]

/- warning: restrict_scalars.add_equiv_map_smul -> RestrictScalars.addEquiv_map_smul is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (M : Type.{u3}) [_inst_1 : AddCommMonoid.{u3} M] [_inst_2 : CommSemiring.{u1} R] [_inst_3 : Semiring.{u2} S] [_inst_4 : Algebra.{u1, u2} R S _inst_2 _inst_3] [_inst_5 : Module.{u2, u3} S M _inst_3 _inst_1] (c : R) (x : RestrictScalars.{u1, u2, u3} R S M), Eq.{succ u3} M (coeFn.{succ u3, succ u3} (AddEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) (fun (_x : AddEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) => (RestrictScalars.{u1, u2, u3} R S M) -> M) (AddEquiv.hasCoeToFun.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) (RestrictScalars.addEquiv.{u1, u2, u3} R S M _inst_1) (SMul.smul.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (SMulZeroClass.toHasSmul.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2))))) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (Module.toMulActionWithZero.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))) c x)) (SMul.smul.{u2, u3} S M (SMulZeroClass.toHasSmul.{u2, u3} S M (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (SMulWithZero.toSmulZeroClass.{u2, u3} S M (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_3)))) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (MulActionWithZero.toSMulWithZero.{u2, u3} S M (Semiring.toMonoidWithZero.{u2} S _inst_3) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (Module.toMulActionWithZero.{u2, u3} S M _inst_3 _inst_1 _inst_5)))) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) (algebraMap.{u1, u2} R S _inst_2 _inst_3 _inst_4) c) (coeFn.{succ u3, succ u3} (AddEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) (fun (_x : AddEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) => (RestrictScalars.{u1, u2, u3} R S M) -> M) (AddEquiv.hasCoeToFun.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) (RestrictScalars.addEquiv.{u1, u2, u3} R S M _inst_1) x))
but is expected to have type
  forall (R : Type.{u3}) (S : Type.{u2}) (M : Type.{u1}) [_inst_1 : AddCommMonoid.{u1} M] [_inst_2 : CommSemiring.{u3} R] [_inst_3 : Semiring.{u2} S] [_inst_4 : Algebra.{u3, u2} R S _inst_2 _inst_3] [_inst_5 : Module.{u2, u1} S M _inst_3 _inst_1] (c : R) (x : RestrictScalars.{u3, u2, u1} R S M), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) (HSMul.hSMul.{u3, u1, u1} R (RestrictScalars.{u3, u2, u1} R S M) (RestrictScalars.{u3, u2, u1} R S M) (instHSMul.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (SMulZeroClass.toSMul.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))) (SMulWithZero.toSMulZeroClass.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommMonoidWithZero.toZero.{u3} R (CommSemiring.toCommMonoidWithZero.{u3} R _inst_2)) (AddMonoid.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))) (MulActionWithZero.toSMulWithZero.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (AddMonoid.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))) (Module.toMulActionWithZero.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)))))) c x)) (FunLike.coe.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) (fun (_x : RestrictScalars.{u3, u2, u1} R S M) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) _x) (EmbeddingLike.toFunLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (EquivLike.toEmbeddingLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (AddEquivClass.toEquivLike.{u1, u1, u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddEquiv.instAddEquivClassAddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))))))) (RestrictScalars.addEquiv.{u3, u2, u1} R S M _inst_1) (HSMul.hSMul.{u3, u1, u1} R (RestrictScalars.{u3, u2, u1} R S M) (RestrictScalars.{u3, u2, u1} R S M) (instHSMul.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (SMulZeroClass.toSMul.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))) (SMulWithZero.toSMulZeroClass.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommMonoidWithZero.toZero.{u3} R (CommSemiring.toCommMonoidWithZero.{u3} R _inst_2)) (AddMonoid.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))) (MulActionWithZero.toSMulWithZero.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (AddMonoid.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))) (Module.toMulActionWithZero.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)))))) c x)) (HSMul.hSMul.{u2, u1, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (instHSMul.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (SMulZeroClass.toSMul.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_1)) (SMulWithZero.toSMulZeroClass.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (MonoidWithZero.toZero.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) (Semiring.toMonoidWithZero.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) _inst_3)) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_1)) (MulActionWithZero.toSMulWithZero.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (Semiring.toMonoidWithZero.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) _inst_3) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_1)) (Module.toMulActionWithZero.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_3 _inst_1 _inst_5))))) (FunLike.coe.{max (succ u3) (succ u2), succ u3, succ u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u3 u2, u3, u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) R S (NonUnitalNonAssocSemiring.toMul.{u3} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)))) (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3))) (NonUnitalRingHomClass.toMulHomClass.{max u3 u2, u3, u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3)) (RingHomClass.toNonUnitalRingHomClass.{max u3 u2, u3, u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3) (RingHom.instRingHomClassRingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3))))) (algebraMap.{u3, u2} R S _inst_2 _inst_3 _inst_4) c) (FunLike.coe.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) (fun (_x : RestrictScalars.{u3, u2, u1} R S M) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) _x) (EmbeddingLike.toFunLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (EquivLike.toEmbeddingLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (AddEquivClass.toEquivLike.{u1, u1, u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddEquiv.instAddEquivClassAddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))))))) (RestrictScalars.addEquiv.{u3, u2, u1} R S M _inst_1) x))
Case conversion may be inaccurate. Consider using '#align restrict_scalars.add_equiv_map_smul RestrictScalars.addEquiv_map_smulₓ'. -/
@[simp]
theorem RestrictScalars.addEquiv_map_smul (c : R) (x : RestrictScalars R S M) :
    RestrictScalars.addEquiv R S M (c • x) = algebraMap R S c • RestrictScalars.addEquiv R S M x :=
  rfl
#align restrict_scalars.add_equiv_map_smul RestrictScalars.addEquiv_map_smul

/- warning: restrict_scalars.smul_def -> RestrictScalars.smul_def is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (M : Type.{u3}) [_inst_1 : AddCommMonoid.{u3} M] [_inst_2 : CommSemiring.{u1} R] [_inst_3 : Semiring.{u2} S] [_inst_4 : Algebra.{u1, u2} R S _inst_2 _inst_3] [_inst_5 : Module.{u2, u3} S M _inst_3 _inst_1] (c : R) (x : RestrictScalars.{u1, u2, u3} R S M), Eq.{succ u3} (RestrictScalars.{u1, u2, u3} R S M) (SMul.smul.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (SMulZeroClass.toHasSmul.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2))))) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (Module.toMulActionWithZero.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))) c x) (coeFn.{succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (fun (_x : AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) => M -> (RestrictScalars.{u1, u2, u3} R S M)) (AddEquiv.hasCoeToFun.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (AddEquiv.symm.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (RestrictScalars.addEquiv.{u1, u2, u3} R S M _inst_1)) (SMul.smul.{u2, u3} S M (SMulZeroClass.toHasSmul.{u2, u3} S M (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (SMulWithZero.toSmulZeroClass.{u2, u3} S M (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_3)))) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (MulActionWithZero.toSMulWithZero.{u2, u3} S M (Semiring.toMonoidWithZero.{u2} S _inst_3) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (Module.toMulActionWithZero.{u2, u3} S M _inst_3 _inst_1 _inst_5)))) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) (algebraMap.{u1, u2} R S _inst_2 _inst_3 _inst_4) c) (coeFn.{succ u3, succ u3} (AddEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) (fun (_x : AddEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) => (RestrictScalars.{u1, u2, u3} R S M) -> M) (AddEquiv.hasCoeToFun.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) (RestrictScalars.addEquiv.{u1, u2, u3} R S M _inst_1) x)))
but is expected to have type
  forall (R : Type.{u3}) (S : Type.{u2}) (M : Type.{u1}) [_inst_1 : AddCommMonoid.{u1} M] [_inst_2 : CommSemiring.{u3} R] [_inst_3 : Semiring.{u2} S] [_inst_4 : Algebra.{u3, u2} R S _inst_2 _inst_3] [_inst_5 : Module.{u2, u1} S M _inst_3 _inst_1] (c : R) (x : RestrictScalars.{u3, u2, u1} R S M), Eq.{succ u1} (RestrictScalars.{u3, u2, u1} R S M) (HSMul.hSMul.{u3, u1, u1} R (RestrictScalars.{u3, u2, u1} R S M) (RestrictScalars.{u3, u2, u1} R S M) (instHSMul.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (SMulZeroClass.toSMul.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))) (SMulWithZero.toSMulZeroClass.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommMonoidWithZero.toZero.{u3} R (CommSemiring.toCommMonoidWithZero.{u3} R _inst_2)) (AddMonoid.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))) (MulActionWithZero.toSMulWithZero.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (AddMonoid.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))) (Module.toMulActionWithZero.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)))))) c x) (FunLike.coe.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))))) M (fun (_x : M) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u3, u2, u1} R S M) _x) (EmbeddingLike.toFunLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))))) M (RestrictScalars.{u3, u2, u1} R S M) (EquivLike.toEmbeddingLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))))) M (RestrictScalars.{u3, u2, u1} R S M) (AddEquivClass.toEquivLike.{u1, u1, u1} (AddEquiv.{u1, u1} M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))))) M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddEquiv.instAddEquivClassAddEquiv.{u1, u1} M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))))))) (AddEquiv.symm.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (RestrictScalars.addEquiv.{u3, u2, u1} R S M _inst_1)) (HSMul.hSMul.{u2, u1, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (instHSMul.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (SMulZeroClass.toSMul.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_1)) (SMulWithZero.toSMulZeroClass.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (MonoidWithZero.toZero.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) (Semiring.toMonoidWithZero.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) _inst_3)) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_1)) (MulActionWithZero.toSMulWithZero.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (Semiring.toMonoidWithZero.{u2} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) _inst_3) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_1)) (Module.toMulActionWithZero.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) c) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_3 _inst_1 _inst_5))))) (FunLike.coe.{max (succ u3) (succ u2), succ u3, succ u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u3 u2, u3, u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) R S (NonUnitalNonAssocSemiring.toMul.{u3} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)))) (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3))) (NonUnitalRingHomClass.toMulHomClass.{max u3 u2, u3, u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3)) (RingHomClass.toNonUnitalRingHomClass.{max u3 u2, u3, u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3) (RingHom.instRingHomClassRingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3))))) (algebraMap.{u3, u2} R S _inst_2 _inst_3 _inst_4) c) (FunLike.coe.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) (fun (_x : RestrictScalars.{u3, u2, u1} R S M) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) _x) (EmbeddingLike.toFunLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (EquivLike.toEmbeddingLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (AddEquivClass.toEquivLike.{u1, u1, u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddEquiv.instAddEquivClassAddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))))))) (RestrictScalars.addEquiv.{u3, u2, u1} R S M _inst_1) x)))
Case conversion may be inaccurate. Consider using '#align restrict_scalars.smul_def RestrictScalars.smul_defₓ'. -/
theorem RestrictScalars.smul_def (c : R) (x : RestrictScalars R S M) :
    c • x =
      (RestrictScalars.addEquiv R S M).symm (algebraMap R S c • RestrictScalars.addEquiv R S M x) :=
  rfl
#align restrict_scalars.smul_def RestrictScalars.smul_def

/- warning: restrict_scalars.add_equiv_symm_map_algebra_map_smul -> RestrictScalars.addEquiv_symm_map_algebraMap_smul is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (M : Type.{u3}) [_inst_1 : AddCommMonoid.{u3} M] [_inst_2 : CommSemiring.{u1} R] [_inst_3 : Semiring.{u2} S] [_inst_4 : Algebra.{u1, u2} R S _inst_2 _inst_3] [_inst_5 : Module.{u2, u3} S M _inst_3 _inst_1] (r : R) (x : M), Eq.{succ u3} (RestrictScalars.{u1, u2, u3} R S M) (coeFn.{succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (fun (_x : AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) => M -> (RestrictScalars.{u1, u2, u3} R S M)) (AddEquiv.hasCoeToFun.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (AddEquiv.symm.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (RestrictScalars.addEquiv.{u1, u2, u3} R S M _inst_1)) (SMul.smul.{u2, u3} S M (SMulZeroClass.toHasSmul.{u2, u3} S M (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (SMulWithZero.toSmulZeroClass.{u2, u3} S M (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_3)))) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (MulActionWithZero.toSMulWithZero.{u2, u3} S M (Semiring.toMonoidWithZero.{u2} S _inst_3) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (Module.toMulActionWithZero.{u2, u3} S M _inst_3 _inst_1 _inst_5)))) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (Semiring.toNonAssocSemiring.{u2} S _inst_3)) (algebraMap.{u1, u2} R S _inst_2 _inst_3 _inst_4) r) x)) (SMul.smul.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (SMulZeroClass.toHasSmul.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2))))) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (Module.toMulActionWithZero.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))) r (coeFn.{succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (fun (_x : AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) => M -> (RestrictScalars.{u1, u2, u3} R S M)) (AddEquiv.hasCoeToFun.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (AddEquiv.symm.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (RestrictScalars.addEquiv.{u1, u2, u3} R S M _inst_1)) x))
but is expected to have type
  forall (R : Type.{u2}) (S : Type.{u1}) (M : Type.{u3}) [_inst_1 : AddCommMonoid.{u3} M] [_inst_2 : CommSemiring.{u2} R] [_inst_3 : Semiring.{u1} S] [_inst_4 : Algebra.{u2, u1} R S _inst_2 _inst_3] [_inst_5 : Module.{u1, u3} S M _inst_3 _inst_1] (r : R) (x : M), Eq.{succ u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M M (instHSMul.{u1, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M (SMulZeroClass.toSMul.{u1, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M (MonoidWithZero.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toMonoidWithZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M (Semiring.toMonoidWithZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M _inst_3 _inst_1 _inst_5))))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3)) R (fun (a : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) a) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3)) R S (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_3))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_3)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3)) R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3) (RingHom.instRingHomClassRingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3))))) (algebraMap.{u2, u1} R S _inst_2 _inst_3 _inst_4) r) x)) (FunLike.coe.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (fun (_x : M) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) _x) (EmbeddingLike.toFunLike.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (EquivLike.toEmbeddingLike.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (AddEquivClass.toEquivLike.{u3, u3, u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))) (AddEquiv.instAddEquivClassAddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))))))) (AddEquiv.symm.{u3, u3} (RestrictScalars.{u2, u1, u3} R S M) M (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (RestrictScalars.addEquiv.{u2, u1, u3} R S M _inst_1)) (HSMul.hSMul.{u1, u3, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M M (instHSMul.{u1, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M (SMulZeroClass.toSMul.{u1, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M (MonoidWithZero.toZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) (Semiring.toMonoidWithZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M (Semiring.toMonoidWithZero.{u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) M _inst_3 _inst_1 _inst_5))))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3)) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3)) R S (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_3))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3)) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S _inst_3)) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3)) R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3) (RingHom.instRingHomClassRingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (Semiring.toNonAssocSemiring.{u1} S _inst_3))))) (algebraMap.{u2, u1} R S _inst_2 _inst_3 _inst_4) r) x)) (HSMul.hSMul.{u2, u3, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (instHSMul.{u2, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (SMulZeroClass.toSMul.{u2, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (AddMonoid.toZero.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (AddCommMonoid.toAddMonoid.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))) (SMulWithZero.toSMulZeroClass.{u2, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (CommMonoidWithZero.toZero.{u2} R (CommSemiring.toCommMonoidWithZero.{u2} R _inst_2)) (AddMonoid.toZero.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (AddCommMonoid.toAddMonoid.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))) (MulActionWithZero.toSMulWithZero.{u2, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (AddMonoid.toZero.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (AddCommMonoid.toAddMonoid.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))) (Module.toMulActionWithZero.{u2, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) x) (CommSemiring.toSemiring.{u2} R _inst_2) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)))))) r (FunLike.coe.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (fun (_x : M) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) _x) (EmbeddingLike.toFunLike.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (EquivLike.toEmbeddingLike.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (AddEquivClass.toEquivLike.{u3, u3, u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))) (AddEquiv.instAddEquivClassAddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))))))) (AddEquiv.symm.{u3, u3} (RestrictScalars.{u2, u1, u3} R S M) M (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (RestrictScalars.addEquiv.{u2, u1, u3} R S M _inst_1)) x))
Case conversion may be inaccurate. Consider using '#align restrict_scalars.add_equiv_symm_map_algebra_map_smul RestrictScalars.addEquiv_symm_map_algebraMap_smulₓ'. -/
theorem RestrictScalars.addEquiv_symm_map_algebraMap_smul (r : R) (x : M) :
    (RestrictScalars.addEquiv R S M).symm (algebraMap R S r • x) =
      r • (RestrictScalars.addEquiv R S M).symm x :=
  rfl
#align restrict_scalars.add_equiv_symm_map_algebra_map_smul RestrictScalars.addEquiv_symm_map_algebraMap_smul

/- warning: restrict_scalars.add_equiv_symm_map_smul_smul -> RestrictScalars.addEquiv_symm_map_smul_smul is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (M : Type.{u3}) [_inst_1 : AddCommMonoid.{u3} M] [_inst_2 : CommSemiring.{u1} R] [_inst_3 : Semiring.{u2} S] [_inst_4 : Algebra.{u1, u2} R S _inst_2 _inst_3] [_inst_5 : Module.{u2, u3} S M _inst_3 _inst_1] (r : R) (s : S) (x : M), Eq.{succ u3} (RestrictScalars.{u1, u2, u3} R S M) (coeFn.{succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (fun (_x : AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) => M -> (RestrictScalars.{u1, u2, u3} R S M)) (AddEquiv.hasCoeToFun.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (AddEquiv.symm.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (RestrictScalars.addEquiv.{u1, u2, u3} R S M _inst_1)) (SMul.smul.{u2, u3} S M (SMulZeroClass.toHasSmul.{u2, u3} S M (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (SMulWithZero.toSmulZeroClass.{u2, u3} S M (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_3)))) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (MulActionWithZero.toSMulWithZero.{u2, u3} S M (Semiring.toMonoidWithZero.{u2} S _inst_3) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (Module.toMulActionWithZero.{u2, u3} S M _inst_3 _inst_1 _inst_5)))) (SMul.smul.{u1, u2} R S (SMulZeroClass.toHasSmul.{u1, u2} R S (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3)))))) (SMulWithZero.toSmulZeroClass.{u1, u2} R S (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2))))) (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3)))))) (MulActionWithZero.toSMulWithZero.{u1, u2} R S (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (AddZeroClass.toHasZero.{u2} S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3)))))) (Module.toMulActionWithZero.{u1, u2} R S (CommSemiring.toSemiring.{u1} R _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3))) (Algebra.toModule.{u1, u2} R S _inst_2 _inst_3 _inst_4))))) r s) x)) (SMul.smul.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (SMulZeroClass.toHasSmul.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (SMulWithZero.toSmulZeroClass.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2))))) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (MulActionWithZero.toSMulWithZero.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (Module.toMulActionWithZero.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))) r (coeFn.{succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (fun (_x : AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) => M -> (RestrictScalars.{u1, u2, u3} R S M)) (AddEquiv.hasCoeToFun.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (AddEquiv.symm.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (RestrictScalars.addEquiv.{u1, u2, u3} R S M _inst_1)) (SMul.smul.{u2, u3} S M (SMulZeroClass.toHasSmul.{u2, u3} S M (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (SMulWithZero.toSmulZeroClass.{u2, u3} S M (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_3)))) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (MulActionWithZero.toSMulWithZero.{u2, u3} S M (Semiring.toMonoidWithZero.{u2} S _inst_3) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (Module.toMulActionWithZero.{u2, u3} S M _inst_3 _inst_1 _inst_5)))) s x)))
but is expected to have type
  forall (R : Type.{u2}) (S : Type.{u1}) (M : Type.{u3}) [_inst_1 : AddCommMonoid.{u3} M] [_inst_2 : CommSemiring.{u2} R] [_inst_3 : Semiring.{u1} S] [_inst_4 : Algebra.{u2, u1} R S _inst_2 _inst_3] [_inst_5 : Module.{u1, u3} S M _inst_3 _inst_1] (r : R) (s : S) (x : M), Eq.{succ u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) (HSMul.hSMul.{u2, u1, u1} R S S (instHSMul.{u2, u1} R S (Algebra.toSMul.{u2, u1} R S _inst_2 _inst_3 _inst_4)) r s) x)) (FunLike.coe.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (fun (_x : M) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) _x) (EmbeddingLike.toFunLike.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (EquivLike.toEmbeddingLike.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (AddEquivClass.toEquivLike.{u3, u3, u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))) (AddEquiv.instAddEquivClassAddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))))))) (AddEquiv.symm.{u3, u3} (RestrictScalars.{u2, u1, u3} R S M) M (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (RestrictScalars.addEquiv.{u2, u1, u3} R S M _inst_1)) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) (HSMul.hSMul.{u2, u1, u1} R S S (instHSMul.{u2, u1} R S (Algebra.toSMul.{u2, u1} R S _inst_2 _inst_3 _inst_4)) r s) x)) (HSMul.hSMul.{u2, u3, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (instHSMul.{u2, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (SMulZeroClass.toSMul.{u2, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (AddMonoid.toZero.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (AddCommMonoid.toAddMonoid.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))) (SMulWithZero.toSMulZeroClass.{u2, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (CommMonoidWithZero.toZero.{u2} R (CommSemiring.toCommMonoidWithZero.{u2} R _inst_2)) (AddMonoid.toZero.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (AddCommMonoid.toAddMonoid.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))) (MulActionWithZero.toSMulWithZero.{u2, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (Semiring.toMonoidWithZero.{u2} R (CommSemiring.toSemiring.{u2} R _inst_2)) (AddMonoid.toZero.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (AddCommMonoid.toAddMonoid.{u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))) (Module.toMulActionWithZero.{u2, u3} R ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)) (CommSemiring.toSemiring.{u2} R _inst_2) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)))))) r (FunLike.coe.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (fun (_x : M) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u2, u1, u3} R S M) _x) (EmbeddingLike.toFunLike.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (EquivLike.toEmbeddingLike.{succ u3, succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (AddEquivClass.toEquivLike.{u3, u3, u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1))))) M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))) (AddEquiv.instAddEquivClassAddEquiv.{u3, u3} M (RestrictScalars.{u2, u1, u3} R S M) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))))))) (AddEquiv.symm.{u3, u3} (RestrictScalars.{u2, u1, u3} R S M) M (AddZeroClass.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u2, u1, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u2, u1, u3} R S M) (instAddCommMonoidRestrictScalars.{u2, u1, u3} R S M _inst_1)))) (AddZeroClass.toAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (RestrictScalars.addEquiv.{u2, u1, u3} R S M _inst_1)) (HSMul.hSMul.{u1, u3, u3} S M M (instHSMul.{u1, u3} S M (SMulZeroClass.toSMul.{u1, u3} S M (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (SMulWithZero.toSMulZeroClass.{u1, u3} S M (MonoidWithZero.toZero.{u1} S (Semiring.toMonoidWithZero.{u1} S _inst_3)) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (MulActionWithZero.toSMulWithZero.{u1, u3} S M (Semiring.toMonoidWithZero.{u1} S _inst_3) (AddMonoid.toZero.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)) (Module.toMulActionWithZero.{u1, u3} S M _inst_3 _inst_1 _inst_5))))) s x)))
Case conversion may be inaccurate. Consider using '#align restrict_scalars.add_equiv_symm_map_smul_smul RestrictScalars.addEquiv_symm_map_smul_smulₓ'. -/
theorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :
    (RestrictScalars.addEquiv R S M).symm ((r • s) • x) =
      r • (RestrictScalars.addEquiv R S M).symm (s • x) :=
  by
  rw [Algebra.smul_def, mul_smul]
  rfl
#align restrict_scalars.add_equiv_symm_map_smul_smul RestrictScalars.addEquiv_symm_map_smul_smul

/- warning: restrict_scalars.lsmul_apply_apply -> RestrictScalars.lsmul_apply_apply is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (M : Type.{u3}) [_inst_1 : AddCommMonoid.{u3} M] [_inst_2 : CommSemiring.{u1} R] [_inst_3 : Semiring.{u2} S] [_inst_4 : Algebra.{u1, u2} R S _inst_2 _inst_3] [_inst_5 : Module.{u2, u3} S M _inst_3 _inst_1] (s : S) (x : RestrictScalars.{u1, u2, u3} R S M), Eq.{succ u3} (RestrictScalars.{u1, u2, u3} R S M) (coeFn.{succ u3, succ u3} (Module.End.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (fun (_x : LinearMap.{u1, u1, u3, u3} R R (CommSemiring.toSemiring.{u1} R _inst_2) (CommSemiring.toSemiring.{u1} R _inst_2) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2))) (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) => (RestrictScalars.{u1, u2, u3} R S M) -> (RestrictScalars.{u1, u2, u3} R S M)) (LinearMap.hasCoeToFun.{u1, u1, u3, u3} R R (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5) (RingHom.id.{u1} R (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_2)))) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (AlgHom.{u1, u2, u3} R S (Module.End.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 _inst_3 (Module.End.semiring.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_4 (Module.End.algebra.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) _inst_2 (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))) (fun (_x : AlgHom.{u1, u2, u3} R S (Module.End.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 _inst_3 (Module.End.semiring.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_4 (Module.End.algebra.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) _inst_2 (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))) => S -> (Module.End.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))) ([anonymous].{u1, u2, u3} R S (Module.End.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 _inst_3 (Module.End.semiring.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) (CommSemiring.toSemiring.{u1} R _inst_2) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_4 (Module.End.algebra.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S M) _inst_2 (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1) (RestrictScalars.module.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))) (RestrictScalars.lsmul.{u1, u2, u3} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5) s) x) (coeFn.{succ u3, succ u3} (AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (fun (_x : AddEquiv.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) => M -> (RestrictScalars.{u1, u2, u3} R S M)) (AddEquiv.hasCoeToFun.{u3, u3} M (RestrictScalars.{u1, u2, u3} R S M) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1))))) (AddEquiv.symm.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (RestrictScalars.addEquiv.{u1, u2, u3} R S M _inst_1)) (SMul.smul.{u2, u3} S M (SMulZeroClass.toHasSmul.{u2, u3} S M (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (SMulWithZero.toSmulZeroClass.{u2, u3} S M (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_3)))) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (MulActionWithZero.toSMulWithZero.{u2, u3} S M (Semiring.toMonoidWithZero.{u2} S _inst_3) (AddZeroClass.toHasZero.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1))) (Module.toMulActionWithZero.{u2, u3} S M _inst_3 _inst_1 _inst_5)))) s (coeFn.{succ u3, succ u3} (AddEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) (fun (_x : AddEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) => (RestrictScalars.{u1, u2, u3} R S M) -> M) (AddEquiv.hasCoeToFun.{u3, u3} (RestrictScalars.{u1, u2, u3} R S M) M (AddZeroClass.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S M) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S M) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S M _inst_1)))) (AddZeroClass.toHasAdd.{u3} M (AddMonoid.toAddZeroClass.{u3} M (AddCommMonoid.toAddMonoid.{u3} M _inst_1)))) (RestrictScalars.addEquiv.{u1, u2, u3} R S M _inst_1) x)))
but is expected to have type
  forall (R : Type.{u3}) (S : Type.{u2}) (M : Type.{u1}) [_inst_1 : AddCommMonoid.{u1} M] [_inst_2 : CommSemiring.{u3} R] [_inst_3 : Semiring.{u2} S] [_inst_4 : Algebra.{u3, u2} R S _inst_2 _inst_3] [_inst_5 : Module.{u2, u1} S M _inst_3 _inst_1] (s : S) (x : RestrictScalars.{u3, u2, u1} R S M), Eq.{succ u1} ((fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : RestrictScalars.{u3, u2, u1} R S M) => RestrictScalars.{u3, u2, u1} R S M) x) (FunLike.coe.{succ u1, succ u1, succ u1} ((fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : S) => Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) s) (RestrictScalars.{u3, u2, u1} R S M) (fun (_x : RestrictScalars.{u3, u2, u1} R S M) => (fun (x._@.Mathlib.Algebra.Module.LinearMap._hyg.6190 : RestrictScalars.{u3, u2, u1} R S M) => RestrictScalars.{u3, u2, u1} R S M) _x) (LinearMap.instFunLikeLinearMap.{u3, u3, u1, u1} R R (RestrictScalars.{u3, u2, u1} R S M) (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5) (RingHom.id.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2)))) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (AlgHom.{u3, u2, u1} R S (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 _inst_3 (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_4 (Module.instAlgebraEndToSemiringSemiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) _inst_2 (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))) S (fun (_x : S) => (fun (x._@.Mathlib.Algebra.Hom.GroupAction._hyg.2186 : S) => Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _x) (SMulHomClass.toFunLike.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R S (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 _inst_3 (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_4 (Module.instAlgebraEndToSemiringSemiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) _inst_2 (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))) R S (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (SMulZeroClass.toSMul.{u3, u2} R S (AddMonoid.toZero.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3))))) (DistribSMul.toSMulZeroClass.{u3, u2} R S (AddMonoid.toAddZeroClass.{u2} S (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3))))) (DistribMulAction.toDistribSMul.{u3, u2} R S (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2))) (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3)))) (Module.toDistribMulAction.{u3, u2} R S (CommSemiring.toSemiring.{u3} R _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3))) (Algebra.toModule.{u3, u2} R S _inst_2 _inst_3 _inst_4))))) (SMulZeroClass.toSMul.{u3, u1} R (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (AddMonoid.toZero.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (AddCommMonoid.toAddMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Semiring.toNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))))) (DistribSMul.toSMulZeroClass.{u3, u1} R (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (AddMonoid.toAddZeroClass.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (AddCommMonoid.toAddMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Semiring.toNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))))) (DistribMulAction.toDistribSMul.{u3, u1} R (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2))) (AddCommMonoid.toAddMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Semiring.toNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)))))) (Module.toDistribMulAction.{u3, u1} R (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (CommSemiring.toSemiring.{u3} R _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Semiring.toNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))) (Algebra.toModule.{u3, u1} R (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Module.instAlgebraEndToSemiringSemiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) _inst_2 (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))))) (DistribMulActionHomClass.toSMulHomClass.{max u2 u1, u3, u2, u1} (AlgHom.{u3, u2, u1} R S (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 _inst_3 (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_4 (Module.instAlgebraEndToSemiringSemiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) _inst_2 (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))) R S (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (MonoidWithZero.toMonoid.{u3} R (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_2))) (AddCommMonoid.toAddMonoid.{u2} S (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3)))) (AddCommMonoid.toAddMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Semiring.toNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)))))) (Module.toDistribMulAction.{u3, u2} R S (CommSemiring.toSemiring.{u3} R _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3))) (Algebra.toModule.{u3, u2} R S _inst_2 _inst_3 _inst_4)) (Module.toDistribMulAction.{u3, u1} R (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (CommSemiring.toSemiring.{u3} R _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Semiring.toNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))) (Algebra.toModule.{u3, u1} R (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Module.instAlgebraEndToSemiringSemiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) _inst_2 (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)))) (SemilinearMapClass.distribMulActionHomClass.{u3, u2, u1, max u2 u1} R S (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (AlgHom.{u3, u2, u1} R S (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 _inst_3 (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_4 (Module.instAlgebraEndToSemiringSemiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) _inst_2 (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))) (CommSemiring.toSemiring.{u3} R _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S _inst_3))) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Semiring.toNonAssocSemiring.{u1} (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))) (Algebra.toModule.{u3, u2} R S _inst_2 _inst_3 _inst_4) (Algebra.toModule.{u3, u1} R (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (Module.instAlgebraEndToSemiringSemiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) _inst_2 (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))) (AlgHomClass.linearMapClass.{u3, u2, u1, max u2 u1} R S (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 _inst_3 (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_4 (Module.instAlgebraEndToSemiringSemiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) _inst_2 (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) (AlgHom.{u3, u2, u1} R S (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 _inst_3 (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_4 (Module.instAlgebraEndToSemiringSemiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) _inst_2 (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))) (AlgHom.algHomClass.{u3, u2, u1} R S (Module.End.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_2 _inst_3 (Module.End.semiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) (CommSemiring.toSemiring.{u3} R _inst_2) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5)) _inst_4 (Module.instAlgebraEndToSemiringSemiring.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S M) _inst_2 (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5))))))) (RestrictScalars.lsmul.{u3, u2, u1} R S M _inst_3 _inst_1 _inst_2 _inst_4 _inst_5) s) x) (FunLike.coe.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))))) M (fun (_x : M) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : M) => RestrictScalars.{u3, u2, u1} R S M) _x) (EmbeddingLike.toFunLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))))) M (RestrictScalars.{u3, u2, u1} R S M) (EquivLike.toEmbeddingLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))))) M (RestrictScalars.{u3, u2, u1} R S M) (AddEquivClass.toEquivLike.{u1, u1, u1} (AddEquiv.{u1, u1} M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1))))) M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddEquiv.instAddEquivClassAddEquiv.{u1, u1} M (RestrictScalars.{u3, u2, u1} R S M) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))))))) (AddEquiv.symm.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (RestrictScalars.addEquiv.{u3, u2, u1} R S M _inst_1)) (HSMul.hSMul.{u2, u1, u1} S ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (instHSMul.{u2, u1} S ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (SMulZeroClass.toSMul.{u2, u1} S ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_1)) (SMulWithZero.toSMulZeroClass.{u2, u1} S ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (MonoidWithZero.toZero.{u2} S (Semiring.toMonoidWithZero.{u2} S _inst_3)) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_1)) (MulActionWithZero.toSMulWithZero.{u2, u1} S ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (Semiring.toMonoidWithZero.{u2} S _inst_3) (AddMonoid.toZero.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) (AddCommMonoid.toAddMonoid.{u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_1)) (Module.toMulActionWithZero.{u2, u1} S ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) x) _inst_3 _inst_1 _inst_5))))) s (FunLike.coe.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) (fun (_x : RestrictScalars.{u3, u2, u1} R S M) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S M) => M) _x) (EmbeddingLike.toFunLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (EquivLike.toEmbeddingLike.{succ u1, succ u1, succ u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (AddEquivClass.toEquivLike.{u1, u1, u1} (AddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1)))) (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))) (AddEquiv.instAddEquivClassAddEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S M) M (AddZeroClass.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddMonoid.toAddZeroClass.{u1} (RestrictScalars.{u3, u2, u1} R S M) (AddCommMonoid.toAddMonoid.{u1} (RestrictScalars.{u3, u2, u1} R S M) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S M _inst_1)))) (AddZeroClass.toAdd.{u1} M (AddMonoid.toAddZeroClass.{u1} M (AddCommMonoid.toAddMonoid.{u1} M _inst_1))))))) (RestrictScalars.addEquiv.{u3, u2, u1} R S M _inst_1) x)))
Case conversion may be inaccurate. Consider using '#align restrict_scalars.lsmul_apply_apply RestrictScalars.lsmul_apply_applyₓ'. -/
theorem RestrictScalars.lsmul_apply_apply (s : S) (x : RestrictScalars R S M) :
    RestrictScalars.lsmul R S M s x =
      (RestrictScalars.addEquiv R S M).symm (s • RestrictScalars.addEquiv R S M x) :=
  rfl
#align restrict_scalars.lsmul_apply_apply RestrictScalars.lsmul_apply_apply

end Module

section Algebra

instance [I : Semiring A] : Semiring (RestrictScalars R S A) :=
  I

instance [I : Ring A] : Ring (RestrictScalars R S A) :=
  I

instance [I : CommSemiring A] : CommSemiring (RestrictScalars R S A) :=
  I

instance [I : CommRing A] : CommRing (RestrictScalars R S A) :=
  I

variable [Semiring A]

/- warning: restrict_scalars.ring_equiv -> RestrictScalars.ringEquiv is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (A : Type.{u3}) [_inst_1 : Semiring.{u3} A], RingEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (Distrib.toHasMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (Distrib.toHasAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))
but is expected to have type
  forall (R : Type.{u1}) (S : Type.{u2}) (A : Type.{u3}) [_inst_1 : Semiring.{u3} A], RingEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (instSemiringRestrictScalars.{u1, u2, u3} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (Distrib.toAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (instSemiringRestrictScalars.{u1, u2, u3} R S A _inst_1))))) (Distrib.toAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))
Case conversion may be inaccurate. Consider using '#align restrict_scalars.ring_equiv RestrictScalars.ringEquivₓ'. -/
/-- Tautological ring isomorphism `restrict_scalars R S A ≃+* A`. -/
def RestrictScalars.ringEquiv : RestrictScalars R S A ≃+* A :=
  RingEquiv.refl _
#align restrict_scalars.ring_equiv RestrictScalars.ringEquiv

variable [CommSemiring S] [Algebra S A] [CommSemiring R] [Algebra R S]

/- warning: restrict_scalars.ring_equiv_map_smul -> RestrictScalars.ringEquiv_map_smul is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (A : Type.{u3}) [_inst_1 : Semiring.{u3} A] [_inst_2 : CommSemiring.{u2} S] [_inst_3 : Algebra.{u2, u3} S A _inst_2 _inst_1] [_inst_4 : CommSemiring.{u1} R] [_inst_5 : Algebra.{u1, u2} R S _inst_4 (CommSemiring.toSemiring.{u2} S _inst_2)] (r : R) (x : RestrictScalars.{u1, u2, u3} R S A), Eq.{succ u3} A (coeFn.{succ u3, succ u3} (RingEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (Distrib.toHasMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (Distrib.toHasAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (fun (_x : RingEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (Distrib.toHasMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (Distrib.toHasAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) => (RestrictScalars.{u1, u2, u3} R S A) -> A) (RingEquiv.hasCoeToFun.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (Distrib.toHasMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (Distrib.toHasAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (RestrictScalars.ringEquiv.{u1, u2, u3} R S A _inst_1) (SMul.smul.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S A) (SMulZeroClass.toHasSmul.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S A) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S A) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S A) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))))) (SMulWithZero.toSmulZeroClass.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S A) (MulZeroClass.toHasZero.{u1} R (MulZeroOneClass.toMulZeroClass.{u1} R (MonoidWithZero.toMulZeroOneClass.{u1} R (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4))))) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S A) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S A) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))))) (MulActionWithZero.toSMulWithZero.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toMonoidWithZero.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4)) (AddZeroClass.toHasZero.{u3} (RestrictScalars.{u1, u2, u3} R S A) (AddMonoid.toAddZeroClass.{u3} (RestrictScalars.{u1, u2, u3} R S A) (AddCommMonoid.toAddMonoid.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))))) (Module.toMulActionWithZero.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S A) (CommSemiring.toSemiring.{u1} R _inst_4) (RestrictScalars.addCommMonoid.{u1, u2, u3} R S A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (RestrictScalars.module.{u1, u2, u3} R S A (CommSemiring.toSemiring.{u2} S _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) _inst_4 _inst_5 (Algebra.toModule.{u2, u3} S A _inst_2 _inst_1 _inst_3)))))) r x)) (SMul.smul.{u2, u3} S A (SMulZeroClass.toHasSmul.{u2, u3} S A (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))))) (SMulWithZero.toSmulZeroClass.{u2, u3} S A (MulZeroClass.toHasZero.{u2} S (MulZeroOneClass.toMulZeroClass.{u2} S (MonoidWithZero.toMulZeroOneClass.{u2} S (Semiring.toMonoidWithZero.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))))) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))))) (MulActionWithZero.toSMulWithZero.{u2, u3} S A (Semiring.toMonoidWithZero.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)) (AddZeroClass.toHasZero.{u3} A (AddMonoid.toAddZeroClass.{u3} A (AddCommMonoid.toAddMonoid.{u3} A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))))) (Module.toMulActionWithZero.{u2, u3} S A (CommSemiring.toSemiring.{u2} S _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (Algebra.toModule.{u2, u3} S A _inst_2 _inst_1 _inst_3))))) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) (algebraMap.{u1, u2} R S _inst_4 (CommSemiring.toSemiring.{u2} S _inst_2) _inst_5) r) (coeFn.{succ u3, succ u3} (RingEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (Distrib.toHasMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (Distrib.toHasAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (fun (_x : RingEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (Distrib.toHasMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (Distrib.toHasAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) => (RestrictScalars.{u1, u2, u3} R S A) -> A) (RingEquiv.hasCoeToFun.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (Distrib.toHasMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (Distrib.toHasAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (RestrictScalars.ringEquiv.{u1, u2, u3} R S A _inst_1) x))
but is expected to have type
  forall (R : Type.{u3}) (S : Type.{u2}) (A : Type.{u1}) [_inst_1 : Semiring.{u1} A] [_inst_2 : CommSemiring.{u2} S] [_inst_3 : Algebra.{u2, u1} S A _inst_2 _inst_1] [_inst_4 : CommSemiring.{u3} R] [_inst_5 : Algebra.{u3, u2} R S _inst_4 (CommSemiring.toSemiring.{u2} S _inst_2)] (r : R) (x : RestrictScalars.{u3, u2, u1} R S A), Eq.{succ u1} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S A) => A) (HSMul.hSMul.{u3, u1, u1} R (RestrictScalars.{u3, u2, u1} R S A) (RestrictScalars.{u3, u2, u1} R S A) (instHSMul.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S A) (SMulZeroClass.toSMul.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S A) (MonoidWithZero.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toMonoidWithZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))) (SMulWithZero.toSMulZeroClass.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S A) (CommMonoidWithZero.toZero.{u3} R (CommSemiring.toCommMonoidWithZero.{u3} R _inst_4)) (MonoidWithZero.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toMonoidWithZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))) (MulActionWithZero.toSMulWithZero.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_4)) (MonoidWithZero.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toMonoidWithZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))) (Module.toMulActionWithZero.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S A) (CommSemiring.toSemiring.{u3} R _inst_4) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1)))) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S A (CommSemiring.toSemiring.{u2} S _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) _inst_4 _inst_5 (Algebra.toModule.{u2, u1} S A _inst_2 _inst_1 _inst_3))))))) r x)) (FunLike.coe.{succ u1, succ u1, succ u1} (RingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))) (RestrictScalars.{u3, u2, u1} R S A) (fun (_x : RestrictScalars.{u3, u2, u1} R S A) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S A) => A) _x) (EmbeddingLike.toFunLike.{succ u1, succ u1, succ u1} (RingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))) (RestrictScalars.{u3, u2, u1} R S A) A (EquivLike.toEmbeddingLike.{succ u1, succ u1, succ u1} (RingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))) (RestrictScalars.{u3, u2, u1} R S A) A (MulEquivClass.toEquivLike.{u1, u1, u1} (RingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))) (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (RingEquivClass.toMulEquivClass.{u1, u1, u1} (RingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))) (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1)))) (RingEquiv.instRingEquivClassRingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))))))) (RestrictScalars.ringEquiv.{u3, u2, u1} R S A _inst_1) (HSMul.hSMul.{u3, u1, u1} R (RestrictScalars.{u3, u2, u1} R S A) (RestrictScalars.{u3, u2, u1} R S A) (instHSMul.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S A) (SMulZeroClass.toSMul.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S A) (MonoidWithZero.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toMonoidWithZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))) (SMulWithZero.toSMulZeroClass.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S A) (CommMonoidWithZero.toZero.{u3} R (CommSemiring.toCommMonoidWithZero.{u3} R _inst_4)) (MonoidWithZero.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toMonoidWithZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))) (MulActionWithZero.toSMulWithZero.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toMonoidWithZero.{u3} R (CommSemiring.toSemiring.{u3} R _inst_4)) (MonoidWithZero.toZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toMonoidWithZero.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))) (Module.toMulActionWithZero.{u3, u1} R (RestrictScalars.{u3, u2, u1} R S A) (CommSemiring.toSemiring.{u3} R _inst_4) (instAddCommMonoidRestrictScalars.{u3, u2, u1} R S A (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1)))) (instModuleRestrictScalarsToSemiringInstAddCommMonoidRestrictScalars.{u3, u2, u1} R S A (CommSemiring.toSemiring.{u2} S _inst_2) (NonUnitalNonAssocSemiring.toAddCommMonoid.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) _inst_4 _inst_5 (Algebra.toModule.{u2, u1} S A _inst_2 _inst_1 _inst_3))))))) r x)) (HSMul.hSMul.{u2, u1, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S A) => A) x) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S A) => A) x) (instHSMul.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S A) => A) x) (Algebra.toSMul.{u2, u1} ((fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) r) ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S A) => A) x) _inst_2 _inst_1 _inst_3)) (FunLike.coe.{max (succ u3) (succ u2), succ u3, succ u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u3 u2, u3, u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) R S (NonUnitalNonAssocSemiring.toMul.{u3} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_4)))) (NonUnitalNonAssocSemiring.toMul.{u2} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)))) (NonUnitalRingHomClass.toMulHomClass.{max u3 u2, u3, u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} R (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_4))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} S (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) (RingHomClass.toNonUnitalRingHomClass.{max u3 u2, u3, u2} (RingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)) (RingHom.instRingHomClassRingHom.{u3, u2} R S (Semiring.toNonAssocSemiring.{u3} R (CommSemiring.toSemiring.{u3} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)))))) (algebraMap.{u3, u2} R S _inst_4 (CommSemiring.toSemiring.{u2} S _inst_2) _inst_5) r) (FunLike.coe.{succ u1, succ u1, succ u1} (RingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))) (RestrictScalars.{u3, u2, u1} R S A) (fun (_x : RestrictScalars.{u3, u2, u1} R S A) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u3, u2, u1} R S A) => A) _x) (EmbeddingLike.toFunLike.{succ u1, succ u1, succ u1} (RingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))) (RestrictScalars.{u3, u2, u1} R S A) A (EquivLike.toEmbeddingLike.{succ u1, succ u1, succ u1} (RingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))) (RestrictScalars.{u3, u2, u1} R S A) A (MulEquivClass.toEquivLike.{u1, u1, u1} (RingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))) (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (RingEquivClass.toMulEquivClass.{u1, u1, u1} (RingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))) (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1)))) (RingEquiv.instRingEquivClassRingEquiv.{u1, u1} (RestrictScalars.{u3, u2, u1} R S A) A (NonUnitalNonAssocSemiring.toMul.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))) (Distrib.toAdd.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u1} (RestrictScalars.{u3, u2, u1} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (Semiring.toNonAssocSemiring.{u1} (RestrictScalars.{u3, u2, u1} R S A) (instSemiringRestrictScalars.{u3, u2, u1} R S A _inst_1))))) (Distrib.toAdd.{u1} A (NonUnitalNonAssocSemiring.toDistrib.{u1} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} A (Semiring.toNonAssocSemiring.{u1} A _inst_1))))))))) (RestrictScalars.ringEquiv.{u3, u2, u1} R S A _inst_1) x))
Case conversion may be inaccurate. Consider using '#align restrict_scalars.ring_equiv_map_smul RestrictScalars.ringEquiv_map_smulₓ'. -/
@[simp]
theorem RestrictScalars.ringEquiv_map_smul (r : R) (x : RestrictScalars R S A) :
    RestrictScalars.ringEquiv R S A (r • x) =
      algebraMap R S r • RestrictScalars.ringEquiv R S A x :=
  rfl
#align restrict_scalars.ring_equiv_map_smul RestrictScalars.ringEquiv_map_smul

/-- `R ⟶ S` induces `S-Alg ⥤ R-Alg` -/
instance : Algebra R (RestrictScalars R S A) :=
  {
    (algebraMap S A).comp (algebraMap R
        S) with
    smul := (· • ·)
    commutes' := fun r x => Algebra.commutes _ _
    smul_def' := fun _ _ => Algebra.smul_def _ _ }

/- warning: restrict_scalars.ring_equiv_algebra_map -> RestrictScalars.ringEquiv_algebraMap is a dubious translation:
lean 3 declaration is
  forall (R : Type.{u1}) (S : Type.{u2}) (A : Type.{u3}) [_inst_1 : Semiring.{u3} A] [_inst_2 : CommSemiring.{u2} S] [_inst_3 : Algebra.{u2, u3} S A _inst_2 _inst_1] [_inst_4 : CommSemiring.{u1} R] [_inst_5 : Algebra.{u1, u2} R S _inst_4 (CommSemiring.toSemiring.{u2} S _inst_2)] (r : R), Eq.{succ u3} A (coeFn.{succ u3, succ u3} (RingEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (Distrib.toHasMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (Distrib.toHasAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (fun (_x : RingEquiv.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (Distrib.toHasMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (Distrib.toHasAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) => (RestrictScalars.{u1, u2, u3} R S A) -> A) (RingEquiv.hasCoeToFun.{u3, u3} (RestrictScalars.{u1, u2, u3} R S A) A (Distrib.toHasMul.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasAdd.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u1, u2, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))))) (Distrib.toHasMul.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (Distrib.toHasAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (RestrictScalars.ringEquiv.{u1, u2, u3} R S A _inst_1) (coeFn.{max (succ u1) (succ u3), max (succ u1) (succ u3)} (RingHom.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))) (fun (_x : RingHom.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))) => R -> (RestrictScalars.{u1, u2, u3} R S A)) (RingHom.hasCoeToFun.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S A) (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u1, u2, u3} R S A) (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1))) (algebraMap.{u1, u3} R (RestrictScalars.{u1, u2, u3} R S A) _inst_4 (RestrictScalars.semiring.{u1, u2, u3} R S A _inst_1) (RestrictScalars.algebra.{u1, u2, u3} R S A _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) r)) (coeFn.{max (succ u2) (succ u3), max (succ u2) (succ u3)} (RingHom.{u2, u3} S A (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)) (Semiring.toNonAssocSemiring.{u3} A _inst_1)) (fun (_x : RingHom.{u2, u3} S A (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)) (Semiring.toNonAssocSemiring.{u3} A _inst_1)) => S -> A) (RingHom.hasCoeToFun.{u2, u3} S A (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2)) (Semiring.toNonAssocSemiring.{u3} A _inst_1)) (algebraMap.{u2, u3} S A _inst_2 _inst_1 _inst_3) (coeFn.{max (succ u1) (succ u2), max (succ u1) (succ u2)} (RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) (fun (_x : RingHom.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) => R -> S) (RingHom.hasCoeToFun.{u1, u2} R S (Semiring.toNonAssocSemiring.{u1} R (CommSemiring.toSemiring.{u1} R _inst_4)) (Semiring.toNonAssocSemiring.{u2} S (CommSemiring.toSemiring.{u2} S _inst_2))) (algebraMap.{u1, u2} R S _inst_4 (CommSemiring.toSemiring.{u2} S _inst_2) _inst_5) r))
but is expected to have type
  forall (R : Type.{u2}) (S : Type.{u1}) (A : Type.{u3}) [_inst_1 : Semiring.{u3} A] [_inst_2 : CommSemiring.{u1} S] [_inst_3 : Algebra.{u1, u3} S A _inst_2 _inst_1] [_inst_4 : CommSemiring.{u2} R] [_inst_5 : Algebra.{u2, u1} R S _inst_4 (CommSemiring.toSemiring.{u1} S _inst_2)] (r : R), Eq.{succ u3} ((fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u2, u1, u3} R S A) => A) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (RingHom.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))) R (fun (a : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => RestrictScalars.{u2, u1, u3} R S A) a) (MulHomClass.toFunLike.{max u2 u3, u2, u3} (RingHom.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))) R (RestrictScalars.{u2, u1, u3} R S A) (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)))) (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u2, u3} (RingHom.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))) R (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u3, u2, u3} (RingHom.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))) R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)) (RingHom.instRingHomClassRingHom.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))))) (algebraMap.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) _inst_4 (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1) (instAlgebraRestrictScalarsInstSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) r)) (FunLike.coe.{succ u3, succ u3, succ u3} (RingEquiv.{u3, u3} (RestrictScalars.{u2, u1, u3} R S A) A (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (Distrib.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))))) (Distrib.toAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (RestrictScalars.{u2, u1, u3} R S A) (fun (_x : RestrictScalars.{u2, u1, u3} R S A) => (fun (x._@.Mathlib.Data.FunLike.Embedding._hyg.19 : RestrictScalars.{u2, u1, u3} R S A) => A) _x) (EmbeddingLike.toFunLike.{succ u3, succ u3, succ u3} (RingEquiv.{u3, u3} (RestrictScalars.{u2, u1, u3} R S A) A (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (Distrib.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))))) (Distrib.toAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (RestrictScalars.{u2, u1, u3} R S A) A (EquivLike.toEmbeddingLike.{succ u3, succ u3, succ u3} (RingEquiv.{u3, u3} (RestrictScalars.{u2, u1, u3} R S A) A (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (Distrib.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))))) (Distrib.toAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (RestrictScalars.{u2, u1, u3} R S A) A (MulEquivClass.toEquivLike.{u3, u3, u3} (RingEquiv.{u3, u3} (RestrictScalars.{u2, u1, u3} R S A) A (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (Distrib.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))))) (Distrib.toAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (RestrictScalars.{u2, u1, u3} R S A) A (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (RingEquivClass.toMulEquivClass.{u3, u3, u3} (RingEquiv.{u3, u3} (RestrictScalars.{u2, u1, u3} R S A) A (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (Distrib.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))))) (Distrib.toAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (RestrictScalars.{u2, u1, u3} R S A) A (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))) (Distrib.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (Distrib.toAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)))) (RingEquiv.instRingEquivClassRingEquiv.{u3, u3} (RestrictScalars.{u2, u1, u3} R S A) A (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (Distrib.toAdd.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonUnitalNonAssocSemiring.toDistrib.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))))) (Distrib.toAdd.{u3} A (NonUnitalNonAssocSemiring.toDistrib.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))))))))) (RestrictScalars.ringEquiv.{u2, u1, u3} R S A _inst_1) (FunLike.coe.{max (succ u2) (succ u3), succ u2, succ u3} (RingHom.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => RestrictScalars.{u2, u1, u3} R S A) _x) (MulHomClass.toFunLike.{max u2 u3, u2, u3} (RingHom.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))) R (RestrictScalars.{u2, u1, u3} R S A) (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)))) (NonUnitalNonAssocSemiring.toMul.{u3} (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u3, u2, u3} (RingHom.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))) R (RestrictScalars.{u2, u1, u3} R S A) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u3, u2, u3} (RingHom.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1))) R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)) (RingHom.instRingHomClassRingHom.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u3} (RestrictScalars.{u2, u1, u3} R S A) (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1)))))) (algebraMap.{u2, u3} R (RestrictScalars.{u2, u1, u3} R S A) _inst_4 (instSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1) (instAlgebraRestrictScalarsInstSemiringRestrictScalars.{u2, u1, u3} R S A _inst_1 _inst_2 _inst_3 _inst_4 _inst_5)) r)) (FunLike.coe.{max (succ u1) (succ u3), succ u1, succ u3} (RingHom.{u1, u3} S A (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u3} A _inst_1)) S (fun (_x : S) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : S) => A) _x) (MulHomClass.toFunLike.{max u1 u3, u1, u3} (RingHom.{u1, u3} S A (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u3} A _inst_1)) S A (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2)))) (NonUnitalNonAssocSemiring.toMul.{u3} A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1))) (NonUnitalRingHomClass.toMulHomClass.{max u1 u3, u1, u3} (RingHom.{u1, u3} S A (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u3} A _inst_1)) S A (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u3} A (Semiring.toNonAssocSemiring.{u3} A _inst_1)) (RingHomClass.toNonUnitalRingHomClass.{max u1 u3, u1, u3} (RingHom.{u1, u3} S A (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u3} A _inst_1)) S A (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u3} A _inst_1) (RingHom.instRingHomClassRingHom.{u1, u3} S A (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2)) (Semiring.toNonAssocSemiring.{u3} A _inst_1))))) (algebraMap.{u1, u3} S A _inst_2 _inst_1 _inst_3) (FunLike.coe.{max (succ u2) (succ u1), succ u2, succ u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2))) R (fun (_x : R) => (fun (x._@.Mathlib.Algebra.Hom.Group._hyg.2391 : R) => S) _x) (MulHomClass.toFunLike.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2))) R S (NonUnitalNonAssocSemiring.toMul.{u2} R (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)))) (NonUnitalNonAssocSemiring.toMul.{u1} S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2)))) (NonUnitalRingHomClass.toMulHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2))) R S (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u2} R (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4))) (NonAssocSemiring.toNonUnitalNonAssocSemiring.{u1} S (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2))) (RingHomClass.toNonUnitalRingHomClass.{max u2 u1, u2, u1} (RingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2))) R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2)) (RingHom.instRingHomClassRingHom.{u2, u1} R S (Semiring.toNonAssocSemiring.{u2} R (CommSemiring.toSemiring.{u2} R _inst_4)) (Semiring.toNonAssocSemiring.{u1} S (CommSemiring.toSemiring.{u1} S _inst_2)))))) (algebraMap.{u2, u1} R S _inst_4 (CommSemiring.toSemiring.{u1} S _inst_2) _inst_5) r))
Case conversion may be inaccurate. Consider using '#align restrict_scalars.ring_equiv_algebra_map RestrictScalars.ringEquiv_algebraMapₓ'. -/
@[simp]
theorem RestrictScalars.ringEquiv_algebraMap (r : R) :
    RestrictScalars.ringEquiv R S A (algebraMap R (RestrictScalars R S A) r) =
      algebraMap S A (algebraMap R S r) :=
  rfl
#align restrict_scalars.ring_equiv_algebra_map RestrictScalars.ringEquiv_algebraMap

end Algebra

