Ticket #3913 (closed enhancement: fixed)
[with patch, positive review] order function not defined for ideal classes
| Reported by: | cremona | Owned by: | was |
|---|---|---|---|
| Priority: | minor | Milestone: | sage-3.1.2 |
| Component: | number theory | Keywords: | |
| Cc: | AlexGhitza | Work issues: | |
| Report Upstream: | Reviewers: | ||
| Authors: | Merged in: | ||
| Dependencies: | Stopgaps: |
Description
In 3.1 you can't ask for the order of an ideal class. Example:
sage: K.<w>=QuadraticField(-23) sage: OK=K.ring_of_integers() sage: C=OK.class_group() sage: h=C.order() sage: P2a,P2b=[P for P,e in (2*OK).factor()] sage: c=C(P2a); c Fractional ideal class (2, 1/2*w - 1/2) sage: c.order() #boom
This is easily provided:
sage: sage.groups.generic.order_from_multiple(c,c.parent().order(),operation='*') 3
Patch coming up.
Attachments
Change History
comment:1 Changed 5 years ago by cremona
- Summary changed from order function not defined for ideal classes to [with patch, needs review] order function not defined for ideal classes
The patch implements this, and adds doctests to some other functions. Based on 3.1.1, and all doctests in sage/rings/number_fields pass.
comment:3 follow-up: ↓ 5 Changed 5 years ago by AlexGhitza
- Summary changed from [with patch, needs review] order function not defined for ideal classes to [with patch, positive review] order function not defined for ideal classes
comment:4 Changed 5 years ago by mabshoff
- Status changed from new to closed
- Resolution set to fixed
Merged in Sage 3.1.2.alpha1
comment:5 in reply to: ↑ 3 Changed 5 years ago by cremona
Replying to AlexGhitza:
Looks good and passes doctests. Also, when this gets merged, #1400 should be closed as a duplicate (note btw that John's patch addresses precisely Nick's objection on #1400).
Thanks -- sorry to have opened a new ticket unnecessarily (I did look, honest). In any case this patch is more efficient, and shows how useful the generic algorithms I implemented are!

