Skip to content

Commit

Permalink
edits to modlgal code & templates
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnCremona committed Aug 21, 2024
1 parent a241ab5 commit 122746a
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 19 deletions.
12 changes: 6 additions & 6 deletions lmfdb/modl_galois_representations/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,20 @@ def blankzeros(n):
modlgal_columns = SearchColumns(
[
LinkCol("label", "modlgal.label", "Label", url_for_modlgal_label),
MathCol("base_ring_characteristic", "modlgal.base_ring_characteristic", r"$\ell$"),
MathCol("base_ring_characteristic", "modlgal.characteristic", r"$\ell$"),
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),
CheckCol("is_surjective", "modlgal.is_surjective", "Surjective"),
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),
ProcessedCol("generating_primes", "modlgal.generating_primes", "Generators", lambda ps: "$" + ",".join([str(p) for p in ps]) + "$", align="center", default=False),
ProcessedCol("kernel_polynomial", "modlgal.kernel_polynomial", "Kernel sibling", formatfield),
ProcessedCol("kernel_polynomial", "modlgal.splitting_field", "Splitting field", formatfield),
ProcessedCol("projective_kernel_polynomial", "modlgal.projective_kernel_polynomial", "Projective kernel", formatfield, default=False),
],
db_cols=["label", "dimension", "base_ring_characteristic", "base_ring_order", "base_ring_is_field", "algebraic_group", "conductor", "image_label",
Expand Down Expand Up @@ -229,7 +229,7 @@ def __init__(self):
select_box=conductor_quantifier)
base_ring_characteristic = TextBox(
name="base_ring_characteristic",
knowl="modlgal.base_ring_characteristic",
knowl="modlgal.characteristic",
label=r"Characteristic $\ell$",
example="2",
example_span="2, 3, or 5")
Expand Down Expand Up @@ -310,7 +310,7 @@ def __init__(self):
[top_slope, image_index, image_order]
]

