The LaTeX printer writes only LaTeX tokens
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, within the list, by a token that is not a number: the printer
writes \times between the bound pairs of a region (before a bracket) and after the
\nabla of a curl (before an operand that does not start with a number).
def AllOK (ts : List Tok) : Prop
What the printer writes: LaTeX tokens, and \times before a token that is not a number.
theorem allOK_times_tok {u : Tok} {r : List Tok} (hr : AllOK (u :: r)) (hu : startsNum [u] = false) :
AllOK (.kw .times :: u :: r)
\times before a list that does not start with a number.
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 (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 (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.