File: Mathlib/LinearAlgebra/LinearDisjoint.lean

full_name: Submodule.linearDisjoint_iff
code: /-- Two submodules `M` and `N` in an algebra `S` over `R` are linearly disjoint if the natural map
`M ⊗[R] N →ₗ[R] S` induced by multiplication in `S` is injective. -/
@[mk_iff]
protected structure LinearDisjoint : Prop where
  injective : Function.Injective (mulMap M N)
goal: M.LinearDisjoint N ↔ Function.Injective ⇑(M.mulMap N)

full_name: Submodule.LinearDisjoint
code: /-- Two submodules `M` and `N` in an algebra `S` over `R` are linearly disjoint if the natural map
`M ⊗[R] N →ₗ[R] S` induced by multiplication in `S` is injective. -/
@[mk_iff]
protected structure LinearDisjoint : Prop where
  injective : Function.Injective (mulMap M N)
goal: Prop

full_name: Submodule.LinearDisjoint.injective
code: /-- Two submodules `M` and `N` in an algebra `S` over `R` are linearly disjoint if the natural map
`M ⊗[R] N →ₗ[R] S` induced by multiplication in `S` is injective. -/
@[mk_iff]
protected structure LinearDisjoint : Prop where
  injective : Function.Injective (mulMap M N)
goal: Function.Injective ⇑(M.mulMap N)

full_name: Submodule.LinearDisjoint.mulMap
code: /-- If `M` and `N` are linearly disjoint submodules, then there is the natural isomorphism
`M ⊗[R] N ≃ₗ[R] M * N` induced by multiplication in `S`. -/
protected def LinearDisjoint.mulMap (H : M.LinearDisjoint N) : M ⊗[R] N ≃ₗ[R] M * N 
goal: ↥M ⊗[R] ↥N ≃ₗ[R] ↥(M * N)

full_name: Submodule.LinearDisjoint.val_mulMap_tmul
code: @[simp]
theorem LinearDisjoint.val_mulMap_tmul (H : M.LinearDisjoint N) (m : M) (n : N) :
    (H.mulMap (m ⊗ₜ[R] n) : S) = m.1 * n.1 
goal: ↑(H.mulMap (m ⊗ₜ[R] n)) = ↑m * ↑n

full_name: Submodule.LinearDisjoint.of_subsingleton
code: @[nontriviality]
theorem LinearDisjoint.of_subsingleton [Subsingleton R] : M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.linearDisjoint_op
code: /-- Linearly disjoint is preserved by taking multiplicative opposite. -/
theorem linearDisjoint_op :
    M.LinearDisjoint N ↔ (equivOpposite.symm (MulOpposite.op N)).LinearDisjoint
      (equivOpposite.symm (MulOpposite.op M)) 
goal: M.LinearDisjoint N ↔
  (Submodule.equivOpposite.symm (MulOpposite.op N)).LinearDisjoint (Submodule.equivOpposite.symm (MulOpposite.op M))

full_name: Submodule.LinearDisjoint.symm_of_commute
code: /-- Linearly disjoint is symmetric if elements in the module commute. -/
theorem LinearDisjoint.symm_of_commute (H : M.LinearDisjoint N)
    (hc : ∀ (m : M) (n : N), Commute m.1 n.1) : N.LinearDisjoint M 
goal: N.LinearDisjoint M

full_name: Submodule.linearDisjoint_symm_of_commute
code: /-- Linearly disjoint is symmetric if elements in the module commute. -/
theorem linearDisjoint_symm_of_commute
    (hc : ∀ (m : M) (n : N), Commute m.1 n.1) : M.LinearDisjoint N ↔ N.LinearDisjoint M 
goal: M.LinearDisjoint N ↔ N.LinearDisjoint M

full_name: Submodule.LinearDisjoint.of_basis_left'
code: /-- If `{ m_i }` is an `R`-basis of `M`, which is also `N`-linearly independent
(in this result it is stated as `Submodule.mulLeftMap` is injective),
then `M` and `N` are linearly disjoint. -/
theorem of_basis_left' {ι : Type*} (m : Basis ι R M)
    (H : Function.Injective (mulLeftMap N m)) : M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.of_basis_right'
code: /-- If `{ n_i }` is an `R`-basis of `N`, which is also `M`-linearly independent
(in this result it is stated as `Submodule.mulRightMap` is injective),
then `M` and `N` are linearly disjoint. -/
theorem of_basis_right' {ι : Type*} (n : Basis ι R N)
    (H : Function.Injective (mulRightMap M n)) : M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.of_basis_mul'
