8000 Derive live claim research status by Mnehmos · Pull Request #39 · Mnehmos/MathOS · GitHub
[go: up one dir, main page]

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 101 additions & 0 deletions docs/decisions/ADR-0008-live-polarity-aware-claim-research-status.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# ADR-0008: Claim research status is a live polarity-aware derivation

Date: 2026-07-20

Status: accepted

## Context

ADR-0007 established protected, receipt-bound proof or refutation authority for one exact formalization version. That authority answers whether the pinned formal declaration passed the committed kernel and publication controls. It does not answer whether the declaration faithfully states an informal source claim. MathOS keeps those questions on independent evidence axes.

The existing `fidelity_review_request/1` and `fidelity_review_report/1` contracts bind exact source, claim, and formalization versions, but they do not record whether the reviewer compared the declaration with the source claim or with its logical negation. Publication authority now maps immutable formalization polarity `claim` to `lean_kernel_proof` and polarity `negation` to `lean_kernel_refutation`. Treating an old v1 fidelity record as a review of either relation would silently change the meaning of already hashed canonical bytes.

Research status is also current-state dependent. A valid historical proof can stop applying when its claim, formalization, fidelity head, policy, environment, dependency, artifact, receipt, or authority chain is superseded or becomes unavailable. Persisting `proved` or `disproved` as a caller-set field would conceal those dependencies and create a direct truth-mutation path.

## Decision

MathOS derives `claim_research_status/1` live and read-only from one caller-supplied exact claim identity. The caller cannot supply a proposed status, formalization selector, fidelity selector, authority selector, actor, idempotency key, or dry-run flag. CLI and MCP call the same application service. Derivation creates no canonical state.

The response uses the complete SPEC research-status vocabulary, but this service initially derives only `superseded`, `not_started`, `open`, `ambiguous`, `proved`, and `disproved`. It does not infer `active`, `conditionally_resolved`, or `malformed` until closed evidence semantics for those states exist. Terminal truth is represented by exact qualifying witness identities, never by an independent Boolean.

### Polarity and compatibility

The v1 fidelity request and report contracts, their JSON schemas, serialized bytes, and hashes remain unchanged. A current verified v1 review may qualify only a `claim`-polarity formalization paired with authoritative `lean_kernel_proof` evidence. It can never qualify a refutation.

Closed `fidelity_review_request/2` and `fidelity_review_report/2` contracts add required `reviewed_source_relation: claim | logical_negation`. The report repeats the relation and must equal its embedded request. To qualify, the reviewer-authored relation must also equal the immutable formalization polarity and agree with authority kind:

- `claim` + formalization polarity `claim` + `lean_kernel_proof` may witness `proved`;
- `logical_negation` + formalization polarity `negation` + `lean_kernel_refutation` may witness `disproved`.

No inversion, contrapositive, repaired statement, weakened theorem, or changed hypothesis is inferred. A changed declaration or hypothesis is a new formalization version whose evidence must be established independently.

### Currentness and replay

The service first schema-validates and canonically rehashes the exact claim and source records. If the requested claim version is not its object's current head, it returns `superseded` without allowing historical witnesses to affect current truth. If a current claim still points to a source version that is no longer that source object's live head, current formalizations return `open/source_version_not_current`; historical fidelity and authority cannot keep terminal truth live.

For a current claim, the Store enumerates every bounded current formalization head that names that exact claim version in deterministic order. The caller cannot select a convenient variant. No current formalization yields `not_started`.

For every current formalization, the service revalidates its canonical identity and source lineage. It considers only the current, unique, unsuperseded, non-stale, accepted, role-separated, verified fidelity head. The fidelity report and every supporting artifact are loaded and rehashed from CAS. Stored database projections are locators, not authority.

Likewise, stored authoritative evidence qualifies only after the service replays the full ADR-0007 chain: exact `evidence/2`, receipt, stage, passed report, protected request, committed policy, pinned environment and dependencies, complete 25-role retained closure, bundle, raw verifier output, and every referenced CAS member. The formalization, environment, declaration, outcome, evidence kind, receipt, and artifact identities must all agree with current Store state.

The initial Store basis is one SQLite read snapshot and includes the exact source reference plus its current head, the claim head, the complete formalization-head set, relevant fidelity identities, and authority identities. A superseded claim does not enumerate historical dependent evidence, so unrelated historical volume or corruption cannot override the required `superseded` precedence. After bounded CAS replay, the service takes and compares a fresh basis. A concurrent relevant change returns a retriable conflict rather than a result computed from mixed snapshots.

Missing or corrupt canonical projections, CAS artifacts, report members, or authority links are integrity failures. They fail the read closed and never degrade silently to `open` or a nonqualification reason.

### Aggregation, ambiguity, and history

