Commit 3fb48ed
ArghDA M9 follow-on: Isabelle session-qualified imports (M9 → 98%) (#52)
## 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>1 parent da34183 commit 3fb48ed
2 files changed
Lines changed: 89 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
117 | 136 | | |
118 | 137 | | |
119 | 138 | | |
| |||
473 | 492 | | |
474 | 493 | | |
475 | 494 | | |
476 | | - | |
| 495 | + | |
477 | 496 | | |
478 | 497 | | |
479 | 498 | | |
| |||
482 | 501 | | |
483 | 502 | | |
484 | 503 | | |
485 | | - | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
486 | 507 | | |
487 | 508 | | |
488 | 509 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
31 | 34 | | |
32 | 35 | | |
33 | 36 | | |
| |||
94 | 97 | | |
95 | 98 | | |
96 | 99 | | |
97 | | - | |
98 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
99 | 105 | | |
100 | 106 | | |
101 | 107 | | |
| |||
105 | 111 | | |
106 | 112 | | |
107 | 113 | | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
108 | 117 | | |
109 | 118 | | |
110 | 119 | | |
111 | | - | |
112 | | - | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
113 | 134 | | |
114 | 135 | | |
115 | 136 | | |
| |||
241 | 262 | | |
242 | 263 | | |
243 | 264 | | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
244 | 285 | | |
245 | 286 | | |
246 | 287 | | |
| |||
353 | 394 | | |
354 | 395 | | |
355 | 396 | | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
356 | 412 | | |
357 | 413 | | |
358 | 414 | | |
| |||
0 commit comments