Skip to content

Commit

Permalink
Merge pull request #5755 from jenpaulhus/chartableupdate
Browse files Browse the repository at this point in the history
Merging, but will submit a pull request to redo the latexing
  • Loading branch information
jwj61 authored Dec 9, 2023
2 parents 0c2ee16 + 4e2482b commit 65ecfd3
Show file tree
Hide file tree
Showing 8 changed files with 153 additions and 34 deletions.
28 changes: 16 additions & 12 deletions lmfdb/groups/abstract/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -766,10 +766,9 @@ def auto_gens(label):
return render_template(
"auto_gens_page.html",
gp=gp,
title="Generators of automorphism group for %s" % label,
bread=get_bread([("Automorphism group generators", " ")]),
learnmore=learnmore_list(),
)
title="Generators of automorphism group for $%s$" % gp.tex_name,
bread=get_bread([(label, url_for(".by_label", label=label)), ("Automorphism group generators", " ")]),
)


@abstract_page.route("/sub/<label>")
Expand All @@ -791,9 +790,8 @@ def char_table(label):
return render_template(
"character_table_page.html",
gp=gp,
title="Character table for %s" % label,
bread=get_bread([("Character table", " ")]),
learnmore=learnmore_list(),
title="Character table for $%s$" % gp.tex_name,
bread=get_bread([(label, url_for(".by_label", label=label)), ("Character table", " ")]),
)


Expand All @@ -807,9 +805,8 @@ def Qchar_table(label):
return render_template(
"rational_character_table_page.html",
gp=gp,
title="Rational character table for %s" % label,
bread=get_bread([("Rational character table", " ")]),
learnmore=learnmore_list(),
title="Rational character table for $%s$" % gp.tex_name,
bread=get_bread([(label, url_for(".by_label", label=label)), ("Rational character table", " ")]),
)

def _subgroup_diagram(label, title, only, style):
Expand Down Expand Up @@ -916,6 +913,13 @@ def show_factor(n):
return "$0$"
return f"${latex(ZZ(n).factor())}$"

#for irrQ_degree and irrC_degree gives negative value as "-"
def remove_negatives(n):
if n < 1:
return "-"
return n


def get_url(label):
return url_for(".by_label", label=label)