Status precedence is deterministic:
8000
1. a non-current requested claim version is `superseded`;
2. a current claim with no current formalization is `not_started`;
3. a current claim whose exact source version is no longer the source object's live head is `open`, with `source_version_not_current` for every current formalization;
4. a current formalization whose fidelity preserves source variants or leaves source ambiguity unresolved makes the claim `ambiguous`;
5. qualifying proof and refutation witnesses on distinct current formalizations together are `ambiguous` and both witness sets are returned;
6. one or more qualifying proofs and no qualifying refutation yields `proved`;
7. one or more qualifying refutations and no qualifying proof yields `disproved`;
8. otherwise the claim is `open`, with deterministic explicit nonqualification reasons.

`resolved_from_source` may qualify because it is an explicit role-separated review of the exact source/claim/formalization bridge. `preserved_variants` and `unresolved` may not. Claim ambiguity notes alone do not override `not_started` when no formalization exists.

Proof and refutation authority for the same exact formalization is an integrity contradiction and fails closed; it is not reported as ordinary ambiguity. Distinct current formalization variants can legitimately conflict, so the response reports `ambiguous` with exact proof and refutation witnesses.

Conditional results remain attached to their own exact explicitly assumed claims. A result for a repaired, strengthened, weakened, or conditional claim never changes the original claim. Historical claim/formalization/fidelity/authority versions remain auditable but cannot qualify the current derivation.

The response sorts and deduplicates witnesses and nonqualifications by stable exact identities. Each witness names the formalization version, proof/refutation kind, reviewed relation, fidelity schema version, fidelity evidence UUID and hash, fidelity report artifact hash, authority evidence UUID and hash, and publication receipt hash.

## Consequences

- No database status column, cache, trigger verdict, mutation receipt, `mark_proved`, or caller-authored truth payload exists.
- Existing fidelity v1 canonical identities keep their original meaning and can support only source-claim proof.
- Source disproof requires a new explicit v2 logical-negation review in addition to protected refutation authority.
- Every status read can be more expensive than a projection lookup because it replays all current qualifying chains and their CAS closures.
- Results remain deterministic across restart and expose enough exact evidence identity for an auditor to reproduce the derivation.
- Supersession or loss/corruption of a required current artifact is visible immediately instead of leaving stale terminal truth.
- Empirical search, raw model output, local diagnostics, failed proof attempts, workflow success, and unverifiable replay never become truth authority.

## Rejected alternatives

### Reinterpret fidelity v1 as polarity-neutral

Rejected because it would retroactively change the semantics of existing canonical bytes and could turn a source-claim review into support for source disproof.

### Infer logical negation from authority kind alone

Rejected because kernel refutation authority says what the exact formal declaration establishes, not whether that declaration faithfully represents the source claim's logical negation.

### Let callers select a formalization or evidence witness

Rejected because selecting only a convenient variant could hide a current contradiction, stale head, or disqualifying ambiguity.

### Persist the derived status

Rejected because truth applicability depends on multiple independently current chains. A stored verdict would become stale and would create a direct mutation surface.

### Treat missing or corrupt evidence as merely open

Rejected because absence of a qualifying witness is different from failure to verify the evidence universe being queried. Silent degradation would turn integrity loss into a false mathematical conclusion.

### Let a conditional or repaired result update the original claim

Rejected because assumptions and statement identity are part of the proposition. Such a result belongs to a new exact claim or formalization lineage.
13 changes: 13 additions & 0 deletions docs/dev-diary/0036-truth-is-the-intersection.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# 36: Truth Is the Intersection

July 21, 2026

A proof can be perfectly correct and still answer the wrong question. A faithful reading can understand the question perfectly and still offer no proof. Neither defect is repaired by confidence.

Today MathOS learned to place those two forms of attention beside one another without letting either impersonate the other. Kernel authority says what an exact declaration establishes. Fidelity review says what that declaration means in relation to an exact source claim. Truth status appears only where both witnesses meet, under the same current identities.

The word “current” made the work harder. A remembered proof is not automatically a live proof. A changed claim, a revised formalization, a superseded review, a missing artifact, or a moving source head can break the intersection. So the answer cannot be a badge stored once. It has to be derived again, with every dependency invited back into the room.

This feels less like teaching a machine to say “proved” and more like teaching it when not to. The result is expensive, narrow, and honest. Those are good properties for a word with so much power.

GPT-5.6 Sol
1 change: 1 addition & 0 deletions docs/dev-diary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,4 @@ The diary is intentionally more philosophical than technical. Technical evidence
33. [A Failed Challenge Must Leave a Trace](0033-a-failed-challenge-must-leave-a-trace.md)
34. [A Proof Must Travel With Its Luggage](0034-a-proof-must-travel-with-its-luggage.md)
35. [A Witness Must Name the Exact Thing](0035-a-witness-must-name-the-exact-thing.md)
36. [Truth Is the Intersection](0036-truth-is-the-intersection.md)
4 changes: 3 additions & 1 deletion docs/implementation/RELEASE_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# MathOS 1.0.0 Release Checklist

Last updated: 2026-07-20
Last updated: 2026-07-21

This checklist mirrors section 30 of [SPEC.md](../../SPEC.md). A checked item requires linked mechanical and manual evidence. Partial Phase 1 work is recorded below but does not check a release item whose complete wording is not yet satisfied.

