Version: v0.14.0

The LaTeX printer writes only LaTeX tokens

Lean module Esm.Document.Math.TokLatex, formal/Esm/Document/Math/TokLatex.lean at ffd5aee2f868
Imports Esm.Document.Math.LexLatex

Every token of a printed well-formed expression is a LaTeX token (tokOK ), so the LaTeX lexer lemma applies to the printer’s output.

def TL : List Tok → Prop

Every \times is followed by a bracket, within the list: the printer writes \times only between the bound pairs of a region.

def AllOK (ts : List Tok) : Prop

What the printer writes: LaTeX tokens, and \times before a bracket.

macro source
macro "aok" : tactic

Close a goal AllOK [fixed tokens and pieces] from the pieces in the context.

Names

JSON

Printer pieces

Reductions

Block assembly

The induction

theorem print_allOK proved source
theorem print_allOK (S : Sym) (e : Json) (he : isE e = true) : AllOK (print .latex S e)

The LaTeX printer writes LaTeX tokens, and \times only before a bracket.

theorem print_tokL proved source
theorem print_tokL (S : Sym) (e : Json) (he : isE e = true) : TokL (print .latex S e)

Every token the LaTeX printer writes for a well-formed expression is a LaTeX token or a \times the lexer lemma allows.

This module also proves 44 lemmas without doc comments; they are in the source.