Lean2Js.Manifest
The proof manifest that accompanies the artifact #
The proof manifest that accompanies the artifact.
What a user writes is only what a user knows: the package's name, its version and how it may be published. Everything else the manifest says is a fact about the build — the compiler's version, Lean's, the module the package was read out of, the theorems proved there and the axioms their proofs reach — and a manifest that let any of them be typed in by hand could be made to say something the build does not. A theorem's statement is one of those facts: a sentence written beside a proof can drift from what the proof proves.
Lean2Js.Claim
sourceA theorem the package is sold on, as lean2js read it out of the build: the signature Lean prints for
it, and the docstring written above it.
Instances For
Used by
Lean2Js.Constant
sourceA constant a shipped theorem's statement names. @[expand] writes a def out where it is called, so
the package holds the number and not the name — and a reader of the claim would have no way to learn what
refundWindowMs is. The value is carried here so that the signature the manifest publishes has no symbol
in it the package cannot answer for.
Instances For
Used by
Lean2Js.Manifest
sourceInstances For
Used by
Lean2Js.Artifact
sourceWhat a package is emitted from. Only manifest is written by hand; lean2js reads the program and the
public theorems out of the manifest's namespace.
docs pairs an export with the docstring written above the def it was read from. A consumer reads the
.d.ts and the package's README and nothing else, so what the author wrote about a function has to reach
both.
Instances For
Used by
Lean2Js.compilerVersion
sourceKept alongside the lakefile's version; scripts/check-template.sh fails when the two drift.
Equations
- Lean2Js.compilerVersion = "0.4.0"
Instances For
Used by
Lean2Js.thrownCodes
sourceThe codes an export throws instead of returning a value JavaScript would have to guess at. The rest of
Value.Err cannot be reached from a shipped program: the cost bound rules out outOfFuel, exhaustiveness
rules out noMatchingAlternative, and the remaining three are about a program that does not compile.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Used by
Lean2Js.Artifact.tsSignature
sourceThe signature a consumer reads, in the types the .d.ts declares rather than the subset's own
spellings: those are what index.d.ts says and the only ones a caller can act on.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Used by
Lean2Js.Artifact.toJson
sourceartifacts is the SHA-256 of every other file the package ships, paired with its name. The manifest
is what carries the theorems, so a reader who has the manifest and the files can ask whether the two
belong together; without it a package that was edited after it was written reads exactly like one that
was not. The manifest cannot name its own digest, which is why the file that carries the list is the one
file not in it.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Used by
Lean2Js.Artifact.toReadme
sourceThe package's own README, which is the page npm shows. A consumer of the package reads this and the
.d.ts; neither Lean nor this repository is in front of them, so what the exports are, what they throw
and what has been proved about them are all stated here.
Equations
- One or more equations did not get rendered due to their size.