The code supporting binary quadratic forms, in quadratic_forms/binary_qf.py, is missing some functionality, and relies on Magma and Pari. The patch in this ticket provides the following changes:
- tests for equivalence, normal, positive and negative definite, indefinite, primitive forms
- normalize a form
- action of matrix on a form
- find content; factor indefinite forms
In addition:
- reduce() no longer calls Pari
- some cleanup: is_reduced() is rewritten; polynomial() replaced with an instance variable (poly)
Doctests are in place for the new code, so the file remains at 100% coverage.