code: /-- If `{ m_i }` is an `R`-basis of `M`, if `{ n_i }` is an `R`-basis of `N`,
such that the family `{ m_i * n_j }` in `S` is `R`-linearly independent
(in this result it is stated as the relevant `Finsupp.total` is injective),
then `M` and `N` are linearly disjoint. -/
theorem of_basis_mul' {κ ι : Type*} (m : Basis κ R M) (n : Basis ι R N)
    (H : Function.Injective (Finsupp.total (κ × ι) S R fun i ↦ m i.1 * n i.2)) :
    M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.bot_left
code: /-- The zero module is linearly disjoint with any other submodules. -/
theorem bot_left : (⊥ : Submodule R S).LinearDisjoint N 
goal: ⊥.LinearDisjoint N

full_name: Submodule.LinearDisjoint.bot_right
code: /-- The zero module is linearly disjoint with any other submodules. -/
theorem bot_right : M.LinearDisjoint (⊥ : Submodule R S) 
goal: M.LinearDisjoint ⊥

full_name: Submodule.LinearDisjoint.one_left
code: /-- The image of `R` in `S` is linearly disjoint with any other submodules. -/
theorem one_left : (1 : Submodule R S).LinearDisjoint N 
goal: Submodule.LinearDisjoint 1 N

full_name: Submodule.LinearDisjoint.one_right
code: /-- The image of `R` in `S` is linearly disjoint with any other submodules. -/
theorem one_right : M.LinearDisjoint (1 : Submodule R S) 
goal: M.LinearDisjoint 1

full_name: Submodule.LinearDisjoint.of_linearDisjoint_fg_left
code: /-- If for any finitely generated submodules `M'` of `M`, `M'` and `N` are linearly disjoint,
then `M` and `N` themselves are linearly disjoint. -/
theorem of_linearDisjoint_fg_left
    (H : ∀ M' : Submodule R S, M' ≤ M → M'.FG → M'.LinearDisjoint N) :
    M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.of_linearDisjoint_fg_right
code: /-- If for any finitely generated submodules `N'` of `N`, `M` and `N'` are linearly disjoint,
then `M` and `N` themselves are linearly disjoint. -/
theorem of_linearDisjoint_fg_right
    (H : ∀ N' : Submodule R S, N' ≤ N → N'.FG → M.LinearDisjoint N') :
    M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.of_linearDisjoint_fg
code: /-- If for any finitely generated submodules `M'` and `N'` of `M` and `N`, respectively,
`M'` and `N'` are linearly disjoint, then `M` and `N` themselves are linearly disjoint. -/
theorem of_linearDisjoint_fg
    (H : ∀ (M' N' : Submodule R S), M' ≤ M → N' ≤ N → M'.FG → N'.FG → M'.LinearDisjoint N') :
    M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.symm
code: /-- Linearly disjoint is symmetric in a commutative ring. -/
theorem LinearDisjoint.symm (H : M.LinearDisjoint N) : N.LinearDisjoint M 
goal: N.LinearDisjoint M

full_name: Submodule.linearDisjoint_symm
code: /-- Linearly disjoint is symmetric in a commutative ring. -/
theorem linearDisjoint_symm : M.LinearDisjoint N ↔ N.LinearDisjoint M 
goal: M.LinearDisjoint N ↔ N.LinearDisjoint M

full_name: Submodule.LinearDisjoint.linearIndependent_left_of_flat
code: /-- If `M` and `N` are linearly disjoint, if `N` is a flat `R`-module, then for any family of
`R`-linearly independent elements `{ m_i }` of `M`, they are also `N`-linearly independent,
in the sense that the `R`-linear map from `ι →₀ N` to `S` which maps `{ n_i }`
to the sum of `m_i * n_i` (`Submodule.mulLeftMap N m`) has trivial kernel. -/
theorem linearIndependent_left_of_flat (H : M.LinearDisjoint N) [Module.Flat R N]
    {ι : Type*} {m : ι → M} (hm : LinearIndependent R m) : LinearMap.ker (mulLeftMap N m) = ⊥ 
goal: LinearMap.ker (Submodule.mulLeftMap N m) = ⊥

full_name: Submodule.LinearDisjoint.of_basis_left
code: /-- If `{ m_i }` is an `R`-basis of `M`, which is also `N`-linearly independent,
then `M` and `N` are linearly disjoint. -/
theorem of_basis_left {ι : Type*} (m : Basis ι R M)
    (H : LinearMap.ker (mulLeftMap N m) = ⊥) : M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.linearIndependent_right_of_flat
