Package: lemma
##### /
  ######  /
 /#   /  /
/    /  /
    /  /
   ## ##              /##    ### /### /###    ### /### /###       /###
   ## ##             / ###    ##/ ###/ /##  /  ##/ ###/ /##  /   / ###  /
   ## ##            /   ###    ##  ###/ ###/    ##  ###/ ###/   /   ###/
   ## ##           ##    ###   ##   ##   ##     ##   ##   ##   ##    ##
   ## ##           ########    ##   ##   ##     ##   ##   ##   ##    ##
   #  ##           #######     ##   ##   ##     ##   ##   ##   ##    ##
      /            ##          ##   ##   ##     ##   ##   ##   ##    ##
  /##/           / ####    /   ##   ##   ##     ##   ##   ##   ##    /#
 /  ############/   ######/    ###  ###  ###    ###  ###  ###   ####/ ##
/     #########      #####      ###  ###  ###    ###  ###  ###   ###   ##
#
 ##An extensible mini-language to generate mathematical notation for
executable and testable Python.TL;DR:Write your mathematical formula with LemmaExecute them from Python codeOutput formula definitions in LaTeX maths notationEnsures your implementation and documentation matchGreat for reproducible research and teaching/learningLe Quick StartFollow the tutorial on Binder:Then check out:Le DocsLe Installation GuideLe API referenceLe FeaturesDefine mathematical formulae that can be formatted as LaTeX and
executed as functions.Check all of the steps in your equation transformations produce the
same results in software.Runs on Python - you can use defined formulae in your existing
Python projects, and use Python libraries from your formulae.Fully extensible - built with Hy (a Lisp running on Python) to
provide powerful tools for defining your own mathematical
operations.Le Use CasesSupports reproducible research by ensuring the notation in your
paper matches the behaviour of your (testable) code.Enables developers to work through math in a more exploratory
way. Use an equation to record the steps in your step-by-step
algebraic transformations, and write test-cases to check your
working. Then, get the LaTeX to document your work.Bridges the gap between mathematical notation and code to simplify
teaching in domains that depend on both.Le Similar Projectshandcalcshandcalcs has a similar goal of producing LaTeX notation for your
Python code, but it takes the approach of directly interpreting
Python syntax. It supports some common mathematical notation, but
does not appear to have the same focus on user extensibility (to
new math domains) and customisability (for fine-grained control of
generated notation) that Lemma does.Mathematica/Wolfram LanguageThe Wolfram Language has similar motivations to Lemma around
bridging the gap between mathematical notation and executable
code. You can generate LaTeX from your code, but it's a
proprietary language. Also, because Lemma is built on top of
Python, it can work with your existing Python code and libraries.SymPyLike the Wolfram Language, SymPy is designed for symbolic
computation. You can generate LaTeX from your expressions, but it
seems that control over the notation is limited (expressions are
automatically simplified, and LaTeX formatting options are
controlled by keyword arguments that apply to the entire
expression). Lemma is designed to be extensible so that you can
define exactly how you want the LaTeX to be generated for your use
case, and so that you can provide notation for any Python code you
like (not just symbolic computation). A library for using SymPy's
symbolic computation powers from Lemma would be a good extension
though...pytexitTranslates a string of Python code to LaTeX. Limited features
supported, and requires managing Python code in strings.LaTeXCalcInterprets and executes LaTeX math notation. Limited library of
math functions available.PenroseWhile Penrose is a math language for generating diagrams, while
Lemma generates LaTeX notation and executable code.Le TODOWrite tutorialAdd more operators toalgebra.hyAdd unit tests