LAWS.bend open laws/TODOs
raw source on the hub · import 0x0d479d846e9ce92faa45a2346110fce8/LAWS.bend as LAWS
WhiteMagic & Mandala Governance Laws
Stated independently of proofs; verified by bend PROOF.bend.
3 imports
import Base import ./main.bend as WM import ./SPEC.bend as Spec
Laws
law capability_attenuation_monotone provedin PROOF.bendsource · line 10 · raw
@+parent:0x0d479d846e9ce92faa45a2346110fce8/main.ScopeToken -> @+mask:0x0d479d846e9ce92faa45a2346110fce8/main.ScopeToken -> @+c:0x0d479d846e9ce92faa45a2346110fce8/main.Cap -> (child = 0x0d479d846e9ce92faa45a2346110fce8/main.attenuate(parent, mask); {0x0d479d846e9ce92faa45a2346110fce8/SPEC.implies(0x0d479d846e9ce92faa45a2346110fce8/SPEC.has_cap(child, c), 0x0d479d846e9ce92faa45a2346110fce8/SPEC.has_cap(parent, c)) == True{} : Bool})LAW 1 (Monotonic Capability Attenuation):
If an attenuated child token possesses capability c, the parent token must also possess c.
law attenuation_idempotent provedin PROOF.bendsource · line 19 · raw
@+t:0x0d479d846e9ce92faa45a2346110fce8/main.ScopeToken -> {0x0d479d846e9ce92faa45a2346110fce8/main.attenuate(t, t) == t : 0x0d479d846e9ce92faa45a2346110fce8/main.ScopeToken}LAW 2 (Scope Attenuation Idempotence): Attenuating any capability token with itself preserves the exact token.
law jti_replay_rejected provedin PROOF.bendsource · line 25 · raw
@slot:0x0d479d846e9ce92faa45a2346110fce8/main.PassSlot -> (next = 0x0d479d846e9ce92faa45a2346110fce8/main.consume_pass(slot); {0x0d479d846e9ce92faa45a2346110fce8/SPEC.can_execute(next) == False{} : Bool})LAW 3 (Single-Use Pass Replay Rejection):
Once consume_pass transitions a Mandala slot, can_execute on the resulting slot is always False.
law pareto_never_promotes_regression provedin PROOF.bendsource · line 33 · raw
@fitness_gain:Bool -> @provenance_ok:Bool -> (fate = 0x0d479d846e9ce92faa45a2346110fce8/main.adjudicate(True{}, fitness_gain, provenance_ok); {0x0d479d846e9ce92faa45a2346110fce8/SPEC.is_promoted(fate) == False{} : Bool})LAW 4 (Constitutional Pareto Non-Regression):
A candidate with any protected-vector regression (has_regression == True) is NEVER promoted,
regardless of scalar fitness gain or provenance.
law pareto_dominance_promotes provedin PROOF.bendsource · line 41 · raw
fate = 0x0d479d846e9ce92faa45a2346110fce8/main.adjudicate(False{}, True{}, True{}); {0x0d479d846e9ce92faa45a2346110fce8/SPEC.is_promoted(fate) == True{} : Bool}LAW 5 (Constitutional Pareto Dominance Liveness): A candidate with zero regressions, positive utility, and valid provenance is ALWAYS promoted.
law hexagram_involution provedin PROOF.bendsource · line 47 · raw
@h:0x0d479d846e9ce92faa45a2346110fce8/main.Hexagram6 -> {0x0d479d846e9ce92faa45a2346110fce8/main.invert_hex(0x0d479d846e9ce92faa45a2346110fce8/main.invert_hex(h)) == h : 0x0d479d846e9ce92faa45a2346110fce8/main.Hexagram6}LAW 6 (64-Hexagram Yijing Line Involution): Inverting all 6 Yin/Yang lines of any hexagram twice restores the exact original hexagram.
law superopt_idempotent_absorption provedin PROOF.bendsource · line 53 · raw
@+g:0x0d479d846e9ce92faa45a2346110fce8/main.PrayMask -> @+rest:0x0d479d846e9ce92faa45a2346110fce8/main.PrayMask -> {0x0d479d846e9ce92faa45a2346110fce8/main.superopt_step(g, 0x0d479d846e9ce92faa45a2346110fce8/main.superopt_step(g, rest)) == 0x0d479d846e9ce92faa45a2346110fce8/main.superopt_step(g, rest) : 0x0d479d846e9ce92faa45a2346110fce8/main.PrayMask}LAW 7 (Sutra Superoptimizer Idempotent Absorption):
Applying a Sutra PRAY-phase operator twice before rest has the exact same denotation as applying it once.
law pray_mask_commutative provedin PROOF.bendsource · line 60 · raw
@+a:0x0d479d846e9ce92faa45a2346110fce8/main.PrayMask -> @+b:0x0d479d846e9ce92faa45a2346110fce8/main.PrayMask -> {0x0d479d846e9ce92faa45a2346110fce8/main.merge_pray(a, b) == 0x0d479d846e9ce92faa45a2346110fce8/main.merge_pray(b, a) : 0x0d479d846e9ce92faa45a2346110fce8/main.PrayMask}LAW 8 (Sutra PRAY Conjunction Commutativity): Merging two Sutra PRAY denotations is commutative.
law crystal_anti_rollback_monotonicity provedin PROOF.bendsource · line 67 · raw
@rev:Nat -> {0x0d479d846e9ce92faa45a2346110fce8/main.advance_epoch(rev) == 0x0d479d846e9ce92faa45a2346110fce8/SPEC.expected_next_epoch(rev) : Nat}LAW 9 (Citta Crystal Monotonic Epoch Step): Advancing a revision epoch by 1n equals the strict successor of the identity revision.
law sigma22_non_dispatching provedin PROOF.bendsource · line 73 · raw
@lens:0x0d479d846e9ce92faa45a2346110fce8/main.Sigma22Lens -> @c:0x0d479d846e9ce92faa45a2346110fce8/main.Cap -> (tok = 0x0d479d846e9ce92faa45a2346110fce8/main.render_sigma22_symbol(lens); {0x0d479d846e9ce92faa45a2346110fce8/SPEC.has_cap(tok, c) == False{} : Bool})LAW 10 (Wave 2 W2-P27 — Sigma_22 Non-Dispatching Invariant): Rendering any Sigma_22 symbolic spectrometer observation holds zero capability authority.
law zero_memory_auth_laundering provedin PROOF.bendsource · line 81 · raw
@live_lease:0x0d479d846e9ce92faa45a2346110fce8/main.ScopeToken -> @c:0x0d479d846e9ce92faa45a2346110fce8/main.Cap -> (tok = 0x0d479d846e9ce92faa45a2346110fce8/main.resolve_authority(True{}, live_lease); {0x0d479d846e9ce92faa45a2346110fce8/SPEC.has_cap(tok, c) == False{} : Bool})LAW 11 (Wave 2 W2-P25 — Zero Endogenous Authorization Laundering):
Authority claimed from recalled memory (from_recalled_memory == True) never grants any capability.
law mmmbaby_non_compensatory_veto provedin PROOF.bendsource · line 89 · raw
@f1:Bool -> @f2:Bool -> @f4:Bool -> @f5:Bool -> @f6:Bool -> {0x0d479d846e9ce92faa45a2346110fce8/main.mmmbaby_vitality(f1, f2, False{}, f4, f5, f6) == False{} : Bool}LAW 12 (Wave 2 W2-P9 — MMMBABY Non-Compensatory Sacrifice Veto):
If any single vital floor is breached (f3 == False), composite vitality is strictly False.
law prodrug_receptor_exclusivity provedin PROOF.bendsource · line 99 · raw
@epoch_valid:Bool -> @seal_valid:Bool -> {0x0d479d846e9ce92faa45a2346110fce8/main.cleave_prodrug(False{}, epoch_valid, seal_valid) == False{} : Bool}LAW 13 (Wave 2 W2-P32 — Prodrug Carrier Receptor Exclusivity):
An intercepted prodrug envelope outside its target receptor (node_matches == False) remains inert.