Skip to content

Commit

Permalink
Merge pull request #6198 from roed314/modcurve_model_types
Browse files Browse the repository at this point in the history
Remove duplicate titles
  • Loading branch information
AndrewVSutherland authored Oct 14, 2024
2 parents ef75ac9 + 7142ff7 commit c0b42ec
Showing 1 changed file with 8 additions and 16 deletions.
24 changes: 8 additions & 16 deletions lmfdb/modular_curves/web_curve.py
Original file line number Diff line number Diff line change
Expand Up @@ -181,35 +181,27 @@ def formatted_model_html(self, m):

def title_of_model(self, lines, nb_var, typ, smooth):
if typ == 0:
title = display_knowl('ag.canonical_model', 'Canonical model') +\
r" in $\mathbb{P}^{ %d }$ " % (nb_var-1,)
title = display_knowl('ag.canonical_model', 'Canonical model') + r" in $\mathbb{P}^{ %d }$ " % (nb_var-1,)
if len(lines) > eqn_threshold:
title += " defined by %d equations" % (len(lines) - 1,)
return title
elif typ == 2:
#smooth is true, false, or none
if smooth is True:
return display_knowl('modcurve.plane_model', 'Smooth plane model') +\
" Smooth plane model"
return display_knowl('modcurve.plane_model', 'Smooth plane model')
elif smooth is False:
return display_knowl('modcurve.plane_model', 'Singular plane model') +\
" Singular plane model"
return display_knowl('modcurve.plane_model', 'Singular plane model')
else:
return display_knowl('modcurve.plane_model', 'Plane model') +\
" Plane model"
return display_knowl('modcurve.plane_model', 'Plane model')
elif typ == 5:
if self.genus == 1:
return display_knowl('ec.weierstrass_coeffs', 'Weierstrass model') +\
" Weierstrass model"
return display_knowl('ec.weierstrass_coeffs', 'Weierstrass model')
else:
return display_knowl('ag.hyperelliptic_curve', 'Weierstrass model') +\
" Weierstrass model"
return display_knowl('ag.hyperelliptic_curve', 'Weierstrass model')
elif typ == 7:
return display_knowl('ag.hyperelliptic_curve', 'Geometric Weierstrass model') +\
" Geometric Weierstrass model"
return display_knowl('ag.hyperelliptic_curve', 'Geometric Weierstrass model')
elif typ == 8:
return display_knowl('modcurve.embedded_model', 'Embedded model') +\
r" Embedded model in $\mathbb{P}^{%d}$" % (nb_var-1,)
return display_knowl('modcurve.embedded_model', 'Embedded model') + r" in $\mathbb{P}^{%d}$" % (nb_var-1,)

def equation_of_model(lines, typ):
table = '<table valign="center">' +\
Expand Down

0 comments on commit c0b42ec

Please sign in to comment.