From 808d9d8a8243de19fc3adda3bd9b257603a5e3ae Mon Sep 17 00:00:00 2001 From: John Jones Date: Wed, 21 Aug 2024 19:17:12 -0400 Subject: [PATCH] Tweaking search results --- lmfdb/modl_galois_representations/main.py | 39 ++++++++++++------- .../templates/modlgal_rep.html | 14 ++++++- .../web_modlgal.py | 11 +++++- 3 files changed, 47 insertions(+), 17 deletions(-) diff --git a/lmfdb/modl_galois_representations/main.py b/lmfdb/modl_galois_representations/main.py index 830bbefdd5..09d9fed394 100644 --- a/lmfdb/modl_galois_representations/main.py +++ b/lmfdb/modl_galois_representations/main.py @@ -40,7 +40,7 @@ from lmfdb.number_fields.web_number_field import formatfield from lmfdb.modl_galois_representations import modlgal_page -from lmfdb.modl_galois_representations.web_modlgal import WebModLGalRep, get_bread, codomain, image_pretty +from lmfdb.modl_galois_representations.web_modlgal import WebModLGalRep, get_bread, codomain, image_pretty_with_abstract from lmfdb.groups.abstract.main import abstract_group_display_knowl LABEL_RE = re.compile(r"[1-9]\d*.[1-9]\d*.[1-9]\d*.[1-9]\d*(-[1-9]\d*)?") @@ -138,21 +138,24 @@ def blankzeros(n): MathCol("dimension", "modlgal.dimension", "Dim", short_title="dimension"), ProcessedCol("conductor", "modlgal.conductor", "Conductor", web_latex_factored_integer, align="center"), RationalCol("top_slope_rational", "modlgal.top_slope", "Top slope", lambda x: x, align="center", default=lambda info: info.get("top_slope")), - MultiProcessedCol("image", "modlgal.image", "Image", ["image_label", "is_surjective", "algebraic_group", "dimension", "base_ring_order", "base_ring_is_field"], - image_pretty, align="center", apply_download=False), - SearchCol("image_index", "modgal.image_index", "Index", short_title="image index", default=False), - SearchCol("image_order", "modgal.image_order", "Order", short_title="image order", default=False), + MultiProcessedCol("image", "modlgal.image", "Image", ["image_label", "is_surjective", "algebraic_group", "dimension", "base_ring_order", "base_ring_is_field", "image_abstract_group"], + image_pretty_with_abstract, align="center", apply_download=False), + MultiProcessedCol("algebraic_group", "modlgal.codomain", "Codomain", ["algebraic_group", "dimension", "base_ring_order", "base_ring_is_field"], codomain, align="center", apply_download=False, default=False), + SearchCol("image_index", "modlgal.image_index", "Index", short_title="image index", default=False), + SearchCol("image_order", "modlgal.image_order", "Order", short_title="image order", default=False), CheckCol("is_surjective", "modlgal.surjective", "Surjective"), - CheckCol("is_absolutely_irreducible", "modlgal.is_absolutely_irreducible", "Abs irred", short_title="absolutely irreducible", default=False), - CheckCol("is_solvable", "modlgal.is_solvable", "Solvable", default=False), - LinkCol("determinant_label", "modlgal.determinant_label", "Determinant", url_for_modlgal_label, align="center", default=False), + CheckCol("is_absolutely_irreducible", "modlgal.absolutely_irreducible", "Abs irred", short_title="absolutely irreducible", default=False), + CheckCol("is_solvable", "modlgal.solvable", "Solvable", default=False), + LinkCol("determinant_label", "modlgal.determinant", "Determinant", url_for_modlgal_label, align="center", default=False), + ProcessedCol("determinant_index", "modlgal.det_surjective", "Det. surjective", lambda a: "✓" if a == 1 else "" , align="center", default=False), ProcessedCol("generating_primes", "modlgal.generating_primes", "Generators", lambda ps: "$" + ",".join([str(p) for p in ps]) + "$", align="center", default=False), - ProcessedCol("kernel_polynomial", "modlgal.splitting_field", "Splitting field", formatfield), - ProcessedCol("projective_kernel_polynomial", "modlgal.projective_kernel_polynomial", "Projective kernel", formatfield, default=False), + ProcessedCol("kernel_polynomial", "modlgal.min_sib_splitting_field", "Splitting field", formatfield), + ProcessedCol("projective_kernel_polynomial", "modlgal.projective_kernel_polynomial", "Projective splitting field", formatfield, default=False), ], db_cols=["label", "dimension", "base_ring_characteristic", "base_ring_order", "base_ring_is_field", "algebraic_group", "conductor", "image_label", "is_surjective", "is_absolutely_irreducible", "is_solvable", "determinant_label", "kernel_polynomial", "projective_kernel_polynomial", - "image_index", "image_order", "top_slope_rational", "generating_primes"] + "image_index", "image_order", "top_slope_rational", + "generating_primes", "determinant_index", "image_abstract_group"] ) @search_wrap( @@ -200,6 +203,7 @@ def modlgal_search(info, query): parse_bool(info, query, "is_surjective") parse_bool(info, query, "is_solvable") parse_bool(info, query, "is_absolutely_irreducible") + parse_bool(info, query, "determinant_index", process=lambda a: 1 if a else {"$gt":1}) class ModLGalRepSearchArray(SearchArray): @@ -281,6 +285,12 @@ def __init__(self): label="Absolutely irreducible", example_col=True, ) + determinant_index = YesNoBox( + name="determinant_index", + knowl="modlgal.determinant_index", + label="Determinant surjective", + example_col=True, + ) image_index = TextBox( name="image_index", knowl="modlgal.image_index", @@ -300,14 +310,15 @@ def __init__(self): [dimension, surjective], [conductor, absolutely_irreducible], [conductor_primes, solvable], - [top_slope, image_index], - [count, image_order], + [image_index, determinant_index], + [image_order, top_slope], + [count] ] self.refine_array = [ [base_ring_characteristic, dimension, conductor, conductor_primes], [codomain, solvable, surjective, absolutely_irreducible], - [top_slope, image_index, image_order] + [top_slope, image_index, image_order, determinant_index] ] #sort_knowl = "modlgal.sort_order" diff --git a/lmfdb/modl_galois_representations/templates/modlgal_rep.html b/lmfdb/modl_galois_representations/templates/modlgal_rep.html index 6a738757cb..043b1218b6 100644 --- a/lmfdb/modl_galois_representations/templates/modlgal_rep.html +++ b/lmfdb/modl_galois_representations/templates/modlgal_rep.html @@ -24,6 +24,13 @@

