Skip to content

Commit

Permalink
feat(linear_algebra/linear_independent): finsupp.total is not equal t…
Browse files Browse the repository at this point in the history
…o a vector outside the support of the coefficients (#8338)

…
  • Loading branch information
semorrison committed Jul 27, 2021
1 parent 7e37f20 commit 65006d2
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/linear_algebra/finsupp.lean
Expand Up @@ -177,6 +177,10 @@ lemma mem_supported' {s : set α} (p : α →₀ M) :
by haveI := classical.dec_pred (λ (x : α), x ∈ s);
simp [mem_supported, set.subset_def, not_imp_comm]

lemma mem_supported_support (p : α →₀ M) :
p ∈ finsupp.supported M R (p.support : set α) :=
by rw finsupp.mem_supported

lemma single_mem_supported {s : set α} {a : α} (b : M) (h : a ∈ s) :
single a b ∈ supported M R s :=
set.subset.trans support_single_subset (finset.singleton_subset_set_iff.2 h)
Expand Down
26 changes: 26 additions & 0 deletions src/linear_algebra/linear_independent.lean
Expand Up @@ -488,6 +488,32 @@ begin
simp [this]
end

lemma linear_independent.not_mem_span_image [nontrivial R] (hv : linear_independent R v) {s : set ι}
{x : ι} (h : x ∉ s) :
v x ∉ submodule.span R (v '' s) :=
begin
have h' : v x ∈ submodule.span R (v '' {x}),
{ rw set.image_singleton,
exact mem_span_singleton_self (v x), },
intro w,
apply linear_independent.ne_zero x hv,
refine disjoint_def.1 (hv.disjoint_span_image _) (v x) h' w,
simpa using h,
end

lemma linear_independent.total_ne_of_not_mem_support [nontrivial R] (hv : linear_independent R v)
{x : ι} (f : ι →₀ R) (h : x ∉ f.support) :
finsupp.total ι M R v f ≠ v x :=
begin
replace h : x ∉ (f.support : set ι) := h,
have p := hv.not_mem_span_image h,
intro w,
rw ←w at p,
rw finsupp.span_image_eq_map_total at p,
simp only [not_exists, not_and, mem_map] at p,
exact p f (f.mem_supported_support R) rfl,
end

lemma linear_independent_sum {v : ι ⊕ ι' → M} :
linear_independent R v ↔ linear_independent R (v ∘ sum.inl) ∧
linear_independent R (v ∘ sum.inr) ∧
Expand Down

0 comments on commit 65006d2

Please sign in to comment.