Native MoonBit Metamath verification and interactive proof execution, with CLI and browser tools.
node bin/moonmetamath.mjs --help
node bin/moonmetamath.mjs verify tests/fixtures/upstream/set-mm/demo0.mmnode scripts/toolchain.mjs install
node scripts/build.mjsnode bin/moonmetamath.mjs theorems database.mm --offset 0 --limit 20
node bin/moonmetamath.mjs rules database.mm --theorem target --query ax --limit 20
node bin/moonmetamath.mjs stdioimport { create_dispatcher } from './dist/moonmetamath-core.mjs';
const dispatch = create_dispatcher();
let serial = 0;
function call(operation, fields = {}) {
const response = JSON.parse(dispatch(JSON.stringify({
...fields, schema_version: 1, request_id: String(++serial), operation,
})));
if (response.status !== 'ok') throw new Error(JSON.stringify(response.diagnostics));
return response;
}
const loaded = call('load', {
entry: 'mini.mm',
sources: [{ source_id: 'mini.mm', text: '$c |- a $. ax $a |- a $. th $p |- a $= ax $.' }],
});
const database_id = loaded.data.database_id;
const report = call('verify', { database_id });
if (report.outcome !== 'valid') throw new Error(JSON.stringify(report));
console.log(call('theorems', { database_id, offset: 0, limit: 20 }).data);
call('unload_database', { database_id });node bin/moonmetamath.mjs verify database.mm --max-operations 100000000
node bin/moonmetamath.mjs session database.mm --theorem th --actions actions.json --export candidate.mm --new-label candidate{"schema_version":1,"actions":[{"operation":"apply_label","label":"ax"}]}node scripts/check.mjs
node scripts/browser-check.mjs
node scripts/package.mjsfn dispatch_json(request : String) -> StringInstall
Download zipNative MoonBit Metamath verification and interactive proof execution, with CLI and browser tools.