LaTeX presentation and definition closure #
This renderer is a presentation component, not a kernel-verified TeX engine. All mathematical operators are rendered from the interpreted syntax tree. Application-specific symbol notations form an explicit, reviewable vocabulary.
def
LeanMirror.Expr.latex
{Symbol : Ty → Type}
(V : Vocabulary Symbol)
{Γ : List Ty}
{a : Ty}
(expr : Expr Symbol Γ a)
(vars : List String := [])
:
Equations
- LeanMirror.Expr.latex V (x.add y) vars = LeanMirror.render✝ V vars x ++ " + " ++ LeanMirror.render✝ V vars y
- LeanMirror.Expr.latex V (x.sub y) vars = LeanMirror.render✝ V vars x ++ " - " ++ LeanMirror.render✝ V vars y
- LeanMirror.Expr.latex V expr vars = LeanMirror.render✝ V vars expr
Instances For
def
LeanMirror.Expr.theoremLatex
{Symbol : Ty → Type}
(v : Vocabulary Symbol)
(expr : Expr Symbol [] Ty.prop)
:
The controlled phrases have exactly the implication semantics of allIn.
Equations
- LeanMirror.Expr.theoremLatex v (LeanMirror.Expr.allIn a_1 a_2 a_3) = LeanMirror.theoremTail✝ v [] (LeanMirror.Expr.allIn a_1 a_2 a_3)
- LeanMirror.Expr.theoremLatex v expr = "\\[\n" ++ LeanMirror.Expr.latex v expr ++ ".\n\\]\n"
Instances For
Dependency order; reject missing definitions and cycles instead of silently omitting them.
Equations
- One or more equations did not get rendered due to their size.
Instances For
def
LeanMirror.definitionClosure.visit
(cards : List DefinitionCard)
(fuel : ℕ)
(active done : List String)
(output : List DefinitionCard)
(key : String)
:
Equations
- One or more equations did not get rendered due to their size.