nx_probability.nx
buildroot/runtime/nx_probability.nx
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
imports: nx_kernel_v2.nx
imported by: nx_world_class_test.nxnx_world_demo_test.nx
structs
| none |
consts
| 24 | const NX_PROB_SYM_PR: nx_int = 412001 // unary: Pr(A) |
| 25 | const NX_PROB_SYM_OMEGA: nx_int = 412002 // sample space |
| 26 | const NX_PROB_SYM_EMPTY: nx_int = 412003 // empty event |
| 27 | const NX_PROB_SYM_INTERSECT: nx_int = 412004 // binary: A ∩ B |
| 28 | const NX_PROB_SYM_UNION: nx_int = 412005 // binary: A ∪ B |
| 29 | const NX_PROB_SYM_COMPLEMENT: nx_int = 412006 // unary: ~A (set complement) |
| 30 | const NX_PROB_SYM_LE: nx_int = 412007 // binary: x <= y |
| 31 | const NX_PROB_SYM_ZERO_R: nx_int = 412008 // real 0 |
| 32 | const NX_PROB_SYM_ONE_R: nx_int = 412009 // real 1 |
| 33 | const NX_PROB_SYM_PLUS_R: nx_int = 412010 // binary: x + y over R |
| 34 | const NX_PROB_SYM_MINUS_R: nx_int = 412011 // binary: x - y over R |
functions
| 37 | func nx_prob_pr(event: *Term) -> *Term |
| 44 | func nx_prob_omega() -> *Term { return nx_term_const(NX_PROB_SYM_OMEGA) } |
| 45 | func nx_prob_empty() -> *Term { return nx_term_const(NX_PROB_SYM_EMPTY) } |
| 46 | func nx_prob_zero() -> *Term { return nx_term_const(NX_PROB_SYM_ZERO_R) } |
| 47 | func nx_prob_one() -> *Term { return nx_term_const(NX_PROB_SYM_ONE_R) } |
| 49 | func nx_prob_intersect(a: *Term, b: *Term) -> *Term |
| 58 | func nx_prob_union(a: *Term, b: *Term) -> *Term |
| 67 | func nx_prob_complement(a: *Term) -> *Term |
| 73 | func nx_prob_plus(a: *Term, b: *Term) -> *Term |
| 82 | func nx_prob_minus(a: *Term, b: *Term) -> *Term |
| 91 | func nx_prob_le(a: *Term, b: *Term) -> *Term |
| 103 | func nx_prob_axiom_k1(ch: *K2Chain, event: *Term) -> nx_int |
| 108 | func nx_prob_axiom_k2(ch: *K2Chain) -> nx_int |
| 117 | func nx_prob_axiom_k3_disjoint(ch: *K2Chain, a: *Term, b: *Term) -> nx_int called by 1: t9_probability calls 8: nx_k2_eqnx_prob_intersectnx_prob_emptynx_prob_prnx_prob_unionnx_prob_plus+2 |
| 127 | func nx_prob_axiom_complement(ch: *K2Chain, a: *Term) -> nx_int called by 1: t9_probability calls 6: nx_prob_prnx_prob_complementnx_prob_minusnx_prob_onenx_k2_axiomnx_k2_eq |
| 135 | func nx_prob_axiom_inclusion_exclusion_2(ch: *K2Chain, a: *Term, b: *Term) -> nx_int called by 2: t9_probabilitydemo9_prob calls 7: nx_prob_prnx_prob_unionnx_prob_plusnx_prob_minusnx_prob_intersectnx_k2_axiom+1 |