Invariants

$\cong$ {{ rep.image_abstract | safe }} {% endif %} + {{ KNOWL('modlgal.determinant_index', 'Determinant index') }}:{{ rep.determinant_index }} + {% if rep.determinant_index == 1 %} + (determinant is surjective) + {% else %} + (determinant is not surjective) + {% endif %} + {% if rep.frobenius_generators %} {{ KNOWL('modlgal.generating_primes', 'Generating primes') }}:${{ rep.frobenius_primes }}$ {% endif %} @@ -38,9 +45,12 @@

Invariants

Associated number fields

- + {% if rep.base_ring_characteristic != 2 %} - + {% endif %}
{{ KNOWL('modlgal.min_sib_splitting_field','Minimal sibling of the splitting field') }} of $\rho$:{{ rep.kernel_sibling | safe }}
{{ KNOWL('nf.minimal_sibling','Minimal sibling') }} of the + {{ KNOWL('modlgal.splitting_field', 'splitting field') }} of $\rho$:{{ rep.kernel_sibling | safe }}
{{ KNOWL('modlgal.min_sib_splitting_field','Minimal sibling of the splitting field') }} of the {{ KNOWL('modlgal.projective_representation','projective representation') }} $\mathbb{P}\rho$:{{ rep.projective_kernel_sibling | safe }}
{{ KNOWL('nf.minimal_sibling','Minimal sibling') }} of the + {{ KNOWL('modlgal.splitting_field', 'splitting field') }} + of the {{ KNOWL('modlgal.projective_representation','projective representation') }} $\mathbb{P}\rho$:{{ rep.projective_kernel_sibling | safe }}
diff --git a/lmfdb/modl_galois_representations/web_modlgal.py b/lmfdb/modl_galois_representations/web_modlgal.py index a51ebe5975..5698f8dcb1 100644 --- a/lmfdb/modl_galois_representations/web_modlgal.py +++ b/lmfdb/modl_galois_representations/web_modlgal.py @@ -20,13 +20,22 @@ def _codomain(algebraic_group, dimension, base_ring_order, base_ring_is_field): def codomain(algebraic_group, dimension, base_ring_order, base_ring_is_field): return "$" + _codomain(algebraic_group, dimension, base_ring_order, base_ring_is_field) + "$" -def image_pretty(image_label, is_surjective, algebraic_group, dimension, base_ring_order, base_ring_is_field, codomain=True): +def image_pretty(image_label, is_surjective, algebraic_group, dimension, base_ring_order, base_ring_is_field, codomain=False): s = _codomain(algebraic_group, dimension, base_ring_order, base_ring_is_field) if is_surjective: return "$" + s + "$" t = display_knowl('gl2.subgroup_data', title=image_label, kwargs={'label':image_label}) if dimension == 2 else image_label return t + r" $< " + s + "$" if codomain else t +def image_pretty_with_abstract(image_label, is_surjective, algebraic_group, dimension, base_ring_order, base_ring_is_field, image_abstract_group, codomain=False): + s = _codomain(algebraic_group, dimension, base_ring_order, base_ring_is_field) + if is_surjective: + return "$" + s + "$" + t = display_knowl('gl2.subgroup_data', title=image_label, kwargs={'label':image_label}) if dimension == 2 else image_label + if image_abstract_group: + t += "$\ \cong$ "+ abstract_group_display_knowl(image_abstract_group) + return t + def rep_pretty(algebraic_group, dimension, base_ring_order, base_ring_is_field): return r"$\rho\colon\Gal_\Q\to" + _codomain(algebraic_group, dimension, base_ring_order, base_ring_is_field) + "$"