Repository navigation
#91 stage 4, PR 2b: term_cases, a theorem proved by a split on the value of a document term (SM-35) - #229
#91 stage 4, PR 2b: term_cases, a theorem proved by a split on the value of a document term (SM-35)#229afflom wants to merge 11 commits into
Conversation
…t term (#91 stage 4) R3: row, SPEC.md section 31 row, scenario and the named test first; the case is not wired, so conformance_sm_35 fails. Count 429 to 430 on this draft. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG
…ment term
SemanticProof gains TermCases { scrutinee, definitions }: checked in language 1.2
only, over a nonempty sorted unique list of prior document definitions and a term
of a document inductive type, with the hypothesis name llCase reserved; the Lean
backend lowers it to cases llCase : term <;> simp (config := {decide := true}) only
[definitions, llCase]. Both v2 schemas accept it. The case links, formats, verifies
under the pinned Lean with exactly the stated axioms, and refuses seven misuses.
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG
…md record and plants Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG
…in EX-07 Seven fixtures under tests/negative/, each LLT4001 with its expected diagnostic; their locks are current for this head and are relocked with the rest by the regeneration wave. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG
…branch; register 434 The release line changed semantic-module-v2.schema.json; the term_cases entry is re-applied to the line's schema. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018vK7Tm6xHF5etAwKM6r9HG
…dition (ite_true, ite_false), which the runtime's refinement needs; the unused-argument linter is off for its script
|
Amendment c44c469 reviewed: accepted. Generated by Claude Code |
…enario, and the failing named test
…, SPEC.md and VERIFICATION.md); fixtures' locks are bound to the compiler-semantics ID
…ter at 441; the semantic-module-v2 schema keeps its proof forms and takes the declaration's axioms
|
Maintainer: landed on release/v0.4 by #248 (merge commit 9796067, the #91 stage-4 stack regenerated on one compiler-semantics identity, full gate green on 677e88d). Closing by hand, since release-line merges do not auto-close. Generated by Claude Code |
What it does
The proof form the maintainer chose on #91 (option B, comment 6285275601) for the runtime profile's refinement statements, stacked on PR 2a (#227).
term_cases{scrutinee: <document term>, definitions: [<prior definitions>]}, language 1.2 only. It lowers tocases llCase : <term> <;> simp (config := {decide := true}) only [<definitions>, llCase]llCaseis reserved. No tactic name, option, or lemma is free.SemanticProof::TermCasesinir/semantic.rs(validationcheck_term_cases, node count, term visitors, widening, binder/type-argument walks), the Lean lowering inbackend/semantic.rs, and the two v2 schemas (semantic-module-v2,semantic-snapshot-v2: threeoneOfentries). The notation reads the form from the schema, so the formatter and notation round trip need no code. The v1 schemas are untouched, so language 1.1 cannot carry it.SM-35register row, scenario andconformance_sm_35, in R3 order (row commit first). Register 430 on this draft (the maintainer assigns the final count).Measured
conformance_sm_35: the project links;semantic-module-v2accepts the module; the formatter keeps the proof and its fixed point links to the same module; the notation reads back to the same module; the generated Lean has the stated lowering; the pinned Lean 4.32.1 verifies the module with exactly[propext]; seven misuses are refused asLLT4001naming the misuse (language 1.1, empty list, out of order, repeated, absent definition, aNatterm, a parameter namedllCase). Three plants caught (VERIFICATION.md).nat_addslice (not in this PR) the same script provesrunExport … = runItem …for all operands in six seconds withpropext,Classical.choice,Quot.sound.-D warnings,validate-model(430),validate-spec-links(430),check-test-inventory(758), thebddmeta-gate: clean.semantic-ir,proofsanddeclarationssuites (76 cases): 54 pass, 22 fail, all 22 withLLC0102(the lock is bound to the compiler-semantics ID, which has moved since PR 1); none on the schema, the proof forms or the snapshot. I did not rerun them on the base.cargo test -p lexlean: 207 of 208 pass; the failure is therust_rendererrecord.Two things to know
term_cases; condition 2 of the decision assumed a proof phrase, so this needs your reading.tests/negative/. A committed fixture carries a lock and expected diagnostics bound to the compiler-semantics ID, which the wave regenerates; the case plants the same misuses and asserts each refusal, without files that go stale. Say if you want committed fixtures after the wave.Not run / left for the wave
Records bound to the compiler-semantics ID,
check-calculus, fulljust vv, other hosts,repro,honesty. One plant not shown: whether the pinned Lean also rejects a lowering withoutllCasein thesimplist (the case's lowering assertion catches it first).Generated by Claude Code