Reference-implementation check for the finite core of SE-210 (Operational Identity)
Project description
se-verification-operational-identity
A reference-implementation check for the finite mathematical core of SE-210, Operational Identity: A Finite Audit of Declared and Implemented Rules of Sameness.
Purpose
The purpose of this project is to confirm the algorithmic
and complexity claims are internally correct.
It tests the core once R, the partitions, surfaces, and uses are supplied.
Checks
Two independent checkers consume the same supplied Instance:
oracle.py: builds~_tau,~_sib, and~=_das explicit pair sets, computes closures by naive fixpoint, and applies Definitions 4.1, 4.3, 4.7, 4.8, and 4.10 by literal subset tests. No algorithmic shortcuts.fast.py: the near-linear procedure of Theorem 5.2: union-find closures, signature grouping forpi_d, and per-declared-block label comparison for faithfulness, witness detection, and the four-way classification, with noR x Rever materialized.
The two are diffed across four verdict fields: faithfulness, divergence-witness existence, sibling-relative classification, and regime substitution.
The diff runs across three sources of instances:
- the seven regression cases taken verbatim from the paper.
These are 1) faithful/pass;
2) unpositioned;
3) sibling-aligned with substitution (Ex. 4.11);
4) aligned without substitution (Prop. 4.14);
5) sub-sibling (Prop. 4.15 and the Section 6
ruleTextVersionworked example (the same construction); 6) super-sibling (Rem. 4.16c); and 7) sibling-incomparable (Rem. 4.16d); - an exhaustive-small deterministic sweep of 180 instances over 3 records, covering every classification pair, every surface value-partition, and four histories;
- a randomized batch, 20,000 instances by default.
Alongside the diff, the harness checks three properties directly: every extracted witness satisfies Definition 4.3; the Proposition 5.5 before/after pair flips the verdict from pass to fail when the history is extended; and a fail never reverts to pass under history extension (anti-monotonicity).
Check Failures
mutation_test.py-style injection confirms the differential catches each named
failure mode:
- reversed refinement direction,
- swapped sub/super,
- dropping the restriction to declared classes, and
- conflating substitution with alignment (the error Prop. 4.14 forbids).
These mutants all get flagged.
Run
uv sync --extra dev --extra docs --upgrade
uvx se-verification-operational-identity
# or with args
uvx se-verification-operational-identity --random 20000 --seed 0
Nonzero exit from se_verification_operational_identity.check means a real disagreement: either the
optimized procedure or the paper wording needs correction.
Family classifications used
| family | RULE-C | RULE-S | family | LOC | OBJ | |
|---|---|---|---|---|---|---|
| refine-structure | PRS | BRK | BF | PRS | BRK | |
| revise-wording | PRS | PRS | ||||
| amend-content | BRK | PRS |
Example Command Output
uv run se-verification-operational-identity --random 20000 --seed 0
====================================================================
SE-210 finite-core verification
====================================================================
regression cases : 7/7 classified as asserted
monotonicity (Prop 5.5) : ok
exhaustive-small diffs : 180 instances, oracle vs fast
randomized diffs : 20000 instances (seed 0)
monotone property : ok
--------------------------------------------------------------------
RESULT: all checks passed
Developer Command Reference
Show command reference
In a machine terminal
Open a machine terminal where you want the project:
git clone https://github.com/structural-explainability/se-verification-operational-identity
cd se-verification-operational-identity
code .
In a VS Code terminal
uv self update
uv python pin 3.14
uv lock --upgrade
uv sync --extra dev --extra docs --upgrade
uvx pre-commit install
uvx pre-commit autoupdate
git add -A
uvx pre-commit run --all-files
# repeat if changes were made
uvx pre-commit run --all-files
# run locally with defaults
uv run se-verification-operational-identity
# or run locally with args
uv run se-verification-operational-identity --random 20000 --seed 0
# A nonzero exit from `se-verification-operational-identity` means a real
# disagreement: either the optimized procedure or the paper wording needs
# correction.
# types, tests, docs
uv run pyright
uv run pytest
uv run zensical build
# save progress
git add -A
git commit -m "update"
git push -u origin main
Merging GH Agent code example
git fetch origin copilot/analyze-test-coverage
git switch copilot/analyze-test-coverage
uv sync --extra dev --extra docs --upgrade
uvx pre-commit run --all-files
git status
git add -A
uvx pre-commit run --all-files
uv run pyright
uv run pytest
uv run se-verification-operational-identity --random 20000 --seed 0
uv run zensical build
git add -A
git commit -m "fix copilot generated test formatting"
git push
Citation
License
Repository Manifest
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file se_verification_operational_identity-0.1.0.tar.gz.
File metadata
- Download URL: se_verification_operational_identity-0.1.0.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
418a8242e1262fe4a1f7e65f2bbac3f31532111afaf16230908c613b3589a199
|
|
| MD5 |
da207920f8b60f252ae817a76a8cdc41
|
|
| BLAKE2b-256 |
cf615d1f410a82e49d7a96b363a2ad9fe23eaa762f6ab30148d7b3cc8ff3e3db
|
Provenance
The following attestation bundles were made for se_verification_operational_identity-0.1.0.tar.gz:
Publisher:
release-pypi.yml on structural-explainability/se-verification-operational-identity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
se_verification_operational_identity-0.1.0.tar.gz -
Subject digest:
418a8242e1262fe4a1f7e65f2bbac3f31532111afaf16230908c613b3589a199 - Sigstore transparency entry: 2219809806
- Sigstore integration time:
-
Permalink:
structural-explainability/se-verification-operational-identity@70f0fa02d133e8ed966c3158c205eb91122294f1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/structural-explainability
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@70f0fa02d133e8ed966c3158c205eb91122294f1 -
Trigger Event:
push
-
Statement type:
File details
Details for the file se_verification_operational_identity-0.1.0-py3-none-any.whl.
File metadata
- Download URL: se_verification_operational_identity-0.1.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b1f8175ec4198fc7c8945d67e0c393e13fedc9b209dcd561569d455077504004
|
|
| MD5 |
5b7358d39885000f2c17cf99781c551e
|
|
| BLAKE2b-256 |
259b7de18ed8b747572dbd68d13ae4270add7d1d49873da9ea7c18e7a80f862a
|
Provenance
The following attestation bundles were made for se_verification_operational_identity-0.1.0-py3-none-any.whl:
Publisher:
release-pypi.yml on structural-explainability/se-verification-operational-identity
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
se_verification_operational_identity-0.1.0-py3-none-any.whl -
Subject digest:
b1f8175ec4198fc7c8945d67e0c393e13fedc9b209dcd561569d455077504004 - Sigstore transparency entry: 2219809830
- Sigstore integration time:
-
Permalink:
structural-explainability/se-verification-operational-identity@70f0fa02d133e8ed966c3158c205eb91122294f1 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/structural-explainability
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@70f0fa02d133e8ed966c3158c205eb91122294f1 -
Trigger Event:
push
-
Statement type: