Opened 4 years ago
Last modified 4 years ago
#21742 new defect
Annihilator use where it perhaps wasn't intended
Reported by: | kcrisman | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-7.5 |
Component: | algebra | Keywords: | |
Cc: | nthiery, virmaux, saliola, vdelecroix, klee | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | N/A | Work issues: | |
Branch: | Commit: | ||
Dependencies: | Stopgaps: |
Description
I'm not sure if this example from ask.sagemath is user error, bad doc, or a bug.
var('x0,x1,x2') r0 = vector(QQ,[3,1,-2]) r1 = vector(QQ,[1,-5,3]) r = span([r0,r1]) s = 2*x0 - 3*x1 - 4*x2 == 0 r.annihilator([vector([2,-3,-4])])
result:
AttributeError: 'sage.rings.rational.Rational' object has no attribute '_vector_'
Change History (4)
comment:1 Changed 4 years ago by
comment:2 Changed 4 years ago by
- Cc vdelecroix klee added
First, the variables and s
are not involved. However, the things in ModulesWithBasis
currently don't exactly support the "standard" free modules. The issue is that the action does not result with elements in a vector space per-se. So, strictly speaking, it is user error. However, I feel like this probably should be supported, and this might be (partially) solved by #21737 (which is why I've cc-ed Vincent and Kwankyu).
comment:3 Changed 4 years ago by
By the way, you may want to reply to the user on the ask.sagemath question, who I think really wants to do something more like orthogonal complement ... but I'm not sure since I usually think of annihilators in a commutative algebra context only and maybe there is something more subtle going on here?
comment:4 Changed 4 years ago by
I believe that user wants
sage: v = vector([2,-3,-4]) sage: r.intersection(matrix(v).right_kernel()) Free module of degree 3 and rank 1 over Integer Ring Echelon basis matrix: [ 4 60 -43]
Could you forward this along as I don't have an ask.sagemath account?
Also, I think of annihilators in a more general context, as a ring/algebra R acting on an R-module. This is an explicit assumption of annihilator
:
The codomain is any vector space, and ``action`` is linear on its first argument; typically it is bilinear;
Although the requirement that it is an honest action is not a strict requirement, but it must be something realizable as a module (vector space?).
(Or is this something which more use of the
TestSuite
would have caught? Just wondering.)