This is not a particular product, but rather a collection of scratch files and formalizations at different levels of interest.
The mm0-lean directory is a lean 3 package with a leanpkg.toml file, so it should work out of the box to run lean --make in the subdirectory.
-
mm0/setis a framework for translating theorems fromset.mminto lean.-
mm0/set/basic.leanis the initial file, which contains lean definitions replacing all the metamath axioms (mostly "definition axioms"). -
mm0/set/set.leanthroughmm0/set/set6.leanare autogenerated files, produced by translatingset.mmto MM0, and from there to Lean, usingmm0-hsas follows:stack exec -- mm0-hs from-mm set.mm -f dirith,elnnne0 -o out.mm0 out.mmu stack exec -- mm0-hs to-lean out.mmu -a .basic -c 2000 -n mm -o mm0-lean/mm0/set/set.lean- The
-f dirith,elnnne0says we are interested in the theoremsdirithandelnnne0and their dependents (which is significantly less than all ofset.mm, and generally preferred if you have a particular goal theorem). - The
-c 2000controls how many theorems appear in each lean file, because lean tends to choke on very large files.
- The
-
mm0/set/post.leanis a manually written postprocessing file, that imports the autogenerated theorems and relates Metamath notions to Lean notions, so that one can obtain a native-Lean statement rather than a deep embedded Metamath statement in Lean. Currently, we are demonstrating this by proving theoremdirith'(Dirichlet's theorem), which uses only Lean definitions but is processed from the analogous MM theoremdirith.
-
-
mm0/meta/basic.leanandmm0/meta/meta.leanare an experimental framework for being able to write MM0 theorems by syntactic restriction of lean theorems, andmm0/set.leanis a demonstration. -
mm0/mm0b.leanis a formalization of the MMB operational semantics in lean. -
mm0/fol.leanis a syntactic model of MM0/ZFC in Lean using deep embedding to schemes in FOL in the language of ZFC. This is WIP but proves soundness of MM0 withset.mmaxioms. -
x86/contains a number of experimental formalizations relating to verified compilation down to a model ofx86-64. -
x86/x86.leanis a formalization of the fullx86model that is of interest for the MM0 bootstrapping project. It is parallel toexamples/x86.mm0. -
x86/lemmas.leanproves some facts about the model, in particular determinism of the decoder. -
x86/assembly.leanformalizes an initial assembly pass to make labels symbolic and remove explicit reference to the PC. -
x86/matching.leanandx86/separation.leanare two competing formalizations for higher level constructs, based on matching logic (see K framework) and separation logic (see Iris et al.) respectively.