Version: v0.14.0

Round trip, case by case: open operators

Lean module Esm.Document.Math.OpenOp, formal/Esm/Document/Math/OpenOp.lean at ffd5aee2f868
Imports Esm.Document.Math.Escape

theorem jsonVal_head proved source
theorem jsonVal_head (sf : Sf) (v : Json) (hv : jwf v = true) (hn : ∀ n, v ≠ .num n) :
    ∃ t r, jsonVal sf v = t :: r ∧
      (sf = .latex → ∀ X, jsonStart (t :: X) = true) ∧ (sf = .typst → t = .code v ∧ r = [])

A field value as JSON tokens starts with a token the parser takes for JSON.

def valToks (c : Ctx) (b : Bool) (v : Json) : List Tok

A field value as printed: an expression at level 4 (b), or JSON.

def fieldToks (c : Ctx) (o : String) (kv : String × Json) : List Tok

A field of the operator o as printed: key, =, value.

theorem callForm_facts proved source
theorem callForm_facts {o : String} {fs : List (String × Json)} (h : callFormOK o fs = true) :
    callOps.contains o = false ∧ o ≠ "neg" ∧ o ≠ "pow" ∧ o ≠ "D" ∧
      (coreOps.contains o && !(fieldCallOps.contains o)) = false

What the call form’s condition gives the reader.

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