Opened 5 years ago
Closed 5 years ago
#23916 closed enhancement (fixed)
Pretty printing and latex for Genera of quadratic forms
Reported by:  Simon Brandhorst  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 5 years ago by
Keywords:  sd91 added 

comment:2 Changed 5 years ago by
Branch:  → u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms 

comment:3 Changed 5 years ago by
Authors:  → Simon Brandhorst 

Commit:  → d9f19ba3b8cacc818cd05fa4b9e30b256fc68060 
comment:4 Changed 5 years ago by
Commit:  d9f19ba3b8cacc818cd05fa4b9e30b256fc68060 → 30a28ce3ac9839fcfa3a9913537ab8dbb1d749a3 

Branch pushed to git repo; I updated commit sha1. New commits:
30a28ce  Added Latex representation. Still need doctests.

comment:5 Changed 5 years ago by
Commit:  30a28ce3ac9839fcfa3a9913537ab8dbb1d749a3 → d9236f7f81b65f305eb254d8a479c3b0364cb6b9 

Branch pushed to git repo; I updated commit sha1. New commits:
d9236f7  Added the latex representation of a Genus

comment:6 Changed 5 years ago by
Status:  new → needs_review 

New commits:
d9236f7  Added the latex representation of a Genus

comment:7 Changed 5 years ago by
Branch:  u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms → u/kedlaya/pretty_printing_and_latex_for_genera_of_quadratic_forms 

comment:8 Changed 5 years ago by
Commit:  d9236f7f81b65f305eb254d8a479c3b0364cb6b9 → 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 5 years ago by
Status:  needs_review → needs_work 

Oops, a few more doctest failures in src/sage/quadratic_forms/quadratic_form__genus.py
.
comment:10 Changed 5 years ago by
Branch:  u/kedlaya/pretty_printing_and_latex_for_genera_of_quadratic_forms → u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms 

comment:11 Changed 5 years ago by
Commit:  2f9048f048208b146ee0925db210c05bb2c04086 → fda4bcd3579184857c1e26815a3b547782c4ef79 

Dependencies:  → #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 5 years ago by
Commit:  fda4bcd3579184857c1e26815a3b547782c4ef79 → 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 5 years ago by
Status:  needs_work → needs_review 

I did check the signs in the docstrings. They are as intended now.
comment:14 Changed 5 years ago by
Reviewers:  → Kiran Kedlaya 

Status:  needs_review → positive_review 
All tests pass on k8s. Positive review.
comment:16 Changed 5 years ago by
Commit:  f81fb90f5ad4b409e811eb730a84f2da1460e36b → 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 5 years ago by
Commit:  4dcf91afb5598c682514bc8a72f0693737976cbc → 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 5 years ago by
Status:  needs_work → needs_review 

comment:19 Changed 5 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:21 Changed 5 years ago by
Branch:  u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms → u/kedlaya/pretty_printing_and_latex_for_genera_of_quadratic_forms 

comment:22 Changed 5 years ago by
Branch:  u/kedlaya/pretty_printing_and_latex_for_genera_of_quadratic_forms → u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms 

comment:23 Changed 5 years ago by
Commit:  4b9249ac102265b890a027a4ba54325da57ed191 → 7d3b712a9530fdb577c24bba2eb3d1a86ad0acb7 

comment:24 Changed 5 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 5 years ago by
Status:  needs_review → needs_work 

comment:26 Changed 5 years ago by
Commit:  7d3b712a9530fdb577c24bba2eb3d1a86ad0acb7 → aeca8374cd3175b28e9b8a7e1a5af88a883b452f 

Branch pushed to git repo; I updated commit sha1. New commits:
aeca837  updated output

comment:27 Changed 5 years ago by
Status:  needs_work → needs_review 

comment:28 Changed 5 years ago by
Status:  needs_review → positive_review 

All tests now passing on k8s. Positive review.
comment:29 Changed 5 years ago by
Branch:  u/sbrandhorst/pretty_printing_and_latex_for_genera_of_quadratic_forms → aeca8374cd3175b28e9b8a7e1a5af88a883b452f 

Resolution:  → fixed 
Status:  positive_review → closed 
New commits:
Printing representation now matches the printing in Conway Sloane's Spherepackings, Lattices and Groups