Commit 3678d64
proof: non-empty module witness + discrimination proofs for items 7+8
Extends the structural agreement work (parent commit 1d09ef6) past the
empty-list case with a concrete alloc/free module and a discrimination
proof showing the L10 single-consumption rule has teeth.
The minimal interesting case: a module exporting Produces 0 followed by
Consumes 0. Builds witnesses through every ILA* / TF* constructor:
* allocFreeModule — the ModuleSummary value.
* allocFreeSpecAccepts — SpecAccepts witness built from raw
ILAProduces / ILAConsumes / TFNil
constructors.
* allocFreeVerifierAccepts / allocFreeSourceAccepts — derived from
the spec witness via the structural
agreement directions. Closes the
structural triangle for a real module.
Discrimination — predicate has teeth. A predicate is only useful if
it can REJECT. Without a Not (SpecAccepts m) proof the predicate
could be vacuously true. This commit lands the first such proof:
* badDoubleConsumeModule — one function with [Consumes 0, Consumes 0].
* notSpecAcceptsBadDoubleConsume : Not (SpecAccepts badDoubleConsumeModule)
— by case-matching on the assumed witness, extracts the
Not (0 = 0) embedded in TFConsumesOther, applies Refl, derives Void.
Idris2's totality checker confirms the impossibility pattern is
exhaustive.
* notVerifierStructuralAcceptsBadDoubleConsume — symmetric on the
structural verifier side. (VADifferential remains the
differential-trust escape hatch by design.)
Idris2 0.8.0 build green: 22/22 modules. Zero new believe_me,
assert_total, postulate, sorry, assert_smaller. %default total
preserved.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 1d09ef6 commit 3678d64
1 file changed
Lines changed: 96 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
465 | 465 | | |
466 | 466 | | |
467 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
0 commit comments