code wiki / (root) / nx_kernel_v2_test.nx

nx_kernel_v2_test.nx

buildroot/runtime/nx_kernel_v2_test.nx

4563 B104 linesdepth 6pulls 6 transitivereach 0 importersview sourcekind gate/prooftopic kernel
docsdependenciesstructsconstsfunctions

about

nx_kernel_v2_test.nx -- exercise the semantic kernel. Three scenarios: T1. Valid modus ponens chain -- kernel accepts. T2. Modus ponens with MISMATCHED antecedent -- kernel REJECTS. This is the test that distinguishes a real kernel from a rubber stamp. HOL Light, Coq, Lean all reject this; the v1 (structural) kernel would not. T3. AND-intro then AND-elim_L round-trip -- kernel preserves the formula structure.

dependencies 5 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_unify.nx nx_kernel_v2.nx nx_kernel_v2_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_unify.nxnx_kernel_v2.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main println sys_write strlen sys_mmap nx_k2_chain_new sys_mmap ↻ nx_term_const sys_mmap ↻ nx_k2_imp sys_mmap ↻ nx_term_app sys_mmap ↻ nx_k2_axiom nx_k2_at nx_k2_modus_ponens nx_k2_at ↻ nx_term_arg nx_term_eq nx_term_eq ↻ nx_term_arg ↻ sys_mmap ↻ nx_k2_inherit_2 nx_k2_at ↻ sys_mmap ↻ nx_k2_hyps_union nx_k2_hyps_alloc sys_mmap ↻ nx_k2_hyps_at nx_k2_hyps_copy_in nx_k2_hyps_at ↻ nx_k2_hyps_contains nx_k2_hyps_at ↻ nx_term_eq ↻ print sys_write ↻ strlen ↻ print_i64 sys_mmap ↻ itoa

structs

none

consts

19const SYM_P: nx_int = 1001
20const SYM_Q: nx_int = 1002
21const SYM_R: nx_int = 1003
22const SYM_A: nx_int = 1004

functions

24func main() -> nx_exit