code: /-- If `M` and `N` are linearly disjoint, if `M` is a flat `R`-module, then for any family of
`R`-linearly independent elements `{ n_i }` of `N`, they are also `M`-linearly independent,
in the sense that the `R`-linear map from `ι →₀ M` to `S` which maps `{ m_i }`
to the sum of `m_i * n_i` (`Submodule.mulRightMap M n`) has trivial kernel. -/
theorem linearIndependent_right_of_flat (H : M.LinearDisjoint N) [Module.Flat R M]
    {ι : Type*} {n : ι → N} (hn : LinearIndependent R n) : LinearMap.ker (mulRightMap M n) = ⊥ 
goal: LinearMap.ker (M.mulRightMap n) = ⊥

full_name: Submodule.LinearDisjoint.of_basis_right
code: /-- If `{ n_i }` is an `R`-basis of `N`, which is also `M`-linearly independent,
then `M` and `N` are linearly disjoint. -/
theorem of_basis_right {ι : Type*} (n : Basis ι R N)
    (H : LinearMap.ker (mulRightMap M n) = ⊥) : M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.linearIndependent_mul_of_flat_left
code: /-- If `M` and `N` are linearly disjoint, if `M` is flat, then for any family of
`R`-linearly independent elements `{ m_i }` of `M`, and any family of
`R`-linearly independent elements `{ n_j }` of `N`, the family `{ m_i * n_j }` in `S` is
also `R`-linearly independent. -/
theorem linearIndependent_mul_of_flat_left (H : M.LinearDisjoint N) [Module.Flat R M]
    {κ ι : Type*} {m : κ → M} {n : ι → N} (hm : LinearIndependent R m)
    (hn : LinearIndependent R n) : LinearIndependent R fun (i : κ × ι) ↦ (m i.1).1 * (n i.2).1 
goal: LinearIndependent R fun i => ↑(m i.1) * ↑(n i.2)

full_name: Submodule.LinearDisjoint.linearIndependent_mul_of_flat_right
code: /-- If `M` and `N` are linearly disjoint, if `N` is flat, then for any family of
`R`-linearly independent elements `{ m_i }` of `M`, and any family of
`R`-linearly independent elements `{ n_j }` of `N`, the family `{ m_i * n_j }` in `S` is
also `R`-linearly independent. -/
theorem linearIndependent_mul_of_flat_right (H : M.LinearDisjoint N) [Module.Flat R N]
    {κ ι : Type*} {m : κ → M} {n : ι → N} (hm : LinearIndependent R m)
    (hn : LinearIndependent R n) : LinearIndependent R fun (i : κ × ι) ↦ (m i.1).1 * (n i.2).1 
goal: LinearIndependent R fun i => ↑(m i.1) * ↑(n i.2)

full_name: Submodule.LinearDisjoint.linearIndependent_mul_of_flat
code: /-- If `M` and `N` are linearly disjoint, if one of `M` and `N` is flat, then for any family of
`R`-linearly independent elements `{ m_i }` of `M`, and any family of
`R`-linearly independent elements `{ n_j }` of `N`, the family `{ m_i * n_j }` in `S` is
also `R`-linearly independent. -/
theorem linearIndependent_mul_of_flat (H : M.LinearDisjoint N)
    (hf : Module.Flat R M ∨ Module.Flat R N)
    {κ ι : Type*} {m : κ → M} {n : ι → N} (hm : LinearIndependent R m)
    (hn : LinearIndependent R n) : LinearIndependent R fun (i : κ × ι) ↦ (m i.1).1 * (n i.2).1 
goal: LinearIndependent R fun i => ↑(m i.1) * ↑(n i.2)

full_name: Submodule.LinearDisjoint.of_basis_mul
code: /-- If `{ m_i }` is an `R`-basis of `M`, if `{ n_i }` is an `R`-basis of `N`,
such that the family `{ m_i * n_j }` in `S` is `R`-linearly independent,
then `M` and `N` are linearly disjoint. -/
theorem of_basis_mul {κ ι : Type*} (m : Basis κ R M) (n : Basis ι R N)
    (H : LinearIndependent R fun (i : κ × ι) ↦ (m i.1).1 * (n i.2).1) : M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.of_le_left_of_flat
