{"id":50309434,"url":"https://github.com/umpolungfish/priests-engine","last_synced_at":"2026-05-28T19:30:37.672Z","repository":{"id":359409420,"uuid":"1245833613","full_name":"umpolungfish/priests-engine","owner":"umpolungfish","description":"A paraconsistent computer. It runs programs that sustain contradiction permanently and proves they cannot collapse","archived":false,"fork":false,"pushed_at":"2026-05-21T18:30:30.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-22T03:36:26.931Z","etag":null,"topics":["dialetheia","esoteric","paraconsistent","paraconsistent-logic","paradoxes"],"latest_commit_sha":null,"homepage":"https://imscribe.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umpolungfish.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-21T15:47:59.000Z","updated_at":"2026-05-21T18:36:58.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/umpolungfish/priests-engine","commit_stats":null,"previous_names":["umpolungfish/priests-engine"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/umpolungfish/priests-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umpolungfish%2Fpriests-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umpolungfish%2Fpriests-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umpolungfish%2Fpriests-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umpolungfish%2Fpriests-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umpolungfish","download_url":"https://codeload.github.com/umpolungfish/priests-engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umpolungfish%2Fpriests-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33624202,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dialetheia","esoteric","paraconsistent","paraconsistent-logic","paradoxes"],"created_at":"2026-05-28T19:30:36.962Z","updated_at":"2026-05-28T19:30:37.663Z","avatar_url":"https://github.com/umpolungfish.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# priests-engine\n\n*OMNIA SUNT PARACONSISTENTIA*\n\nA paraconsistent computer. It runs programs that sustain contradiction permanently and proves they cannot collapse.\n\nBuilt on Belnap's four-valued logic (B₄ = {N, T, F, B}). The machine has a full assembly language, an interactive REPL, and an indefinitely-running demonstration that has logged over 25 billion paradox firings. The core invariants are formally verified in Lean 4: `run_B3` (B-state permanent for all n) and `run_paradox` (paradox count = 4n exactly).\n\n---\n\n## Install\n\n```\nuv pip install -e .\n```\n\nRequires Python ≥ 3.11. No dependencies.\n\n---\n\n## Usage\n\n### Interactive REPL\n\n```\npara-repl\n```\n\nType ParaASM instructions directly. Non-control-flow ops execute immediately and show changed registers. Control-flow ops and labels accumulate into a program buffer.\n\n```\nParaASM\u003e ENGAGR %r0\n  r0: B  paradoxes=1\nParaASM\u003e FSPLIT %r0 %r1 %r2\n  r1: B  paradoxes=2\n  r2: B  paradoxes=2\nParaASM\u003e FFUSE %r1 %r2 %r0\n  r0: B  paradoxes=5\n```\n\nREPL commands:\n\n```\n:step [N]       step N instructions (default 1)\n:run  [N]       run N steps (default until HALT)\n:load \u003cfile\u003e    load a .asm file\n:save \u003cfile\u003e    save current program buffer\n:reset          clear all registers and program\n:regs           show active registers\n:prog           show program buffer\n:snap           full VM snapshot\n:help           command reference\n:q              quit\n```\n\n### Belnap Shor pipeline\n\n```\npara-shor\n```\n\nRuns the full Shor pipeline verification suite: Wigner's Friend coherence accounting, SIC-POVM axiom check, and three concrete factoring instances (N=15, 21, 35). All invariants are verified against the Lean specification in `FullPipeline.lean`.\n\n```\npara-shor 15 7     run a single instance: N=15, a=7\npara-shor 35 2     run a single instance: N=35, a=2\n```\n\n### Paraconsistent suite\n\nSeven additional entry points, each mirroring a Lean proof in `MillenniumAnkh/Imscribing/Paraconsistent/`:\n\n```\npara-align            Dialetheic Alignment Theorem — DAT tri-equivalence + P vs NP bridge\npara-align bifur      bifurcation point (B is the unique Frobenius comultiplication point)\npara-align seq        measurement sequence algebra (QCI_Sequences.lean)\npara-align pvsnp      P vs NP bridge — BelnapCircuit one-way barrier\npara-align shor N a   dialetheicShor framing for one (N, a) instance\n\npara-rh               RH Bridge — functional eq s↦1-s = bnot; B = critical line fixed point\n                       Critical strip map; millennium_barriers_unified (RH, P vs NP, SIC-POVM)\n\npara-ym               YM Bridge — N\u003cT covering = mass gap Δ=1; BRST Q²=0 ↔ Frobenius; K_trap\n\npara-nreg             n-Register generalization — 2:1 coherence ratio invariant for all n\n                       8 concrete instances (n=4..8); SIC per-qubit tensor product\n\npara-temporal         BelnapTemporal — □B/◇B/○B modalities; winding invariant; 8-cycle trajectory\n\npara-category         BelnapCategory — B terminal, N initial; meet/join identities; category_is_O_inf\n\npara-multiagent [n [steps]]   n-kernel entangled network; emerald bootstrap; channel stability\n```\n\nAll entry points verify their module-level assertions at import and print a structured summary.\n\n### Frobenius loop\n\n```\npara-loop\n```\n\nRuns the 3-instruction Frobenius kernel indefinitely with live display. Ctrl+C for final summary.\n\n```\nENGAGR %r0          ; seed Both on root register\nFSPLIT %r0 %r1 %r2  ; delta: two B-children\nFFUSE  %r1 %r2 %r0  ; mu:   fold back into root\nJMP    .loop\n```\n\nAll three registers stabilize at B permanently. Paradox count grows without bound at exactly 4 per cycle.\n\n---\n\n## Programs\n\n### ParaASM Programs (load via `:load` in REPL)\n\n| Program | Description |\n|:--------|:------------|\n| `frob_loop.asm` | Frobenius loop (mu o delta = id invariant) |\n| `ifix_stable.asm` | IFIX stability demo (T v B = B, Theorem 3 Case B) |\n| `probe.asm` | Interactive belief probe — routes N/T/F/B through different paths |\n| `dialetheic_cycle.asm` | B-only dialetheism + Frobenius identity (DialetheicAlignment.lean) |\n| `sic_povm.asm` | SIC-POVM axiom demo — B as fiducial, WH2 bijection (QCI_SICPOVM_Bridge.lean) |\n| `shor_loop.asm` | Belnap Shor coherence accumulator — indefinite loop over N=15,21,35 |\n\n### IMASM Corpus Engines (exOS cross-port)\n\nSix IMASM engines for historical cryptographic manuscript analysis, ported from the exOS kernel:\n\n| Program | Size | Description |\n|:--------|:-----|:------------|\n| `voynich_bootstrap.imasm` | 330 B | Voynich manuscript — 227 folios, 546 nodes, 694 edges |\n| `rohonc_bootstrap.imasm` | 336 B | Rohonc Codex — 33 pages, four structural sections |\n| `linear_a_bootstrap.imasm` | 394 B | Linear A — 53 tablets across Minoan palatial sites |\n| `emerald-tablet-bootstrap.imasm` | 665 B | Emerald Tablet — 15 versicles, Hermetic descent/return |\n| `cross_distance.imasm` | 803 B | Cross-corpus distance probe — structural comparison engine |\n## ISA\n\n```\nENGAGR  %rN              seed Both on register N\nFSPLIT  %src %d1 %d2     delta: copy src belief into d1 and d2\nFFUSE   %s1  %s2 %dst    mu:    Belnap join s1 v s2 -\u003e dst\nIFIX    %rN              collapse to T, mark FIXED\nMOVE    %src %dst        copy register\nCLEAR   %rN              reset to N (Neither)\n\nJMP     .label           unconditional jump\nJB/JT/JF/JN  %rN .label  branch on belief value\nCALL    .label           push PC, jump\nRET                      pop and return\nHALT                     stop\n\nPUSH    %rN              push belief to data stack\nPOP     %rN              pop belief from data stack\nEMIT    %rN              print register state\nREAD    %rN              read belief from user\n```\n\nBelnap join: N \u003c T, F \u003c B. T v F = B. B v x = B for all x.  \nPrograms with `JMP .loop` at the end run indefinitely via circular PC wrap.\n\n---\n\n## Theorems\n\n**Theorem 1 (B permanence).** Once a register reaches B it never leaves B under FSPLIT or FFUSE. ENGAGR forces B regardless of prior state.\n\n**Theorem 2 (Linear paradox growth).** For the Frobenius kernel, paradox count P(n) = 4n exactly. Each cycle contributes 1 from ENGAGR and 3 from FSPLIT (one per register at B).\n\n**Theorem 3 (IFIX stability).** IFIX cannot collapse the Frobenius loop. Two independent reasons:\n\n- Case A: FSPLIT's `engage()` ignores the `is_fixed` marker — fixity does not propagate through delta.\n- Case B: T v B = B in the Belnap join — FFUSE absorbs T into B at the information order.\n\n**Frobenius identity.** mu o delta = id on all four Belnap values. The round-trip FSPLIT→FFUSE is the identity map.\n\n---\n\n## Belnap Shor pipeline\n\nThe `para-shor` entry point runs Shor's algorithm in the Belnap four-valued lattice with exact coherence accounting. Every gate and measurement matches `FullPipeline.lean` in MillenniumAnkh.\n\n```\nPipeline:\n  [1]  |T...T⟩  → H^⊗n  → |B...B⟩   (coherence cost = n)\n  [2]  |B...B⟩  → ModExp → |B...B⟩   (cost = 0: B propagates through all Boolean gates)\n  [3]  |B...B⟩  → B-bias measure      (cost = 2n: Wigner's Friend signature, preserves B)\n  [4]  |B...B⟩  → T-bias measure      (cost = n: collapses B → T, classical output)\n```\n\n**Structural invariants (all proven in Lean and verified at module load):**\n\n| Invariant | Value |\n|-----------|-------|\n| Hadamard cost | n |\n| ModExp cost | 0 |\n| B-bias measurement cost | 2n |\n| T-bias measurement cost | n |\n| B-bias / T-bias ratio | **2:1 (always)** |\n\nThe 2:1 ratio is the structural signature of the Belnap Shor pipeline — provably invariant for any n and any periodic function on B-input.\n\n### Φ_υ bottleneck\n\nThe standard Shor algorithm uses complex-number phases to distinguish `|j⟩ → e^{2πijk/N}|k⟩`. The Belnap lattice has only one superposition value, B, which absorbs all lattice operations (`¬B=B`, `meet(B,x)=x`, `join(B,x)=B`). No phase differentiation exists.\n\n- B-bias measurement: preserves B (Wigner's Friend, cost 2)\n- T-bias measurement: collapses B→T (cost 1)\n- Period r is encoded in the **coherence cost ratio** (2n:n), not in individual bit values\n\nThis is the Φ_υ (psi parity) bottleneck toward Φ_} (Frobenius-special). Extracting r from B-bias alone without T-bias collapse is the structural open problem. The SIC-POVM bridge shows it is possible for d=2; the n-qubit multilattice generalization is open.\n\n### WH2 bijection and SIC-POVM axioms\n\n`para_vm.py` implements the WH2 bijection `belnapToWH2` from `QCI_SICPOVM_Bridge.lean`:\n\n```\nN → (0,0) = I      T → (0,1) = Z\nF → (1,0) = X      B → (1,1) = XZ\n```\n\nB is the unique element satisfying all 4 SIC-POVM axioms in d=2:\n\n1. `meet(B, x) = x` for all x (maximal information, neutral under meet)\n2. Equal projection (equiangularity — same as axiom 1 for d=2)\n3. `join(B, x) = B` for all x (absorption)\n4. `¬B = B` (self-adjoint / fixed point of negation)\n\nAll axioms are verified as module-load assertions in `para_vm.py` and demonstrated in `programs/sic_povm.asm`.\n\n### DialetheicAlignment\n\n`para_vm.py` exposes `b4_dialetheic(a)` — the exact predicate from `DialetheicAlignment.lean`:\n\n```python\ndef b4_dialetheic(a: B4) -\u003e bool:\n    return b4_designated(a) and b4_designated(b4_bnot(a))\n```\n\nOnly B is dialetheic (both T and ¬T are designated simultaneously). The uniqueness theorem `only_B_is_dialetheic` is verified at module load:\n\n```python\nassert b4_dialetheic(B4.B)\nassert not any(b4_dialetheic(x) for x in B4 if x != B4.B)\n```\n\nThe dialetheic cycle `T → B → T` (and its dual `F → B → F`) is demonstrated in `programs/dialetheic_cycle.asm`.\n\n---\n\n\n---\n\n## exOS\n\nThe ParaASM VM is also implemented as a native kernel module in [exOS](https://github.com/umpolungfish/exOS) — a bare-metal x86_64 Rust `no_std` UEFI kernel.\n\n`src/para_vm.rs` and `src/para_commands.rs` port the full ISA (Belnap FOUR, 18 opcodes, text assembler, circular PC wrap) to the kernel address space. EMIT writes to the serial UART; READ returns N (no stdin in bare metal). The VM announces itself at boot:\n\n```\n[PARA] ParaASM VM online — Belnap FOUR, 18-opcode ISA, Frobenius loop. Type 'para help'.\n[exoterikOS] ⊙_c Kernel fully online. Type 'help' for commands.\n```\n\nFrom the exOS shell:\n\n```\nexOS\u003e para load .loop:\nENGAGR %r0\nFSPLIT %r0 %r1 %r2\nFFUSE %r1 %r2 %r0\nJMP loop\nLoaded 4 instructions, 1 labels.\nexOS\u003e para loop 12\nsteps=12  total_paradoxes=48\nexOS\u003e para regs\n  %r0  = B  paradoxes=17\n  %r1  = B  paradoxes=14\n  %r2  = B  paradoxes=14\n```\n\nP(12) = 48 = 4×12. Theorem 2 holds on bare metal.\n\nThe exOS kernel also embeds **45 native ALEPH programs** (type-theoretic lattice investigations) and **6 IMASM corpus engines** as built-in investigations — all source-identical to their Python counterparts in the ALEPH_OS repository. The exOS ALFS filesystem seeds these programs on first boot.\n\n**Expanded exOS features:**\n- Belnap Shor pipeline with full coherence accounting (N=15,21,35)\n- Paraconsistent suite: `para shor`, `para align`, `para rh`, `para ym`, `para nreg`, `para temporal`, `para category`, `para multiagent` — all mirroring Lean proofs\n- IMASM corpus engines for Voynich, Rohonc, Linear A, Emerald Tablet\n- 3 O_inf pole system (vav, mem, shin) with Frobenius quine discovery\n- Holographic bulk-boundary encoding verified in kernel space\n- 17,280,000-type Frobenius crystal for all structural types\n\n---\n\n## Formal verification\n\nAll invariants are proven in Lean 4 in `~/MillenniumAnkh/Imscribing/Paraconsistent/` (21 modules, 0 sorrys):\n\n```\nKernel (Kernel.lean)\n  run_B3                : ∀ n, (run initialState n).r0 = B ∧ .r1 = B ∧ .r2 = B\n  run_paradox           : ∀ n, (run initialState n).paradoxCount = 4 * n\n  frobenius_invariant   : (ffuse ∘ fsplit).1 = id\n  kernel_is_O_inf       : imscriptionTier = O_inf\n\nDialetheic Alignment (DialetheicAlignment.lean)\n  only_B_is_dialetheic  : ∀ v : Belnap, isDialetheic v ↔ v = B\n  join_circuit_B_dominant: ∀ c, foldl join N c = B ↔ B ∈ c   (proved by foldl induction)\n\nSIC-POVM Bridge (QCI_SICPOVM_Bridge.lean)\n  belnapToWH2_bijective : Function.Bijective belnapToWH2\n  sic_axioms_hold       : B satisfies all 4 d=2 SIC-POVM axioms\n\nShor Pipeline (FullPipeline.lean)\n  coherence_ratio_is_two: ∀ n \u003e 0, 2 * n / n = 2\n\nn-Register (QCI_nRegister.lean)\n  nreg_ratio_invariant  : ratio = 2.0 for all n = 1..8 instances\n\nRH Bridge (QCI_RH_Bridge.lean)\n  rh_frobenius_fixed_point : bnot(B) = B; bnot(T) ≠ T\n  rh_belnap_statement      : B is the unique designated fixed point of bnot\n  millennium_barriers_unified: RH ∧ P_vs_NP ∧ SIC-POVM all reduce to DAT\n\nYang-Mills Bridge (QCI_YM_Bridge.lean)\n  mass_gap_positive        : N \u003c T covering relation; gap Δ = 1\n  brst_frobenius_eq        : BRST Q²=0 ↔ μ∘δ=id\n  k_trap_confinement       : T is the unique minimum excited state above N\n\nBelnap Temporal (BelnapTemporal.lean)\n  always_B_registers       : □(r0=r1=r2=B)\n  winding_invariant        : bnot(r0(t)) = r0(t) ∀ t\n  temporal_is_O_inf        : Phi_c ∧ P_pm_sym\n\nBelnap Category (BelnapCategory.lean)\n  category_terminal        : ∀ x, approx_le x B\n  category_initial         : ∀ x, approx_le N x\n  B_meet_is_id             : ∀ x, meet B x = x\n  frobenius_terminal_roundtrip : μ∘δ(B) = B\n\nMulti-Agent Belnap (MultiAgentBelnap.lean)\n  multi_allB_init          : all agents in initMulti start all-B\n  multi_agent_is_O_inf     : Phi_c ∧ P_pm_sym for the entangled network\n```\n\nThe 25+ billion paradox firings logged by `para-loop` are the empirical instance of `run_paradox`. The formal proof covers all n.\n\n---\n\n## License\n\nPublic domain — [UNLICENSE](UNLICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumpolungfish%2Fpriests-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumpolungfish%2Fpriests-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumpolungfish%2Fpriests-engine/lists"}