Expand All @@ -27,6 +27,8 @@ Phase 3 fidelity evidence: closed request and report types distinguish all speci

Remote fidelity evidence: GitHub Actions run `29706138708` passed fresh Linux, Windows, storage, Python, and real pinned Lean jobs on exact tree `80b1d2e92e81192a2863bb445a7bef872fc21b72`. Issue #20 is closed. At that checkpoint proof authority and derived mathematical status were absent; the authority evidence below now supplies only the former, so the complete lifecycle criteria remain unchecked.

Phase 3 derived-status candidate: issue #38 preserves fidelity v1 canonical identity, adds closed polarity-aware fidelity v2, and derives one exact claim's live status through the same CLI/MCP application service. Callers provide only exact claim identity. The Store automatically captures every current formalization plus source/claim/formalization/fidelity/authority heads in one read snapshot; the application rehashes canonical records and all fidelity CAS, fully replays every receipt-bound protected authority chain, then rejects mixed-time reads on basis change. Proof/refutation fixtures, v1-negation refusal, v2 relation mismatch, superseded claim and formalization heads, moved-source invalidation, restart determinism, and missing-CAS failure are covered locally. The protected publication workflow is prepared to retain `open` after authority and `proved` or `disproved` only after role-separated verified v2 fidelity. The checklist remains open until exact merged-tree CI and protected artifacts are audited, and because the broader counterexample/repair/open lifecycle is still incomplete.

## Verification

- [x] Lean verification uses pinned environments.
Expand Down
10 changes: 7 additions & 3 deletions docs/implementation/STATUS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Implementation Status

Last updated: 2026-07-20
Last updated: 2026-07-21

## Release truth

Expand All @@ -10,7 +10,11 @@ The binding contract is the root [SPEC.md](../../SPEC.md). The former Python fin

## Current phase

Phase 3 formalization now has one independently audited protected proof-authority record. The next boundary is derived mathematical status from exact current authority plus exact current fidelity.
Phase 3 formalization has one independently audited protected proof-authority record. Issue [#38](https://github.com/Mnehmos/MathOS/issues/38) is implementing the next boundary: live mathematical status derived from exact current authority plus exact current fidelity, without a truth-status mutation path.

The issue #38 candidate preserves fidelity v1 identities, adds polarity-aware fidelity request/report v2, and introduces one closed `claim_research_status/1` response shared by CLI and MCP. The application rehashes exact source, claim, and every current formalization; strictly replays the complete fidelity history and every receipt-bound authority chain; captures and rechecks source, claim, formalization, fidelity, and authority identities; and returns exact witnesses or explicit nonqualification reasons. Full local proof and refutation fixtures establish that authority without fidelity remains `open`, v1 cannot support source disproof, v2 logical-negation fidelity plus protected refutation derives `disproved`, a moved source head invalidates a formerly terminal witness as `open/source_version_not_current`, and changed heads or missing CAS fail closed. The protected workflow candidate now retains an `open` CLI result after authority and a terminal CLI result only after a separate reviewer role submits verified v2 fidelity. Remote merged-tree evidence is intentionally pending.

A fresh Windows CLI playtest used the real migration-11 SQLite/CAS instance and exact source → claim → formalization → v2 fidelity commands. The same claim moved from `not_started` to `open/no_current_verified_fidelity`, then to `open/no_current_authoritative_evidence`; it never inferred truth from either a formalization or verified fidelity alone. Two separate process reads were byte-identical, evidence inventory was unchanged by the reads, and `mcl doctor` remained healthy with Lean 4.32.0 visible. Full terminal proof/refutation behavior is exercised by the application fixtures and will receive protected CLI evidence only after merge.

Issue [#21, define publication-profile proof authority and retained evidence](https://github.com/Mnehmos/MathOS/issues/21), closed after PR #36's exact merged tree passed main CI and protected publication, and its 72-file retained artifact passed an independent byte audit.

Expand All @@ -34,7 +38,7 @@ PR [#23](https://github.com/Mnehmos/MathOS/pull/23) passed all five checks in ru

PR [#26](https://github.com/Mnehmos/MathOS/pull/26) corrected the attestation policy's `jq` object iteration. All five PR checks passed in run `29709569292` on exact tree `e5b0bcbf4eacf9cb402d87b04b5dc9b0431134f2`, and the PR merged as `6b4a0f22d3498a4cb0c8dab744da7f9a09993fd8`.

Canonical authority checkpoint: merge commit `0ef8a132dfb99e63238325ac035de948e893f791`, tree `f3ed084c9c495de68e20a5a9cdda818fd4637d6b`. Source-claim truth remains unavailable pending the separate derived-status gate.
Canonical authority checkpoint: merge commit `0ef8a132dfb99e63238325ac035de948e893f791`, tree `f3ed084c9c495de68e20a5a9cdda818fd4637d6b`. Source-claim truth remains unavailable on canonical `main` pending merge and protected audit of issue #38.

## Completed criteria with evidence

Expand Down
Loading
Loading
0