code wiki / (root) / nx_probability.nx

nx_probability.nx

buildroot/runtime/nx_probability.nx

6532 B140 linesdepth 6pulls 6 transitivereach 2 importersview sourcekind library
docsdependenciesstructsconstsfunctions

about

nx_probability.nx -- probability-measure substrate. Closes the LAST named blocker for Wikipedia "probabilistic proof" method. Per user 2026-05-15: "no losses". Provides: - Term constructors: Pr(A), Omega (sample space), set ops intersection / union / complement on event symbols - Kolmogorov axioms K1..K3 as v2 kernel axiom emitters - common derived axioms: Pr(~A) = 1 - Pr(A); inclusion-exclusion Patent-clean: built on the v2 kernel + Term machinery only. Sym IDs reserved 412001..412020 (probability family; distinct from arith 410xxx and connectives 400xxx).

dependencies 1 imports · 2 importers

nx_kernel_v2.nx nx_probability.nx nx_world_class_test.nx nx_world_demo_test.nx

imports: nx_kernel_v2.nx

imported by: nx_world_class_test.nxnx_world_demo_test.nx

structs

none

consts

24const NX_PROB_SYM_PR: nx_int = 412001 // unary: Pr(A)
25const NX_PROB_SYM_OMEGA: nx_int = 412002 // sample space
26const NX_PROB_SYM_EMPTY: nx_int = 412003 // empty event
27const NX_PROB_SYM_INTERSECT: nx_int = 412004 // binary: A ∩ B
28const NX_PROB_SYM_UNION: nx_int = 412005 // binary: A ∪ B
29const NX_PROB_SYM_COMPLEMENT: nx_int = 412006 // unary: ~A (set complement)
30const NX_PROB_SYM_LE: nx_int = 412007 // binary: x <= y
31const NX_PROB_SYM_ZERO_R: nx_int = 412008 // real 0
32const NX_PROB_SYM_ONE_R: nx_int = 412009 // real 1
33const NX_PROB_SYM_PLUS_R: nx_int = 412010 // binary: x + y over R
34const NX_PROB_SYM_MINUS_R: nx_int = 412011 // binary: x - y over R

functions

37func nx_prob_pr(event: *Term) -> *Term
44func nx_prob_omega() -> *Term { return nx_term_const(NX_PROB_SYM_OMEGA) }
called by 1: nx_prob_axiom_k2 calls 1: nx_term_const
45func nx_prob_empty() -> *Term { return nx_term_const(NX_PROB_SYM_EMPTY) }
46func nx_prob_zero() -> *Term { return nx_term_const(NX_PROB_SYM_ZERO_R) }
called by 1: nx_prob_axiom_k1 calls 1: nx_term_const
47func nx_prob_one() -> *Term { return nx_term_const(NX_PROB_SYM_ONE_R) }
49func nx_prob_intersect(a: *Term, b: *Term) -> *Term
58func nx_prob_union(a: *Term, b: *Term) -> *Term
67func nx_prob_complement(a: *Term) -> *Term
73func nx_prob_plus(a: *Term, b: *Term) -> *Term
82func nx_prob_minus(a: *Term, b: *Term) -> *Term
91func nx_prob_le(a: *Term, b: *Term) -> *Term
called by 1: nx_prob_axiom_k1 calls 1: nx_term_app
103func nx_prob_axiom_k1(ch: *K2Chain, event: *Term) -> nx_int
108func nx_prob_axiom_k2(ch: *K2Chain) -> nx_int
117func nx_prob_axiom_k3_disjoint(ch: *K2Chain, a: *Term, b: *Term) -> nx_int
127func nx_prob_axiom_complement(ch: *K2Chain, a: *Term) -> nx_int
135func nx_prob_axiom_inclusion_exclusion_2(ch: *K2Chain, a: *Term, b: *Term) -> nx_int