- def norm(x):
- # Don't expand the given field; the inner-product's codomain
- # is already correct. For example QQ(2).sqrt() returns sqrt(2)
- # in SR, and that will give you weird errors about symbolics
- # when what's really going wrong is that you're trying to
- # orthonormalize in QQ.
- return V.base_ring()(inner_product(x,x).sqrt())
-