sort_knowl = "modlgal.sort_order"
#sort_knowl = "modlgal.sort_order"
sorts = [
("label", "label", ["dimension", "base_ring_order", "conductor", "num"]),
("conductor", "conductor", ["conductor", "dimension", "base_ring_order", "conductor", "num"]),
Expand All @@ -336,7 +336,7 @@ def __init__(self):
def short_summary(self):
modlgal_knowl = display_knowl("modlgal", title=r"mod-$\ell$ Galois representations")
return (
fr'The database currently contains {self.nreps} {modlgal_knowl} of $\Gal_\Q$ of conductor $N\le {self.max_cond}$ and dimension $d\le {self.max_dim}$ for $\ell \le {self.max_ell}$. You can <a href="{url_for(".statistics")}">browse further statistics</a>.<br><br>'
fr'The database currently contains {self.nreps} irreducible {modlgal_knowl} of $\Gal_\Q$ of conductor $N\le {self.max_cond}$ and dimension $d\le {self.max_dim}$ for $\ell \le {self.max_ell}$. You can <a href="{url_for(".statistics")}">browse further statistics</a>.<br><br>'
)

@property
Expand Down
27 changes: 21 additions & 6 deletions lmfdb/modl_galois_representations/templates/modlgal_rep.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,14 @@ <h2> {{ KNOWL('modlgal', title='Mod-&#x2113; Galois representation')}} </h2>
<h2>Invariants</h2>

<table>
<tr><td>{{ KNOWL('modlgal.characteristic', 'Characteristic') }}:</td><td>${{ rep.base_ring_characteristic }}$</td></tr>
<tr><td>{{ KNOWL('modlgal.dimension', 'Dimension') }}:</td><td>${{ rep.dimension }}$</td></tr>
<tr><td>{{ KNOWL('modlgal.conductor', 'Conductor') }}:</td><td>{{ rep.factored_conductor }}</td></tr>
{% if rep.weight and rep.weight >= 0 %}
{% endif %}
{% if rep.dimension > 1 %}
<tr><td>{{ KNOWL('modlgal.determinant', 'Determinant') }}:</td><td>{{ rep.determinant | safe }}</td></tr>
{% endif %}
{% if not rep.is_surjective %}
<tr><td>{{ KNOWL('modlgal.codomain', 'Codomain') }}:<td>{{ rep.codomain }}</td></tr>
{% endif %}
Expand All @@ -21,22 +25,22 @@ <h2>Invariants</h2>
{% endif %}
</td></tr>
{% if rep.frobenius_generators %}
<tr><td>{{ KNOWL('modlgal.generating_primes', 'Generators') }}:<td>${{ rep.frobenius_generators }}$</td></tr>
<tr><td>{{ KNOWL('modlgal.generating_primes', 'Generating primes') }}:<td>${{ rep.frobenius_primes }}$</td></tr>
{% endif %}
<tr><td>{{ KNOWL('modlgal.image_index', 'Image index') }}:<td>{{ rep.image_index }}</td></tr>
<tr><td>{{ KNOWL('modlgal.image_order', 'Image order') }}:<td>{{ rep.image_order }}</td></tr>
<tr><td>{{ KNOWL('modlgal.absolutely_irreducible', 'Absolutely irreducible') }}:</td><td>{% if rep.is_absolutely_irreducible%}yes{% else %}no{% endif %}</td></tr>
<tr><td>{{ KNOWL('modlgal.surjective', 'Surjective') }}:<td>{% if rep.is_surjective %}yes{% else %}no{% endif %}</td></tr>
<tr><td>{{ KNOWL('modlgal.surjective', 'Surjective') }}:<td>{% if rep.image_index==1 %}yes{% else %}no{% endif %}</td></tr>
<tr><td>{{ KNOWL('modlgal.solvable', 'Solvable') }}:<td>{% if rep.is_solvable %}yes{% else %}no{% endif %}</td></tr>
<tr><td>{{ KNOWL('modlgal.top_slope', 'Top slope') }}:</td><td>{{ rep.top_slope_rational }}</td></tr>
</table>

<h2>Associated number fields</h2>

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

Expand All @@ -63,19 +67,30 @@ <h2> Frobenius data </h2>

{% if rep.frobenius_matrices_pretty %}

<p>
Information about $\rho(\text{Frob}_p)$ for {{ KNOWL('modlgal.frobenius_prime', 'good primes') }} $p<100$.
{% if rep.generating_primes %}
<p>{{ KNOWL('modlgal.generating_primes', 'Generating primes') }} are shown in bold.</p>
{{ KNOWL('modlgal.generating_primes', 'Generating primes') }} are shown in bold.
{% endif %}
</p>

<table class="ntdata" cellpadding=3 style="table-layout:fixed">
<tr><th>{{ KNOWL('modlgal.frobenius_prime','Prime') }}</th>
<th>{{ KNOWL('modlgal.frobenius_trace','Trace') }}</th>
<th>{{ KNOWL('modlgal.frobenius_determinant','Determinant') }}</th>
<th>{{ KNOWL('modlgal.frobenius_order','Order') }}</th>
<th>{{ KNOWL('modlgal.frobenius_charpoly','Char poly') }}</th>
<th>{{ KNOWL('modlgal.frobenius_matrix','Matrix') }}</th>
</tr>
{% for r in rep.frobenius_matrices_pretty %}
<tr><td align="center">${{ r[0] }}$</td><td align="center">${{ r[1] }}$</td><td align="center">${{ r[2] }}$</td><td>{{ r[3] }}</td><td>{{ r[4] }}</td></tr>
<tr>
<td align="center">${{ r[0] }}$</td>
<td align="center">${{ r[1] }}$</td>
<td align="center">${{ r[2] }}$</td>
<td align="center">${{ r[3] }}$</td>
<td>{{ r[4] }}</td>
<td>{{ r[5] }}</td>
</tr>
{% endfor %}
</table>
{% else %}
Expand Down
29 changes: 22 additions & 7 deletions lmfdb/modl_galois_representations/web_modlgal.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,14 @@ class WebModLGalRep(WebObj):
def properties(self):
props = [
("Label", self.label),
("Dimension", str(self.dimension)),
("Codomain", str(self.codomain)),
("Characteristic", str(self.base_ring_characteristic)),
("Dimension", str(self.dimension))
]
if self.dimension>1:
props += [("Determinant", str(self.determinant_label))]
props += [
("Conductor", str(self.conductor)),
("Codomain", str(self.codomain)),
("Top slope", self.top_slope_rational),
("Image index", str(self.image_index)),
("Image order", str(self.image_order)),
Expand Down Expand Up @@ -132,7 +137,7 @@ def codomain(self):

@lazy_attribute
def image_pretty(self):
return image_pretty(self.image_label, self.is_surjective, self.algebraic_group, self.dimension, self.base_ring_order, self.base_ring_is_field, codomain=False)
return image_pretty(self.image_label, self.image_index==1, self.algebraic_group, self.dimension, self.base_ring_order, self.base_ring_is_field, codomain=False)

@lazy_attribute
def rep_pretty(self):
Expand Down Expand Up @@ -164,6 +169,12 @@ def frobenius_generators(self):
return None
return ",".join([r"\mathrm{Frob}_{%s}"%(p) for p in self.generating_primes])

@lazy_attribute
def frobenius_primes(self):
if not self.generating_primes:
return None
return ",".join([str(p) for p in self.generating_primes])

@lazy_attribute
def frobenius_matrices_pretty(self):
L = []
Expand All @@ -176,10 +187,10 @@ def frobenius_matrices_pretty(self):
for i in range(len(ps)):
m = Matrix(F,n,frobs[i])
M = R(frobs[i])
if self.generating_primes and ps[i] in self.generating_primes:
L.append([r"\mathbf{%s}"%(ps[i]),m.trace(),M.order(),web_latex(factor(m.charpoly())),web_latex(m)])
else:
L.append([ps[i],m.trace(),M.order(),web_latex(factor(m.charpoly())),web_latex(m)])
p = r"\mathbf{%s}"%(ps[i]) if self.generating_primes and ps[i] in self.generating_primes else ps[i]
charpoly = m.charpoly()
pol = web_latex(charpoly) if charpoly.is_irreducible() else web_latex(factor(charpoly))
L.append([p, m.trace(), m.det(), M.order(), pol, web_latex(m)])
except ValueError:
print(f"Error occurred while attempting to parse frobenius_matrices for {self.label}")
print(self.frobenius_matrices)
Expand All @@ -198,6 +209,10 @@ def dual_algebra_pretty(self):
}
return data

@lazy_attribute
def determinant(self):
return modlgal_link(self.determinant_label)

@lazy_attribute
def downloads(self):
self.downloads = [
Expand Down

0 comments on commit 122746a

Please sign in to comment.