#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 | Merged in: | |
Authors: | Reviewers: | ||
Report Upstream: | Work issues: | ||
Branch: | Commit: | ||
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 (1)
Change History (6)
Changed 13 years ago by
comment:1 Changed 13 years ago by
- Summary changed from order function not defined for ideal classes to [with patch, needs review] order function not defined for ideal classes
comment:2 Changed 13 years ago by
- Cc AlexGhitza added
comment:3 follow-up: ↓ 5 Changed 13 years ago by
- 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 13 years ago by
- Resolution set to fixed
- Status changed from new to closed
Merged in Sage 3.1.2.alpha1
comment:5 in reply to: ↑ 3 Changed 13 years ago by
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!
Note: See
TracTickets for help on using
tickets.
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.