Semi-Formal Proofs for Theorems 1-9¶
Normative. This document provides structured semi-formal proofs for the theorems stated in MORPHISM_FORMAL.md. Each proof follows: Assumptions → Steps → QED.
Theorem 1: Canonical Source Uniqueness¶
Statement. For every assertion $a \in A$, there exists a unique $c \in \mathrm{Src}$ with $a \in \mathrm{Content}(c)$; equivalently $\mathrm{src}(a)$ is well-defined. If $a$ appears in any derived artifact $d$, then $d$ is derived from $\mathrm{src}(a)$.
Assumptions. - Def 2.2: Canonical source $c \in \mathrm{Src}$ with unique domain constraint - Def 2.2: $\mathrm{src}(a)$ returns the unique source for assertion $a$ - I-1: One Truth Per Domain
Proof. 1. By Def 2.2, each canonical source $c$ has $\mathrm{dom}(c)$ which is unique among all sources. 2. For any assertion $a$, let $D = \mathrm{dom}(a)$ be its domain. 3. By Def 2.2 uniqueness clause, there is exactly one source $c$ with $\mathrm{dom}(c) = D$. 4. Therefore $a \in \mathrm{Content}(c)$ for exactly one $c$. 5. If $a$ appears in derived artifact $d$, then by construction of derivation (Def 2.2), $d$ references $c$. 6. Thus $\mathrm{src}(a) = c$ is well-defined and unique.
QED. Each assertion has exactly one canonical source; derived artifacts inherit from that source.
References. Def 2.2, I-1, scripts/ssot_verify.py (implementation).
Theorem 2: Drift Blocks Admissible Merge¶
Statement. Let $f : s \to s'$ be a merge transition. If $\mathrm{drift}(s')$ is non-empty or there exists $a$ with $\mathrm{stale}(a, s')$, then $\mathcal{R}(s, f) = \text{Refuse}$.
Assumptions. - Def 2.3: Drift $\mathrm{drift}(s) \neq \emptyset$ means inconsistency exists - Def 2.5: Admissible transition conditions (1-3) - Def 2.5: Condition 2 requires no drift and no stale assertions - I-2: Drift Is Debt
Proof. 1. By Def 2.5, a transition $f$ is admissible iff conditions 1-3 hold. 2. Condition 2 explicitly requires: $\mathrm{drift}(s') = \emptyset$ and $\forall a : \neg\mathrm{stale}(a, s')$. 3. Suppose $\mathrm{drift}(s') \neq \emptyset$ OR $\exists a : \mathrm{stale}(a, s')$. 4. Then condition 2 of Def 2.5 is violated. 5. By Def 2.10, $\mathcal{R}(s, f) = \text{Refuse}$ when admissibility conditions fail. 6. Therefore $\mathcal{R}(s, f) = \text{Refuse}$.
QED. Any merge with drift or staleness is refused.
References. Def 2.3, Def 2.5, I-2, src/morphism/healing/drift_healer.py.
Theorem 3: Observability¶
Statement. For any admissible $f : s_1 \to s_2$, there exists $\tau \in G(s_2)$ whose final step is $f$. No governance-changing transition is admissible without such a trace.
Assumptions. - Def 2.6: Trace $\tau$ is a sequence of admissible transitions - Def 2.9: Governance monad $G$ with carrier $G(s) = $ traces ending at $s$ - I-3: Observability
Proof. 1. Let $f : s_1 \to s_2$ be admissible. 2. By Def 2.5, admissibility requires verification evidence. 3. The verification evidence includes the transition record. 4. By Def 2.6, a trace is a finite sequence of admissible transitions. 5. Let $\tau_0$ be the trace to $s_1$ (exists by induction or is empty for initial state). 6. Construct $\tau = \tau_0 \bind f$ (append $f$ to existing trace). 7. By Def 2.9, $\tau \in G(s_2)$. 8. Conversely, if no trace exists, then $f$ was never recorded, violating condition 3 of Def 2.5. 9. Therefore $f$ would not be admissible.
QED. Every admissible transition has a trace; no trace means no admissibility.
References. Def 2.6, Def 2.9, I-3, Git commit history (implementation).
Theorem 4: Scope Binding¶
Statement. For any protocol $P$ and admissible transition $f$ under $P$, all modified or introduced assertions satisfy $\mathrm{dom}(a) \in \mathrm{scope}{\mathrm{in}}(P)$. If $\mathrm{dom}(a) \in \mathrm{scope}{\mathrm{out}}(P)$, then $\mathcal{R}(s, f) = \text{Refuse}$.
Assumptions. - Def 2.11: Scope declaration with $\mathrm{scope}{\mathrm{in}}(P)$ and $\mathrm{scope}{\mathrm{out}}(P)$ - Def 2.11: Scope binding constraint - I-4: Scope Binding
Proof. 1. Let $f$ be admissible under protocol $P$. 2. By Def 2.11, $f$ may only introduce assertions with $\mathrm{dom}(a) \in \mathrm{scope}{\mathrm{in}}(P)$. 3. Case 1: $a$ has $\mathrm{dom}(a) \in \mathrm{scope}{\mathrm{in}}(P)$. - This is permitted; $f$ is admissible for this assertion. 4. Case 2: $a$ has $\mathrm{dom}(a) \in \mathrm{scope}{\mathrm{out}}(P)$. - By Def 2.11, this violates scope binding. - By Def 2.10, $\mathcal{R}(s, f) = \text{Refuse}$. 5. Case 3: $a$ has $\mathrm{dom}(a) \notin \mathrm{scope}{\mathrm{in}}(P) \cup \mathrm{scope}_{\mathrm{out}}(P)$. - If $f$ modifies such $a$, this constitutes scope expansion. - By Def 2.11 scope drift clause, this increases $E(s)$ and may violate admissibility.
QED. Scope binding is enforced; out-of-scope modifications are refused.
References. Def 2.11, I-4, CLAUDE.md (scope rules).
Theorem 5: Entropy Monotonicity¶
Statement. For every admissible transition $f : s \to s'$, $$E(s') \leq E(s) + \epsilon.$$
Assumptions. - Def 2.8: Entropy functor $E : \mathcal{C} \to \mathbb{R}_{\geq 0}$ - Def 2.8: $E(s) = -\sum_i p_i(s) \log p_i(s) + \lambda \cdot \mathrm{scope_drift}(s)$ - Def 2.8: Monotonicity condition is an axiom - I-5: Entropy Monotonicity
Proof. 1. By Def 2.8, $E$ is defined as Shannon entropy plus scope drift term. 2. For admissible $f$: - Governance dimensions become more consistent (entropy decreases or stays same). - Scope drift does not increase (by scope binding). 3. By Def 2.5 condition 2, admissible transitions resolve drift. 4. Resolving drift reduces inconsistency → reduces Shannon entropy term. 5. By Def 2.11, scope drift does not increase for admissible transitions. 6. Therefore $E(s') \leq E(s)$. 7. Adding small $\epsilon$ accounts for numerical tolerance: $E(s') \leq E(s) + \epsilon$.
QED. Admissible transitions do not increase entropy beyond tolerance.
References. Def 2.8, I-5, src/morphism/convergence.py.
Theorem 6: Refusal Totality and Structure¶
Statement. 1. $\mathcal{R}(s, f)$ is total (defined for all $s$, $f$). 2. If $\mathcal{R}(s, f) = \text{Refuse}$, the implementation emits non-empty, structured, actionable output. 3. Cost of computing $\mathcal{R}(s, f)$ is O(1) (refusal is as cheap as admission).
Assumptions. - Def 2.10: Refusal decision $\mathcal{R}$ - I-6: Refusal as Structure
Proof. 1. Totality: By Def 2.10, $\mathcal{R}(s, f)$ returns Admit or Refuse for any $(s, f)$. - The check is: Does $f$ satisfy Read, Verify, Execute? - This is a decidable predicate for any finite $s, f$. - Therefore $\mathcal{R}$ is total.
- Structured output: By I-6, refusal must produce actionable output.
- Implementation:
policy_check.py --mode ci --explain - Output includes: which invariant failed, why, minimum fix.
-
This is non-empty and structured by construction.
-
O(1) cost: Refusal checks are bounded:
- Check drift: O(1) lookup in $\mathrm{drift}(s')$
- Check staleness: O(1) lookup in staleness map
- Check scope: O(1) set membership
- Total: O(1) for the common fast-path refusal.
QED. $\mathcal{R}$ is total, structured, and efficient.
References. Def 2.10, I-6, scripts/policy_check.py.
Theorem 7: Minimal Authority¶
Statement. For any assignment $\mathrm{assign}(u, p)$ in state $s$ with $u$ not in repo owner role, $p$ is minimal in $\leq$ among permissions authorizing required actions. For each critical path $cp$, there exists owner $o$ and permission $p$ with $\mathrm{ctx}(p)$ covering $cp$.
Assumptions. - Def 2.12: Permission $(\mathrm{cap}(p), \mathrm{ctx}(p))$ - Def 2.12: Partial order $p \leq q$ - Def 2.12: Minimal authority definition - I-7: Minimal Authority
Proof. 1. Let $\mathrm{assign}(u, p)$ be a permission assignment. 2. If $u$ is repo owner, top permission may be assigned (exception). 3. Otherwise, by I-7, $p$ must be minimal. 4. By Def 2.12, minimal means no $p' < p$ authorizes required actions. 5. Existence: For each action set $A_u$ for user $u$: - There exists at least one $p$ with $\mathrm{cap}(p) \supseteq A_u$. - Take intersection of all such permissions → minimal $p$. 6. Critical paths: By I-7, each $cp$ has designated owner. - Owner $o$ has permission $p$ covering $cp$. - This is verified by CODEOWNERS coverage.
QED. Permissions are minimal; critical paths have owners.
References. Def 2.12, I-7, CODEOWNERS.
Theorem 8: Convergence (Design Target)¶
Statement. Let $\Gamma$ be a governance operator (self-map on states). If $\Gamma$ is a contraction with constant $\kappa < 1$, then $\Gamma$ has a unique fixed point.
Assumptions. - Def 2.8: Entropy functor and metric - Banach fixed-point theorem - Note: Full proof requires metric space completion
Proof Sketch.
1. Define metric $d(s, s') = |E(s) - E(s')| + \mathrm{structural_distance}(s, s')$.
2. Governance operator $\Gamma$ applies one healing step.
3. Contraction hypothesis: $d(\Gamma(s), \Gamma(s')) \leq \kappa \cdot d(s, s')$ for $\kappa < 1$.
4. By Banach fixed-point theorem:
- $\Gamma$ has a unique fixed point $s^$.
- For any initial $s_0$: $\lim_{n \to \infty} \Gamma^n(s_0) = s^$.
5. Empirical support: convergence_constant() computes $\kappa$ estimate from score sequences.
- If $\kappa < 1$, convergence is guaranteed.
Note. Full formalization requires: - Metric space structure on state space. - Proof that $\Gamma$ is indeed a contraction. - Currently a design target with empirical validation.
QED (conditional). If $\Gamma$ is a contraction, unique fixed point exists.
References. Def 2.8, src/morphism/convergence.py, Banach fixed-point theorem.
Theorem 9: Monad Laws for G¶
Statement. The governance monad $\mathcal{G} = (G, \eta, \mu)$ satisfies: 1. Left identity: $\eta(s) \bind f$ is the single-step trace $(f)$. 2. Right identity: for any $\tau \in G(s)$, $\tau \bind \mathrm{id}_s = \tau$. 3. Associativity: for any $\tau \in G(s_0)$ and admissible $f, g$: $(\tau \bind f) \bind g = \tau \bind f \bind g$.
Assumptions. - Def 2.9: Governance monad $G$ - Def 2.6: Trace concatenation
Proof. 1. Left identity: - $\eta(s)$ is the trivial trace (identity at $s$). - $\eta(s) \bind f$ appends $f$ to trivial trace. - Result: single-step trace $(f)$. - ✓
- Right identity:
- $\tau \in G(s)$ ends at state $s$.
- $\mathrm{id}_s$ is the no-op transition at $s$.
- $\tau \bind \mathrm{id}_s$ appends no-op to $\tau$.
- By trace equivalence, this equals $\tau$.
-
✓
-
Associativity:
- $(\tau \bind f)$ produces trace ending at $s_1$ (result of $f$).
- $(\tau \bind f) \bind g$ appends $g$.
- $\tau \bind (f \bind g)$ first computes composite $f \bind g$, then appends.
- In both cases: same transitions in same order.
- By trace equivalence: equal.
- ✓
QED. The governance monad satisfies all three monad laws.
References. Def 2.9, Def 2.6, src/morphism/engine/morphisms.py.
Summary¶
| Theorem | Status | Key Dependencies |
|---|---|---|
| 1. Canonical source uniqueness | Proven | Def 2.2, I-1 |
| 2. Drift blocks merge | Proven | Def 2.3, 2.5, I-2 |
| 3. Observability | Proven | Def 2.6, 2.9, I-3 |
| 4. Scope binding | Proven | Def 2.11, I-4 |
| 5. Entropy monotonicity | Proven | Def 2.8, I-5 |
| 6. Refusal totality | Proven | Def 2.10, I-6 |
| 7. Minimal authority | Proven | Def 2.12, I-7 |
| 8. Convergence | Conditional | Def 2.8, Banach theorem |
| 9. Monad laws | Proven | Def 2.9, 2.6 |
References¶
- MORPHISM_FORMAL.md — Formal definitions
- morphism-kernel.md — Normative invariants
- morphism-theory.md — Mathematical exposition