fact
stringlengths
6
3.84k
type
stringclasses
11 values
library
stringclasses
32 values
imports
listlengths
1
14
filename
stringlengths
20
95
symbolic_name
stringlengths
1
90
docstring
stringlengths
7
20k
map (H : M.LinearDisjoint N) {T : Type w} [Semiring T] [Algebra R T] {F : Type*} [FunLike F S T] [AlgHomClass F R S T] (f : F) (hf : Function.Injective f) : (M.map f).LinearDisjoint (N.map f) := by rw [linearDisjoint_iff] at H ⊢ have : _ ∘ₗ (TensorProduct.congr (M.equivMapOfInjective f hf) (N.equivMapOfInjective f hf)).toLinearMap = _ := M.mulMap_map_comp_eq N f replace H : Function.Injective ((f : S →ₗ[R] T) ∘ₗ mulMap M N) := hf.comp H simpa only [← this, LinearMap.coe_comp, LinearEquiv.coe_coe, EquivLike.injective_comp] using H variable (M N)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
map
Linear disjointness is preserved by injective algebra homomorphisms.
of_basis_left' {ι : Type*} (m : Basis ι R M) (H : Function.Injective (mulLeftMap N m)) : M.LinearDisjoint N := by classical simp_rw [mulLeftMap_eq_mulMap_comp, ← Basis.coe_repr_symm, ← LinearEquiv.coe_rTensor, LinearEquiv.comp_coe, LinearMap.coe_comp, LinearEquiv.coe_coe, EquivLike.injective_comp] at H exact ⟨H⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_basis_left'
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.
of_basis_right' {ι : Type*} (n : Basis ι R N) (H : Function.Injective (mulRightMap M n)) : M.LinearDisjoint N := by classical simp_rw [mulRightMap_eq_mulMap_comp, ← Basis.coe_repr_symm, ← LinearEquiv.coe_lTensor, LinearEquiv.comp_coe, LinearMap.coe_comp, LinearEquiv.coe_coe, EquivLike.injective_comp] at H exact ⟨H⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_basis_right'
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.
of_basis_mul' {κ ι : Type*} (m : Basis κ R M) (n : Basis ι R N) (H : Function.Injective (Finsupp.linearCombination R fun i : κ × ι ↦ (m i.1 * n i.2 : S))) : M.LinearDisjoint N := by let i0 := (finsuppTensorFinsupp' R κ ι).symm let i1 := TensorProduct.congr m.repr n.repr let i := mulMap M N ∘ₗ (i0.trans i1.symm).toLinearMap have : i = Finsupp.linearCombination R fun i : κ × ι ↦ (m i.1 * n i.2 : S) := by ext x simp [i, i0, i1, finsuppTensorFinsupp'_symm_single_eq_single_one_tmul] simp_rw [← this, i, LinearMap.coe_comp, LinearEquiv.coe_coe, EquivLike.injective_comp] at H exact ⟨H⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_basis_mul'
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.linearCombination` is injective), then `M` and `N` are linearly disjoint.
bot_left : (⊥ : Submodule R S).LinearDisjoint N := ⟨Function.injective_of_subsingleton _⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
bot_left
The zero module is linearly disjoint with any other submodules.
bot_right : M.LinearDisjoint (⊥ : Submodule R S) := ⟨Function.injective_of_subsingleton _⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
bot_right
The zero module is linearly disjoint with any other submodules.
one_left : (1 : Submodule R S).LinearDisjoint N := by rw [linearDisjoint_iff, ← Algebra.toSubmodule_bot, mulMap_one_left_eq] exact N.injective_subtype.comp N.lTensorOne.injective
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
one_left
The image of `R` in `S` is linearly disjoint with any other submodules.
one_right : M.LinearDisjoint (1 : Submodule R S) := by rw [linearDisjoint_iff, ← Algebra.toSubmodule_bot, mulMap_one_right_eq] exact M.injective_subtype.comp M.rTensorOne.injective
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
one_right
The image of `R` in `S` is linearly disjoint with any other submodules.
of_linearDisjoint_fg_left (H : ∀ M' : Submodule R S, M' ≤ M → M'.FG → M'.LinearDisjoint N) : M.LinearDisjoint N := (linearDisjoint_iff _ _).2 fun x y hxy ↦ by obtain ⟨M', hM, hFG, h⟩ := TensorProduct.exists_finite_submodule_left_of_finite' {x, y} (Set.toFinite _) rw [Module.Finite.iff_fg] at hFG obtain ⟨x', hx'⟩ := h (show x ∈ {x, y} by simp) obtain ⟨y', hy'⟩ := h (show y ∈ {x, y} by simp) rw [← hx', ← hy']; congr exact (H M' hM hFG).injective (by simp [← mulMap_comp_rTensor _ hM, hx', hy', hxy])
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_linearDisjoint_fg_left
If for any finitely generated submodules `M'` of `M`, `M'` and `N` are linearly disjoint, then `M` and `N` themselves are linearly disjoint.
of_linearDisjoint_fg_right (H : ∀ N' : Submodule R S, N' ≤ N → N'.FG → M.LinearDisjoint N') : M.LinearDisjoint N := (linearDisjoint_iff _ _).2 fun x y hxy ↦ by obtain ⟨N', hN, hFG, h⟩ := TensorProduct.exists_finite_submodule_right_of_finite' {x, y} (Set.toFinite _) rw [Module.Finite.iff_fg] at hFG obtain ⟨x', hx'⟩ := h (show x ∈ {x, y} by simp) obtain ⟨y', hy'⟩ := h (show y ∈ {x, y} by simp) rw [← hx', ← hy']; congr exact (H N' hN hFG).injective (by simp [← mulMap_comp_lTensor _ hN, hx', hy', hxy])
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_linearDisjoint_fg_right
If for any finitely generated submodules `N'` of `N`, `M` and `N'` are linearly disjoint, then `M` and `N` themselves are linearly disjoint.
of_linearDisjoint_fg (H : ∀ (M' N' : Submodule R S), M' ≤ M → N' ≤ N → M'.FG → N'.FG → M'.LinearDisjoint N') : M.LinearDisjoint N := of_linearDisjoint_fg_left _ _ fun _ hM hM' ↦ of_linearDisjoint_fg_right _ _ fun _ hN hN' ↦ H _ _ hM hN hM' hN'
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_linearDisjoint_fg
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.
LinearDisjoint.symm (H : M.LinearDisjoint N) : N.LinearDisjoint M := H.symm_of_commute fun _ _ ↦ mul_comm _ _
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
LinearDisjoint.symm
Linear disjointness is symmetric in a commutative ring.
linearDisjoint_comm : M.LinearDisjoint N ↔ N.LinearDisjoint M := ⟨LinearDisjoint.symm, LinearDisjoint.symm⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
linearDisjoint_comm
Linear disjointness is symmetric in a commutative ring.
linearIndependent_left_of_flat (H : M.LinearDisjoint N) [Module.Flat R N] {ι : Type*} {m : ι → M} (hm : LinearIndependent R m) : LinearMap.ker (mulLeftMap N m) = ⊥ := by refine LinearMap.ker_eq_bot_of_injective ?_ classical simp_rw [mulLeftMap_eq_mulMap_comp, LinearMap.coe_comp, LinearEquiv.coe_coe, ← Function.comp_assoc, EquivLike.injective_comp] rw [LinearIndependent] at hm exact H.injective.comp (Module.Flat.rTensor_preserves_injective_linearMap (M := N) _ hm)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
linearIndependent_left_of_flat
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.
of_basis_left {ι : Type*} (m : Basis ι R M) (H : LinearMap.ker (mulLeftMap N m) = ⊥) : M.LinearDisjoint N := by letI : AddCommGroup (ι →₀ N) := Finsupp.instAddCommGroup exact of_basis_left' M N m (LinearMap.ker_eq_bot.1 H) variable {M N} in
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_basis_left
If `{ m_i }` is an `R`-basis of `M`, which is also `N`-linearly independent, then `M` and `N` are linearly disjoint.
linearIndependent_right_of_flat (H : M.LinearDisjoint N) [Module.Flat R M] {ι : Type*} {n : ι → N} (hn : LinearIndependent R n) : LinearMap.ker (mulRightMap M n) = ⊥ := by refine LinearMap.ker_eq_bot_of_injective ?_ classical simp_rw [mulRightMap_eq_mulMap_comp, LinearMap.coe_comp, LinearEquiv.coe_coe, ← Function.comp_assoc, EquivLike.injective_comp] rw [LinearIndependent] at hn exact H.injective.comp (Module.Flat.lTensor_preserves_injective_linearMap (M := M) _ hn)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
linearIndependent_right_of_flat
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.
of_basis_right {ι : Type*} (n : Basis ι R N) (H : LinearMap.ker (mulRightMap M n) = ⊥) : M.LinearDisjoint N := by letI : AddCommGroup (ι →₀ M) := Finsupp.instAddCommGroup exact of_basis_right' M N n (LinearMap.ker_eq_bot.1 H) variable {M N} in
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_basis_right
If `{ n_i }` is an `R`-basis of `N`, which is also `M`-linearly independent, then `M` and `N` are linearly disjoint.
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 := by rw [LinearIndependent] at hm hn ⊢ let i0 := (finsuppTensorFinsupp' R κ ι).symm let i1 := LinearMap.rTensor (ι →₀ R) (Finsupp.linearCombination R m) let i2 := LinearMap.lTensor M (Finsupp.linearCombination R n) let i := mulMap M N ∘ₗ i2 ∘ₗ i1 ∘ₗ i0.toLinearMap have h1 : Function.Injective i1 := Module.Flat.rTensor_preserves_injective_linearMap _ hm have h2 : Function.Injective i2 := Module.Flat.lTensor_preserves_injective_linearMap _ hn have h : Function.Injective i := H.injective.comp h2 |>.comp h1 |>.comp i0.injective have : i = Finsupp.linearCombination R fun i ↦ (m i.1).1 * (n i.2).1 := by ext x simp [i, i0, i1, i2, finsuppTensorFinsupp'_symm_single_eq_single_one_tmul] rwa [this] at h variable {M N} in
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
linearIndependent_mul_of_flat_left
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.
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 := by rw [LinearIndependent] at hm hn ⊢ let i0 := (finsuppTensorFinsupp' R κ ι).symm let i1 := LinearMap.lTensor (κ →₀ R) (Finsupp.linearCombination R n) let i2 := LinearMap.rTensor N (Finsupp.linearCombination R m) let i := mulMap M N ∘ₗ i2 ∘ₗ i1 ∘ₗ i0.toLinearMap have h1 : Function.Injective i1 := Module.Flat.lTensor_preserves_injective_linearMap _ hn have h2 : Function.Injective i2 := Module.Flat.rTensor_preserves_injective_linearMap _ hm have h : Function.Injective i := H.injective.comp h2 |>.comp h1 |>.comp i0.injective have : i = Finsupp.linearCombination R fun i ↦ (m i.1).1 * (n i.2).1 := by ext x simp [i, i0, i1, i2, finsuppTensorFinsupp'_symm_single_eq_single_one_tmul] rwa [this] at h variable {M N} in
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
linearIndependent_mul_of_flat_right
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.
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 := by rcases hf with _ | _ · exact H.linearIndependent_mul_of_flat_left hm hn · exact H.linearIndependent_mul_of_flat_right hm hn
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
linearIndependent_mul_of_flat
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.
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 := by rw [LinearIndependent] at H exact of_basis_mul' M N m n H variable {M N} in
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_basis_mul
If `{ m_i }` is an `R`-basis of `M`, if `{ n_j }` 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.
of_le_left_of_flat (H : M.LinearDisjoint N) {M' : Submodule R S} (h : M' ≤ M) [Module.Flat R N] : M'.LinearDisjoint N := by let i := mulMap M N ∘ₗ (inclusion h).rTensor N have hi : Function.Injective i := H.injective.comp <| Module.Flat.rTensor_preserves_injective_linearMap _ <| inclusion_injective h have : i = mulMap M' N := by ext; simp [i] exact ⟨this ▸ hi⟩ variable {M N} in
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_le_left_of_flat
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.
of_le_right_of_flat (H : M.LinearDisjoint N) {N' : Submodule R S} (h : N' ≤ N) [Module.Flat R M] : M.LinearDisjoint N' := by let i := mulMap M N ∘ₗ (inclusion h).lTensor M have hi : Function.Injective i := H.injective.comp <| Module.Flat.lTensor_preserves_injective_linearMap _ <| inclusion_injective h have : i = mulMap M N' := by ext; simp [i] exact ⟨this ▸ hi⟩ variable {M N} in
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_le_right_of_flat
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.
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' := (H.of_le_left_of_flat hm).of_le_right_of_flat hn variable {M N} in
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_le_of_flat_right
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.
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' := (H.of_le_right_of_flat hn).of_le_left_of_flat hm
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_le_of_flat_left
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.
of_left_le_one_of_flat (h : M ≤ 1) [Module.Flat R N] : M.LinearDisjoint N := (one_left N).of_le_left_of_flat h
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_left_le_one_of_flat
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.
of_right_le_one_of_flat (h : N ≤ 1) [Module.Flat R M] : M.LinearDisjoint N := (one_right M).of_le_right_of_flat h
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
of_right_le_one_of_flat
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.
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] := fun h ↦ by let n : Fin 2 → N := (inclusion inf_le_right) ∘ ![a, b] have hn : LinearIndependent R n := h.map' _ (ker_inclusion _ _ _) letI : AddCommGroup (Fin 2 →₀ M) := Finsupp.instAddCommGroup let m : Fin 2 →₀ M := .single 0 ⟨b.1, b.2.1⟩ - .single 1 ⟨a.1, a.2.1⟩ have hm : mulRightMap M n m = 0 := by simp [m, n, show _ * _ = _ * _ from hc] rw [← LinearMap.mem_ker, H.linearIndependent_right_of_flat hn, mem_bot] at hm simp only [Fin.isValue, sub_eq_zero, Finsupp.single_eq_single_iff, zero_ne_one, Subtype.mk.injEq, SetLike.coe_eq_coe, false_and, false_or, m] at hm repeat rw [AddSubmonoid.mk_eq_zero, ZeroMemClass.coe_eq_zero] at hm exact h.ne_zero 0 hm.2
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
not_linearIndependent_pair_of_commute_of_flat_left
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`).
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] := fun h ↦ by let m : Fin 2 → M := (inclusion inf_le_left) ∘ ![a, b] have hm : LinearIndependent R m := h.map' _ (ker_inclusion _ _ _) letI : AddCommGroup (Fin 2 →₀ N) := Finsupp.instAddCommGroup let n : Fin 2 →₀ N := .single 0 ⟨b.1, b.2.2⟩ - .single 1 ⟨a.1, a.2.2⟩ have hn : mulLeftMap N m n = 0 := by simp [m, n, show _ * _ = _ * _ from hc] rw [← LinearMap.mem_ker, H.linearIndependent_left_of_flat hm, mem_bot] at hn simp only [Fin.isValue, sub_eq_zero, Finsupp.single_eq_single_iff, zero_ne_one, Subtype.mk.injEq, SetLike.coe_eq_coe, false_and, false_or, n] at hn repeat rw [AddSubmonoid.mk_eq_zero, ZeroMemClass.coe_eq_zero] at hn exact h.ne_zero 0 hn.2
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
not_linearIndependent_pair_of_commute_of_flat_right
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`).
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] := by rcases hf with _ | _ · exact H.not_linearIndependent_pair_of_commute_of_flat_left a b hc · exact H.not_linearIndependent_pair_of_commute_of_flat_right a b hc
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
not_linearIndependent_pair_of_commute_of_flat
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`).
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 := by nontriviality R refine _root_.rank_le fun s h ↦ ?_ by_contra hs rw [not_le, ← Fintype.card_coe, Fintype.one_lt_card_iff_nontrivial] at hs obtain ⟨a, b, hab⟩ := hs.exists_pair_ne refine H.not_linearIndependent_pair_of_commute_of_flat hf a.1 b.1 (hc a.1 b.1) ?_ have := h.comp ![a, b] fun i j hij ↦ by fin_cases i <;> fin_cases j · rfl · simp [hab] at hij · simp [hab.symm] at hij · rfl convert this ext i fin_cases i <;> simp
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
rank_inf_le_one_of_commute_of_flat
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.
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 := H.rank_inf_le_one_of_commute_of_flat (Or.inl ‹_›) hc
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
rank_inf_le_one_of_commute_of_flat_left
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.
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 := H.rank_inf_le_one_of_commute_of_flat (Or.inr ‹_›) hc
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
rank_inf_le_one_of_commute_of_flat_right
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.
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 := by rw [← inf_of_le_left (le_refl M)] at hc ⊢ exact H.rank_inf_le_one_of_commute_of_flat_left hc
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
rank_le_one_of_commute_of_flat_of_self
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.
not_linearIndependent_pair_of_flat_left [Module.Flat R M] (a b : ↥(M ⊓ N)) : ¬LinearIndependent R ![a, b] := H.not_linearIndependent_pair_of_commute_of_flat_left a b (mul_comm _ _)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
not_linearIndependent_pair_of_flat_left
The `Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat_left` for commutative rings.
not_linearIndependent_pair_of_flat_right [Module.Flat R N] (a b : ↥(M ⊓ N)) : ¬LinearIndependent R ![a, b] := H.not_linearIndependent_pair_of_commute_of_flat_right a b (mul_comm _ _)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
not_linearIndependent_pair_of_flat_right
The `Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat_right` for commutative rings.
not_linearIndependent_pair_of_flat (hf : Module.Flat R M ∨ Module.Flat R N) (a b : ↥(M ⊓ N)) : ¬LinearIndependent R ![a, b] := H.not_linearIndependent_pair_of_commute_of_flat hf a b (mul_comm _ _)
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
not_linearIndependent_pair_of_flat
The `Submodule.LinearDisjoint.not_linearIndependent_pair_of_commute_of_flat` for commutative rings.
rank_inf_le_one_of_flat (hf : Module.Flat R M ∨ Module.Flat R N) : Module.rank R ↥(M ⊓ N) ≤ 1 := H.rank_inf_le_one_of_commute_of_flat hf fun _ _ ↦ mul_comm _ _
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
rank_inf_le_one_of_flat
The `Submodule.LinearDisjoint.rank_inf_le_one_of_commute_of_flat` for commutative rings.
rank_inf_le_one_of_flat_left [Module.Flat R M] : Module.rank R ↥(M ⊓ N) ≤ 1 := H.rank_inf_le_one_of_commute_of_flat_left fun _ _ ↦ mul_comm _ _
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
rank_inf_le_one_of_flat_left
The `Submodule.LinearDisjoint.rank_inf_le_one_of_commute_of_flat_left` for commutative rings.
rank_inf_le_one_of_flat_right [Module.Flat R N] : Module.rank R ↥(M ⊓ N) ≤ 1 := H.rank_inf_le_one_of_commute_of_flat_right fun _ _ ↦ mul_comm _ _
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
rank_inf_le_one_of_flat_right
The `Submodule.LinearDisjoint.rank_inf_le_one_of_commute_of_flat_right` for commutative rings.
rank_le_one_of_flat_of_self (H : M.LinearDisjoint M) [Module.Flat R M] : Module.rank R M ≤ 1 := H.rank_le_one_of_commute_of_flat_of_self fun _ _ ↦ mul_comm _ _
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.TensorProduct.Tower", "Mathlib.LinearAlgebra.TensorProduct.Finiteness", "Mathlib.LinearAlgebra.TensorProduct.Submodule", "Mathlib.LinearAlgebra.Dimension.Finite", "Mathlib.RingTheory.Flat.Basic" ]
Mathlib/LinearAlgebra/LinearDisjoint.lean
rank_le_one_of_flat_of_self
The `Submodule.LinearDisjoint.rank_le_one_of_commute_of_flat_of_self` for commutative rings.
LinearPMap (R : Type u) [Ring R] (E : Type v) [AddCommGroup E] [Module R E] (F : Type w) [AddCommGroup F] [Module R F] where domain : Submodule R E toFun : domain →ₗ[R] F @[inherit_doc] notation:25 E " →ₗ.[" R:25 "] " F:0 => LinearPMap R E F variable {R : Type*} [Ring R] {E : Type*} [AddCommGroup E] [Module R E] {F : Type*} [AddCommGroup F] [Module R F] {G : Type*} [AddCommGroup G] [Module R G]
structure
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
LinearPMap
A `LinearPMap R E F` or `E →ₗ.[R] F` is a linear map from a submodule of `E` to `F`.
@[coe] toFun' (f : E →ₗ.[R] F) : f.domain → F := f.toFun
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
toFun'
null
@[simp] toFun_eq_coe (f : E →ₗ.[R] F) (x : f.domain) : f.toFun x = f x := rfl @[ext (iff := false)]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
toFun_eq_coe
null
ext {f g : E →ₗ.[R] F} (h : f.domain = g.domain) (h' : ∀ ⦃x : E⦄ ⦃hf : x ∈ f.domain⦄ ⦃hg : x ∈ g.domain⦄, f ⟨x, hf⟩ = g ⟨x, hg⟩) : f = g := by rcases f with ⟨f_dom, f⟩ rcases g with ⟨g_dom, g⟩ obtain rfl : f_dom = g_dom := h congr apply LinearMap.ext intro x apply h'
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
ext
null
dExt {f g : E →ₗ.[R] F} (h : f.domain = g.domain) (h' : ∀ ⦃x : f.domain⦄ ⦃y : g.domain⦄ (_h : (x : E) = y), f x = g y) : f = g := ext h fun _ _ _ ↦ h' rfl @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
dExt
A dependent version of `ext`.
map_zero (f : E →ₗ.[R] F) : f 0 = 0 := f.toFun.map_zero
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
map_zero
null
ext_iff {f g : E →ₗ.[R] F} : f = g ↔ f.domain = g.domain ∧ ∀ ⦃x : E⦄ ⦃hf : x ∈ f.domain⦄ ⦃hg : x ∈ g.domain⦄, f ⟨x, hf⟩ = g ⟨x, hg⟩ := ⟨by rintro rfl; simp, fun ⟨deq, feq⟩ ↦ ext deq feq⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
ext_iff
null
dExt_iff {f g : E →ₗ.[R] F} : f = g ↔ ∃ _domain_eq : f.domain = g.domain, ∀ ⦃x : f.domain⦄ ⦃y : g.domain⦄ (_h : (x : E) = y), f x = g y := ⟨fun EQ => EQ ▸ ⟨rfl, fun x y h => by congr exact mod_cast h⟩, fun ⟨deq, feq⟩ => dExt deq feq⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
dExt_iff
null
ext' {s : Submodule R E} {f g : s →ₗ[R] F} (h : f = g) : mk s f = mk s g := h ▸ rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
ext'
null
map_add (f : E →ₗ.[R] F) (x y : f.domain) : f (x + y) = f x + f y := f.toFun.map_add x y
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
map_add
null
map_neg (f : E →ₗ.[R] F) (x : f.domain) : f (-x) = -f x := f.toFun.map_neg x
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
map_neg
null
map_sub (f : E →ₗ.[R] F) (x y : f.domain) : f (x - y) = f x - f y := f.toFun.map_sub x y
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
map_sub
null
map_smul (f : E →ₗ.[R] F) (c : R) (x : f.domain) : f (c • x) = c • f x := f.toFun.map_smul c x @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
map_smul
null
mk_apply (p : Submodule R E) (f : p →ₗ[R] F) (x : p) : mk p f x = f x := rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
mk_apply
null
noncomputable mkSpanSingleton' (x : E) (y : F) (H : ∀ c : R, c • x = 0 → c • y = 0) : E →ₗ.[R] F where domain := R ∙ x toFun := have H : ∀ c₁ c₂ : R, c₁ • x = c₂ • x → c₁ • y = c₂ • y := by intro c₁ c₂ h rw [← sub_eq_zero, ← sub_smul] at h ⊢ exact H _ h { toFun z := Classical.choose (mem_span_singleton.1 z.prop) • y map_add' y z := by rw [← add_smul, H] have (w : R ∙ x) := Classical.choose_spec (mem_span_singleton.1 w.prop) simp only [add_smul, this, ← coe_add] map_smul' c z := by rw [smul_smul, H] have (w : R ∙ x) := Classical.choose_spec (mem_span_singleton.1 w.prop) simp only [mul_smul, this] apply coe_smul } @[simp]
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
mkSpanSingleton'
The unique `LinearPMap` on `R ∙ x` that sends `x` to `y`. This version works for modules over rings, and requires a proof of `∀ c, c • x = 0 → c • y = 0`.
domain_mkSpanSingleton (x : E) (y : F) (H : ∀ c : R, c • x = 0 → c • y = 0) : (mkSpanSingleton' x y H).domain = R ∙ x := rfl @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
domain_mkSpanSingleton
null
mkSpanSingleton'_apply (x : E) (y : F) (H : ∀ c : R, c • x = 0 → c • y = 0) (c : R) (h) : mkSpanSingleton' x y H ⟨c • x, h⟩ = c • y := by dsimp [mkSpanSingleton'] rw [← sub_eq_zero, ← sub_smul] apply H simp only [sub_smul, sub_eq_zero] apply Classical.choose_spec (mem_span_singleton.1 h) @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
mkSpanSingleton'_apply
null
mkSpanSingleton'_apply_self (x : E) (y : F) (H : ∀ c : R, c • x = 0 → c • y = 0) (h) : mkSpanSingleton' x y H ⟨x, h⟩ = y := by conv_rhs => rw [← one_smul R y] rw [← mkSpanSingleton'_apply x y H 1 ?_] · congr rw [one_smul] · rwa [one_smul]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
mkSpanSingleton'_apply_self
null
noncomputable mkSpanSingleton {K E F : Type*} [DivisionRing K] [AddCommGroup E] [Module K E] [AddCommGroup F] [Module K F] (x : E) (y : F) (hx : x ≠ 0) : E →ₗ.[K] F := mkSpanSingleton' x y fun c hc => (smul_eq_zero.1 hc).elim (fun hc => by rw [hc, zero_smul]) fun hx' => absurd hx' hx
abbrev
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
mkSpanSingleton
The unique `LinearPMap` on `span R {x}` that sends a non-zero vector `x` to `y`. This version works for modules over division rings.
mkSpanSingleton_apply (K : Type*) {E F : Type*} [DivisionRing K] [AddCommGroup E] [Module K E] [AddCommGroup F] [Module K F] {x : E} (hx : x ≠ 0) (y : F) : mkSpanSingleton x y hx ⟨x, (Submodule.mem_span_singleton_self x : x ∈ Submodule.span K {x})⟩ = y := LinearPMap.mkSpanSingleton'_apply_self _ _ _ _
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
mkSpanSingleton_apply
null
protected fst (p : Submodule R E) (p' : Submodule R F) : E × F →ₗ.[R] E where domain := p.prod p' toFun := (LinearMap.fst R E F).comp (p.prod p').subtype @[simp]
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
fst
Projection to the first coordinate as a `LinearPMap`
fst_apply (p : Submodule R E) (p' : Submodule R F) (x : p.prod p') : LinearPMap.fst p p' x = (x : E × F).1 := rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
fst_apply
null
protected snd (p : Submodule R E) (p' : Submodule R F) : E × F →ₗ.[R] F where domain := p.prod p' toFun := (LinearMap.snd R E F).comp (p.prod p').subtype @[simp]
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
snd
Projection to the second coordinate as a `LinearPMap`
snd_apply (p : Submodule R E) (p' : Submodule R F) (x : p.prod p') : LinearPMap.snd p p' x = (x : E × F).2 := rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
snd_apply
null
le : LE (E →ₗ.[R] F) := ⟨fun f g => f.domain ≤ g.domain ∧ ∀ ⦃x : f.domain⦄ ⦃y : g.domain⦄ (_h : (x : E) = y), f x = g y⟩
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
le
null
apply_comp_inclusion {T S : E →ₗ.[R] F} (h : T ≤ S) (x : T.domain) : T x = S (Submodule.inclusion h.1 x) := h.2 rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
apply_comp_inclusion
null
exists_of_le {T S : E →ₗ.[R] F} (h : T ≤ S) (x : T.domain) : ∃ y : S.domain, (x : E) = y ∧ T x = S y := ⟨⟨x.1, h.1 x.2⟩, ⟨rfl, h.2 rfl⟩⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
exists_of_le
null
eq_of_le_of_domain_eq {f g : E →ₗ.[R] F} (hle : f ≤ g) (heq : f.domain = g.domain) : f = g := dExt heq hle.2
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
eq_of_le_of_domain_eq
null
eqLocus (f g : E →ₗ.[R] F) : Submodule R E where carrier := { x | ∃ (hf : x ∈ f.domain) (hg : x ∈ g.domain), f ⟨x, hf⟩ = g ⟨x, hg⟩ } zero_mem' := ⟨zero_mem _, zero_mem _, f.map_zero.trans g.map_zero.symm⟩ add_mem' {x y} := fun ⟨hfx, hgx, hx⟩ ⟨hfy, hgy, hy⟩ ↦ ⟨add_mem hfx hfy, add_mem hgx hgy, by simp_all [← AddMemClass.mk_add_mk, f.map_add, g.map_add]⟩ smul_mem' c x := fun ⟨hfx, hgx, hx⟩ ↦ ⟨smul_mem _ c hfx, smul_mem _ c hgx, by have {f : E →ₗ.[R] F} (hfx) : (⟨c • x, smul_mem _ c hfx⟩ : f.domain) = c • ⟨x, hfx⟩ := by simp rw [this hfx, this hgx, f.map_smul, g.map_smul, hx]⟩
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
eqLocus
Given two partial linear maps `f`, `g`, the set of points `x` such that both `f` and `g` are defined at `x` and `f x = g x` form a submodule.
bot : Bot (E →ₗ.[R] F) := ⟨⟨⊥, 0⟩⟩
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
bot
null
inhabited : Inhabited (E →ₗ.[R] F) := ⟨⊥⟩
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
inhabited
null
semilatticeInf : SemilatticeInf (E →ₗ.[R] F) where le := (· ≤ ·) le_refl f := ⟨le_refl f.domain, fun _ _ h => Subtype.eq h ▸ rfl⟩ le_trans := fun _ _ _ ⟨fg_le, fg_eq⟩ ⟨gh_le, gh_eq⟩ => ⟨le_trans fg_le gh_le, fun x _ hxz => have hxy : (x : E) = inclusion fg_le x := rfl (fg_eq hxy).trans (gh_eq <| hxy.symm.trans hxz)⟩ le_antisymm _ _ fg gf := eq_of_le_of_domain_eq fg (le_antisymm fg.1 gf.1) inf f g := ⟨f.eqLocus g, f.toFun.comp <| inclusion fun _x hx => hx.fst⟩ le_inf := by intro f g h ⟨fg_le, fg_eq⟩ ⟨fh_le, fh_eq⟩ exact ⟨fun x hx => ⟨fg_le hx, fh_le hx, (fg_eq (x := ⟨x, hx⟩) rfl).symm.trans (fh_eq rfl)⟩, fun x ⟨y, yg, hy⟩ h => fg_eq h⟩ inf_le_left f _ := ⟨fun _ hx => hx.fst, fun _ _ h => congr_arg f <| Subtype.eq <| h⟩ inf_le_right _ g := ⟨fun _ hx => hx.snd.fst, fun ⟨_, _, _, hx⟩ _ h => hx.trans <| congr_arg g <| Subtype.eq <| h⟩
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
semilatticeInf
null
orderBot : OrderBot (E →ₗ.[R] F) where bot := ⊥ bot_le f := ⟨bot_le, fun x y h => by have hx : x = 0 := Subtype.eq ((mem_bot R).1 x.2) have hy : y = 0 := Subtype.eq (h.symm.trans (congr_arg _ hx)) rw [hx, hy, map_zero, map_zero]⟩
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
orderBot
null
le_of_eqLocus_ge {f g : E →ₗ.[R] F} (H : f.domain ≤ f.eqLocus g) : f ≤ g := suffices f ≤ f ⊓ g from le_trans this inf_le_right ⟨H, fun _x _y hxy => ((inf_le_left : f ⊓ g ≤ f).2 hxy.symm).symm⟩
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
le_of_eqLocus_ge
null
domain_mono : StrictMono (@domain R _ E _ _ F _ _) := fun _f _g hlt => lt_of_le_of_ne hlt.1.1 fun heq => ne_of_lt hlt <| eq_of_le_of_domain_eq (le_of_lt hlt) heq
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
domain_mono
null
private sup_aux (f g : E →ₗ.[R] F) (h : ∀ (x : f.domain) (y : g.domain), (x : E) = y → f x = g y) : ∃ fg : ↥(f.domain ⊔ g.domain) →ₗ[R] F, ∀ (x : f.domain) (y : g.domain) (z : ↥(f.domain ⊔ g.domain)), (x : E) + y = ↑z → fg z = f x + g y := by choose x hx y hy hxy using fun z : ↥(f.domain ⊔ g.domain) => mem_sup.1 z.prop set fg := fun z => f ⟨x z, hx z⟩ + g ⟨y z, hy z⟩ have fg_eq : ∀ (x' : f.domain) (y' : g.domain) (z' : ↥(f.domain ⊔ g.domain)) (_H : (x' : E) + y' = z'), fg z' = f x' + g y' := by intro x' y' z' H dsimp [fg] rw [add_comm, ← sub_eq_sub_iff_add_eq_add, eq_comm, ← map_sub, ← map_sub] apply h simp only [← eq_sub_iff_add_eq] at hxy simp only [AddSubgroupClass.coe_sub, hxy, ← sub_add, ← sub_sub, sub_self, zero_sub, ← H] apply neg_add_eq_sub use { toFun := fg, map_add' := ?_, map_smul' := ?_ }, fg_eq · rintro ⟨z₁, hz₁⟩ ⟨z₂, hz₂⟩ rw [← add_assoc, add_right_comm (f _), ← map_add, add_assoc, ← map_add] apply fg_eq simp only [coe_add, ← add_assoc] rw [add_right_comm (x _), hxy, add_assoc, hxy, coe_mk, coe_mk] · intro c z rw [smul_add, ← map_smul, ← map_smul] apply fg_eq simp only [coe_smul, ← smul_add, hxy, RingHom.id_apply]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
sup_aux
null
protected noncomputable sup (f g : E →ₗ.[R] F) (h : ∀ (x : f.domain) (y : g.domain), (x : E) = y → f x = g y) : E →ₗ.[R] F := ⟨_, Classical.choose (sup_aux f g h)⟩ @[simp]
def
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
sup
Given two partial linear maps that agree on the intersection of their domains, `f.sup g h` is the unique partial linear map on `f.domain ⊔ g.domain` that agrees with `f` and `g`.
domain_sup (f g : E →ₗ.[R] F) (h : ∀ (x : f.domain) (y : g.domain), (x : E) = y → f x = g y) : (f.sup g h).domain = f.domain ⊔ g.domain := rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
domain_sup
null
sup_apply {f g : E →ₗ.[R] F} (H : ∀ (x : f.domain) (y : g.domain), (x : E) = y → f x = g y) (x : f.domain) (y : g.domain) (z : ↥(f.domain ⊔ g.domain)) (hz : (↑x : E) + ↑y = ↑z) : f.sup g H z = f x + g y := Classical.choose_spec (sup_aux f g H) x y z hz
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
sup_apply
null
protected left_le_sup (f g : E →ₗ.[R] F) (h : ∀ (x : f.domain) (y : g.domain), (x : E) = y → f x = g y) : f ≤ f.sup g h := by refine ⟨le_sup_left, fun z₁ z₂ hz => ?_⟩ rw [← add_zero (f _), ← g.map_zero] refine (sup_apply h _ _ _ ?_).symm simpa
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
left_le_sup
null
protected right_le_sup (f g : E →ₗ.[R] F) (h : ∀ (x : f.domain) (y : g.domain), (x : E) = y → f x = g y) : g ≤ f.sup g h := by refine ⟨le_sup_right, fun z₁ z₂ hz => ?_⟩ rw [← zero_add (g _), ← f.map_zero] refine (sup_apply h _ _ _ ?_).symm simpa
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
right_le_sup
null
protected sup_le {f g h : E →ₗ.[R] F} (H : ∀ (x : f.domain) (y : g.domain), (x : E) = y → f x = g y) (fh : f ≤ h) (gh : g ≤ h) : f.sup g H ≤ h := have Hf : f ≤ f.sup g H ⊓ h := le_inf (f.left_le_sup g H) fh have Hg : g ≤ f.sup g H ⊓ h := le_inf (f.right_le_sup g H) gh le_of_eqLocus_ge <| sup_le Hf.1 Hg.1
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
sup_le
null
sup_h_of_disjoint (f g : E →ₗ.[R] F) (h : Disjoint f.domain g.domain) (x : f.domain) (y : g.domain) (hxy : (x : E) = y) : f x = g y := by rw [disjoint_def] at h have hy : y = 0 := Subtype.eq (h y (hxy ▸ x.2) y.2) have hx : x = 0 := Subtype.eq (hxy.trans <| congr_arg _ hy) simp [*] /-! ### Algebraic operations -/
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
sup_h_of_disjoint
Hypothesis for `LinearPMap.sup` holds, if `f.domain` is disjoint with `g.domain`.
instZero : Zero (E →ₗ.[R] F) := ⟨⊤, 0⟩ @[simp]
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
instZero
null
zero_domain : (0 : E →ₗ.[R] F).domain = ⊤ := rfl @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
zero_domain
null
zero_apply (x : (⊤ : Submodule R E)) : (0 : E →ₗ.[R] F) x = 0 := rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
zero_apply
null
instSMul : SMul M (E →ₗ.[R] F) := ⟨fun a f => { domain := f.domain toFun := a • f.toFun }⟩ @[simp]
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
instSMul
null
smul_domain (a : M) (f : E →ₗ.[R] F) : (a • f).domain = f.domain := rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
smul_domain
null
smul_apply (a : M) (f : E →ₗ.[R] F) (x : (a • f).domain) : (a • f) x = a • f x := rfl @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
smul_apply
null
coe_smul (a : M) (f : E →ₗ.[R] F) : ⇑(a • f) = a • ⇑f := rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
coe_smul
null
instSMulCommClass [SMulCommClass M N F] : SMulCommClass M N (E →ₗ.[R] F) := ⟨fun a b f => ext' <| smul_comm a b f.toFun⟩
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
instSMulCommClass
null
instIsScalarTower [SMul M N] [IsScalarTower M N F] : IsScalarTower M N (E →ₗ.[R] F) := ⟨fun a b f => ext' <| smul_assoc a b f.toFun⟩
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
instIsScalarTower
null
instMulAction : MulAction M (E →ₗ.[R] F) where smul := (· • ·) one_smul := fun ⟨_s, f⟩ => ext' <| one_smul M f mul_smul a b f := ext' <| mul_smul a b f.toFun
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
instMulAction
null
instNeg : Neg (E →ₗ.[R] F) := ⟨fun f => ⟨f.domain, -f.toFun⟩⟩ @[simp]
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
instNeg
null
neg_domain (f : E →ₗ.[R] F) : (-f).domain = f.domain := rfl @[simp]
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
neg_domain
null
neg_apply (f : E →ₗ.[R] F) (x) : (-f) x = -f x := rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
neg_apply
null
instInvolutiveNeg : InvolutiveNeg (E →ₗ.[R] F) := ⟨fun f => by ext x y hxy · rfl · simp only [neg_apply, neg_neg]⟩
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
instInvolutiveNeg
null
instAdd : Add (E →ₗ.[R] F) := ⟨fun f g => { domain := f.domain ⊓ g.domain toFun := f.toFun.comp (inclusion (inf_le_left : f.domain ⊓ g.domain ≤ _)) + g.toFun.comp (inclusion (inf_le_right : f.domain ⊓ g.domain ≤ _)) }⟩
instance
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
instAdd
null
add_domain (f g : E →ₗ.[R] F) : (f + g).domain = f.domain ⊓ g.domain := rfl
theorem
LinearAlgebra
[ "Mathlib.LinearAlgebra.Prod" ]
Mathlib/LinearAlgebra/LinearPMap.lean
add_domain
null