Skip to content

Commit

Permalink
Merge pull request #5805 from jenpaulhus/gp_cleanup
Browse files Browse the repository at this point in the history
More updates to groups pages
  • Loading branch information
roed314 authored Jan 11, 2024
2 parents 727dc63 + afe8ede commit 39375be
Show file tree
Hide file tree
Showing 6 changed files with 117 additions and 18 deletions.
2 changes: 1 addition & 1 deletion lmfdb/classical_modular_forms/templates/cmf_newform.html
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ <h2>{{KNOWL('cmf.satake_parameters',title='Satake parameters')}}</h2>
<table class="ntdata complex-cols">
<thead>
<tr>
<th class="sticky-head dark" style="min-width: 40px;">{{ KNOWL('cmf.embedding_label', title='Label')}}</th>
<th class="sticky-head dark" style="min-width: 40px;">{{ KNOWL('cmf.embedding_label', 'Label')}}&nbsp;&nbsp;</th>
{% if newform.has_exact_qexp %}
<th class="sticky-head dark center" style="left: 60px;">\(\iota_m(\nu)\)</th>
{% endif %}
Expand Down
10 changes: 10 additions & 0 deletions lmfdb/groups/abstract/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,9 @@ def auto_gens(label):
if gp.is_null():
flash_error("No group with label %s was found in the database.", label)
return redirect(url_for(".index"))
if gp.aut_gens is None:
flash_error("The generators for the automorphism group of the group with label %s have not been computed.", label)
return redirect(url_for(".by_label", label=label))
return render_template(
"auto_gens_page.html",
gp=gp,
Expand All @@ -758,6 +761,9 @@ def char_table(label):
if gp.is_null():
flash_error("No group with label %s was found in the database.", label)
return redirect(url_for(".index"))
if not gp.complex_characters_known:
flash_error("The complex characters for the group with label %s have not been computed.", label)
return redirect(url_for(".by_label", label=label))
return render_template(
"character_table_page.html",
gp=gp,
Expand All @@ -773,6 +779,9 @@ def Qchar_table(label):
if gp.is_null():
flash_error("No group with label %s was found in the database.", label)
return redirect(url_for(".index"))
if not gp.rational_characters_known:
flash_error("The rational characters for the group with label %s have not been computed.", label)
return redirect(url_for(".by_label", label=label))
return render_template(
"rational_character_table_page.html",
gp=gp,
Expand Down Expand Up @@ -1194,6 +1203,7 @@ def diagram_js_string(gp, only=None):

# Writes individual pages
def render_abstract_group(label, data=None):

info = {}
if data is None:
label = clean_input(label)
Expand Down
47 changes: 33 additions & 14 deletions lmfdb/groups/abstract/templates/abstract-show-group.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@
<script type="text/javascript" src="{{ url_for('static', filename='graphs/graph.js') }}"></script>


{% if gp.live() %}
<p>
This group is not stored in the database. However, basic information about the group, computed on the fly, is listed below.
</p>
{% endif %}


<h2> Group information</h2>
<p>
<table>
Expand All @@ -38,10 +45,9 @@ <h2> Group information</h2>

<h2>Group statistics</h2>

<p>

{% if gp.order_stats != None %}
<table class="ntdata" style="margin-left:0;">
<p> {% if gp.order_stats != None %}
<div class="table-scroll-wrapper">
<table class="ntdata onesticky" style="margin-left:0;">
<thead>
<tr>
<th>{{KNOWL('group.element_order', 'Order')}}</th>
Expand All @@ -60,7 +66,7 @@ <h2>Group statistics</h2>
<td class="border-left">{{ gp.order }}</td>
</tr>
<tr>
<td>{{KNOWL('group.conjugacy_class', 'Conjugacy classes')}}</td>
<td>{{KNOWL('group.conjugacy_class', 'Conjugacy classes ')}}&nbsp;</td>
{% for c in gp.cc_statistics %}
<td>{{ c[1] }} </td>
{% endfor %}
Expand Down Expand Up @@ -98,19 +104,21 @@ <h2>Group statistics</h2>
</tr>
<tr style="border-bottom:none;">
<td>{{KNOWL('group.autjugacy_class', 'Autjugacy classes')}}</td>
<td colspan="{{gp.order_stats|length}}">data not computed</td>
<td class="border-left"></td>
<td colspan="{{gp.order_stats|length}}">data not computed</td>
<td class="border-left"></td>
</tr>
{% endif %}
</tbody>
</table>
</div>
{% endif %}
</p>

{% if gp.live() or gp.rational_characters %} {# for now, there are a few groups with p>511 dividing the order that do not have rational character tables #}

<p>
<table class="ntdata" style="margin-left:0;">
<div class="table-scroll-wrapper">
<table class="ntdata onesticky" style="margin-left:0;">
<thead>
<tr><th>Dimension</th>
{% for d in (gp.rep_dims) %}
Expand All @@ -121,7 +129,7 @@ <h2>Group statistics</h2>
</thead>
<tbody>
<tr>
<td>{{KNOWL('group.representation.character', 'Irr. complex chars.')}}</td>
<td>{{KNOWL('group.representation.character', 'Irr. complex chars.')}} &nbsp;</td>
{% for n in gp.irrep_statistics %}
<td>{{ n }} </td>
{% endfor %}
Expand All @@ -138,6 +146,7 @@ <h2>Group statistics</h2>
{% endif %}
</tbody>
</table>
</div>
</p>

{% endif %}
Expand All @@ -146,7 +155,7 @@ <h2>Group statistics</h2>


{% if not gp.live() %}
<h3>Minimal Presentations</h3>
<h2>Minimal Presentations</h2>

<p>
<table>
Expand Down Expand Up @@ -196,6 +205,12 @@ <h2>Constructions</h2>
{{ gp.stored_representations | safe }}
</table>

{% if not gp.live() %}
<p>
{{ gp.repr_strg() | safe }}
</p>
{% endif %}

{% else %}

<h2>Constructions</h2>
Expand All @@ -215,6 +230,10 @@ <h2>Constructions</h2>
</tr>
</table>

{% if not gp.live() %}
{{ gp.repr_strg() | safe }}
{% endif %}

{% endif %} {# not live and abelian #}

<h2> Homology </h2>
Expand Down Expand Up @@ -517,7 +536,7 @@ <h2> Character theory </h2>

<p> The character tables for this group have not been computed. </p>

{% else %}
{% else %}

<h3>{{KNOWL('group.complex_character_table','Complex character table')}}</h3>

Expand All @@ -533,14 +552,14 @@ <h3>{{KNOWL('group.complex_character_table','Complex character table')}}</h3>


{% if gp.number_conjugacy_classes == None %}

<p> The complex character table for this group is not computed. </p>

{% elif gp.complex_characters_known == False %}

<p> The ${{gp.number_conjugacy_classes}} \times {{gp.number_conjugacy_classes}}$ character table is not available for this group. </p>

{% else %}
{% else %}
{% if gp.number_conjugacy_classes <= 16 %}

{% include 'character_table.html' %}
Expand Down
4 changes: 2 additions & 2 deletions lmfdb/groups/abstract/templates/auto_gens_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@


<p>
&nbsp; Each row represents an {{KNOWL('group.automorphism', 'automorphism')}} given by its image on a set of {{KNOWL('group.generators','generators')}} of the group (listed as the headers of the columns). <br>
Each row represents an {{KNOWL('group.automorphism', 'automorphism')}} given by its image on a set of {{KNOWL('group.generators','generators')}} of the group (listed as the headers of the columns). <br>

{% if gp.element_repr_type == 'PC' %} &nbsp; The entries in the table are given as words on the generators in the presentation for this group. {% endif %}
{{gp.repr_strg(other_page=True) | safe}}<br>
</p>


Expand Down
38 changes: 38 additions & 0 deletions lmfdb/groups/abstract/web_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -2144,6 +2144,8 @@ def show_reps(rtype):
output_strg += show_reps("wreath")
output_strg += show_reps("nonsplit")
output_strg += show_reps("aut")
if output_strg == "": #some live groups have no constructions
return "data not computed"
return output_strg

def is_null(self):
Expand Down Expand Up @@ -2334,6 +2336,42 @@ def gen_noun(self):
else:
return f"generating {self.rank}-tuples"

def repr_strg(self, other_page=False):
# string to say where elements of group live
# other_page is if the description is not on main page for the group (eg. automorphism group generators)
rep_type = self.element_repr_type
data = self.representations.get(rep_type)
if rep_type == "Lie": # same whether from main page or not
fam, d, q = data[0]["family"], data[0]["d"], data[0]["q"]
if fam[0] == "P": # note about matrix parentheses
return fr"Elements of the group are displayed as equivalence classes (represented by square brackets) of matrices in $\{fam[1:]}({d},{q})$."
else:
return fr"Elements of the group are displayed as matrices in $\{fam}({d},{q})$."
elif rep_type == "Perm":
d = data["d"]
return f"Elements of the group are displayed as permutations of degree {d}."
elif rep_type == "PC":
rep_str = "Elements of the group are displayed as words in the generators from the presentation given"
if other_page:
return rep_str + " in the Construction section of this group's <a href='%s'>main page</a>." % url_for(".by_label", self.label)
else:
return rep_str + " above."
elif rep_type in ["GLFp", "GLFq", "GLZN", "GLZq", "GLZ"]:
d = data["d"]
if rep_type == "GLFp":
R = fr"\F_{{{data['p']}}}"
elif rep_type == "GLFq":
R = fr"\F_{{{data['q']}}}"
elif rep_type == "GLZN":
R = fr"\Z/{{{data['p']}}}\Z"
elif rep_type == "GLZq":
R = fr"\Z/{{{data['q']}}}\Z"
else:
R = r"\Z"
return fr"Elements of the group are displayed as matrices in $\GL_{{{d}}}({R})$."
else: # if not any of these types
return ""

@lazy_attribute
def max_sub_cnt(self):
return db.gps_subgroups.count_distinct(
Expand Down
34 changes: 33 additions & 1 deletion lmfdb/templates/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ table.ntdata {
margin-bottom: 15px;
}
table.ntdata thead th {
background: {{ color.table_ntdata_background }};
background-color: {{ color.table_ntdata_background }};
}
table.ntdata > thead {
border-bottom: 2px solid {{ color.table_ntdata_border }};
Expand Down Expand Up @@ -2276,6 +2276,38 @@ div.table-scroll-wrapper thead > tr:last-child > th {
position: sticky; left: 0; top: 0;
z-index:3;
}

/* Automate embedding-wrap, sticky-col and border-right for scrollable tables with one sticky header column */
div.table-scroll-wrapper table.onesticky :is(th:first-child, td:first-child) {
margin: 0;
padding: 0;
position: -webkit-sticky; left: 0;
position: sticky; left: 0;
z-index:2;
background-clip: padding-box;
}
div.table-scroll-wrapper table.onesticky tr:nth-child(even) :is(th:first-child, td:first-child) {
background-color: {{color.table_ntdata_background_2}};
}
div.table-scroll-wrapper table.onesticky tr:nth-child(odd) :is(th:first-child, td:first-child) {
background-color: white;
}
div.table-scroll-wrapper table.onesticky thead > tr:last-child > th:first-child {
padding-bottom: 2px;
border-bottom: 2px solid {{ color.table_ntdata_border}};
}

/* :is doesn't work for pseudo-elements */
div.table-scroll-wrapper table.onesticky th:first-child::after, div.table-scroll-wrapper table.onesticky td:first-child::after {
content:'';
position:absolute;
right: 0;
top: 0;
height:100%;
border-right: 2px solid {{ color.table_ntdata_border}};
}


table.nowrap td {
white-space:nowrap;
}
Expand Down

0 comments on commit 39375be

Please sign in to comment.