: the product submodule as a product module
Definitionsubmodule_prodEquivalgebralinear-algebra
Let be a ring and let , be -modules. For submodules and , Mathlib's Submodule.prod forms the submodule . This file records the -linear isomorphism
between the submodule of , regarded as a module in its own right, and the product module of and . The map sends to , where witnesses and ; its inverse reassembles the pair. Every structure field, including linearity and the two inverse laws, holds by rfl. Two simp lemmas describe the map and its inverse pointwise.
Together with Submodule.quotientProdEquiv (the analogous statement for quotients) it lets a rank computation on a direct sum of linear maps be split into one on and one on : for instance as modules.
Definition code
import Mathlib.LinearAlgebra.Prod
/-!
The submodule `p × q` of `M × N`, viewed as a module in its own right, is the
product module `p × q`. Every structure field is definitional.
-/
namespace Submodule
variable {R M N : Type*} [Ring R] [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N]
/-- The submodule `p × q` of `M × N`, viewed as a module, is the product of `p`
and `q`. -/
def prodEquiv (p : Submodule R M) (q : Submodule R N) : p.prod q ≃ₗ[R] p × q where
toFun z := (⟨z.1.1, z.2.1⟩, ⟨z.1.2, z.2.2⟩)
invFun w := ⟨(w.1.1, w.2.1), ⟨w.1.2, w.2.2⟩⟩
map_add' _ _ := rfl
map_smul' _ _ := rfl
left_inv _ := rfl
right_inv _ := rfl
@[simp]
theorem prodEquiv_apply (p : Submodule R M) (q : Submodule R N) (z : p.prod q) :
prodEquiv p q z = (⟨z.1.1, z.2.1⟩, ⟨z.1.2, z.2.2⟩) := rfl
@[simp]
theorem prodEquiv_symm_apply (p : Submodule R M) (q : Submodule R N) (w : p × q) :
(prodEquiv p q).symm w = ⟨(w.1.1, w.2.1), ⟨w.1.2, w.2.2⟩⟩ := rfl
end Submodule
Source
Drafted as a Mathlib contribution for `Mathlib/LinearAlgebra/Prod.lean`, beside `Submodule.prod`; source repository: github.com/tavi-halmaghi (MorseFloer project, `contrib/Mathlib/LinearAlgebra/Prod.lean`).