Repository navigation
BendTT: adequacy, a checked law holds at each closed instance - #1627
Merged
Merged
Conversation
Claim.consistent says no checked def has type <>. Claim.adequate says what
a law's user relies on: a closed live term of a checked book typed at
{a == b} has convertible sides, so a law's proof def applied to closed
values makes its two sides compute to a common term. By halts, progress
and sr the term reaches a value at {a == b}, and canon_eql shows that value
is {==} with convertible sides. No line Book.check or main runs changes;
the CLI binary builds byte-identical.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lorenzobattistela
approved these changes
Oct 22, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opened after Nico's go-ahead on Discord.
Claim.consistentsays no checked def has type<>. This adds the claim a law's user relies on: a checked proof of{a == b}meansaandbconvert. It holds for any closed, live term, so a checked law holds at each closed instance (its proof def applied to closed values), in the kernel's own reduction (opaque defs at their models, as in Part 2).The proof is
adequate, afterconsistent. It reuseshalts,progress,pars_sr,value_form,genandfits_conv, plus two small lemmas aftercanon_enu:eql_inj(the sides of convertible equations convert) andcanon_eql(a closed value at an equation is{==}). It changes no line thatBook.checkormainruns.What I ran on this exact file (identical to
mainat22d627bplus this patch;bendtt.leanis unchanged since234cb9b, where I ran these):lake build(Lean 4.34.0)#print axiomson all 10 theorems,Book.check,mainpropext,Classical.choice,Quot.soundonlyleanchecker --fresh--fresh(its 4.33.0-rc2 toolchain)lean -c+leanc -O3 -DNDEBUGkernel binarymain'stests/+demos/*/PROOF.bend(1,666 files) through--verdictttok==0.3, which matches CI)Happy to shorten it, rename, or restate it in the file's style.
Found and tested with Claude Code, running Claude Opus 5.5, during an audit of
--verdict.