Repository: LMFDB/lmfdb

Issue:
Need total line for the Torsion Groups
From the feedback page:

https://www.lmfdb.org/EllipticCurve/Q/stats has a total line for the ranks and for SHA, but oddly missed this for the torsion groups. Please add this in for consistency. Thank you.


Discussion:
I'm fine with this change, but I'm not personally going to work on it.

Resolving patch:
diff --git a/lmfdb/characters/main.py b/lmfdb/characters/main.py
--- a/lmfdb/characters/main.py
+++ b/lmfdb/characters/main.py
@@ -238,7 +238,10 @@ def display_galois_orbit(modulus, first, last, degree):
     MathCol("conductor", "character.dirichlet.conductor", "Conductor"),
     MathCol("order", "character.dirichlet.order", "Order"),
     ProcessedCol("is_even", "character.dirichlet.parity", "Parity", lambda is_even: "even" if is_even else "odd"),
-    CheckCol("is_primitive", "character.dirichlet.primitive", "Primitive")])
+    CheckCol("is_real", "character.dirichlet.real", "Real"),
+    CheckCol("is_primitive", "character.dirichlet.primitive", "Primitive"),
+    CheckCol("is_minimal", "character.dirichlet.minimal", "Minimal"),
+    ])
 
 @search_wrap(
     table=db.char_dirichlet,
@@ -712,9 +715,9 @@ class DirichStats(StatsDisplay):
          "totaler": totaler(),
          "proportioner": proportioners.per_col_total},
     ]
-    buckets = {"conductor": ["1-10", "11-100", "101-1000", "1001-10000"],
-               "modulus": ["1-10", "11-100", "101-1000", "1001-10000"],
-               "order": ["1-10", "11-100", "101-1000", "1001-10000"]}
+    buckets = {"conductor": ["1-10", "11-100", "101-1000", "1001-10000", "10001-100000", "100001-1000000"],
+               "modulus": ["1-10", "11-100", "101-1000", "1001-10000", "10001-100000", "100001-1000000"],
+               "order": ["1-10", "11-100", "101-1000", "1001-10000", "10001-100000", "100001-1000000"]}
     knowls = {"conductor": "character.dirichlet.conductor",
               "modulus": "character.dirichlet.modulus",
               "order": "character.dirichlet.order",
@@ -739,21 +742,21 @@ def __init__(self):
 
     @property
     def short_summary(self):
-        return 'The database currently contains %s %s of %s of %s up to %s. This comprises %s Dirichlet characters.  Among these, L-functions are available for characters of modulus up to 2,800 (and some of higher modulus).  Here are some <a href="%s">further statistics</a>.' % (
+        return 'The database currently contains %s %s of %s %s of %s up to %s.  L-functions are available for characters of modulus up to 2,800 (and some of higher modulus).  Here are some <a href="%s">further statistics</a>.' % (
             comma(self.norbits),
             display_knowl("character.dirichlet.galois_orbit", "Galois orbits"),
+            comma(self.nchars),
             display_knowl("character.dirichlet", "Dirichlet characters"),
             display_knowl("character.dirichlet.modulus", "modulus"),
             comma(self.maxmod),
-            comma(self.nchars),
             url_for(".statistics"))
 
     @property
     def summary(self):
-        return "The database currently contains %s %s of %s of %s up to %s. This comprises %s Dirichlet characters. The tables below show counts of Galois orbits." % (
+        return "The database currently contains %s %s of %s %s of %s up to %s. The tables below count Galois orbits." % (
             comma(self.norbits),
             display_knowl("character.dirichlet.galois_orbit", "Galois orbits"),
+            comma(self.nchars),
             display_knowl("character.dirichlet", "Dirichlet characters"),
             display_knowl("character.dirichlet.modulus", "modulus"),
-            comma(self.maxmod),
-            comma(self.nchars))
+            comma(self.maxmod))
diff --git a/lmfdb/elliptic_curves/elliptic_curve.py b/lmfdb/elliptic_curves/elliptic_curve.py
--- a/lmfdb/elliptic_curves/elliptic_curve.py
+++ b/lmfdb/elliptic_curves/elliptic_curve.py
@@ -210,7 +210,7 @@ def summary(self):
 
     stat_list = [
         {'cols': 'rank', 'totaler': {'avg': True}},
-        {'cols': 'torsion_structure'},
+        {'cols': 'torsion_structure', 'totaler': {'avg': False}},
         {'cols': 'sha', 'totaler': {'avg': False}},
     ]
 


Test patch:
diff --git a/lmfdb/characters/test_characters.py b/lmfdb/characters/test_characters.py
--- a/lmfdb/characters/test_characters.py
+++ b/lmfdb/characters/test_characters.py
@@ -82,7 +82,7 @@ def test_dirichletgroup(self):
         assert bool_string(True) in W.get_data(as_text=True)
         assert 'DirichletGroup(23)' in W.get_data(as_text=True)
         assert 'e\\left(\\frac{7}{11}\\right)' in W.get_data(as_text=True)
-        assert '/Character/Dirichlet/23/10' in W.get_data(as_text=True)
+        assert '\\chi_{23}(10,\\cdot)' in W.get_data(as_text=True)
 
         W = self.tc.get('/Character/Dirichlet/91', follow_redirects=True)
         assert bool_string(True) in W.get_data(as_text=True)