Zulip Chat Archive

Stream: mathlib4

Topic: Vectorization of Elements in Finite-Dimensional Vector Space


Zichen Wang (Oct 12 2024 at 12:47):

Suppose that

(F : Type) [NormedAddCommGroup F ] [InnerProductSpace  F ] [FiniteDimensional  F](b:F)

I now want to vectorize b, i.e. construct a mapping from an indicator set ( which size of is dimension of F) to each component of b. More specifically, I want to equate b to (Finset N \r Real),and I would like it to be derivable.Is there a better way of constructing it.
My solution is

variable {F : Type*}
[NormedAddCommGroup F ] [InnerProductSpace  F ] [FiniteDimensional  F]

lemma fin_to_F: Nonempty (Finset.range (FiniteDimensional.finrank  F)  (Basis.ofVectorSpaceIndex  F)) := by
      refine Fintype.card_eq.mp ?_
      simp
      refine FiniteDimensional.finrank_eq_card_basis ?h
      exact Basis.extend _
def eqaute (b : F):= fun i =>
      (Basis.ofVectorSpace  F).repr b ((Classical.choice fin_to_F) i)

Eric Wieser (Oct 12 2024 at 13:33):

Are you looking for docs#Module.finBasis ?

Zichen Wang (Oct 14 2024 at 07:19):

Thx.But what's a good way to convert between Finset.range n and Fin n?

Zichen Wang (Oct 14 2024 at 07:22):

Or between Fin n and Finset ℕ


Last updated: May 02 2025 at 03:31 UTC