Opened 4 years ago
Closed 4 years ago
#23916 closed enhancement (fixed)
Pretty printing and latex for Genera of quadratic forms
Reported by:  sbrandhorst  Owned by:  

Priority:  minor  Milestone:  sage8.1 
Component:  quadratic forms  Keywords:  sd91 
Cc:  Merged in:  
Authors:  Simon Brandhorst  Reviewers:  Kiran Kedlaya 
Report Upstream:  N/A  Work issues:  
Branch:  aeca837 (Commits, GitHub, GitLab)  Commit:  aeca8374cd3175b28e9b8a7e1a5af88a883b452f 
Dependencies:  #23955  Stopgaps: 
Description
Currently:
sage: sage.quadratic_forms.genera.genus.Genus(Matrix(ZZ,2,2,[2,1,1,2])) Genus of [ 2 1] [1 2]
Better:
sage: sage.quadratic_forms.genera.genus.Genus(Matrix(ZZ,2,2,[2,1,1,2])) Genus of [ 2 1] [1 2] Conway Sloane Genus Symbol: II( 3^1 )
See Conway Sloane Spherepackings lattices and groups. Chapter 15, 7.8
Change History (29)
comment:1 Changed 4 years ago by
 Keywords sd91 added
comment:2 Changed 4 years ago by
 Branch set to u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms
comment:3 Changed 4 years ago by
 Commit set to d9f19ba3b8cacc818cd05fa4b9e30b256fc68060
comment:4 Changed 4 years ago by
 Commit changed from d9f19ba3b8cacc818cd05fa4b9e30b256fc68060 to 30a28ce3ac9839fcfa3a9913537ab8dbb1d749a3
Branch pushed to git repo; I updated commit sha1. New commits:
30a28ce  Added Latex representation. Still need doctests.

comment:5 Changed 4 years ago by
 Commit changed from 30a28ce3ac9839fcfa3a9913537ab8dbb1d749a3 to d9236f7f81b65f305eb254d8a479c3b0364cb6b9
Branch pushed to git repo; I updated commit sha1. New commits:
d9236f7  Added the latex representation of a Genus

comment:6 Changed 4 years ago by
 Status changed from new to needs_review
New commits:
d9236f7  Added the latex representation of a Genus

comment:7 Changed 4 years ago by
 Branch changed from u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms to u/kedlaya/pretty_printing_and_latex_for_genera_of_quadratic_forms
comment:8 Changed 4 years ago by
 Commit changed from d9236f7f81b65f305eb254d8a479c3b0364cb6b9 to 2f9048f048208b146ee0925db210c05bb2c04086
Please check the signs in the docstrings. If they are all correct, then give this a positive review (or preferably, wait for patchbot to concur).
New commits:
2f9048f  Spacing and other corrections

comment:9 Changed 4 years ago by
 Status changed from needs_review to needs_work
Oops, a few more doctest failures in src/sage/quadratic_forms/quadratic_form__genus.py
.
comment:10 Changed 4 years ago by
 Branch changed from u/kedlaya/pretty_printing_and_latex_for_genera_of_quadratic_forms to u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms
comment:11 Changed 4 years ago by
 Commit changed from 2f9048f048208b146ee0925db210c05bb2c04086 to fda4bcd3579184857c1e26815a3b547782c4ef79
 Dependencies set to #23955
New commits:
88bdf3c  Fixed two bugs in the genus class

8e62210  Seems that is_2_adic_genus did not assume the input to be canonical but instead did not reduce the determinants mod 8. Changed that.

a7cf87e  Merge branch 'u/bhutz/projective_infinity' of git://trac.sagemath.org/sage into t/23376/equality_testing_of_genera_of_quadratic_forms_over_zz_changes_the_genus_and_produces_false_results

24a5b0b  Doctest formatting.

c4ced01  Merge branch 'u/sbrandhorst/equality_testing_of_genera_of_quadratic_forms_over_zz_changes_the_genus_and_produces_false_results' of git://trac.sagemath.org/sage into t/23916/pretty_printing_and_latex_for_genera_of_quadratic_forms

