code wiki / (root) / nx_analyst_causal_gate.nx

nx_analyst_causal_gate.nx

buildroot/runtime/nx_analyst_causal_gate.nx

7827 B149 linesdepth 6pulls 9 transitivereach 0 importersview sourcekind gate/prooftopic analyst
docsdependenciesstructsconstsfunctions

about

nx_analyst_causal_gate.nx -- F1005. The role logic is trivial to assert; what this gate really has to prove is WHY it must exist. So the centre of it is two EMPIRICAL demonstrations on real generated data, where the identical operation -- "control for a third column" -- is right once and catastrophic twice: T6 COLLIDER: two INDEPENDENT columns acquire a strong NEGATIVE partial correlation purely by conditioning on their sum. The association is manufactured out of nothing. T7 MEDIATOR: a real, strong x->m->y effect is driven toward ZERO by conditioning on m. T8 CONFOUNDER: the same operation is CORRECT, collapsing a spurious link. F1004's ai_confound_scan picks whichever control weakens the relationship most -- which in T6 and T7 is exactly the wrong column. That is the defect this organ exists to gate. D001-compliant verdict via nx_gate_verdict. license_tier: ORIGINAL expect_exit: 0

dependencies 2 imports · 0 importers

nx_gate_verdict.nx nx_analyst_causal.nx nx_analyst_causal_gate.nx

imports: nx_gate_verdict.nxnx_analyst_causal.nx

imported by: nobody (leaf or entry point)

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

main gv_ctr sys_mmap nxa_die sys_write sys_exit nxa_lock_take nxa_lock_addr sys_write ↻ nxa_lock_give nxa_lock_addr ↻ nxa_report_overrun sys_write ↻ nxa_dump_printable sys_write ↻ nxa_dump_sizes sys_write ↻ gv_head gv_puts sys_write ↻ gv_check gv_puts ↻ cg_eq ac_verdict ac_any_declared sys_mmap ↻ ac_adjustment_set ac_adjustment_set ↻ ac_explain ac_cat cg_has am_pearson_milli sys_mmap ↻ df_mean df_sum df_isqrt vm_isqrt ai_partial_milli ai_r_undef df_isqrt ↻

structs

none

consts

14const CG_N: i64 = 60

functions

16func cg_eq(a: i64, b: i64) -> i64 { if a == b { return 1 } return 0 }
called by 1: main
17func cg_has(hay: *u8, needle: *u8) -> i64
called by 1: main
33func main() -> i64