Zulip Chat Archive
Stream: Is there code for X?
Topic: Extract a basis from a spanning family
Etienne Marion (Jul 31 2024 at 12:30):
Hi! Given a family of vectors spanning the space, how do I extract a basis contained in this family please?
Riccardo Brasca (Jul 31 2024 at 12:43):
Riccardo Brasca (Jul 31 2024 at 12:43):
no sorry
Riccardo Brasca (Jul 31 2024 at 12:50):
We have a quite a few results like docs#exists_linearIndependent
Riccardo Brasca (Jul 31 2024 at 12:51):
If look for "maximal in Mathlib.LinearAlgebra.Basis there must be a way of getting a basis, but I am not sure which one is the quickest
Riccardo Brasca (Jul 31 2024 at 12:53):
The fact that it is not literally there makes me think that this can usually be avoided. But of course this may be not the case for you.
Etienne Marion (Jul 31 2024 at 12:56):
Thanks for your answer, I'll see what I can do with that. I haven't given it a great deal of thought yet because I assumed the literal statement would exist, but I suppose I'll be able to go around it.
Riccardo Brasca (Jul 31 2024 at 12:57):
well, it is docs#LinearIndependent.extend applied to the empty set I think
Riccardo Brasca (Jul 31 2024 at 12:58):
adds vectors to a linear independent set s ⊆ t
until it spans all elements of t
.
Etienne Marion (Jul 31 2024 at 13:00):
Ah yes, this should to the trick, thanks!
Edward van de Meent (Jul 31 2024 at 18:34):
a bit late, but if you already know your family is independent, Basis.span might be what you want
Last updated: May 02 2025 at 03:31 UTC