lemmaindependent : LinearIndependentK (funi : Index (K:=K) v => v i.val) :=by
proof · 16
lines
classical
have aux (s : FinsetS) : (↑s : SetS) ⊆Selected (K:=K) v →LinearIndepOnK v (↑s : SetS) :=by
induction s usingFinset.induction_on_max with
| empty => intro _; simpa only [Finset.coe_empty] using linearIndepOn_empty K v
| insert a s hlt ih =>
intro hs
rw [Finset.coe_insert]
apply (ih (fun x hx => hs (by simp [hx]))).insert
intro ha
apply hs (show a ∈ (↑(insert a s) : SetS) by simp)
exact span_mono (Set.image_mono (fun x hx => hlt x hx)) ha
have h := aux (Finset.univ.filter (fun i => i ∈Selected (K:=K) v)) (by simp)
change LinearIndepOnK v (Selected (K:=K) v)
convert h using1
ext i
simp
lemmaspan_selected : span K (Set.range (funi : Index (K:=K) v => v i.val)) = span K (Set.range v) :=by
proof · 17
lines
classical
apply le_antisymm
· apply span_mono
rintro x ⟨i,rfl⟩
exact ⟨i.val,rfl⟩
· apply span_le.mpr
rintro x ⟨i,rfl⟩
refine @WellFounded.induction S (· < ·) wellFounded_lt (fun i => v i ∈ span K (Set.range (funi : Index (K:=K) v => v i.val))) i ?_
intro i ih
by_cases hi : Selected (K:=K) v i
· exact subset_span ⟨⟨i,hi⟩,rfl⟩
· havehm : v i ∈ span K (v '' Set.Iio i) :=by
change ¬ (v i ∉ span K (v '' Set.Iio i)) at hi
exact not_not.mp hi
apply (span_le.mpr ?_ : span K (v '' Set.Iio i) ≤ span K (Set.range (funi : Index (K:=K) v => v i.val))) hm
rintro x ⟨j,hj,rfl⟩
exact ih j (by exact hj)