(Is it possible to use LaTeX code here in order to get a nice output?)
Let's say I want to put the map phi: Q^3 x Q^3 -> Q defined by (x,y) -> x1y1 - x2y2 + x3*y3 into Sage. How do I do this? I want to have later:
sage: x=vector((1,2,3)); y=vector((2,3,1))
sage: phi(x,y)
Is it only possible via the def
command (withx[1]
etc.)? Or how can you specify the domain of a map?