lean2js

Lean2Js.Verified

source

What an author writes next to a def #

A package is a namespace of ordinary Lean defs, each marked @[ship], and one ship_package under them. Marking a def reads the declaration out of it; ship_package gathers those into the program, writes the certificate saying each one denotes the def it came from, and puts up the wall emit puts up. None of it is a shortcut — the declarations and the certificates come out of the same walk, so a declaration cannot reach the program without one.

The certificates are written after the program because a certificate names it: a declaration that calls another goes through p.find?.

def

Lean2Js.Verified.«commandCertificates%»

source

The certificate for every declaration the program carries: the same walk that read the declaration out of the def also emits the proof that the declaration denotes it. A def that takes a function is handed a declaration's name rather than a value, so its certificate takes the name and what running it does.

Equations
Instances For
    Used by
      def

      Lean2Js.Verified.commandShip_package

      source

      The package: the program gathered from the defs marked above, a certificate for each declaration in it, and what emit refuses by reading the program alone, asked here where it costs a compile rather than a differential run.

      Equations
      Instances For
        Used by