The areas / V07. Linear algebra
Mathlib.LinearAlgebra.Basis.VectorSpace
44 declarations. Mathlib docs · Source
Bases in a vector space
This file provides results for bases of a vector space.
Some of these results should be merged with the results on free modules. We state these results in a separate file to the results on modules to avoid an import cycle.
Main statements
Basis.ofVectorSpacestates that every vector space has a basis.Module.Free.of_divisionRingstates that every vector space is a free module.
Tags
basis, bases
def Module.Basis.extend E1 #
{K : Type u_3} →
{V : Type u_4} →
[inst : DivisionRing K] →
[inst_1 : AddCommGroup V] →
[inst_2 : Module K V] → {s : Set V} → (hs : LinearIndepOn K id s) → Module.Basis (↑(hs.extend ⋯)) K V
If s is a linear independent set of vectors, we can extend it to a basis.
theorem Module.Basis.extend_apply_self E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s : Set V}
(hs : LinearIndepOn K id s) (x : ↑(hs.extend ⋯)), (Module.Basis.extend hs) x = ↑x
theorem Module.Basis.coe_extend E0 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s : Set V}
(hs : LinearIndepOn K id s), ⇑(Module.Basis.extend hs) = Subtype.val
theorem Module.Basis.range_extend E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s : Set V}
(hs : LinearIndepOn K id s), Set.range ⇑(Module.Basis.extend hs) = hs.extend ⋯
def Module.Basis.sumExtendIndex E1 #
{ι : Type u_1} →
{K : Type u_3} →
{V : Type u_4} →
[inst : DivisionRing K] →
[inst_1 : AddCommGroup V] → [inst_2 : Module K V] → {v : ι → V} → LinearIndependent K v → Set V
Auxiliary definition: the index for the new basis vectors in Basis.sumExtend.
The specific value of this definition should be considered an implementation detail.
def Module.Basis.sumExtend E1 #
{ι : Type u_1} →
{K : Type u_3} →
{V : Type u_4} →
[inst : DivisionRing K] →
[inst_1 : AddCommGroup V] →
[inst_2 : Module K V] →
{v : ι → V} → (hs : LinearIndependent K v) → Module.Basis (ι ⊕ ↑(Module.Basis.sumExtendIndex hs)) K V
If v is a linear independent family of vectors, extend it to a basis indexed by a sum type.
theorem Module.Basis.subset_extend E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s : Set V}
(hs : LinearIndepOn K id s), s ⊆ hs.extend ⋯
def Module.Basis.extendLe E1 #
{K : Type u_3} →
{V : Type u_4} →
[inst : DivisionRing K] →
[inst_1 : AddCommGroup V] →
[inst_2 : Module K V] →
{s t : Set V} →
(hs : LinearIndepOn K id s) → (hst : s ⊆ t) → ⊤ ≤ Submodule.span K t → Module.Basis (↑(hs.extend hst)) K V
If s is a family of linearly independent vectors contained in a set t spanning V,
then one can get a basis of V containing s and contained in t.
theorem Module.Basis.extendLe_apply_self E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s t : Set V}
(hs : LinearIndepOn K id s) (hst : s ⊆ t) (ht : ⊤ ≤ Submodule.span K t) (x : ↑(hs.extend hst)),
(Module.Basis.extendLe hs hst ht) x = ↑x
theorem Module.Basis.coe_extendLe E0 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s t : Set V}
(hs : LinearIndepOn K id s) (hst : s ⊆ t) (ht : ⊤ ≤ Submodule.span K t),
⇑(Module.Basis.extendLe hs hst ht) = Subtype.val
theorem Module.Basis.range_extendLe E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s t : Set V}
(hs : LinearIndepOn K id s) (hst : s ⊆ t) (ht : ⊤ ≤ Submodule.span K t),
Set.range ⇑(Module.Basis.extendLe hs hst ht) = hs.extend hst
theorem Module.Basis.subset_extendLe E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s t : Set V}
(hs : LinearIndepOn K id s) (hst : s ⊆ t) (ht : ⊤ ≤ Submodule.span K t),
s ⊆ Set.range ⇑(Module.Basis.extendLe hs hst ht)
theorem Module.Basis.extendLe_subset E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s t : Set V}
(hs : LinearIndepOn K id s) (hst : s ⊆ t) (ht : ⊤ ≤ Submodule.span K t),
Set.range ⇑(Module.Basis.extendLe hs hst ht) ⊆ t
def Module.Basis.ofSpan E1 #
{K : Type u_3} →
{V : Type u_4} →
[inst : DivisionRing K] →
[inst_1 : AddCommGroup V] →
[inst_2 : Module K V] → {s : Set V} → ⊤ ≤ Submodule.span K s → Module.Basis (↑(⋯.extend ⋯)) K V
If a set s spans the space, this is a basis contained in s.
theorem Module.Basis.ofSpan_apply_self E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s : Set V}
(hs : ⊤ ≤ Submodule.span K s) (x : ↑(⋯.extend ⋯)), (Module.Basis.ofSpan hs) x = ↑x
theorem Module.Basis.coe_ofSpan E0 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s : Set V}
(hs : ⊤ ≤ Submodule.span K s), ⇑(Module.Basis.ofSpan hs) = Subtype.val
theorem Module.Basis.range_ofSpan E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s : Set V}
(hs : ⊤ ≤ Submodule.span K s), Set.range ⇑(Module.Basis.ofSpan hs) = ⋯.extend ⋯
theorem Module.Basis.ofSpan_subset E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {s : Set V}
(hs : ⊤ ≤ Submodule.span K s), Set.range ⇑(Module.Basis.ofSpan hs) ⊆ s
def Module.Basis.ofVectorSpaceIndex E1 #
(K : Type u_3) → (V : Type u_4) → [inst : DivisionRing K] → [inst_1 : AddCommGroup V] → [Module K V] → Set V
A set used to index Basis.ofVectorSpace.
def Module.Basis.ofVectorSpace E3 #
(K : Type u_3) →
(V : Type u_4) →
[inst : DivisionRing K] →
[inst_1 : AddCommGroup V] → [inst_2 : Module K V] → Module.Basis (↑(Module.Basis.ofVectorSpaceIndex K V)) K V
Each vector space has a basis.
instance Module.Free.of_divisionRing E3 #
∀ (K : Type u_3) (V : Type u_4) [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V], Module.Free K V
Stacks Tag 09FN (Generalized from fields to division rings.)
theorem Module.Basis.ofVectorSpace_apply_self E1 #
∀ (K : Type u_3) (V : Type u_4) [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V]
(x : ↑(Module.Basis.ofVectorSpaceIndex K V)), (Module.Basis.ofVectorSpace K V) x = ↑x
theorem Module.Basis.coe_ofVectorSpace E0 #
∀ (K : Type u_3) (V : Type u_4) [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V],
⇑(Module.Basis.ofVectorSpace K V) = Subtype.val
theorem Module.Basis.ofVectorSpaceIndex.linearIndependent E1 #
∀ (K : Type u_3) (V : Type u_4) [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V],
LinearIndependent K Subtype.val
theorem Module.Basis.range_ofVectorSpace E1 #
∀ (K : Type u_3) (V : Type u_4) [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V],
Set.range ⇑(Module.Basis.ofVectorSpace K V) = Module.Basis.ofVectorSpaceIndex K V
theorem Module.Basis.exists_basis E1 #
∀ (K : Type u_3) (V : Type u_4) [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V],
∃ s, Nonempty (Module.Basis (↑s) K V)
theorem VectorSpace.card_fintype E1 #
∀ (K : Type u_3) (V : Type u_4) [inst : DivisionRing K] [inst_1 : AddCommGroup V] [Module K V] [inst : Fintype K]
[inst_2 : Fintype V], ∃ n, Fintype.card V = Fintype.card K ^ n
theorem nonzero_span_atom E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] (v : V),
v ≠ 0 → IsAtom (K ∙ v)
For a module over a division ring, the span of a nonzero element is an atom of the lattice of submodules.
theorem atom_iff_nonzero_span E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V]
(W : Submodule K V), IsAtom W ↔ ∃ v, v ≠ 0 ∧ W = K ∙ v
The atoms of the lattice of submodules of a module over a division ring are the submodules equal to the span of a nonzero element of the module.
instance instIsAtomisticSubmodule E0 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V],
IsAtomistic (Submodule K V)
The lattice of submodules of a module over a division ring is atomistic.
theorem LinearMap.exists_leftInverse_of_injective E1 #
∀ {K : Type u_3} {V : Type u_4} {V' : Type u_5} [inst : DivisionRing K] [inst_1 : AddCommGroup V]
[inst_2 : AddCommGroup V'] [inst_3 : Module K V] [inst_4 : Module K V'] (f : V →ₗ[K] V'),
f.ker = ⊥ → ∃ g, g ∘ₗ f = LinearMap.id
def LinearMap.leftInverse E1 #
{K : Type u_3} →
{V : Type u_4} →
{V' : Type u_5} →
[inst : DivisionRing K] →
[inst_1 : AddCommGroup V] →
[inst_2 : AddCommGroup V'] → [inst_3 : Module K V] → [inst_4 : Module K V'] → (V →ₗ[K] V') → V' →ₗ[K] V
The left inverse of f : E →ₗ[𝕜] F.
If f is not injective, then we use the junk value 0.
theorem LinearMap.leftInverse_comp_of_inj E1 #
∀ {K : Type u_3} {V : Type u_4} {V' : Type u_5} [inst : DivisionRing K] [inst_1 : AddCommGroup V]
[inst_2 : AddCommGroup V'] [inst_3 : Module K V] [inst_4 : Module K V'] {f : V →ₗ[K] V'},
f.ker = ⊥ → f.leftInverse ∘ₗ f = LinearMap.id
theorem LinearMap.leftInverse_apply_of_inj E1 #
∀ {K : Type u_3} {V : Type u_4} {V' : Type u_5} [inst : DivisionRing K] [inst_1 : AddCommGroup V]
[inst_2 : AddCommGroup V'] [inst_3 : Module K V] [inst_4 : Module K V'] {f : V →ₗ[K] V'},
f.ker = ⊥ → ∀ (x : V), f.leftInverse (f x) = x
If f is injective, then the left inverse composed with f is the identity.
theorem Submodule.exists_isCompl E3 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V]
(p : Submodule K V), ∃ q, IsCompl p q
instance Submodule.complementedLattice E0 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V],
ComplementedLattice (Submodule K V)
theorem LinearMap.exists_extend E1 #
∀ {K : Type u_3} {V : Type u_4} {V' : Type u_5} [inst : DivisionRing K] [inst_1 : AddCommGroup V]
[inst_2 : AddCommGroup V'] [inst_3 : Module K V] [inst_4 : Module K V'] {p : Submodule K V} (f : ↥p →ₗ[K] V'),
∃ g, g ∘ₗ p.subtype = f
Any linear map f : p →ₗ[K] V' defined on a subspace p can be extended to the whole
space.
theorem LinearMap.exists_extend_of_notMem E1 #
∀ {K : Type u_3} {V : Type u_4} {V' : Type u_5} [inst : DivisionRing K] [inst_1 : AddCommGroup V]
[inst_2 : AddCommGroup V'] [inst_3 : Module K V] [inst_4 : Module K V'] {p : Submodule K V} {v : V} (f : ↥p →ₗ[K] V'),
v ∉ p → ∀ (y : V'), ∃ g, g ∘ₗ p.subtype = f ∧ g v = y
theorem Submodule.exists_le_ker_of_notMem E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V]
{p : Submodule K V} {v : V}, v ∉ p → ∃ f, f v ≠ 0 ∧ p ≤ f.ker
instance instNontrivialLinearMapId E0 #
∀ {K : Type u_3} {V : Type u_4} {V' : Type u_5} [inst : DivisionRing K] [inst_1 : AddCommGroup V]
[inst_2 : AddCommGroup V'] [inst_3 : Module K V] [inst_4 : Module K V'] [Nontrivial V] [Nontrivial V'],
Nontrivial (V →ₗ[K] V')
If V and V' are nontrivial vector spaces over a field K, the space of K-linear maps
between them is nontrivial.
theorem Submodule.exists_le_ker_of_lt_top E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V],
∀ p < ⊤, ∃ f, f ≠ 0 ∧ p ≤ f.ker
If p < ⊤ is a subspace of a vector space V, then there exists a nonzero linear map
f : V →ₗ[K] K such that p ≤ ker f.
theorem quotient_prod_linearEquiv E1 #
∀ {K : Type u_3} {V : Type u_4} [inst : DivisionRing K] [inst_1 : AddCommGroup V] [inst_2 : Module K V]
(p : Submodule K V), Nonempty (((V ⧸ p) × ↥p) ≃ₗ[K] V)
theorem exists_basis_of_pairing_ne_zero E1 #
∀ {K : Type u_6} {V : Type u_7} [inst : Field K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {f : V →ₗ[K] K}
{v : V}, f v ≠ 0 → ∃ n b i, v = b i ∧ f = f v • b.coord i
In a vector space, given a nonzero linear form f,
a nonzero vector v such that f v ≠ 0,
there exists a basis b with an index i
such that v = b i and f = (f v) • b.coord i.
theorem exists_basis_of_pairing_eq_zero E1 #
∀ {K : Type u_6} {V : Type u_7} [inst : Field K] [inst_1 : AddCommGroup V] [inst_2 : Module K V] {f : V →ₗ[K] K}
{v : V}, f v = 0 → f ≠ 0 → v ≠ 0 → ∃ n b i j, i ≠ j ∧ v = b i ∧ f = b.coord j
In a vector space, given a nonzero linear form f,
a nonzero vector v such that f v = 0,
there exists a basis b with two distinct indices i, j
such that v = b i and f = b.coord j.