Version: dev

This is the documentation for the development version. For the latest release, see v0.14.0.

Round trip, case by case: block assembly (makearray) and a bare template

Lean module Esm.Document.Math.Makearray, formal/Esm/Document/Math/Makearray.lean at ffd5aee2f868
Imports Esm.Document.Math.Faq

A native makearray is a bracketed two-column table, one row per region (the value, then the region as bound pairs joined by \times), with its output indices as the bracket’s subscript. A template applied with no bindings, unless the symbol table knows it with no parameters, is its bare name, \operatorname{n}.

A bare template

Block assembly

def GoodX (c : Ctx) (P : Json → Out) (x : Json) : Prop

What the round trip of a native makearray knows of a sub-expression.

def rowsToksM (c : Ctx) (P : Json → Out) (rows : List (Json × List (Json × Json))) : List Tok

The rows of a table, as printed.

theorem M_mk proved source
theorem M_mk (c : Ctx) (kvs : List (String × Json)) (A : MkForm) (hA : mkForm kvs = some A)
    (hok : mkOK A = true) (P : Json → Out) (hP : ∀ x ∈ mkSubs A, P x = pr c x)
    (hpr : pr c (.obj kvs) = mkOutT c P A) (hM : ∀ x ∈ mkSubs A, M c x) : M c (.obj kvs)

A native makearray reads back.

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