code wiki / (root) / nx_caplab_compete_test.nx

nx_caplab_compete_test.nx

buildroot/runtime/nx_caplab_compete_test.nx

5043 B112 linesdepth 3pulls 4 transitivereach 0 importersview sourcekind gate/prooftopic caplab
docsdependenciesstructsconstsfunctions

about

nx_caplab_compete_test.nx -- gate for Capitalism Lab R1 (competition). Proves: (1) symmetric firms split the market evenly, (2) the cheaper firm wins a larger share, (3) CONSERVATION -- firm quantities always sum to the market size (largest-remainder), even when the split is uneven, (4) NEG-CONTROL: a firm priced at/above the choke sells zero, (5) NEG-CONTROL: if every firm is priced out, nobody buys, (6) margin x volume -- the higher-priced firm can still out-earn the cheaper one.

dependencies 4 imports · 0 importers

nx_syscalls.nx nx_runtime.nx nx_tier.nx nx_caplab_compete.nx nx_caplab_compete_test.nx

imports: nx_syscalls.nxnx_runtime.nxnx_tier.nxnx_caplab_compete.nx

imported by: nobody (leaf or entry point)

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

main sys_mmap println sys_write strlen sys_mmap ↻ nx_clab_split nx_clab_appeal_sum nx_clab_appeal sys_mmap ↻ nx_clab_appeal ↻ nx_assert_eq print sys_write ↻ strlen ↻ print_i64 sys_mmap ↻ itoa sys_mmap ↻ sys_write ↻ println ↻ nx_assert_gt print ↻ print_i64 ↻ println ↻ nx_clab_firm_profit print ↻ print_i64 ↻

structs

none

consts

none

functions

15func nx_assert_eq(label: *u8, got: nx_int, want: nx_int, pass_n: *nx_int, fail_n: *nx_int)
called by 1: main calls 3: printprint_i64println
26func nx_assert_gt(label: *u8, got: nx_int, floor: nx_int, pass_n: *nx_int, fail_n: *nx_int)
called by 1: main calls 3: printprint_i64println
37func main() -> nx_exit