Datasets:

Modalities:
Text
Languages:
English
Libraries:
Datasets
License:
Zhangir Azerbayev
I think it's all done!
fc5e983
raw
history blame
5.33 kB
/-
Copyright (c) 2022 Oliver Nash. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Oliver Nash
-/
import ring_theory.tensor_product
/-!
# Bimodules
One frequently encounters situations in which several sets of scalars act on a single space, subject
to compatibility condition(s). A distinguished instance of this is the theory of bimodules: one has
two rings `R`, `S` acting on an additive group `M`, with `R` acting covariantly ("on the left")
and `S` acting contravariantly ("on the right"). The compatibility condition is just:
`(r β€’ m) β€’ s = r β€’ (m β€’ s)` for all `r : R`, `s : S`, `m : M`.
This situation can be set up in Mathlib as:
```lean
variables (R S M : Type*) [ring R] [ring S]
variables [add_comm_group M] [module R M] [module Sᡐᡒᡖ M] [smul_comm_class R Sᡐᡒᡖ M]
```
The key fact is:
```lean
example : module (R βŠ—[β„•] Sᡐᡒᡖ) M := tensor_product.algebra.module
```
Note that the corresponding result holds for the canonically isomorphic ring `R βŠ—[β„€] Sᡐᡒᡖ` but it is
preferable to use the `R βŠ—[β„•] Sᡐᡒᡖ` instance since it works without additive inverses.
Bimodules are thus just a special case of `module`s and most of their properties follow from the
theory of `module`s`. In particular a two-sided submodule of a bimodule is simply a term of type
`submodule (R βŠ—[β„•] Sᡐᡒᡖ) M`.
This file is a place to collect results which are specific to bimodules.
## Main definitions
* `subbimodule.mk`
* `subbimodule.smul_mem`
* `subbimodule.smul_mem'`
* `subbimodule.to_submodule`
* `subbimodule.to_submodule'`
## Implementation details
For many definitions and lemmas it is preferable to set things up without opposites, i.e., as:
`[module S M] [smul_comm_class R S M]` rather than `[module Sᡐᡒᡖ M] [smul_comm_class R Sᡐᡒᡖ M]`.
The corresponding results for opposites then follow automatically and do not require taking
advantage of the fact that `(Sᡐᡒᡖ)ᡐᡒᡖ` is defeq to `S`.
## TODO
Develop the theory of two-sided ideals, which have type `submodule (R βŠ—[β„•] Rᡐᡒᡖ) R`.
-/
open_locale tensor_product
local attribute [instance] tensor_product.algebra.module
namespace subbimodule
section algebra
variables {R A B M : Type*}
variables [comm_semiring R] [add_comm_monoid M] [module R M]
variables [semiring A] [semiring B] [module A M] [module B M]
variables [algebra R A] [algebra R B]
variables [is_scalar_tower R A M] [is_scalar_tower R B M]
variables [smul_comm_class A B M]
/-- A constructor for a subbimodule which demands closure under the two sets of scalars
individually, rather than jointly via their tensor product.
Note that `R` plays no role but it is convenient to make this generalisation to support the cases
`R = β„•` and `R = β„€` which both show up naturally. See also `base_change`. -/
@[simps] def mk (p : add_submonoid M)
(hA : βˆ€ (a : A) {m : M}, m ∈ p β†’ a β€’ m ∈ p)
(hB : βˆ€ (b : B) {m : M}, m ∈ p β†’ b β€’ m ∈ p) : submodule (A βŠ—[R] B) M :=
{ carrier := p,
smul_mem' := Ξ» ab m, tensor_product.induction_on ab
(Ξ» hm, by simpa only [zero_smul] using p.zero_mem)
(Ξ» a b hm, by simpa only [tensor_product.algebra.smul_def] using hA a (hB b hm))
(Ξ» z w hz hw hm, by simpa only [add_smul] using p.add_mem (hz hm) (hw hm)),
.. p }
lemma smul_mem (p : submodule (A βŠ—[R] B) M) (a : A) {m : M} (hm : m ∈ p) : a β€’ m ∈ p :=
begin
suffices : a β€’ m = a βŠ—β‚œ[R] (1 : B) β€’ m, { exact this.symm β–Έ p.smul_mem _ hm, },
simp [tensor_product.algebra.smul_def],
end
lemma smul_mem' (p : submodule (A βŠ—[R] B) M) (b : B) {m : M} (hm : m ∈ p) : b β€’ m ∈ p :=
begin
suffices : b β€’ m = (1 : A) βŠ—β‚œ[R] b β€’ m, { exact this.symm β–Έ p.smul_mem _ hm, },
simp [tensor_product.algebra.smul_def],
end
/-- If `A` and `B` are also `algebra`s over yet another set of scalars `S` then we may "base change"
from `R` to `S`. -/
@[simps] def base_change (S : Type*) [comm_semiring S] [module S M] [algebra S A] [algebra S B]
[is_scalar_tower S A M] [is_scalar_tower S B M] (p : submodule (A βŠ—[R] B) M) :
submodule (A βŠ—[S] B) M :=
mk p.to_add_submonoid (smul_mem p) (smul_mem' p)
/-- Forgetting the `B` action, a `submodule` over `A βŠ—[R] B` is just a `submodule` over `A`. -/
@[simps] def to_submodule (p : submodule (A βŠ—[R] B) M) : submodule A M :=
{ carrier := p,
smul_mem' := smul_mem p,
.. p }
/-- Forgetting the `A` action, a `submodule` over `A βŠ—[R] B` is just a `submodule` over `B`. -/
@[simps] def to_submodule' (p : submodule (A βŠ—[R] B) M) : submodule B M :=
{ carrier := p,
smul_mem' := smul_mem' p,
.. p }
end algebra
section ring
variables (R S M : Type*) [ring R] [ring S]
variables [add_comm_group M] [module R M] [module S M] [smul_comm_class R S M]
/-- A `submodule` over `R βŠ—[β„•] S` is naturally also a `submodule` over the canonically-isomorphic
ring `R βŠ—[β„€] S`. -/
@[simps] def to_subbimodule_int (p : submodule (R βŠ—[β„•] S) M) : submodule (R βŠ—[β„€] S) M :=
base_change β„€ p
/-- A `submodule` over `R βŠ—[β„€] S` is naturally also a `submodule` over the canonically-isomorphic
ring `R βŠ—[β„•] S`. -/
@[simps] def to_subbimodule_nat (p : submodule (R βŠ—[β„€] S) M) : submodule (R βŠ—[β„•] S) M :=
base_change β„• p
end ring
end subbimodule