Expand Down Expand Up @@ -988,8 +992,8 @@ def group_postprocess(res, info, query):
ProcessedCol("outer_order", "group.outer_aut", r"$\card{\mathrm{Out}(G)}$", show_factor, align="center", short_title="outer automorphisms", default=False),
MathCol("transitive_degree", "group.transitive_degree", "Tr. deg", short_title="transitive degree", default=False),
MathCol("permutation_degree", "group.permutation_degree", "Perm. deg", short_title="permutation degree", default=False),
MathCol("irrC_degree", "group.min_complex_irrep_deg", r"$\C$-irrep deg", short_title=r"$\C$-irrep degree", default=False),
MathCol("irrQ_degree", "group.min_rational_irrep_deg", r"$\Q$-irrep deg", short_title=r"$\Q$-irrep degree", default=False),
ProcessedCol("irrC_degree", "group.min_complex_irrep_deg", r"$\C$-irrep deg", remove_negatives, short_title=r"$\C$-irrep degree", default=False, align="center"),
ProcessedCol("irrQ_degree", "group.min_rational_irrep_deg", r"$\Q$-irrep deg", remove_negatives, short_title=r"$\Q$-irrep degree", default=False, align="center"),
MultiProcessedCol("type", "group.type", "Type - length",
["abelian", "nilpotent", "solvable", "smith_abelian_invariants", "nilpotency_class", "derived_length", "composition_length"],
show_type,
Expand Down
30 changes: 17 additions & 13 deletions lmfdb/groups/abstract/templates/abstract-show-group.html
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ <h3>Minimal Presentations</h3>
<tr>
<td>{{KNOWL('group.rank', 'Rank')}}:</td>
{% if gp.rank %}
<td>${{gp.rank}}$</td>
<td>{{gp.rank}}</td>
{% else %}
<td>not computed</td>
{% endif %}
</tr>
<tr>
<td>{{KNOWL('group.generators', 'Inequivalent ' + gp.gen_noun())}}:</td>
{% if gp.eulerian_function != None %}
<td>${{gp.eulerian_function}}$</td>
<td>{{gp.eulerian_function}}</td>
{% else %} <td>not computed</td> {% endif %}
</tr>
</table>
Expand Down Expand Up @@ -309,8 +309,8 @@ <h2> Homology </h2>
<tr>
<td>{{KNOWL('group.commutator_length', 'Commutator length')}}:</td>
{% if gp.commutator_count %}
<td>${{gp.commutator_count}}$</td>
{% elif gp.abelian %} <td>$0$</td>
<td>{{gp.commutator_count}}</td>
{% elif gp.abelian %} <td>0</td>
{% else %} <td>not computed</td> {% endif %}
</tr>
{% endif %}
Expand Down Expand Up @@ -584,6 +584,7 @@ <h2> Character theory </h2>
<p>



{% if not gp.rational_characters and gp.number_conjugacy_classes == None %}

<p> The character tables for this group have not been computed. </p>
Expand All @@ -592,6 +593,17 @@ <h2> Character theory </h2>

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

{% if gp.number_divisions == gp.number_conjugacy_classes %}

<p>
Every character has rational values, so the {{KNOWL('group.complex_character_table','complex character table')}} is the same as the rational character table below.
</p>


{% else %}



{% if gp.number_conjugacy_classes == None %}

<p> The complex character table for this group is not computed. </p>
Expand Down Expand Up @@ -626,16 +638,9 @@ <h3>{{KNOWL('group.complex_character_table','Complex character table')}}</h3>

{% endif %}

{% if gp.number_divisions == gp.number_conjugacy_classes %}

<p>
Every character has rational values, so the {{KNOWL('group.rational_character_table','rational character table')}} is the same as the complex character table.
</p>


{% else %}


{% endif %}

<h3>{{KNOWL('group.rational_character_table','Rational character table')}}</h3>

Expand All @@ -656,7 +661,6 @@ <h3>{{KNOWL('group.rational_character_table','Rational character table')}}</h3>
</p>
{% endif %}
{% endif %}
{% endif %}
{% endif %} {# gp.live() #}

{% endblock %}
16 changes: 13 additions & 3 deletions lmfdb/groups/abstract/templates/auto_gens_page.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@

{% extends "base.html" %}
{% extends "homepage.html" %}

{% block content %}

{% block body %}

<br>

<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>
Expand Down Expand Up @@ -33,6 +33,16 @@
</table>
</p>

{% endblock %}


{# Hack to remove the sidebar and move main content over #}
{% block sidebar %}
<style>
#main {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 10px;
min-height:600px;
}
</style>
{% endblock %}
15 changes: 13 additions & 2 deletions lmfdb/groups/abstract/templates/character_table_page.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{% extends "base.html" %}
{% extends "homepage.html" %}

{% block body %}
{% block content %}

{% include 'character_table.html' %}

{% endblock %}

{# Hack to remove the sidebar and move main content over #}
{% block sidebar %}
<style>
#main {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 10px;
min-height:600px;
}
</style>
{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@
</tr>
{% endfor %}

{% if gp.has_nontrivial_schur_character %}
<tr><td></td><td>{{KNOWL('group.representation.schur_index', 'Schur')}}</td></tr>
{% endif %}
{% for chtr in gp.rational_characters %}
<tr>
<td> {{ chtr.display_knowl() | safe }}</td><td></td>
<td> {{ chtr.display_knowl() | safe }}</td>{% if gp.has_nontrivial_schur_character %}<td class="center"> {% if chtr.schur_index != 1 %} {{chtr.schur_index}} {% endif %} </td> {% endif %}
{% for c in gp.conjugacy_class_divisions %}
<td class="right">${{ chtr.qvalues[c.classes.0.counter - 1] }}$</td>
{% endfor %}
Expand Down
15 changes: 13 additions & 2 deletions lmfdb/groups/abstract/templates/rational_character_table_page.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
{% extends "base.html" %}
{% extends "homepage.html" %}

{% block body %}
{% block content %}

{% include 'rational_character_table.html' %}

{% endblock %}

{# Hack to remove the sidebar and move main content over #}
{% block sidebar %}
<style>
#main {
margin: 0px 0px 0px 0px;
padding: 0px 0px 0px 10px;
min-height:600px;
}
</style>
{% endblock %}
72 changes: 72 additions & 0 deletions lmfdb/groups/abstract/verify.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/usr/bin/env python3
#from lmfdb.groups.abstract import verify
#TO DO: subgroups, larger order + 1024


from lmfdb import db
from sage.all import libgap

def test_small_gps(sample_gp):
print(sample_gp['label'])

if sample_gp['order'] != 1024: #1024 doesn't have standard labels, need to construct another way
#create corresponding GAP group
id_nums = sample_gp['label'].split(".")
G = libgap.SmallGroup(int(id_nums[0]),int(id_nums[1]))
#Confirm group order matches
print("Group orders match: " + str(sample_gp['order'] == libgap.Order(G)))
#Confirm IsAbelian returns same value
print("Groups abelian-ness match: " + str((sample_gp['abelian']) == bool(libgap.IsAbelian(G))))
#Confirm IsSimple returns same value
print("Groups simple-ness match: " + str((sample_gp['simple']) == bool(libgap.IsSimple(G))))
#Confirm IsPerfect returns same value
print("Groups perfect-ness match: " + str((sample_gp['perfect']) == bool(libgap.IsPerfect(G))))
#Confirm IsMonomial returns same value
print("Groups monomial-ness match: " + str((sample_gp['monomial']) == bool(libgap.IsMonomial(G))))

#Confirm number of non-conjugate subgroups (if known in database)
if sample_gp['number_subgroup_classes']:
SubLat = libgap.LatticeSubgroups(G)
Cons = libgap.ConjugacyClassesSubgroups(SubLat)
print ("Number of subgroup classes match: " + str(libgap.Size(Cons) == sample_gp['number_subgroup_classes']))
if sample_gp['number_normal_subgroups']:
NormLat = libgap.NormalSubgroups(G)
print ("Number of normal subgroups match: " + str(libgap.Size(NormLat) == sample_gp['number_normal_subgroups']))


# check if minimal permutation degrees match
if sample_gp['permutation_degree']:
minpermdeg_gap = libgap.MinimalFaithfulPermutationDegree(G)
print("Minimal permutation degrees match: " + str(minpermdeg_gap == sample_gp['permutation_degree']))


# check order stats
stupid_str = 'Set(ConjugacyClasses(SmallGroup(' + id_nums[0]+ ',' + id_nums[1] + ")), z->Order(Representative(z))) "
ords = libgap.eval(stupid_str)

ordsLMFDB = []
ords_list = sample_gp['order_stats']
for i in range(len(ords_list)):
ordsLMFDB.append(ords_list[i][0])
print("Order set matches: " + str(ords == ordsLMFDB))
#print(ords,ordsLMFDB)

#check degrees
irr_stats = sample_gp['irrep_stats']
degLMFDB = []
for i in range(len(irr_stats)):
for j in range(irr_stats[i][1]):
degLMFDB.append(irr_stats[i][0])
stupid_str_2 = 'List(Irr(SmallGroup(' + id_nums[0] + ',' + id_nums[1]+ ')), z -> z[1])'
degs = libgap.eval(stupid_str_2)

print("Degrees of characters match: " + str(degs == degLMFDB))
#print(degs,degLMFDB)


#pick random group of order <= 2000 from DB

for i in range(10):
x = db.gps_groups_test.random({'order': {"$lte" :2000}})
sample_gp =db.gps_groups_test.lucky({'label': x})
test_small_gps(sample_gp)
6 changes: 5 additions & 1 deletion lmfdb/groups/abstract/web_groups.py
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ def subgp_paragraph(self):
elif self.number_characteristic_subgroups is None:
return """There are <a href=" """ + str(url_for('.index', search_type='Subgroups', ambient=self.label, normal='yes')) + """ "> """ +str(self.number_normal_subgroups) + " normal</a> subgroups. <p>"+normalcolor
else:
ret_str = """ There are <a href=" """ +str(url_for('.index', search_type='Subgroups', ambient=self.label)) + """ "> """ +str(self.number_normal_subgroups) + """ normal subgroups</a>"""
ret_str = """ There are <a href=" """ +str(url_for('.index', search_type='Subgroups', ambient=self.label, normal='yes')) + """ "> """ +str(self.number_normal_subgroups) + """ normal subgroups</a>"""
if self.number_characteristic_subgroups < self.number_normal_subgroups:
ret_str = ret_str + """ (<a href=" """ + str(url_for('.index', search_type='Subgroups', ambient=self.label, characteristic='yes')) + """ ">""" + str(self.number_characteristic_subgroups) + " characteristic</a>).<p>"+charcolor+" "+normalcolor
else:
Expand Down Expand Up @@ -1339,6 +1339,10 @@ def rational_characters(self):
]
return sorted(chrs, key=lambda x: x.counter)

@lazy_attribute
def has_nontrivial_schur_character(self):
return any(chtr.schur_index > 1 for chtr in self.rational_characters)

@lazy_attribute
def maximal_subgroup_of(self):
# Could show up multiple times as non-conjugate maximal subgroups in the same ambient group
Expand Down

0 comments on commit 65ecfd3

Please sign in to comment.