Skip to content

ArghDA M10 follow-on: Mizar local-article cross-references (M10 → 95%)#51

Merged
hyperpolymath merged 1 commit into
mainfrom
claude/arghda-roadmap-planning-p5mu93
Jul 17, 2026
Merged

ArghDA M10 follow-on: Mizar local-article cross-references (M10 → 95%)#51
hyperpolymath merged 1 commit into
mainfrom
claude/arghda-roadmap-planning-p5mu93

Conversation

@hyperpolymath

Copy link
Copy Markdown
Owner

What

A Mizar article that Requires a sibling — theorems X; on a local article X — is now checkable. Before this, X wasn't in any library, so accom on the dependent errored.

How

Ground-truthed the export pipeline against real Mizar 8.1.15: to reference a local X, X must be built into a local library — accom X; verifier X; exporter X; transfer X produces X's library files, and transfer populates a local ./prel the accommodator reads. check_file now, before checking the target, exports each in-tree transitive dependency in topological order (mizar_transitive_deps is a cycle-safe post-order DFS over environ imports; MML references are skipped) via that 4-tool pipeline in the temp work dir.

Honesty preserved

A broken dependency fails the dependent — no false green:

case result
y.miz with theorems X; using by X:1, valid x proven (was error before)
ybad requiring a broken xbad error
reason --check over the dir x/y proven, xbad/ybad error

Verification (actually run)

  • cargo fmt --check / clippy -D warnings — clean
  • cargo test175 pass (+1 topo-order unit)
  • check-spdx.sh — OK
  • Dogfooded vs real Mizar 8.1.15 (MIZFILES=/opt/mizar) — table above.

Honest scope

The theorems cross-reference path is dogfooded end-to-end. The same accom → verifier → exporter → transfer pipeline is Mizar's standard library build, so definitions/notations/constructors cross-refs travel the same path, but were not separately dogfooded (a correct definitions fixture is finicky to author; I chose not to rabbit-hole). Residual (the 5%): verify those + a session/root convention.

Part of the heavy-tail completion cuts — last one next: Isabelle multi-session (M9).

🤖 Generated with Claude Code

https://claude.ai/code/session_012MpYSh6Wy8YMBH2E3qVyT7


Generated by Claude Code

A Mizar article that `Require`s a sibling — `theorems X;` on a local article X —
is now checkable. Before this, X wasn't in any library, so `accom` on the
dependent errored.

Ground-truthed the export pipeline against real Mizar 8.1.15: to reference a
local X, X must be built into a local library — `accom X; verifier X;
exporter X; transfer X` produces X's library files, and `transfer` populates a
local `./prel` the accommodator reads. `check_file` now, before checking the
target, exports each in-tree transitive dependency in topological order
(`mizar_transitive_deps` is a cycle-safe post-order DFS over environ imports;
MML references are skipped) via that 4-tool pipeline in the temp work dir.

Honesty preserved: a broken dependency fails the dependent — dogfooded a
`ybad` that requires a broken `xbad` → `error` (no false green). A valid
`y` requiring a valid `x` → `proven`.

Verification (actually run): cargo fmt --check, clippy -D warnings, cargo test
(175 pass, +1 topo-order unit), check-spdx.sh — all green. Dogfooded vs real
Mizar 8.1.15 (MIZFILES=/opt/mizar): `y.miz` with `theorems X;` using `by X:1`
→ proven (was error pre-fix); `ybad` requiring broken `xbad` → error;
`reason --check` → x/y proven, xbad/ybad error.

Honest scope: the THEOREMS cross-reference path is dogfooded end-to-end. The
same accom→verifier→exporter→transfer pipeline is Mizar's standard library
build, so definitions/notations/constructors cross-refs travel the same path,
but were not separately dogfooded (a correct definitions fixture is finicky to
author; not rabbit-holed). Residual: verify those + a session/root convention.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_012MpYSh6Wy8YMBH2E3qVyT7
@hyperpolymath
hyperpolymath marked this pull request as ready for review July 17, 2026 04:40
@hyperpolymath
hyperpolymath merged commit da34183 into main Jul 17, 2026
3 checks passed
@hyperpolymath
hyperpolymath deleted the claude/arghda-roadmap-planning-p5mu93 branch July 17, 2026 04:40
hyperpolymath added a commit that referenced this pull request Jul 17, 2026
## What

A theory that imports from another session — `imports
"HOL-Library.FuncSet"` — is now checkable. This is the **last** of the
heavy-tail completion cuts.

Ground-truthed first (the important step): **flat sibling imports
already worked** — the adapter stages every sibling `.thy` into the
session, so `imports Main Foo` on a sibling `Foo` already resolved. So
the real gap was narrower than the milestone text suggested: only
*session-qualified* imports.

## How

The gap: the generated ROOT said `= HOL +` with no route to
`HOL-Library`, so the build errored "Cannot load theory". Fix:
`session_prefixes` scans all staged theories' `imports` clauses for
qualified `"Session.Theory"` forms (session = the segment before the
first `.`; Isabelle session names are dot-free) and emits a `sessions
"<S>" …` clause in the generated ROOT, so `isabelle build` pulls those
sessions' heaps. The distribution session heaps ship prebuilt, so the
build stays fast (~15 s).

## Verification (actually run)

- `cargo fmt --check` / `clippy -D warnings` — clean
- `cargo test` — **176 pass** (+1 `session_prefixes` unit)
- `check-spdx.sh` — OK

**Dogfooded vs real Isabelle2025:**

| case | result |
|---|---|
| `Q.thy` importing `"HOL-Library.FuncSet"`, using its Pi-notation |
`proven` (was `error` before) |
| flat-sibling regression (`Bar` imports sibling `Foo`) | still `proven`
|

## Scope

M9 → 98%. Residual: a project with its OWN multi-session ROOT (a
locally-defined session importing another local session's theories) —
niche; single-theory, flat-sibling and distribution-session-qualified
imports all work.

**This completes the heavy-tail completion cuts** (Coq
dependency-ordering #50, Mizar cross-refs #51, Isabelle
session-qualified imports).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

https://claude.ai/code/session_012MpYSh6Wy8YMBH2E3qVyT7

---
_Generated by [Claude
Code](https://claude.ai/code/session_012MpYSh6Wy8YMBH2E3qVyT7)_

Co-authored-by: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants