Repository: LMFDB/lmfdb

Issue:
In lfunctions, what is Lkey?
I see that many (not all) of the L-functions have implemented a method called Lkey(), but that none of these are ever used. I wonder --- is this a previous attempt at making something like the Lhash we now have? Or is there a deeper, longer plan in the works that hasn't yet been realized?


Discussion:
I only know that it should be a dictionary. No idea what it is used for.
And indeed it is never used.
Here is the result of `grep -n -A3 -B1 -r Lkey .  `
https://gist.github.com/37b977801b650849286642e13ff1577d
I think that the original intent of Lkey has been lost to time. So I think that I'll remove the remnants soon.

Resolving patch:
diff --git a/lmfdb/lfunctions/Lfunction.py b/lmfdb/lfunctions/Lfunction.py
--- a/lmfdb/lfunctions/Lfunction.py
+++ b/lmfdb/lfunctions/Lfunction.py
@@ -338,9 +338,6 @@ def __init__(self, **args):
         # Generate a function to do computations
         self.sageLfunction = lc.Lfunction_Zeta()
 
-    def Lkey(self):
-        return {}
-
 #############################################################################
 
 
@@ -441,10 +438,6 @@ def __init__(self, **args):
                                  ", " + title_end)
         self.info['title_analytic'] = "$" + self.texname + "$" + ", " + title_end
 
-    def Lkey(self):
-        return {"charactermodulus": self.charactermodulus,
-                "characternumber": self.characternumber}
-
 
 #############################################################################
 
@@ -568,11 +561,6 @@ def base_field(self):
 #                # if C.bmfs.forms.search.find({ u'label' : label }).count() > 0
 #                pass;
 
-    def Lkey(self):
-        return {"label": self.long_isogeny_class_label}
-
-
-
 # DEPRECATED
 #class Lfunction_EC_Q(Lfunction):
 #    """Class representing an elliptic curve L-function
@@ -642,11 +630,6 @@ def Lkey(self):
 #
 #    def ground_field(self):
 #        return "Q"
-#
-#    def Lkey(self):
-#        # If over Q, the lmfdb label determines the curve
-#        return {"label": self.label}
-#
 
 #############################################################################
 
@@ -769,9 +752,6 @@ def __init__(self, **args):
             "with weight %s, level %s, and %s" % (
             self.weight, self.level, characterName))
 
-    def Lkey(self):
-        return {"weight": self.weight, "level": self.level}
-
     def original_object(self):
         return self.MF
 
@@ -905,9 +885,6 @@ def __init__(self, **args):
         self.info['title'] = ("$L(s,f)$, where $f$ is a Maass cusp form with "
                       + "level %s" % (self.level)) + title_end
 
-    def Lkey(self):
-        return {"dbid": self.dbid}
-
 #############################################################################
 
 
@@ -1066,9 +1043,6 @@ def __init__(self, **args):
         else:
             self.info['title'] += ", and trivial character"
 
-    def Lkey(self):
-        return {"label", self.label}
-
     def original_object(self):
         return self.f
 
@@ -1177,9 +1151,6 @@ def __init__(self, **args):
         self.info['title'] = ("$L(s,F)$, " + "where $F$ is a scalar-valued Siegel " +
                       "modular form of weight " + str(self.weight) + ".")
 
-    def Lkey(self):
-        return {"weight": self.weight, "orbit": self.orbit}
-
     def original_object(self):
         return self.S
 
@@ -1244,10 +1215,6 @@ def __init__(self, **args):
                                  title_end)
         self.info['title_analytic'] = "$" + self.texname + "$" + ", " + title_end
 
-    def Lkey(self):
-        return {"label", self.label}
-
-
 
 #############################################################################
 
@@ -1367,9 +1334,6 @@ def __init__(self, **args):
         self.info['label'] = self.label
         self.info['title'] = "Dedekind zeta-function: $\\zeta_K(s)$, where $K$ is the number field with defining polynomial %s" %  web_latex(self.NF.defining_polynomial())
 
-    def Lkey(self):
-        return {"label": self.label}
-
     def original_object(self):
         return self.NF
 
@@ -1450,9 +1414,6 @@ def __init__(self, **args):
         self.info['knowltype'] = "artin"
         self.info['title'] = ("L-function for Artin representation " + str(self.label))
 
-    def Lkey(self):
-        return {"label": self.label}
-
     def original_object(self):
         return self.artin
 
@@ -1534,9 +1495,6 @@ def __init__(self, **args):
         self.info['knowltype'] = "hgm"
         self.info['title'] = ("L-function for the hypergeometric motive with label "+self.label)
 
-    def Lkey(self):
-        return {"label":self.label}
-
     def original_object(self):
         return self.motive
 
@@ -1644,10 +1602,6 @@ def ordinal(n):
                       % (ordinal(self.m), self.m, self.label))
 
 
-    def Lkey(self):
-        return {"power": self.power, "underlying_type": self.underlying_type,
-                "field": self.field}
-
     def original_object(self):
         return self.S
 
@@ -1720,9 +1674,6 @@ def __init__(self, **args):
         logger.debug("Start generating Sage L")
         generateSageLfunction(self)
 
-    def Lkey(self):
-        return {"filecontents": self.filecontents}
-
 #############################################################################
 
 # This class it not used anywhere and has not been touched since January 2014.  The key function TensorProduct is not defined anywhere, so it won't work
@@ -1802,11 +1753,6 @@ def __init__(self, **args):
 
         constructor_logger(self, args)
 
-    def Lkey(self):
-        return {"ellipticcurvelabel": self.Elabel,
-                "charactermodulus": self.charactermodulus,
-                "characternumber": self.characternumber}
-
 #############################################################################
 
 
diff --git a/lmfdb/lfunctions/Lfunction_base.py b/lmfdb/lfunctions/Lfunction_base.py
--- a/lmfdb/lfunctions/Lfunction_base.py
+++ b/lmfdb/lfunctions/Lfunction_base.py
@@ -29,10 +29,6 @@ def checkselfdual(self):
                 if abs(imag_part(self.dirichlet_coefficients[n] / self.dirichlet_coefficients[0])) > 0.00001:
                     self.selfdual = False
 
-    def Lkey(self):
-        # Lkey should be a dictionary
-        raise KeyError("not all L-function implement the Lkey scheme atm")
-
     def compute_kappa_lambda_Q_from_mu_nu(self):
         """ Computes some kappa, lambda and Q from mu, nu, which might not be optimal for computational purposes
         """
diff --git a/lmfdb/tensor_products/galois_reps.py b/lmfdb/tensor_products/galois_reps.py
--- a/lmfdb/tensor_products/galois_reps.py
+++ b/lmfdb/tensor_products/galois_reps.py
@@ -625,11 +625,6 @@ def lfunction(self):
     def Ltype(self):
         return "galoisrepresentation"
 
-    # does not have keys in the previous sense really.
-    def Lkey(self):
-        return {"galoisrepresentation":self.title}
-
-
 #########################
 # This is copied from Mark Watkin's code:
 


Test patch: