code wiki / (root) / _pp_minimal.nx

_pp_minimal.nx source

↩ module page · 29 lines · 733 B

1// nx_safety_envelope: 2// intended_use: AUTO_APPLIED -- primitive-specific tuning queued 3// sil_target: SIL1 4// evidence: [bulk_applied_2026-05-16, see-file-comment-for-detail] 5// verdict: NOT_YET_EVALUATED 6 7import "nx_kernel_v2.nx" 8 9struct ProofCtx { 10 facts: *nx_int, 11 n: nx_int, 12 cap: nx_int, 13} 14const NX_PROOF_CTX_BYTES: nx_int = 24 15 16func nx_proof_ctx_lookup(ch: *K2Chain, p: *ProofCtx, goal: *Term) -> nx_int { 17 var i: nx_int = 0 18 while i < p.n { 19 let idx: nx_int = p.facts[i] 20 let t: *K2Thm = nx_k2_at(ch, idx) 21 if nx_term_eq(t.stmt, goal) == 1 { return idx } 22 i = i + 1 23 } 24 return 0 - 1 25} 26 27func main() -> nx_exit { 28 return 0 29}