Permutation Invariance Theorem
Author: Nirvan Chitnis Date: 2025-11-08 Status: Formal Proof
Abstract
We prove that the equity bridge formula and all conservation laws are invariant under arbitrary permutations of accounts and entities. This establishes that the framework’s outputs depend only on the economic substance of transactions, not on arbitrary labeling or ordering choices.
1. Statement of the Theorem
Theorem (Permutation Invariance): Let $\Pi$ be any permutation matrix acting on the account-entity space $\mathcal{A} \times \mathcal{S}$. For any journal entry system with incidence matrix $P$ and equity bridge inputs $(E_{\text{open}}, E_{\text{close}}, \text{NI}, \text{OCI}, \ldots)$, the following quantities are unchanged under the action of $\Pi$:
- Balanced posting condition: $\mathbf{1}^\top P_j = 0$ for all entries $j$
- Equity bridge residual: $R = \Delta E_{\text{parent}} - (\text{Internal} + \text{Owner} + \text{Measurement})$
- Conservation totals: Sum of all account balances, total equity
2. Mathematical Framework
2.1 Permutation Matrix Properties
A permutation matrix $\Pi \in \{0,1\}^{n \times n}$ satisfies:
where $\mathbf{1}$ is the all-ones vector. The second property states that row sums are preserved under permutation.
2.2 Action on Incidence Matrix
When we relabel accounts/entities via permutation $\Pi$, the incidence matrix transforms as:
This reorders rows (accounts/entities) while preserving column structure (journal entries).
3. Proof of Invariance
3.1 Balanced Postings (Theorem 1)
Claim: The balanced posting condition $\mathbf{1}^\top P_j = 0$ is preserved under permutation.
Proof:
The third equality uses $\mathbf{1}^\top \Pi = \mathbf{1}^\top$ (transpose of $\Pi \mathbf{1} = \mathbf{1}$).
Consequence: Kirchhoff’s law (conservation of flow) is intrinsic to the transaction, not dependent on account ordering. ∎
3.2 Equity Bridge Totals
Claim: All equity bridge source terms are invariant under entity/account permutation.
Proof: The equity bridge formula is:
Each term (NI, OCI, Issuance, etc.) is a scalar sum derived from specific account classifications:
Under permutation $\tilde{x} = \Pi x$, the sum becomes:
because permutation merely relabels the indices without changing the underlying set or values.
Consequence: The residual $R = \Delta E_{\text{actual}} - \Delta E_{\text{expected}}$ is invariant:
where we use that $\Pi$ acts identically on both sides. ∎
3.3 Conservation of Mass
Claim: Total account mass $M = \sum_i x_i = \mathbf{1}^\top x$ is invariant.
Proof:
using $\mathbf{1}^\top \Pi = \mathbf{1}^\top$. ∎
4. Implications for Implementation
4.1 Validation Independence
This theorem guarantees that:
- Reordering CSV rows in XBRL filings does not affect validation results
- Entity consolidation order does not matter (associativity modulo NCI allocation)
- Account chart variations across companies are handled correctly
4.2 Test Coverage
We validate this property via:
- Property-based tests: Generate random permutations of accounts; assert residual unchanged
- Metamorphic tests: Shuffle entity order; verify conservation laws hold
- Commutativity tests: $\text{Validate}(\Pi_1 \Pi_2 P) = \text{Validate}(\Pi_2 \Pi_1 P)$
See:
tests/property_based/test_conservation_invariants.py:test_permutation_invariance
5. Contrast with Non-Invariant Operations
Not all accounting operations are permutation-invariant. Counter-examples:
| Operation | Invariant? | Reason |
|---|---|---|
| Internal flows | ✅ Yes | Balanced postings: $\mathbf{1}^\top P = 0$ |
| Equity bridge totals | ✅ Yes | Scalar sums over classified accounts |
| Ownership % without LOC | ❌ No | Depends on parent-subsidiary ordering |
| Hyperinflation restatement | ❌ No | Restatement factor depends on temporal sequence |
| FX translation (IAS 21) | ⚠️ Partial | Balance sheet: Yes. P&L: No (avg vs closing rate) |
Key insight: Permutation invariance applies to structural operations (postings, classification) but not to temporal or hierarchical operations that inherently depend on ordering.
6. Extensions
6.1 Multi-Entity Permutations
For consolidation with multiple entities $S_t = \{e_1, \ldots, e_k\}$, permutation can act on:
- Entity labels: $e_i \leftrightarrow e_j$ (affects NCI allocation order, but not totals)
- Account labels within entity: $(e_i, a_m) \leftrightarrow (e_i, a_n)$ (fully invariant)
- Cross-entity: $(e_i, a_m) \leftrightarrow (e_j, a_n)$ (invariant for internal flows; breaks entity attribution)
Practical rule: Permutations within entity-account blocks preserve all properties. Permutations across entities require careful handling of NCI boundaries.
6.2 Connection to Symmetry Groups
The set of all permutations forms the symmetric group $S_n$, which acts on the state space $\mathbb{R}^n$. Our theorem states that:
making the equity bridge a $S_n$-equivariant map. This is the accounting analog of gauge invariance in physics.
7. Conclusion
Main Result: The accounting conservation framework is intrinsically permutation-invariant, meaning all validation outputs depend only on economic substance, not arbitrary labeling.
Practical Impact: - ✅ Robust to CSV row ordering, account chart variations - ✅ Validates correctness of account classification (invariance breaks if mis-classified) - ✅ Provides formal foundation for canonical form representations
Formal Verification: See
formal/lean/permutation_invariance.lean for mechanized
proof in Lean 4.
References
- Ellerman, D. (2014). Accounting and Category Theory. arXiv:1412.4229 — Duality and invariance in double-entry systems
- Liang, P. (2023). Kirchhoff’s Current Law for Accounting. — Graph-theoretic foundations
- IFRS Foundation (2023). IAS 1 §54 — Requirement that line item ordering not affect compliance
Generated with Claude Code (claude-sonnet-4-5) Co-Authored-By: Claude noreply@anthropic.com