Opened 3 years ago
Closed 5 months ago
#11783 closed defect (fixed)
bug in DirichletGroup and/or DirichletCharacter when the modulus is 1
Reported by: | was | Owned by: | was |
---|---|---|---|
Priority: | major | Milestone: | sage-6.2 |
Component: | number theory | Keywords: | |
Cc: | Merged in: | ||
Authors: | Alex Ghitza | Reviewers: | Peter Bruin |
Report Upstream: | N/A | Work issues: | |
Branch: | 0693286 (Commits) | Commit: | 06932866de2e5308e2bdf58d137e6e9911f29460 |
Dependencies: | Stopgaps: |
Description
Observe that the value of chi(1) below depends on whether chi.values() is called first. Thus there is certainly a bug. I think we should always have chi(1)=1, since gcd(1,1)=1; this is also consistent with the rule that if psi is trivial but not primitive, then psi(n)=1 for all n coprime to the modulus of psi.
See this thread:
http://groups.google.com/group/sage-devel/browse_thread/thread/fa94a97612c7225b
wstein@ubuntu:~$ sage ---------------------------------------------------------------------- | Sage Version 4.7.2.alpha2, Release Date: 2011-08-18 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- ********************************************************************** * * * Warning: this is a prerelease version, and it may be unstable. * * * ********************************************************************** sage: chi = DirichletGroup(1)[0] sage: chi(1) 1 sage: chi.values() [1] sage: Exiting Sage (CPU time 0m0.09s, Wall time 0m18.02s). wstein@ubuntu:~$ sage ---------------------------------------------------------------------- | Sage Version 4.7.2.alpha2, Release Date: 2011-08-18 | | Type notebook() for the GUI, and license() for information. | ---------------------------------------------------------------------- ********************************************************************** * * * Warning: this is a prerelease version, and it may be unstable. * * * ********************************************************************** sage: chi = DirichletGroup(1)[0] sage: chi.values() [0] sage: chi(1) 0
Change History (7)
comment:1 Changed 13 months ago by jdemeyer
- Milestone changed from sage-5.11 to sage-5.12
comment:2 Changed 8 months ago by vbraun_spam
- Milestone changed from sage-6.1 to sage-6.2
comment:3 Changed 5 months ago by AlexGhitza
comment:4 Changed 5 months ago by AlexGhitza
- Branch set to u/AlexGhitza/ticket/11783
- Modified changed from 04/24/14 01:22:09 to 04/24/14 01:22:09
comment:5 Changed 5 months ago by AlexGhitza
- Commit set to 06932866de2e5308e2bdf58d137e6e9911f29460
- Status changed from new to needs_review
New commits:
0693286 | doctest to verify fix of issue with DirichletCharacter of modulus 1 |
comment:6 Changed 5 months ago by pbruin
- Reviewers set to Peter Bruin
- Status changed from needs_review to positive_review
comment:7 Changed 5 months ago by vbraun
- Branch changed from u/AlexGhitza/ticket/11783 to 06932866de2e5308e2bdf58d137e6e9911f29460
- Resolution set to fixed
- Status changed from positive_review to closed
Note: See
TracTickets for help on using
tickets.
This was fixed in #14368. In sage-6.1.1 we have:
I am adding a bit to the existing doctest to illustrate this.