Inner products with dimension $n$.
Is there a way to work with inner products with unspecified dimension in Sage? All the options that I've been able to find e.g. FreeModule
have a required argument that asks for a dimension, basis or rank of some sort.
Ideally, what I need would work like:
INN = InnerProdSpace(RR); u, v = INN(u,v); u.dot(v)
and it would be able to perform basic simplifications like:
u.dot(v + ru) = u.dot(v) + ru.dot(u)
I know that some modules like VectorSpace
already do this and much more; but I would like to do it without needing to specify the dimension.