#9502: Basis parent bug in FreeModule
----------------------------------+-----------------------------------------
   Reporter:  novoselt            |       Owner:  AlexGhitza  
       Type:  defect              |      Status:  needs_review
   Priority:  major               |   Milestone:  sage-4.5    
  Component:  algebra             |    Keywords:              
     Author:  Andrey Novoseltsev  |    Upstream:  N/A         
   Reviewer:                      |      Merged:              
Work_issues:                      |  
----------------------------------+-----------------------------------------
Changes (by newvalueoldvalue):

  * status:  new => needs_review
  * author:  => Andrey Novoseltsev


Old description:

> There is an inconsistency in the example below for the echelonized basis
> of submodules with basis:
> {{{
> sage: F = FreeModule(ZZ, 3)
> sage: S = F.submodule_with_basis([(1,2,3),(3,2,1)])
> sage: parent(S.basis()[0])
> Free module of degree 3 and rank 2 over Integer Ring
> User basis matrix:
> [1 2 3]
> [3 2 1]
> sage: parent(S.echelonized_basis()[0])
> Ambient free module of rank 3 over the principal ideal domain Integer
> Ring
> }}}
>
> For automatic bases everything is OK:
> {{{
> sage: S = F.submodule([(1,2,3),(3,2,1)])
> sage: parent(S.echelonized_basis()[0])
> Free module of degree 3 and rank 2 over Integer Ring
> Echelon basis matrix:
> [1 2 3]
> [0 4 8]
> sage: parent(S.basis()[0])
> Free module of degree 3 and rank 2 over Integer Ring
> Echelon basis matrix:
> [1 2 3]
> [0 4 8]
> }}}
>
> I am working on a patch to fix this.

New description:

 There is an inconsistency in the example below for the echelonized basis
 of submodules with basis:
 {{{
 sage: F = FreeModule(ZZ, 3)
 sage: S = F.submodule_with_basis([(1,2,3),(3,2,1)])
 sage: parent(S.basis()[0])
 Free module of degree 3 and rank 2 over Integer Ring
 User basis matrix:
 [1 2 3]
 [3 2 1]
 sage: parent(S.echelonized_basis()[0])
 Ambient free module of rank 3 over the principal ideal domain Integer Ring
 }}}

 For automatic bases everything is OK:
 {{{
 sage: S = F.submodule([(1,2,3),(3,2,1)])
 sage: parent(S.echelonized_basis()[0])
 Free module of degree 3 and rank 2 over Integer Ring
 Echelon basis matrix:
 [1 2 3]
 [0 4 8]
 sage: parent(S.basis()[0])
 Free module of degree 3 and rank 2 over Integer Ring
 Echelon basis matrix:
 [1 2 3]
 [0 4 8]
 }}}

 While I was working on this patch, I expanded documentation for
 `FreeModule_submodule_with_basis_pid` and rewrote its constructor to fix
 the issue on this ticket and make its logic more clear.

 I have also discovered that it avoids calling the base constructor which
 checks that the base ring is indeed a PID. I tried to fix, got errors,
 fixed one of them (thanks to Mike Hansen), but there are more with number
 fields and since it was not the main issue on this ticket I delegated it
 to #9503.

 Current patch passed all tests on 4.5.alpha1.

--

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9502#comment:1>
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.

Reply via email to