fda4bcd  Changed the printing representation to use the canonical symbol instead of the symbol. There is a bug in the compartments() method which prevents meaningfull doctest. We have to wait for that to be fixed first.

comment:12 Changed 4 years ago by
 Commit changed from fda4bcd3579184857c1e26815a3b547782c4ef79 to f81fb90f5ad4b409e811eb730a84f2da1460e36b
Branch pushed to git repo; I updated commit sha1. New commits:
22c83b7  Rewrote canonical_2_adic_trains()

711bbf0  Removed unnecessary computations of compartments for the train function.

7dff05e  Resolved merge conflict in the doc tests

c3b136c  Adapted the doctests and modified them by hand where necessary

f81fb90  Cleanup in _latex_

comment:13 Changed 4 years ago by
 Status changed from needs_work to needs_review
I did check the signs in the docstrings. They are as intended now.
comment:14 Changed 4 years ago by
 Reviewers set to Kiran Kedlaya
 Status changed from needs_review to positive_review
All tests pass on k8s. Positive review.
comment:16 Changed 4 years ago by
 Commit changed from f81fb90f5ad4b409e811eb730a84f2da1460e36b to 4dcf91afb5598c682514bc8a72f0693737976cbc
Branch pushed to git repo; I updated commit sha1. New commits:
4dcf91a  Merge branch 'develop' into t/23916/pretty_printing_and_latex_for_genera_of_quadratic_forms

comment:17 Changed 4 years ago by
 Commit changed from 4dcf91afb5598c682514bc8a72f0693737976cbc to 4b9249ac102265b890a027a4ba54325da57ed191
Branch pushed to git repo; I updated commit sha1. New commits:
4b9249a  Merge branch 'develop' into t/23916/pretty_printing_and_latex_for_genera_of_quadratic_forms

comment:18 Changed 4 years ago by
 Status changed from needs_work to needs_review
comment:19 Changed 4 years ago by
Patchbot is complaining about coverage. I think it's because the method _latex_
in genus.py
only has tests, whereas it should also have at least one example.
comment:20 Changed 4 years ago by
I guess we can make that an example instead.
comment:21 Changed 4 years ago by
 Branch changed from u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms to u/kedlaya/pretty_printing_and_latex_for_genera_of_quadratic_forms
comment:22 Changed 4 years ago by
 Branch changed from u/kedlaya/pretty_printing_and_latex_for_genera_of_quadratic_forms to u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms
comment:23 Changed 4 years ago by
 Commit changed from 4b9249ac102265b890a027a4ba54325da57ed191 to 7d3b712a9530fdb577c24bba2eb3d1a86ad0acb7
comment:24 Changed 4 years ago by
I'm getting one doctest failure. Is this just a case where the output needs to be updated?
File "src/sage/modules/free_quadratic_module_integer_symmetric.py", line 437, in sage.modules.free_quadratic_module_integer_symmetric.FreeQuadraticModule_integer_symmetric.genus Failed example: L.genus() Expected: Genus of [0 1] [1 0] Got: Genus of [0 1] [1 0] Genus symbol at 2: 1^2
comment:25 Changed 4 years ago by
 Status changed from needs_review to needs_work
comment:26 Changed 4 years ago by
 Commit changed from 7d3b712a9530fdb577c24bba2eb3d1a86ad0acb7 to aeca8374cd3175b28e9b8a7e1a5af88a883b452f
Branch pushed to git repo; I updated commit sha1. New commits:
aeca837  updated output

comment:27 Changed 4 years ago by
 Status changed from needs_work to needs_review
comment:28 Changed 4 years ago by
 Status changed from needs_review to positive_review
All tests now passing on k8s. Positive review.
comment:29 Changed 4 years ago by
 Branch changed from u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms to aeca8374cd3175b28e9b8a7e1a5af88a883b452f
 Resolution set to fixed
 Status changed from positive_review to closed
New commits:
Printing representation now matches the printing in Conway Sloane's Spherepackings, Lattices and Groups