Module docstring
{"# Bases indexed by Fin
"}
{"# Bases indexed by Fin
"}
Basis.mkFinCons
definition
{n : ℕ} {N : Submodule R M} (y : M) (b : Basis (Fin n) R N) (hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0)
(hsp : ∀ z : M, ∃ c : R, z + c • y ∈ N) : Basis (Fin (n + 1)) R M
/-- Let `b` be a basis for a submodule `N` of `M`. If `y : M` is linear independent of `N`
and `y` and `N` together span the whole of `M`, then there is a basis for `M`
whose basis vectors are given by `Fin.cons y b`. -/
noncomputable def mkFinCons {n : ℕ} {N : Submodule R M} (y : M) (b : Basis (Fin n) R N)
(hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0) (hsp : ∀ z : M, ∃ c : R, z + c • y ∈ N) :
Basis (Fin (n + 1)) R M :=
have span_b : Submodule.span R (Set.range (N.subtype ∘ b)) = N := by
rw [Set.range_comp, Submodule.span_image, b.span_eq, Submodule.map_subtype_top]
Basis.mk (v := Fin.cons y (N.subtype ∘ b))
((b.linearIndependent.map' N.subtype (Submodule.ker_subtype _)).fin_cons' _ _
(by
rintro c ⟨x, hx⟩ hc
rw [span_b] at hx
exact hli c x hx hc))
fun x _ => by
rw [Fin.range_cons, Submodule.mem_span_insert', span_b]
exact hsp x
Basis.coe_mkFinCons
theorem
{n : ℕ} {N : Submodule R M} (y : M) (b : Basis (Fin n) R N) (hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0)
(hsp : ∀ z : M, ∃ c : R, z + c • y ∈ N) : (mkFinCons y b hli hsp : Fin (n + 1) → M) = Fin.cons y ((↑) ∘ b)
@[simp]
theorem coe_mkFinCons {n : ℕ} {N : Submodule R M} (y : M) (b : Basis (Fin n) R N)
(hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0) (hsp : ∀ z : M, ∃ c : R, z + c • y ∈ N) :
(mkFinCons y b hli hsp : Fin (n + 1) → M) = Fin.cons y ((↑) ∘ b) := by
unfold mkFinCons
exact coe_mk (v := Fin.cons y (N.subtype ∘ b)) _ _
Basis.mkFinConsOfLE
definition
{n : ℕ} {N O : Submodule R M} (y : M) (yO : y ∈ O) (b : Basis (Fin n) R N) (hNO : N ≤ O)
(hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0) (hsp : ∀ z ∈ O, ∃ c : R, z + c • y ∈ N) : Basis (Fin (n + 1)) R O
/-- Let `b` be a basis for a submodule `N ≤ O`. If `y ∈ O` is linear independent of `N`
and `y` and `N` together span the whole of `O`, then there is a basis for `O`
whose basis vectors are given by `Fin.cons y b`. -/
noncomputable def mkFinConsOfLE {n : ℕ} {N O : Submodule R M} (y : M) (yO : y ∈ O)
(b : Basis (Fin n) R N) (hNO : N ≤ O) (hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0)
(hsp : ∀ z ∈ O, ∃ c : R, z + c • y ∈ N) : Basis (Fin (n + 1)) R O :=
mkFinCons ⟨y, yO⟩ (b.map (Submodule.comapSubtypeEquivOfLe hNO).symm)
(fun c x hc hx => hli c x (Submodule.mem_comap.mp hc) (congr_arg ((↑) : O → M) hx))
fun z => hsp z z.2
Basis.coe_mkFinConsOfLE
theorem
{n : ℕ} {N O : Submodule R M} (y : M) (yO : y ∈ O) (b : Basis (Fin n) R N) (hNO : N ≤ O)
(hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0) (hsp : ∀ z ∈ O, ∃ c : R, z + c • y ∈ N) :
(mkFinConsOfLE y yO b hNO hli hsp : Fin (n + 1) → O) = Fin.cons ⟨y, yO⟩ (Submodule.inclusion hNO ∘ b)
@[simp]
theorem coe_mkFinConsOfLE {n : ℕ} {N O : Submodule R M} (y : M) (yO : y ∈ O) (b : Basis (Fin n) R N)
(hNO : N ≤ O) (hli : ∀ (c : R), ∀ x ∈ N, c • y + x = 0 → c = 0)
(hsp : ∀ z ∈ O, ∃ c : R, z + c • y ∈ N) :
(mkFinConsOfLE y yO b hNO hli hsp : Fin (n + 1) → O) =
Fin.cons ⟨y, yO⟩ (Submodule.inclusionSubmodule.inclusion hNO ∘ b) :=
coe_mkFinCons _ _ _ _
Basis.finTwoProd
definition
(R : Type*) [Semiring R] : Basis (Fin 2) R (R × R)
/-- The basis of `R × R` given by the two vectors `(1, 0)` and `(0, 1)`. -/
protected def finTwoProd (R : Type*) [Semiring R] : Basis (Fin 2) R (R × R) :=
Basis.ofEquivFun (LinearEquiv.finTwoArrow R R).symm
Basis.finTwoProd_zero
theorem
(R : Type*) [Semiring R] : Basis.finTwoProd R 0 = (1, 0)
@[simp]
theorem finTwoProd_zero (R : Type*) [Semiring R] : Basis.finTwoProd R 0 = (1, 0) := by
simp [Basis.finTwoProd, LinearEquiv.finTwoArrow]
Basis.finTwoProd_one
theorem
(R : Type*) [Semiring R] : Basis.finTwoProd R 1 = (0, 1)
@[simp]
theorem finTwoProd_one (R : Type*) [Semiring R] : Basis.finTwoProd R 1 = (0, 1) := by
simp [Basis.finTwoProd, LinearEquiv.finTwoArrow]
Basis.coe_finTwoProd_repr
theorem
{R : Type*} [Semiring R] (x : R × R) : ⇑((Basis.finTwoProd R).repr x) = ![x.fst, x.snd]
@[simp]
theorem coe_finTwoProd_repr {R : Type*} [Semiring R] (x : R × R) :
⇑((Basis.finTwoProd R).repr x) = ![x.fst, x.snd] :=
rfl