#8681: implement matrix actions on binary quadratic forms
-------------------------------+--------------------------------------------
Reporter: AlexGhitza | Owner: justin
Type: enhancement | Status: needs_review
Priority: major | Milestone: sage-4.4
Component: quadratic forms | Keywords:
Author: Alex Ghitza | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
-------------------------------+--------------------------------------------
Comment(by tornaria):
The patch looks good to me -- pending actually trying it.
I wonder if it would make sense to avoid using polynomials as much as
possible, except for convenience printing and input. For instance,
{{{matrix_action_left}}} could be defined using something like:
{{{
v,w = M.columns()
a1 = Q(*v)
c1 = Q(*w)
b1 = Q(*(v+w))-a1-c1
return BinaryQF(a1,b1,c1)
}}}
and {{{matrix_action_right}}} defined similarly with {{{rows()}}} instead
of {{{columns()}}}.
I see that {{{__call__}}} is itself defined using polynomials instead of
the other way around --- should that be changed as well?
e.g.
{{{
def __call__(self, *x):
if len(x)==1:
x = x[0]
x, y = x
return (self._a * x + self._b * y) * x + self._c * y**2
}}}
and
{{{
def polynomial(self):
return self(ZZ['x,y'].gens())
}}}
besides, with the definition of {{{__call__}}} I propose above, one can
actually evaluate a quadratic form at a vector (so, the * in the proposed
matrix actions above would no longer be necessary -- it is because
{{{Q(v)}}} now fails for v a vector, which is inconvenient IMO).
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8681#comment:3>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica,
and MATLAB
--
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en.