code wiki / (root) / nx_research_corroborate_gate.nx

nx_research_corroborate_gate.nx source

↩ module page · 43 lines · 1985 B

1// nx_research_corroborate_gate.nx -- liar-kill gate for research corroboration. 2// The S-class thesis, proven: 3 ECHOES of one source-class score BELOW 2 3// genuinely-INDEPENDENT sources. Independence beats raw mention count. 4 5import "nx_syscalls.nx" 6import "nx_research_corroborate.nx" 7 8func main() -> i64 { 9 let c: *NxCorrob = nx_corrob_new(32) 10 // claim 100: asserted 3x but ALL source-class 5 (echo chamber / one blog network) 11 if nx_corrob_assert(c, 100, 1, 5) != 0 { return 1 } 12 if nx_corrob_assert(c, 100, 2, 5) != 0 { return 2 } 13 if nx_corrob_assert(c, 100, 3, 5) != 0 { return 3 } 14 // claim 200: 2 sources of DIFFERENT classes (primary-doc + press) = independent 15 if nx_corrob_assert(c, 200, 4, 1) != 0 { return 4 } 16 if nx_corrob_assert(c, 200, 5, 2) != 0 { return 5 } 17 // claim 300: a single source 18 if nx_corrob_assert(c, 300, 6, 1) != 0 { return 6 } 19 20 // raw counts include echoes 21 if nx_corrob_raw_count(c, 100) != 3 { return 7 } 22 if nx_corrob_raw_count(c, 200) != 2 { return 8 } 23 24 // INDEPENDENCE: 3 echoes collapse to 1 independent class; 2 distinct = 2 25 if nx_corrob_independent_count(c, 100) != 1 { return 9 } 26 if nx_corrob_independent_count(c, 200) != 2 { return 10 } 27 28 // CONFIDENCE: the 3-echo claim is only SINGLE; 2-independent is CONFIRMED 29 if nx_corrob_confidence(c, 100) != NX_CORR_SINGLE { return 11 } 30 if nx_corrob_confidence(c, 200) != NX_CORR_CONFIRMED { return 12 } 31 if nx_corrob_confidence(c, 300) != NX_CORR_SINGLE { return 13 } 32 if nx_corrob_confidence(c, 999) != NX_CORR_NONE { return 14 } 33 34 // citations: distinct source ids per claim 35 let cites: *i64 = sys_mmap(8 * 16) as *i64 36 if nx_corrob_cite(c, 100, cites, 16) != 3 { return 15 } 37 if nx_corrob_cite(c, 200, cites, 16) != 2 { return 16 } 38 39 // THE KILLER: 2 independent sources OUTRANK 3 echoes (independence > volume) 40 if nx_corrob_confidence(c, 200) <= nx_corrob_confidence(c, 100) { return 17 } 41 42 return 0 43}