Writing L-functions in Python (or any other language)

Click For Summary

Discussion Overview

The discussion revolves around the implementation of L-functions in programming languages, particularly Python. Participants explore different types of L-functions, including lambda functions and Dirichlet L-functions, while seeking clarification on the original request and relevant resources.

Discussion Character

  • Exploratory
  • Technical explanation
  • Debate/contested

Main Points Raised

  • Some participants seek a step-by-step guide for writing L-functions, noting a lack of existing code examples.
  • One participant corrects the interpretation of L-functions, suggesting that the OP may be referring to lambda functions instead.
  • There is confusion regarding the specific type of L-functions being discussed, with some assuming automorphic functions and others suggesting Dirichlet L-functions.
  • Resources for implementing lambda functions in Python are provided, indicating that many examples exist online.
  • Another participant points to the NIST Digital Library of Mathematical Functions as a potential resource for Dirichlet L-functions, although they note a lack of implemented software for these functions.
  • A participant expresses curiosity about both automorphic and Dirichlet L-functions and shares a link to GitHub for implementations they found.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the specific type of L-functions being discussed, with multiple competing views regarding whether the focus is on lambda functions, automorphic functions, or Dirichlet L-functions.

Contextual Notes

The discussion reflects uncertainty regarding the definitions and implementations of various types of L-functions, and participants express differing interpretations of the OP's request.

DAntanov
Messages
7
Reaction score
2
TL;DR
I am interested in the steps to implement L-functions (of any kind) in python.
Not many code examples exist for how one would go about writing an L-function. Can anyone give me a step-by-step run down of how to do this and/or link me to relevant resources?
 
Technology news on Phys.org
CORRECTION: This misinterprets what the OP meant by L-function. (See posts #6 and #7)
Here is a simple example in many languages, including Python.
[CODE lang="python" title="A Python L-function"]def adder(x):
return lambda y: x + y
add5 = adder(5)
add5(1)
6
[/CODE]
 
Last edited:
  • Like
Likes   Reactions: DAntanov
What kind of L-functions are we talking about? At first I assumed it was automorphic, but after the first reply I am lost.
 
martinbn said:
What kind of L-functions are we talking about? At first I assumed it was automorphic, but after the first reply I am lost.
My guess is that the OP is asking about lambda functions. @FactChecker is making the same assumption.
 
DAntanov said:
TL;DR Summary: I am interested in the steps to implement L-functions (of any kind) in python.

Not many code examples exist for how one would go about writing an L-function.
Assuming that what you're really asking about are lambda functions, there are tons of examples online. Here are just a few (search string -- python lambda function)
https://www.w3schools.com/python/python_lambda.asp
https://realpython.com/python-lambda/
https://www.programiz.com/python-programming/anonymous-function
https://www.learnbyexample.org/python-lambda-function/

Many other programming languages also provide support for user-defined lambda functions.
 
If the OP means Dirichlet L-functions, then chapters 25 and 27 of the NIST Digital Library of Mathematical Functions seem to be a good place to start. However since none of the Methods of Computation, Tables, or Software sections mention Dirichlet L-functions - except § 25.21(ix) which states "No research software has been found for these functions" - I suspect they have not been implemented in any language.
 
  • Like
Likes   Reactions: FactChecker
pasmith said:
If the OP means Dirichlet L-functions, then chapters 25 and 27 of the NIST Digital Library of Mathematical Functions seem to be a good place to start. However since none of the Methods of Computation, Tables, or Software sections mention Dirichlet L-functions - except § 25.21(ix) which states "No research software has been found for these functions" - I suspect they have not been implemented in any language.
This elaborates my question perfectly. I'm sorry for the vague language in my last post. I am curious about automorphic and Dirichlet L-functions, and became very lost after the first few replies here. I stumbled upon these fairly plain implementations on github: https://github.com/JamesShakarji/L-Function-Types
 
  • Like
Likes   Reactions: FactChecker

Similar threads

  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 2 ·
Replies
2
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 133 ·
5
Replies
133
Views
11K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 26 ·
Replies
26
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K