Skip to main content

Module prelude

Module prelude 

Source
Expand description

Standard Library for the Kernel.

Defines fundamental types and logical connectives:

  • Entity: domain of individuals (for FOL)
  • Nat: natural numbers
  • True, False: propositional constants
  • Eq: propositional equality
  • And, Or: logical connectives

Structs§

AxiomUsage
What a proof rests on: the axioms it cites transitively, and the names that resolve to nothing.
StandardLibrary
Standard library definitions.

Constants§

ADMITTED_AXIOMS
Names that mark a proof as ADMITTED rather than proved.
FOREIGN_AXIOMS
Axioms and constants LOGOS deliberately does NOT have, each with the sentence a diagnostic should say instead of “unbound variable”.

Functions§

axiom_dependencies
Every AXIOM a term actually depends on — Lean’s #print axioms, as a function.
axiom_dependencies_given
The axiom closure of term, as axiom_dependencies, where known answers the axioms of a constant whose closure was already taken: the walk takes that answer at the constant instead of walking below it. Reachability is transitive, so the answer is what the walk would have found there, and a constant whose closure was taken had every name below it resolved. An importer that audits each declaration in order passes the sets it recorded, so a declaration’s walk covers its own terms and what is not yet audited rather than the whole closure again.
axiom_dependencies_of
The axiom closure of a NAMED constant in a context — what Print Axioms <name>. reports.
foreign_axiom_note
The diagnostic sentence for a constant the trusted base deliberately lacks, or None when the name is simply not registered (a typo, a missing import, an out-of-scope local).
is_admitted_axiom
Whether a name marks an admitted (not proved) step.