Ticket #6064 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

[with patch; with positive review] allow rationals in kronecker_symbol and legendre_symbol

Reported by: tornaria Owned by: tornaria
Priority: major Milestone: sage-4.0
Component: number theory Keywords:
Cc: Work issues:
Report Upstream: Reviewers: John Cremona
Authors: Gonzalo Tornaria Merged in: 4.0.rc0
Dependencies: Stopgaps:

Description

With sage-4.0.alpha0:

sage: kronecker(2/3,7)
...
TypeError: no conversion of this rational to integer

Same for kronecker_symbol and legendre_symbol. However, it does make sense for these to be defined on rationals.

This is actually used by is_padic_square when used with rationals, and triggered by some of the new quadratic form doctests.

Attachments

trac_6064.patch Download (1.0 KB) - added by tornaria 4 years ago.
allow rationals in kronecker_symbol and legendre_symbol

Change History

comment:1 Changed 4 years ago by tornaria

  • Summary changed from allow rationals in kronecker_symbol and legendre_symbol to [with patch; needs review] allow rationals in kronecker_symbol and legendre_symbol

Note: this is needed to fix doctests in quadratic forms (#5954, #6037, #6040).

Changed 4 years ago by tornaria

allow rationals in kronecker_symbol and legendre_symbol

comment:2 Changed 4 years ago by cremona

  • Summary changed from [with patch; needs review] allow rationals in kronecker_symbol and legendre_symbol to [with patch; with positive review] allow rationals in kronecker_symbol and legendre_symbol

Joint review with #6062: applied both patches, both are fine and tests pass.

comment:3 Changed 4 years ago by mabshoff

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone set to sage-4.0

Merged in Sage 4.0.rc0.

Cheers,

Michael

comment:4 Changed 4 years ago by davidloeffler

  • Reviewers set to John Cremona
  • Merged in set to 4.0.rc0
  • Authors set to Gonzalo Tornaria
Note: See TracTickets for help on using tickets.