#16893: Free modules over PIDs
-------------------------------------+-------------------------------------
Reporter: aly.deines | Owner:
Type: defect | Status: needs_work
Priority: major | Milestone: sage-6.4
Component: linear algebra | Resolution:
Keywords: free modules, PID | Merged in:
Authors: aly.deines | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/aly.deines/free_modules_over_pids| 867b1507389a0b3f3c4be024bffb0c8a1f1a2cb8
Dependencies: | Stopgaps:
-------------------------------------+-------------------------------------
Comment (by vdelecroix):
After a first lecture:
- `self` should not be mentioned in the `INPUT` section.
- in your example `[ideal(ZZ(p)) for p in ...]` you could remove the `ZZ`.
The output of `prime_range` are already integers.
- {{{ValueError("gens and ideal_list must have the same lenghth")}}} chane
`lenghth` into `length`
- it is better to use `ZZ is ZF` rather than `ZZ == ZF`. The reason is
that it does not involve Python comparisons (which might be tedious).
Similarly, you can safely replace `ideal_list == None` with `ideal_list is
None`
- instead of `pari(F)` use `F._pari_()`. Doing that way you can remove
`pari` from the imported modules. You can also go from `pari` to `sage`
using `.sage()`
{{{
sage: m = matrix([[2,1],[1,1]])
sage: p = m._pari_()
sage: p
[2, 1; 1, 1]
sage: p.sage()
[2 1]
[1 1]
}}}
copying the entries one by one will be rather slow (it will not
necessarily works well with number field elements).
- you can replace {{{[F.ideal(1) for id in range(len(self.gens()))]}}}
with {{{[F.ideal(1)] * len(self.gens())}}}.
Vincent
--
Ticket URL: <http://trac.sagemath.org/ticket/16893#comment:4>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.