#12693: bug in jordan_form(transformation=true) for integer matrices
----------------------------------+-----------------------------------------
Reporter: hthomas | Owner: jason, was
Type: defect | Status: new
Priority: major | Milestone: sage-5.0
Component: linear algebra | Resolution:
Keywords: jordan form | Work issues:
Report Upstream: N/A | Reviewers:
Authors: | Merged in:
Dependencies: | Stopgaps:
----------------------------------+-----------------------------------------
Comment (by dsm):
I can see what's going on, but I'm not sure what the best way to deal with
it is. For my part I'd probably simply push everything to the fraction
field during the base_ring changes of jordan_form() in matrix2.pyx and
work with vector spaces over the field instead of free modules over the
ring, but not everyone might like that.
Comparing the differences between the code paths for ZZ and QQ, the first
divergence seems to come in _jordan_form_vector_in_difference. Both cases
get V= [(1, 0, -1), (0, 1, -1)] and W = [(2, 0, -2), (1, 0, 0)], but in
the integer case the resulting W_space is
{{{
W_space: Free module of degree 3 and rank 2 over Integer Ring
Echelon basis matrix:
[1 0 0]
[0 0 2]
}}}
i.e. a FreeModule_submodule_pid_with_category (not a
FreeModule_submodule_field_with_category, as it would be in QQ) at which
point Sage decides (reasonably enough) that (1, 0, -1) isn't in W_space.
For comparison, the QQ case gives
{{{
W_space: Vector space of degree 3 and dimension 2 over Rational Field
Basis matrix:
[1 0 0]
[0 0 1]
}}}
and it returns (0, 1, -1) instead.
Good news is that whatever we decide to do should be straightforward.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12693#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.