Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaking search results #6157

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 25 additions & 14 deletions lmfdb/modl_galois_representations/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -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*)?")
Expand Down Expand Up @@ -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(
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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",
Expand All @@ -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"
Expand Down
14 changes: 12 additions & 2 deletions lmfdb/modl_galois_representations/templates/modlgal_rep.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ <h2>Invariants</h2>
$\cong$ {{ rep.image_abstract | safe }}
{% endif %}
</td></tr>
<tr><td>{{ KNOWL('modlgal.determinant_index', 'Determinant index') }}:<td>{{ rep.determinant_index }}
{% if rep.determinant_index == 1 %}
(determinant is surjective)
{% else %}
(determinant is not surjective)
{% endif %}
</td></tr>
{% if rep.frobenius_generators %}
<tr><td>{{ KNOWL('modlgal.generating_primes', 'Generating primes') }}:<td>${{ rep.frobenius_primes }}$</td></tr>
{% endif %}
Expand All @@ -38,9 +45,12 @@ <h2>Invariants</h2>
<h2>Associated number fields</h2>

<table>
<tr><td>{{ KNOWL('modlgal.min_sib_splitting_field','Minimal sibling of the splitting field') }} of $\rho$:</td><td>{{ rep.kernel_sibling | safe }}</td></tr>
<tr><td>{{ KNOWL('nf.minimal_sibling','Minimal sibling') }} of the
{{ KNOWL('modlgal.splitting_field', 'splitting field') }} of $\rho$:</td><td>{{ rep.kernel_sibling | safe }}</td></tr>
{% if rep.base_ring_characteristic != 2 %}
<tr><td>{{ KNOWL('modlgal.min_sib_splitting_field','Minimal sibling of the splitting field') }} of the {{ KNOWL('modlgal.projective_representation','projective representation') }} $\mathbb{P}\rho$:</td><td>{{ rep.projective_kernel_sibling | safe }}</td></tr>
<tr><td> {{ 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$:</td><td>{{ rep.projective_kernel_sibling | safe }}</td></tr>
{% endif %}
</table>

Expand Down
11 changes: 10 additions & 1 deletion lmfdb/modl_galois_representations/web_modlgal.py
Original file line number Diff line number Diff line change
Expand Up @@ -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) + "$"

Expand Down
Loading