ntp-mathlib / Extracted /Mathlib /TacticPrediction /Mathlib_Algebra_Algebra_RestrictScalars.jsonl
wellecks's picture
Upload folder using huggingface_hub
01d1bb5 verified
raw
history blame
43.8 kB
{"state":"R : Type u_1\nS✝ : Type u_2\nM✝ : Type u_3\nA : Type u_4\ninst✝⁴ : Semiring S✝\ninst✝³ : AddCommMonoid M✝\ninst✝² : CommSemiring R\ninst✝¹ : Algebra R S✝\ninst✝ : Module S✝ M✝\nr : R\nS : S✝\nM : RestrictScalars R S✝ M✝\n⊢ (r • S) • M = r • S • M","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Tower\n\n#align_import algebra.algebra.restrict_scalars from \"leanprover-community/mathlib\"@\"c310cfdc40da4d99a10a58c33a95360ef9e6e0bf\"\n\n/-!\n\n# The `RestrictScalars` type alias\n\nSee the documentation attached to the `RestrictScalars` definition for advice on how and when to\nuse this type alias. As described there, it is often a better choice to use the `IsScalarTower`\ntypeclass instead.\n\n## Main definitions\n\n* `RestrictScalars R S M`: the `S`-module `M` viewed as an `R` module when `S` is an `R`-algebra.\n Note that by default we do *not* have a `Module S (RestrictScalars R S M)` instance\n for the original action.\n This is available as a def `RestrictScalars.moduleOrig` if really needed.\n* `RestrictScalars.addEquiv : RestrictScalars R S M ≃+ M`: the additive equivalence\n between the restricted and original space (in fact, they are definitionally equal,\n but sometimes it is helpful to avoid using this fact, to keep instances from leaking).\n* `RestrictScalars.ringEquiv : RestrictScalars R S A ≃+* A`: the ring equivalence\n between the restricted and original space when the module is an algebra.\n\n## See also\n\nThere are many similarly-named definitions elsewhere which do not refer to this type alias. These\nrefer to restricting the scalar type in a bundled type, such as from `A →ₗ[R] B` to `A →ₗ[S] B`:\n\n* `LinearMap.restrictScalars`\n* `LinearEquiv.restrictScalars`\n* `AlgHom.restrictScalars`\n* `AlgEquiv.restrictScalars`\n* `Submodule.restrictScalars`\n* `Subalgebra.restrictScalars`\n-/\n\n\nvariable (R S M A : Type*)\n\n/-- If we put an `R`-algebra structure on a semiring `S`, we get a natural equivalence from the\ncategory of `S`-modules to the category of representations of the algebra `S` (over `R`). The type\nsynonym `RestrictScalars` is essentially this equivalence.\n\nWarning: use this type synonym judiciously! Consider an example where we want to construct an\n`R`-linear map from `M` to `S`, given:\n```lean\nvariable (R S M : Type*)\nvariable [CommSemiring R] [Semiring S] [Algebra R S] [AddCommMonoid M] [Module S M]\n```\nWith the assumptions above we can't directly state our map as we have no `Module R M` structure, but\n`RestrictScalars` permits it to be written as:\n```lean\n-- an `R`-module structure on `M` is provided by `RestrictScalars` which is compatible\nexample : RestrictScalars R S M →ₗ[R] S := sorry\n```\nHowever, it is usually better just to add this extra structure as an argument:\n```lean\n-- an `R`-module structure on `M` and proof of its compatibility is provided by the user\nexample [Module R M] [IsScalarTower R S M] : M →ₗ[R] S := sorry\n```\nThe advantage of the second approach is that it defers the duty of providing the missing typeclasses\n`[Module R M] [IsScalarTower R S M]`. If some concrete `M` naturally carries these (as is often\nthe case) then we have avoided `RestrictScalars` entirely. If not, we can pass\n`RestrictScalars R S M` later on instead of `M`.\n\nNote that this means we almost always want to state definitions and lemmas in the language of\n`IsScalarTower` rather than `RestrictScalars`.\n\nAn example of when one might want to use `RestrictScalars` would be if one has a vector space\nover a field of characteristic zero and wishes to make use of the `ℚ`-algebra structure. -/\n@[nolint unusedArguments]\ndef RestrictScalars (_R _S M : Type*) : Type _ := M\n#align restrict_scalars RestrictScalars\n\ninstance [I : Inhabited M] : Inhabited (RestrictScalars R S M) := I\n\ninstance [I : AddCommMonoid M] : AddCommMonoid (RestrictScalars R S M) := I\n\ninstance [I : AddCommGroup M] : AddCommGroup (RestrictScalars R S M) := I\n\nsection Module\n\nsection\n\nvariable [Semiring S] [AddCommMonoid M]\n\n/-- We temporarily install an action of the original ring on `RestrictScalars R S M`. -/\ndef RestrictScalars.moduleOrig [I : Module S M] : Module S (RestrictScalars R S M) := I\n#align restrict_scalars.module_orig RestrictScalars.moduleOrig\n\nvariable [CommSemiring R] [Algebra R S]\n\nsection\n\nattribute [local instance] RestrictScalars.moduleOrig\n\n/-- When `M` is a module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a\nmodule structure over `R`.\n\nThe preferred way of setting this up is `[Module R M] [Module S M] [IsScalarTower R S M]`.\n-/\ninstance RestrictScalars.module [Module S M] : Module R (RestrictScalars R S M) :=\n Module.compHom M (algebraMap R S)\n\n/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) :=\n ⟨fun r S M ↦ by\n ","nextTactic":"rw [Algebra.smul_def]","declUpToTactic":"/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) :=\n ⟨fun r S M ↦ by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_RestrictScalars.111_0.FyKmAB3YCMLCVBR","decl":"/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) "}
{"state":"R : Type u_1\nS✝ : Type u_2\nM✝ : Type u_3\nA : Type u_4\ninst✝⁴ : Semiring S✝\ninst✝³ : AddCommMonoid M✝\ninst✝² : CommSemiring R\ninst✝¹ : Algebra R S✝\ninst✝ : Module S✝ M✝\nr : R\nS : S✝\nM : RestrictScalars R S✝ M✝\n⊢ ((algebraMap R S✝) r * S) • M = r • S • M","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Tower\n\n#align_import algebra.algebra.restrict_scalars from \"leanprover-community/mathlib\"@\"c310cfdc40da4d99a10a58c33a95360ef9e6e0bf\"\n\n/-!\n\n# The `RestrictScalars` type alias\n\nSee the documentation attached to the `RestrictScalars` definition for advice on how and when to\nuse this type alias. As described there, it is often a better choice to use the `IsScalarTower`\ntypeclass instead.\n\n## Main definitions\n\n* `RestrictScalars R S M`: the `S`-module `M` viewed as an `R` module when `S` is an `R`-algebra.\n Note that by default we do *not* have a `Module S (RestrictScalars R S M)` instance\n for the original action.\n This is available as a def `RestrictScalars.moduleOrig` if really needed.\n* `RestrictScalars.addEquiv : RestrictScalars R S M ≃+ M`: the additive equivalence\n between the restricted and original space (in fact, they are definitionally equal,\n but sometimes it is helpful to avoid using this fact, to keep instances from leaking).\n* `RestrictScalars.ringEquiv : RestrictScalars R S A ≃+* A`: the ring equivalence\n between the restricted and original space when the module is an algebra.\n\n## See also\n\nThere are many similarly-named definitions elsewhere which do not refer to this type alias. These\nrefer to restricting the scalar type in a bundled type, such as from `A →ₗ[R] B` to `A →ₗ[S] B`:\n\n* `LinearMap.restrictScalars`\n* `LinearEquiv.restrictScalars`\n* `AlgHom.restrictScalars`\n* `AlgEquiv.restrictScalars`\n* `Submodule.restrictScalars`\n* `Subalgebra.restrictScalars`\n-/\n\n\nvariable (R S M A : Type*)\n\n/-- If we put an `R`-algebra structure on a semiring `S`, we get a natural equivalence from the\ncategory of `S`-modules to the category of representations of the algebra `S` (over `R`). The type\nsynonym `RestrictScalars` is essentially this equivalence.\n\nWarning: use this type synonym judiciously! Consider an example where we want to construct an\n`R`-linear map from `M` to `S`, given:\n```lean\nvariable (R S M : Type*)\nvariable [CommSemiring R] [Semiring S] [Algebra R S] [AddCommMonoid M] [Module S M]\n```\nWith the assumptions above we can't directly state our map as we have no `Module R M` structure, but\n`RestrictScalars` permits it to be written as:\n```lean\n-- an `R`-module structure on `M` is provided by `RestrictScalars` which is compatible\nexample : RestrictScalars R S M →ₗ[R] S := sorry\n```\nHowever, it is usually better just to add this extra structure as an argument:\n```lean\n-- an `R`-module structure on `M` and proof of its compatibility is provided by the user\nexample [Module R M] [IsScalarTower R S M] : M →ₗ[R] S := sorry\n```\nThe advantage of the second approach is that it defers the duty of providing the missing typeclasses\n`[Module R M] [IsScalarTower R S M]`. If some concrete `M` naturally carries these (as is often\nthe case) then we have avoided `RestrictScalars` entirely. If not, we can pass\n`RestrictScalars R S M` later on instead of `M`.\n\nNote that this means we almost always want to state definitions and lemmas in the language of\n`IsScalarTower` rather than `RestrictScalars`.\n\nAn example of when one might want to use `RestrictScalars` would be if one has a vector space\nover a field of characteristic zero and wishes to make use of the `ℚ`-algebra structure. -/\n@[nolint unusedArguments]\ndef RestrictScalars (_R _S M : Type*) : Type _ := M\n#align restrict_scalars RestrictScalars\n\ninstance [I : Inhabited M] : Inhabited (RestrictScalars R S M) := I\n\ninstance [I : AddCommMonoid M] : AddCommMonoid (RestrictScalars R S M) := I\n\ninstance [I : AddCommGroup M] : AddCommGroup (RestrictScalars R S M) := I\n\nsection Module\n\nsection\n\nvariable [Semiring S] [AddCommMonoid M]\n\n/-- We temporarily install an action of the original ring on `RestrictScalars R S M`. -/\ndef RestrictScalars.moduleOrig [I : Module S M] : Module S (RestrictScalars R S M) := I\n#align restrict_scalars.module_orig RestrictScalars.moduleOrig\n\nvariable [CommSemiring R] [Algebra R S]\n\nsection\n\nattribute [local instance] RestrictScalars.moduleOrig\n\n/-- When `M` is a module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a\nmodule structure over `R`.\n\nThe preferred way of setting this up is `[Module R M] [Module S M] [IsScalarTower R S M]`.\n-/\ninstance RestrictScalars.module [Module S M] : Module R (RestrictScalars R S M) :=\n Module.compHom M (algebraMap R S)\n\n/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) :=\n ⟨fun r S M ↦ by\n rw [Algebra.smul_def]\n ","nextTactic":"rw [mul_smul]","declUpToTactic":"/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) :=\n ⟨fun r S M ↦ by\n rw [Algebra.smul_def]\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_RestrictScalars.111_0.FyKmAB3YCMLCVBR","decl":"/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) "}
{"state":"R : Type u_1\nS✝ : Type u_2\nM✝ : Type u_3\nA : Type u_4\ninst✝⁴ : Semiring S✝\ninst✝³ : AddCommMonoid M✝\ninst✝² : CommSemiring R\ninst✝¹ : Algebra R S✝\ninst✝ : Module S✝ M✝\nr : R\nS : S✝\nM : RestrictScalars R S✝ M✝\n⊢ (algebraMap R S✝) r • S • M = r • S • M","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Tower\n\n#align_import algebra.algebra.restrict_scalars from \"leanprover-community/mathlib\"@\"c310cfdc40da4d99a10a58c33a95360ef9e6e0bf\"\n\n/-!\n\n# The `RestrictScalars` type alias\n\nSee the documentation attached to the `RestrictScalars` definition for advice on how and when to\nuse this type alias. As described there, it is often a better choice to use the `IsScalarTower`\ntypeclass instead.\n\n## Main definitions\n\n* `RestrictScalars R S M`: the `S`-module `M` viewed as an `R` module when `S` is an `R`-algebra.\n Note that by default we do *not* have a `Module S (RestrictScalars R S M)` instance\n for the original action.\n This is available as a def `RestrictScalars.moduleOrig` if really needed.\n* `RestrictScalars.addEquiv : RestrictScalars R S M ≃+ M`: the additive equivalence\n between the restricted and original space (in fact, they are definitionally equal,\n but sometimes it is helpful to avoid using this fact, to keep instances from leaking).\n* `RestrictScalars.ringEquiv : RestrictScalars R S A ≃+* A`: the ring equivalence\n between the restricted and original space when the module is an algebra.\n\n## See also\n\nThere are many similarly-named definitions elsewhere which do not refer to this type alias. These\nrefer to restricting the scalar type in a bundled type, such as from `A →ₗ[R] B` to `A →ₗ[S] B`:\n\n* `LinearMap.restrictScalars`\n* `LinearEquiv.restrictScalars`\n* `AlgHom.restrictScalars`\n* `AlgEquiv.restrictScalars`\n* `Submodule.restrictScalars`\n* `Subalgebra.restrictScalars`\n-/\n\n\nvariable (R S M A : Type*)\n\n/-- If we put an `R`-algebra structure on a semiring `S`, we get a natural equivalence from the\ncategory of `S`-modules to the category of representations of the algebra `S` (over `R`). The type\nsynonym `RestrictScalars` is essentially this equivalence.\n\nWarning: use this type synonym judiciously! Consider an example where we want to construct an\n`R`-linear map from `M` to `S`, given:\n```lean\nvariable (R S M : Type*)\nvariable [CommSemiring R] [Semiring S] [Algebra R S] [AddCommMonoid M] [Module S M]\n```\nWith the assumptions above we can't directly state our map as we have no `Module R M` structure, but\n`RestrictScalars` permits it to be written as:\n```lean\n-- an `R`-module structure on `M` is provided by `RestrictScalars` which is compatible\nexample : RestrictScalars R S M →ₗ[R] S := sorry\n```\nHowever, it is usually better just to add this extra structure as an argument:\n```lean\n-- an `R`-module structure on `M` and proof of its compatibility is provided by the user\nexample [Module R M] [IsScalarTower R S M] : M →ₗ[R] S := sorry\n```\nThe advantage of the second approach is that it defers the duty of providing the missing typeclasses\n`[Module R M] [IsScalarTower R S M]`. If some concrete `M` naturally carries these (as is often\nthe case) then we have avoided `RestrictScalars` entirely. If not, we can pass\n`RestrictScalars R S M` later on instead of `M`.\n\nNote that this means we almost always want to state definitions and lemmas in the language of\n`IsScalarTower` rather than `RestrictScalars`.\n\nAn example of when one might want to use `RestrictScalars` would be if one has a vector space\nover a field of characteristic zero and wishes to make use of the `ℚ`-algebra structure. -/\n@[nolint unusedArguments]\ndef RestrictScalars (_R _S M : Type*) : Type _ := M\n#align restrict_scalars RestrictScalars\n\ninstance [I : Inhabited M] : Inhabited (RestrictScalars R S M) := I\n\ninstance [I : AddCommMonoid M] : AddCommMonoid (RestrictScalars R S M) := I\n\ninstance [I : AddCommGroup M] : AddCommGroup (RestrictScalars R S M) := I\n\nsection Module\n\nsection\n\nvariable [Semiring S] [AddCommMonoid M]\n\n/-- We temporarily install an action of the original ring on `RestrictScalars R S M`. -/\ndef RestrictScalars.moduleOrig [I : Module S M] : Module S (RestrictScalars R S M) := I\n#align restrict_scalars.module_orig RestrictScalars.moduleOrig\n\nvariable [CommSemiring R] [Algebra R S]\n\nsection\n\nattribute [local instance] RestrictScalars.moduleOrig\n\n/-- When `M` is a module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a\nmodule structure over `R`.\n\nThe preferred way of setting this up is `[Module R M] [Module S M] [IsScalarTower R S M]`.\n-/\ninstance RestrictScalars.module [Module S M] : Module R (RestrictScalars R S M) :=\n Module.compHom M (algebraMap R S)\n\n/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) :=\n ⟨fun r S M ↦ by\n rw [Algebra.smul_def]\n rw [mul_smul]\n ","nextTactic":"rfl","declUpToTactic":"/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) :=\n ⟨fun r S M ↦ by\n rw [Algebra.smul_def]\n rw [mul_smul]\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_RestrictScalars.111_0.FyKmAB3YCMLCVBR","decl":"/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) "}
{"state":"R : Type u_1\nS : Type u_2\nM : Type u_3\nA : Type u_4\ninst✝⁴ : AddCommMonoid M\ninst✝³ : CommSemiring R\ninst✝² : Semiring S\ninst✝¹ : Algebra R S\ninst✝ : Module S M\nr : R\ns : S\nx : M\n⊢ (AddEquiv.symm (addEquiv R S M)) ((r • s) • x) = r • (AddEquiv.symm (addEquiv R S M)) (s • x)","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Tower\n\n#align_import algebra.algebra.restrict_scalars from \"leanprover-community/mathlib\"@\"c310cfdc40da4d99a10a58c33a95360ef9e6e0bf\"\n\n/-!\n\n# The `RestrictScalars` type alias\n\nSee the documentation attached to the `RestrictScalars` definition for advice on how and when to\nuse this type alias. As described there, it is often a better choice to use the `IsScalarTower`\ntypeclass instead.\n\n## Main definitions\n\n* `RestrictScalars R S M`: the `S`-module `M` viewed as an `R` module when `S` is an `R`-algebra.\n Note that by default we do *not* have a `Module S (RestrictScalars R S M)` instance\n for the original action.\n This is available as a def `RestrictScalars.moduleOrig` if really needed.\n* `RestrictScalars.addEquiv : RestrictScalars R S M ≃+ M`: the additive equivalence\n between the restricted and original space (in fact, they are definitionally equal,\n but sometimes it is helpful to avoid using this fact, to keep instances from leaking).\n* `RestrictScalars.ringEquiv : RestrictScalars R S A ≃+* A`: the ring equivalence\n between the restricted and original space when the module is an algebra.\n\n## See also\n\nThere are many similarly-named definitions elsewhere which do not refer to this type alias. These\nrefer to restricting the scalar type in a bundled type, such as from `A →ₗ[R] B` to `A →ₗ[S] B`:\n\n* `LinearMap.restrictScalars`\n* `LinearEquiv.restrictScalars`\n* `AlgHom.restrictScalars`\n* `AlgEquiv.restrictScalars`\n* `Submodule.restrictScalars`\n* `Subalgebra.restrictScalars`\n-/\n\n\nvariable (R S M A : Type*)\n\n/-- If we put an `R`-algebra structure on a semiring `S`, we get a natural equivalence from the\ncategory of `S`-modules to the category of representations of the algebra `S` (over `R`). The type\nsynonym `RestrictScalars` is essentially this equivalence.\n\nWarning: use this type synonym judiciously! Consider an example where we want to construct an\n`R`-linear map from `M` to `S`, given:\n```lean\nvariable (R S M : Type*)\nvariable [CommSemiring R] [Semiring S] [Algebra R S] [AddCommMonoid M] [Module S M]\n```\nWith the assumptions above we can't directly state our map as we have no `Module R M` structure, but\n`RestrictScalars` permits it to be written as:\n```lean\n-- an `R`-module structure on `M` is provided by `RestrictScalars` which is compatible\nexample : RestrictScalars R S M →ₗ[R] S := sorry\n```\nHowever, it is usually better just to add this extra structure as an argument:\n```lean\n-- an `R`-module structure on `M` and proof of its compatibility is provided by the user\nexample [Module R M] [IsScalarTower R S M] : M →ₗ[R] S := sorry\n```\nThe advantage of the second approach is that it defers the duty of providing the missing typeclasses\n`[Module R M] [IsScalarTower R S M]`. If some concrete `M` naturally carries these (as is often\nthe case) then we have avoided `RestrictScalars` entirely. If not, we can pass\n`RestrictScalars R S M` later on instead of `M`.\n\nNote that this means we almost always want to state definitions and lemmas in the language of\n`IsScalarTower` rather than `RestrictScalars`.\n\nAn example of when one might want to use `RestrictScalars` would be if one has a vector space\nover a field of characteristic zero and wishes to make use of the `ℚ`-algebra structure. -/\n@[nolint unusedArguments]\ndef RestrictScalars (_R _S M : Type*) : Type _ := M\n#align restrict_scalars RestrictScalars\n\ninstance [I : Inhabited M] : Inhabited (RestrictScalars R S M) := I\n\ninstance [I : AddCommMonoid M] : AddCommMonoid (RestrictScalars R S M) := I\n\ninstance [I : AddCommGroup M] : AddCommGroup (RestrictScalars R S M) := I\n\nsection Module\n\nsection\n\nvariable [Semiring S] [AddCommMonoid M]\n\n/-- We temporarily install an action of the original ring on `RestrictScalars R S M`. -/\ndef RestrictScalars.moduleOrig [I : Module S M] : Module S (RestrictScalars R S M) := I\n#align restrict_scalars.module_orig RestrictScalars.moduleOrig\n\nvariable [CommSemiring R] [Algebra R S]\n\nsection\n\nattribute [local instance] RestrictScalars.moduleOrig\n\n/-- When `M` is a module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a\nmodule structure over `R`.\n\nThe preferred way of setting this up is `[Module R M] [Module S M] [IsScalarTower R S M]`.\n-/\ninstance RestrictScalars.module [Module S M] : Module R (RestrictScalars R S M) :=\n Module.compHom M (algebraMap R S)\n\n/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) :=\n ⟨fun r S M ↦ by\n rw [Algebra.smul_def]\n rw [mul_smul]\n rfl⟩\n#align restrict_scalars.is_scalar_tower RestrictScalars.isScalarTower\n\nend\n\n/-- When `M` is a right-module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a\nright-module structure over `R`.\nThe preferred way of setting this up is\n`[Module Rᵐᵒᵖ M] [Module Sᵐᵒᵖ M] [IsScalarTower Rᵐᵒᵖ Sᵐᵒᵖ M]`.\n-/\ninstance RestrictScalars.opModule [Module Sᵐᵒᵖ M] : Module Rᵐᵒᵖ (RestrictScalars R S M) :=\n letI : Module Sᵐᵒᵖ (RestrictScalars R S M) := ‹Module Sᵐᵒᵖ M›\n Module.compHom M (RingHom.op $ algebraMap R S)\n#align restrict_scalars.op_module RestrictScalars.opModule\n\ninstance RestrictScalars.isCentralScalar [Module S M] [Module Sᵐᵒᵖ M] [IsCentralScalar S M] :\n IsCentralScalar R (RestrictScalars R S M) where\n op_smul_eq_smul r _x := (op_smul_eq_smul (algebraMap R S r) (_ : M) : _)\n#align restrict_scalars.is_central_scalar RestrictScalars.isCentralScalar\n\n/-- The `R`-algebra homomorphism from the original coefficient algebra `S` to endomorphisms\nof `RestrictScalars R S M`.\n-/\ndef RestrictScalars.lsmul [Module S M] : S →ₐ[R] Module.End R (RestrictScalars R S M) :=\n -- We use `RestrictScalars.moduleOrig` in the implementation,\n -- but not in the type.\n letI : Module S (RestrictScalars R S M) := RestrictScalars.moduleOrig R S M\n Algebra.lsmul R R (RestrictScalars R S M)\n#align restrict_scalars.lsmul RestrictScalars.lsmul\n\nend\n\nvariable [AddCommMonoid M]\n\n/-- `RestrictScalars.addEquiv` is the additive equivalence with the original module. -/\ndef RestrictScalars.addEquiv : RestrictScalars R S M ≃+ M :=\n AddEquiv.refl M\n#align restrict_scalars.add_equiv RestrictScalars.addEquiv\n\nvariable [CommSemiring R] [Semiring S] [Algebra R S] [Module S M]\n\ntheorem RestrictScalars.smul_def (c : R) (x : RestrictScalars R S M) :\n c • x = (RestrictScalars.addEquiv R S M).symm\n (algebraMap R S c • RestrictScalars.addEquiv R S M x) :=\n rfl\n#align restrict_scalars.smul_def RestrictScalars.smul_def\n\n@[simp]\ntheorem RestrictScalars.addEquiv_map_smul (c : R) (x : RestrictScalars R S M) :\n RestrictScalars.addEquiv R S M (c • x) = algebraMap R S c • RestrictScalars.addEquiv R S M x :=\n rfl\n#align restrict_scalars.add_equiv_map_smul RestrictScalars.addEquiv_map_smul\n\ntheorem RestrictScalars.addEquiv_symm_map_algebraMap_smul (r : R) (x : M) :\n (RestrictScalars.addEquiv R S M).symm (algebraMap R S r • x) =\n r • (RestrictScalars.addEquiv R S M).symm x :=\n rfl\n#align restrict_scalars.add_equiv_symm_map_algebra_map_smul RestrictScalars.addEquiv_symm_map_algebraMap_smul\n\ntheorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :\n (RestrictScalars.addEquiv R S M).symm ((r • s) • x) =\n r • (RestrictScalars.addEquiv R S M).symm (s • x) := by\n ","nextTactic":"rw [Algebra.smul_def]","declUpToTactic":"theorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :\n (RestrictScalars.addEquiv R S M).symm ((r • s) • x) =\n r • (RestrictScalars.addEquiv R S M).symm (s • x) := by\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_RestrictScalars.176_0.FyKmAB3YCMLCVBR","decl":"theorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :\n (RestrictScalars.addEquiv R S M).symm ((r • s) • x) =\n r • (RestrictScalars.addEquiv R S M).symm (s • x) "}
{"state":"R : Type u_1\nS : Type u_2\nM : Type u_3\nA : Type u_4\ninst✝⁴ : AddCommMonoid M\ninst✝³ : CommSemiring R\ninst✝² : Semiring S\ninst✝¹ : Algebra R S\ninst✝ : Module S M\nr : R\ns : S\nx : M\n⊢ (AddEquiv.symm (addEquiv R S M)) (((algebraMap R S) r * s) • x) = r • (AddEquiv.symm (addEquiv R S M)) (s • x)","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Tower\n\n#align_import algebra.algebra.restrict_scalars from \"leanprover-community/mathlib\"@\"c310cfdc40da4d99a10a58c33a95360ef9e6e0bf\"\n\n/-!\n\n# The `RestrictScalars` type alias\n\nSee the documentation attached to the `RestrictScalars` definition for advice on how and when to\nuse this type alias. As described there, it is often a better choice to use the `IsScalarTower`\ntypeclass instead.\n\n## Main definitions\n\n* `RestrictScalars R S M`: the `S`-module `M` viewed as an `R` module when `S` is an `R`-algebra.\n Note that by default we do *not* have a `Module S (RestrictScalars R S M)` instance\n for the original action.\n This is available as a def `RestrictScalars.moduleOrig` if really needed.\n* `RestrictScalars.addEquiv : RestrictScalars R S M ≃+ M`: the additive equivalence\n between the restricted and original space (in fact, they are definitionally equal,\n but sometimes it is helpful to avoid using this fact, to keep instances from leaking).\n* `RestrictScalars.ringEquiv : RestrictScalars R S A ≃+* A`: the ring equivalence\n between the restricted and original space when the module is an algebra.\n\n## See also\n\nThere are many similarly-named definitions elsewhere which do not refer to this type alias. These\nrefer to restricting the scalar type in a bundled type, such as from `A →ₗ[R] B` to `A →ₗ[S] B`:\n\n* `LinearMap.restrictScalars`\n* `LinearEquiv.restrictScalars`\n* `AlgHom.restrictScalars`\n* `AlgEquiv.restrictScalars`\n* `Submodule.restrictScalars`\n* `Subalgebra.restrictScalars`\n-/\n\n\nvariable (R S M A : Type*)\n\n/-- If we put an `R`-algebra structure on a semiring `S`, we get a natural equivalence from the\ncategory of `S`-modules to the category of representations of the algebra `S` (over `R`). The type\nsynonym `RestrictScalars` is essentially this equivalence.\n\nWarning: use this type synonym judiciously! Consider an example where we want to construct an\n`R`-linear map from `M` to `S`, given:\n```lean\nvariable (R S M : Type*)\nvariable [CommSemiring R] [Semiring S] [Algebra R S] [AddCommMonoid M] [Module S M]\n```\nWith the assumptions above we can't directly state our map as we have no `Module R M` structure, but\n`RestrictScalars` permits it to be written as:\n```lean\n-- an `R`-module structure on `M` is provided by `RestrictScalars` which is compatible\nexample : RestrictScalars R S M →ₗ[R] S := sorry\n```\nHowever, it is usually better just to add this extra structure as an argument:\n```lean\n-- an `R`-module structure on `M` and proof of its compatibility is provided by the user\nexample [Module R M] [IsScalarTower R S M] : M →ₗ[R] S := sorry\n```\nThe advantage of the second approach is that it defers the duty of providing the missing typeclasses\n`[Module R M] [IsScalarTower R S M]`. If some concrete `M` naturally carries these (as is often\nthe case) then we have avoided `RestrictScalars` entirely. If not, we can pass\n`RestrictScalars R S M` later on instead of `M`.\n\nNote that this means we almost always want to state definitions and lemmas in the language of\n`IsScalarTower` rather than `RestrictScalars`.\n\nAn example of when one might want to use `RestrictScalars` would be if one has a vector space\nover a field of characteristic zero and wishes to make use of the `ℚ`-algebra structure. -/\n@[nolint unusedArguments]\ndef RestrictScalars (_R _S M : Type*) : Type _ := M\n#align restrict_scalars RestrictScalars\n\ninstance [I : Inhabited M] : Inhabited (RestrictScalars R S M) := I\n\ninstance [I : AddCommMonoid M] : AddCommMonoid (RestrictScalars R S M) := I\n\ninstance [I : AddCommGroup M] : AddCommGroup (RestrictScalars R S M) := I\n\nsection Module\n\nsection\n\nvariable [Semiring S] [AddCommMonoid M]\n\n/-- We temporarily install an action of the original ring on `RestrictScalars R S M`. -/\ndef RestrictScalars.moduleOrig [I : Module S M] : Module S (RestrictScalars R S M) := I\n#align restrict_scalars.module_orig RestrictScalars.moduleOrig\n\nvariable [CommSemiring R] [Algebra R S]\n\nsection\n\nattribute [local instance] RestrictScalars.moduleOrig\n\n/-- When `M` is a module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a\nmodule structure over `R`.\n\nThe preferred way of setting this up is `[Module R M] [Module S M] [IsScalarTower R S M]`.\n-/\ninstance RestrictScalars.module [Module S M] : Module R (RestrictScalars R S M) :=\n Module.compHom M (algebraMap R S)\n\n/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) :=\n ⟨fun r S M ↦ by\n rw [Algebra.smul_def]\n rw [mul_smul]\n rfl⟩\n#align restrict_scalars.is_scalar_tower RestrictScalars.isScalarTower\n\nend\n\n/-- When `M` is a right-module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a\nright-module structure over `R`.\nThe preferred way of setting this up is\n`[Module Rᵐᵒᵖ M] [Module Sᵐᵒᵖ M] [IsScalarTower Rᵐᵒᵖ Sᵐᵒᵖ M]`.\n-/\ninstance RestrictScalars.opModule [Module Sᵐᵒᵖ M] : Module Rᵐᵒᵖ (RestrictScalars R S M) :=\n letI : Module Sᵐᵒᵖ (RestrictScalars R S M) := ‹Module Sᵐᵒᵖ M›\n Module.compHom M (RingHom.op $ algebraMap R S)\n#align restrict_scalars.op_module RestrictScalars.opModule\n\ninstance RestrictScalars.isCentralScalar [Module S M] [Module Sᵐᵒᵖ M] [IsCentralScalar S M] :\n IsCentralScalar R (RestrictScalars R S M) where\n op_smul_eq_smul r _x := (op_smul_eq_smul (algebraMap R S r) (_ : M) : _)\n#align restrict_scalars.is_central_scalar RestrictScalars.isCentralScalar\n\n/-- The `R`-algebra homomorphism from the original coefficient algebra `S` to endomorphisms\nof `RestrictScalars R S M`.\n-/\ndef RestrictScalars.lsmul [Module S M] : S →ₐ[R] Module.End R (RestrictScalars R S M) :=\n -- We use `RestrictScalars.moduleOrig` in the implementation,\n -- but not in the type.\n letI : Module S (RestrictScalars R S M) := RestrictScalars.moduleOrig R S M\n Algebra.lsmul R R (RestrictScalars R S M)\n#align restrict_scalars.lsmul RestrictScalars.lsmul\n\nend\n\nvariable [AddCommMonoid M]\n\n/-- `RestrictScalars.addEquiv` is the additive equivalence with the original module. -/\ndef RestrictScalars.addEquiv : RestrictScalars R S M ≃+ M :=\n AddEquiv.refl M\n#align restrict_scalars.add_equiv RestrictScalars.addEquiv\n\nvariable [CommSemiring R] [Semiring S] [Algebra R S] [Module S M]\n\ntheorem RestrictScalars.smul_def (c : R) (x : RestrictScalars R S M) :\n c • x = (RestrictScalars.addEquiv R S M).symm\n (algebraMap R S c • RestrictScalars.addEquiv R S M x) :=\n rfl\n#align restrict_scalars.smul_def RestrictScalars.smul_def\n\n@[simp]\ntheorem RestrictScalars.addEquiv_map_smul (c : R) (x : RestrictScalars R S M) :\n RestrictScalars.addEquiv R S M (c • x) = algebraMap R S c • RestrictScalars.addEquiv R S M x :=\n rfl\n#align restrict_scalars.add_equiv_map_smul RestrictScalars.addEquiv_map_smul\n\ntheorem RestrictScalars.addEquiv_symm_map_algebraMap_smul (r : R) (x : M) :\n (RestrictScalars.addEquiv R S M).symm (algebraMap R S r • x) =\n r • (RestrictScalars.addEquiv R S M).symm x :=\n rfl\n#align restrict_scalars.add_equiv_symm_map_algebra_map_smul RestrictScalars.addEquiv_symm_map_algebraMap_smul\n\ntheorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :\n (RestrictScalars.addEquiv R S M).symm ((r • s) • x) =\n r • (RestrictScalars.addEquiv R S M).symm (s • x) := by\n rw [Algebra.smul_def]\n ","nextTactic":"rw [mul_smul]","declUpToTactic":"theorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :\n (RestrictScalars.addEquiv R S M).symm ((r • s) • x) =\n r • (RestrictScalars.addEquiv R S M).symm (s • x) := by\n rw [Algebra.smul_def]\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_RestrictScalars.176_0.FyKmAB3YCMLCVBR","decl":"theorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :\n (RestrictScalars.addEquiv R S M).symm ((r • s) • x) =\n r • (RestrictScalars.addEquiv R S M).symm (s • x) "}
{"state":"R : Type u_1\nS : Type u_2\nM : Type u_3\nA : Type u_4\ninst✝⁴ : AddCommMonoid M\ninst✝³ : CommSemiring R\ninst✝² : Semiring S\ninst✝¹ : Algebra R S\ninst✝ : Module S M\nr : R\ns : S\nx : M\n⊢ (AddEquiv.symm (addEquiv R S M)) ((algebraMap R S) r • s • x) = r • (AddEquiv.symm (addEquiv R S M)) (s • x)","srcUpToTactic":"/-\nCopyright (c) 2018 Kenny Lau. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Kenny Lau, Yury Kudryashov\n-/\nimport Mathlib.Algebra.Algebra.Tower\n\n#align_import algebra.algebra.restrict_scalars from \"leanprover-community/mathlib\"@\"c310cfdc40da4d99a10a58c33a95360ef9e6e0bf\"\n\n/-!\n\n# The `RestrictScalars` type alias\n\nSee the documentation attached to the `RestrictScalars` definition for advice on how and when to\nuse this type alias. As described there, it is often a better choice to use the `IsScalarTower`\ntypeclass instead.\n\n## Main definitions\n\n* `RestrictScalars R S M`: the `S`-module `M` viewed as an `R` module when `S` is an `R`-algebra.\n Note that by default we do *not* have a `Module S (RestrictScalars R S M)` instance\n for the original action.\n This is available as a def `RestrictScalars.moduleOrig` if really needed.\n* `RestrictScalars.addEquiv : RestrictScalars R S M ≃+ M`: the additive equivalence\n between the restricted and original space (in fact, they are definitionally equal,\n but sometimes it is helpful to avoid using this fact, to keep instances from leaking).\n* `RestrictScalars.ringEquiv : RestrictScalars R S A ≃+* A`: the ring equivalence\n between the restricted and original space when the module is an algebra.\n\n## See also\n\nThere are many similarly-named definitions elsewhere which do not refer to this type alias. These\nrefer to restricting the scalar type in a bundled type, such as from `A →ₗ[R] B` to `A →ₗ[S] B`:\n\n* `LinearMap.restrictScalars`\n* `LinearEquiv.restrictScalars`\n* `AlgHom.restrictScalars`\n* `AlgEquiv.restrictScalars`\n* `Submodule.restrictScalars`\n* `Subalgebra.restrictScalars`\n-/\n\n\nvariable (R S M A : Type*)\n\n/-- If we put an `R`-algebra structure on a semiring `S`, we get a natural equivalence from the\ncategory of `S`-modules to the category of representations of the algebra `S` (over `R`). The type\nsynonym `RestrictScalars` is essentially this equivalence.\n\nWarning: use this type synonym judiciously! Consider an example where we want to construct an\n`R`-linear map from `M` to `S`, given:\n```lean\nvariable (R S M : Type*)\nvariable [CommSemiring R] [Semiring S] [Algebra R S] [AddCommMonoid M] [Module S M]\n```\nWith the assumptions above we can't directly state our map as we have no `Module R M` structure, but\n`RestrictScalars` permits it to be written as:\n```lean\n-- an `R`-module structure on `M` is provided by `RestrictScalars` which is compatible\nexample : RestrictScalars R S M →ₗ[R] S := sorry\n```\nHowever, it is usually better just to add this extra structure as an argument:\n```lean\n-- an `R`-module structure on `M` and proof of its compatibility is provided by the user\nexample [Module R M] [IsScalarTower R S M] : M →ₗ[R] S := sorry\n```\nThe advantage of the second approach is that it defers the duty of providing the missing typeclasses\n`[Module R M] [IsScalarTower R S M]`. If some concrete `M` naturally carries these (as is often\nthe case) then we have avoided `RestrictScalars` entirely. If not, we can pass\n`RestrictScalars R S M` later on instead of `M`.\n\nNote that this means we almost always want to state definitions and lemmas in the language of\n`IsScalarTower` rather than `RestrictScalars`.\n\nAn example of when one might want to use `RestrictScalars` would be if one has a vector space\nover a field of characteristic zero and wishes to make use of the `ℚ`-algebra structure. -/\n@[nolint unusedArguments]\ndef RestrictScalars (_R _S M : Type*) : Type _ := M\n#align restrict_scalars RestrictScalars\n\ninstance [I : Inhabited M] : Inhabited (RestrictScalars R S M) := I\n\ninstance [I : AddCommMonoid M] : AddCommMonoid (RestrictScalars R S M) := I\n\ninstance [I : AddCommGroup M] : AddCommGroup (RestrictScalars R S M) := I\n\nsection Module\n\nsection\n\nvariable [Semiring S] [AddCommMonoid M]\n\n/-- We temporarily install an action of the original ring on `RestrictScalars R S M`. -/\ndef RestrictScalars.moduleOrig [I : Module S M] : Module S (RestrictScalars R S M) := I\n#align restrict_scalars.module_orig RestrictScalars.moduleOrig\n\nvariable [CommSemiring R] [Algebra R S]\n\nsection\n\nattribute [local instance] RestrictScalars.moduleOrig\n\n/-- When `M` is a module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a\nmodule structure over `R`.\n\nThe preferred way of setting this up is `[Module R M] [Module S M] [IsScalarTower R S M]`.\n-/\ninstance RestrictScalars.module [Module S M] : Module R (RestrictScalars R S M) :=\n Module.compHom M (algebraMap R S)\n\n/-- This instance is only relevant when `RestrictScalars.moduleOrig` is available as an instance.\n-/\ninstance RestrictScalars.isScalarTower [Module S M] : IsScalarTower R S (RestrictScalars R S M) :=\n ⟨fun r S M ↦ by\n rw [Algebra.smul_def]\n rw [mul_smul]\n rfl⟩\n#align restrict_scalars.is_scalar_tower RestrictScalars.isScalarTower\n\nend\n\n/-- When `M` is a right-module over a ring `S`, and `S` is an algebra over `R`, then `M` inherits a\nright-module structure over `R`.\nThe preferred way of setting this up is\n`[Module Rᵐᵒᵖ M] [Module Sᵐᵒᵖ M] [IsScalarTower Rᵐᵒᵖ Sᵐᵒᵖ M]`.\n-/\ninstance RestrictScalars.opModule [Module Sᵐᵒᵖ M] : Module Rᵐᵒᵖ (RestrictScalars R S M) :=\n letI : Module Sᵐᵒᵖ (RestrictScalars R S M) := ‹Module Sᵐᵒᵖ M›\n Module.compHom M (RingHom.op $ algebraMap R S)\n#align restrict_scalars.op_module RestrictScalars.opModule\n\ninstance RestrictScalars.isCentralScalar [Module S M] [Module Sᵐᵒᵖ M] [IsCentralScalar S M] :\n IsCentralScalar R (RestrictScalars R S M) where\n op_smul_eq_smul r _x := (op_smul_eq_smul (algebraMap R S r) (_ : M) : _)\n#align restrict_scalars.is_central_scalar RestrictScalars.isCentralScalar\n\n/-- The `R`-algebra homomorphism from the original coefficient algebra `S` to endomorphisms\nof `RestrictScalars R S M`.\n-/\ndef RestrictScalars.lsmul [Module S M] : S →ₐ[R] Module.End R (RestrictScalars R S M) :=\n -- We use `RestrictScalars.moduleOrig` in the implementation,\n -- but not in the type.\n letI : Module S (RestrictScalars R S M) := RestrictScalars.moduleOrig R S M\n Algebra.lsmul R R (RestrictScalars R S M)\n#align restrict_scalars.lsmul RestrictScalars.lsmul\n\nend\n\nvariable [AddCommMonoid M]\n\n/-- `RestrictScalars.addEquiv` is the additive equivalence with the original module. -/\ndef RestrictScalars.addEquiv : RestrictScalars R S M ≃+ M :=\n AddEquiv.refl M\n#align restrict_scalars.add_equiv RestrictScalars.addEquiv\n\nvariable [CommSemiring R] [Semiring S] [Algebra R S] [Module S M]\n\ntheorem RestrictScalars.smul_def (c : R) (x : RestrictScalars R S M) :\n c • x = (RestrictScalars.addEquiv R S M).symm\n (algebraMap R S c • RestrictScalars.addEquiv R S M x) :=\n rfl\n#align restrict_scalars.smul_def RestrictScalars.smul_def\n\n@[simp]\ntheorem RestrictScalars.addEquiv_map_smul (c : R) (x : RestrictScalars R S M) :\n RestrictScalars.addEquiv R S M (c • x) = algebraMap R S c • RestrictScalars.addEquiv R S M x :=\n rfl\n#align restrict_scalars.add_equiv_map_smul RestrictScalars.addEquiv_map_smul\n\ntheorem RestrictScalars.addEquiv_symm_map_algebraMap_smul (r : R) (x : M) :\n (RestrictScalars.addEquiv R S M).symm (algebraMap R S r • x) =\n r • (RestrictScalars.addEquiv R S M).symm x :=\n rfl\n#align restrict_scalars.add_equiv_symm_map_algebra_map_smul RestrictScalars.addEquiv_symm_map_algebraMap_smul\n\ntheorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :\n (RestrictScalars.addEquiv R S M).symm ((r • s) • x) =\n r • (RestrictScalars.addEquiv R S M).symm (s • x) := by\n rw [Algebra.smul_def]\n rw [mul_smul]\n ","nextTactic":"rfl","declUpToTactic":"theorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :\n (RestrictScalars.addEquiv R S M).symm ((r • s) • x) =\n r • (RestrictScalars.addEquiv R S M).symm (s • x) := by\n rw [Algebra.smul_def]\n rw [mul_smul]\n ","declId":"Examples.Mathlib.SplitRw.Mathlib_Algebra_Algebra_RestrictScalars.176_0.FyKmAB3YCMLCVBR","decl":"theorem RestrictScalars.addEquiv_symm_map_smul_smul (r : R) (s : S) (x : M) :\n (RestrictScalars.addEquiv R S M).symm ((r • s) • x) =\n r • (RestrictScalars.addEquiv R S M).symm (s • x) "}