code: /-- If `M` and `N` are linearly disjoint, if `N` is flat, then for any submodule `M'` of `M`,
`M'` and `N` are also linearly disjoint. -/
theorem of_le_left_of_flat (H : M.LinearDisjoint N) {M' : Submodule R S}
    (h : M' ≤ M) [Module.Flat R N] : M'.LinearDisjoint N 
goal: M'.LinearDisjoint N

full_name: Submodule.LinearDisjoint.of_le_right_of_flat
code: /-- If `M` and `N` are linearly disjoint, if `M` is flat, then for any submodule `N'` of `N`,
`M` and `N'` are also linearly disjoint. -/
theorem of_le_right_of_flat (H : M.LinearDisjoint N) {N' : Submodule R S}
    (h : N' ≤ N) [Module.Flat R M] : M.LinearDisjoint N' 
goal: M.LinearDisjoint N'

full_name: Submodule.LinearDisjoint.of_le_of_flat_right
code: /-- If `M` and `N` are linearly disjoint, `M'` and `N'` are submodules of `M` and `N`,
respectively, such that `N` and `M'` are flat, then `M'` and `N'` are also linearly disjoint. -/
theorem of_le_of_flat_right (H : M.LinearDisjoint N) {M' N' : Submodule R S}
    (hm : M' ≤ M) (hn : N' ≤ N) [Module.Flat R N] [Module.Flat R M'] :
    M'.LinearDisjoint N' 
goal: M'.LinearDisjoint N'

full_name: Submodule.LinearDisjoint.of_le_of_flat_left
code: /-- If `M` and `N` are linearly disjoint, `M'` and `N'` are submodules of `M` and `N`,
respectively, such that `M` and `N'` are flat, then `M'` and `N'` are also linearly disjoint. -/
theorem of_le_of_flat_left (H : M.LinearDisjoint N) {M' N' : Submodule R S}
    (hm : M' ≤ M) (hn : N' ≤ N) [Module.Flat R M] [Module.Flat R N'] :
    M'.LinearDisjoint N' 
goal: M'.LinearDisjoint N'

full_name: Submodule.LinearDisjoint.of_left_le_one_of_flat
code: /-- If `N` is flat, `M` is contained in `i(R)`, where `i : R → S` is the structure map,
then `M` and `N` are linearly disjoint. -/
theorem of_left_le_one_of_flat (h : M ≤ 1) [Module.Flat R N] :
    M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.of_right_le_one_of_flat
code: /-- If `M` is flat, `N` is contained in `i(R)`, where `i : R → S` is the structure map,
then `M` and `N` are linearly disjoint. -/
theorem of_right_le_one_of_flat (h : N ≤ 1) [Module.Flat R M] :
    M.LinearDisjoint N 
goal: M.LinearDisjoint N

full_name: Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat_left
code: /-- If `M` and `N` are linearly disjoint, if `M` is flat, then any two commutative
elements of `↥(M ⊓ N)` are not `R`-linearly independent (namely, their span is not `R ^ 2`). -/
theorem not_linearIndependent_pair_of_commute_of_flat_left [Module.Flat R M]
    (a b : ↥(M ⊓ N)) (hc : Commute a.1 b.1) : ¬LinearIndependent R ![a, b] 
goal: ¬LinearIndependent R ![a, b]

full_name: Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat_right
code: /-- If `M` and `N` are linearly disjoint, if `N` is flat, then any two commutative
elements of `↥(M ⊓ N)` are not `R`-linearly independent (namely, their span is not `R ^ 2`). -/
theorem not_linearIndependent_pair_of_commute_of_flat_right [Module.Flat R N]
    (a b : ↥(M ⊓ N)) (hc : Commute a.1 b.1) : ¬LinearIndependent R ![a, b] 
goal: ¬LinearIndependent R ![a, b]

full_name: Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat
code: /-- If `M` and `N` are linearly disjoint, if one of `M` and `N` is flat, then any two commutative
elements of `↥(M ⊓ N)` are not `R`-linearly independent (namely, their span is not `R ^ 2`). -/
theorem not_linearIndependent_pair_of_commute_of_flat (hf : Module.Flat R M ∨ Module.Flat R N)
    (a b : ↥(M ⊓ N)) (hc : Commute a.1 b.1) : ¬LinearIndependent R ![a, b] 
goal: ¬LinearIndependent R ![a, b]

full_name: Submodule.LinearDisjoint.rank_inf_le_one_of_commute_of_flat
code: /-- If `M` and `N` are linearly disjoint, if one of `M` and `N` is flat,
if any two elements of `↥(M ⊓ N)` are commutative, then the rank of `↥(M ⊓ N)` is at most one. -/
theorem rank_inf_le_one_of_commute_of_flat (hf : Module.Flat R M ∨ Module.Flat R N)
    (hc : ∀ (m n : ↥(M ⊓ N)), Commute m.1 n.1) : Module.rank R ↥(M ⊓ N) ≤ 1 
goal: Module.rank R ↥(M ⊓ N) ≤ 1

full_name: Submodule.LinearDisjoint.rank_inf_le_one_of_commute_of_flat_left
code: /-- If `M` and `N` are linearly disjoint, if `M` is flat,
if any two elements of `↥(M ⊓ N)` are commutative, then the rank of `↥(M ⊓ N)` is at most one. -/
theorem rank_inf_le_one_of_commute_of_flat_left [Module.Flat R M]
    (hc : ∀ (m n : ↥(M ⊓ N)), Commute m.1 n.1) : Module.rank R ↥(M ⊓ N) ≤ 1 
goal: Module.rank R ↥(M ⊓ N) ≤ 1

full_name: Submodule.LinearDisjoint.rank_inf_le_one_of_commute_of_flat_right
code: /-- If `M` and `N` are linearly disjoint, if `N` is flat,
if any two elements of `↥(M ⊓ N)` are commutative, then the rank of `↥(M ⊓ N)` is at most one. -/
theorem rank_inf_le_one_of_commute_of_flat_right [Module.Flat R N]
    (hc : ∀ (m n : ↥(M ⊓ N)), Commute m.1 n.1) : Module.rank R ↥(M ⊓ N) ≤ 1 
goal: Module.rank R ↥(M ⊓ N) ≤ 1

full_name: Submodule.LinearDisjoint.rank_le_one_of_commute_of_flat_of_self
code: /-- If `M` and itself are linearly disjoint, if `M` is flat,
if any two elements of `M` are commutative, then the rank of `M` is at most one. -/
theorem rank_le_one_of_commute_of_flat_of_self (H : M.LinearDisjoint M) [Module.Flat R M]
    (hc : ∀ (m n : M), Commute m.1 n.1) : Module.rank R M ≤ 1 
goal: Module.rank R ↥M ≤ 1

full_name: Submodule.LinearDisjoint.not_linearIndependent_pair_of_flat_left
code: /-- The `Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat_left`
for commutative rings. -/
theorem not_linearIndependent_pair_of_flat_left [Module.Flat R M]
    (a b : ↥(M ⊓ N)) : ¬LinearIndependent R ![a, b] 
goal: ¬LinearIndependent R ![a, b]

full_name: Submodule.LinearDisjoint.not_linearIndependent_pair_of_flat_right
code: /-- The `Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat_right`
for commutative rings. -/
theorem not_linearIndependent_pair_of_flat_right [Module.Flat R N]
    (a b : ↥(M ⊓ N)) : ¬LinearIndependent R ![a, b] 
goal: ¬LinearIndependent R ![a, b]

full_name: Submodule.LinearDisjoint.not_linearIndependent_pair_of_flat
code: /-- The `Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat`
for commutative rings. -/
theorem not_linearIndependent_pair_of_flat (hf : Module.Flat R M ∨ Module.Flat R N)
    (a b : ↥(M ⊓ N)) : ¬LinearIndependent R ![a, b] 
goal: ¬LinearIndependent R ![a, b]

full_name: Submodule.LinearDisjoint.rank_inf_le_one_of_flat
code: /-- The `Submodule.LinearDisjoint.rank_inf_le_one_of_commute_of_flat`
for commutative rings. -/
theorem rank_inf_le_one_of_flat (hf : Module.Flat R M ∨ Module.Flat R N) :
    Module.rank R ↥(M ⊓ N) ≤ 1 
goal: Module.rank R ↥(M ⊓ N) ≤ 1

full_name: Submodule.LinearDisjoint.rank_inf_le_one_of_flat_left
code: /-- The `Submodule.LinearDisjoint.rank_inf_le_one_of_commute_of_flat_left`
for commutative rings. -/
theorem rank_inf_le_one_of_flat_left [Module.Flat R M] : Module.rank R ↥(M ⊓ N) ≤ 1 
goal: Module.rank R ↥(M ⊓ N) ≤ 1

full_name: Submodule.LinearDisjoint.rank_inf_le_one_of_flat_right
code: /-- The `Submodule.LinearDisjoint.rank_inf_le_one_of_commute_of_flat_right`
for commutative rings. -/
theorem rank_inf_le_one_of_flat_right [Module.Flat R N] : Module.rank R ↥(M ⊓ N) ≤ 1 
goal: Module.rank R ↥(M ⊓ N) ≤ 1

full_name: Submodule.LinearDisjoint.rank_le_one_of_flat_of_self
code: /-- The `Submodule.LinearDisjoint.rank_le_one_of_commute_of_flat_of_self`
for commutative rings. -/
theorem rank_le_one_of_flat_of_self (H : M.LinearDisjoint M) [Module.Flat R M] :
    Module.rank R M ≤ 1 
goal: Module.rank R ↥M ≤ 1