nx_mizar_ingest.nx
buildroot/runtime/nx_mizar_ingest.nx
about
nx_mizar_ingest.nx -- ingest Mizar .miz theorem-level statements (M0).
Mizar's syntax for declarations we track:
theorem :: label
<statement>
proof
<proof script>
end;
definition let ... ; func ... ; ... end;
scheme :: label
<scheme body>
end;
notation / registration / reservation -- skipped at M0
MML identifier construction:
ARTICLE = uppercase filename without .miz
Each theorem gets a sequential number; identifier = ARTICLE:th N
Each definition gets ARTICLE:def N
Each scheme gets ARTICLE:sch N
We do NOT parse Mizar's typed FOL. We do NOT verify proofs.
At M0, we extract the identifier list with stable QED-format names.
At M1+ we'll parse statements and feed them through nx_prover.
genealogy_id: trybulec_mizar_1972 + bancerek_mml + wiedijk_qed_1994
lineage_id: formal_statement_parsing + typed_fol
axioms: NX_AX_ZFC_SEPARATION
dependencies 3 imports · 7 importers
imports: syscalls.nxnx_axioms.nxnx_lex.nx
imported by: nx_corpus_drive.nxnx_five_systems_test.nxnx_ingest_pipeline.nxnx_mizar_dir_ingest.nxnx_mizar_ingest_test.nxnx_mizar_stream_ingest.nxnx_mizar_stream_ingest_test.nx
structs
| 53 | struct MizarDecl |
| 62 | struct MizarDb |
consts
| 43 | const NX_MIZAR_KIND_NONE: i64 = 0 |
| 44 | const NX_MIZAR_KIND_THEOREM: i64 = 1 |
| 45 | const NX_MIZAR_KIND_DEFINITION: i64 = 2 |
| 46 | const NX_MIZAR_KIND_SCHEME: i64 = 3 |
| 47 | const NX_MIZAR_KIND_LEMMA: i64 = 4 |
| 51 | const NX_MIZAR_MAX_NAME_LEN: i64 = 128 |
| 60 | const NX_MIZAR_DECL_BYTES: i64 = 32 |
| 71 | const NX_MIZAR_MAX_DECLS: i64 = 1024 |
functions
| 73 | func nx_mizar_db_alloc(article_name: *u8) -> *MizarDb called by 1: nx_mizar_ingest_corpus |
| 85 | func nx_mizar_decl_at(db: *MizarDb, i: i64) -> *MizarDecl |
| 94 | func nx_mizar_skip_ws(buf: *u8, pos: *i64, len: i64) -> i64 |
| 112 | func nx_mizar_match_kw(buf: *u8, pos: *i64, len: i64, kw: *u8) -> i64 called by 1: nx_mizar_ingest_corpus |
| 135 | func nx_mizar_skip_to_newline(buf: *u8, pos: *i64, len: i64) -> i64 called by 1: nx_mizar_ingest_corpus |
| 145 | func nx_mizar_ingest_corpus(buf: *u8, len: i64) -> *MizarDb |
| 224 | func nx_mizar_count_kind(db: *MizarDb, kind: i64) -> i64 |