Repository navigation
Support a verifier in staged channel soundness - #7
Draft
nicole-graus wants to merge 4 commits into
Draft
nicole-graus wants to merge 4 commits into
nicole-graus wants to merge 4 commits into
Conversation
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.
Builds on PR #2. The staged soundness theorems no longer require
ens.verifier = .empty.What changes
The verifier's interactions on a stage are part of that stage. Its pulls get their guarantees from the stage's consistency, and its spec follows from them.
The verifier's requirements on a stage are a new hypothesis,
VerifierStagedRequirementsOn. Like a component's, they may use its guarantees on earlier stages. When the verifier pushes nothing on a stage's channel,verifierStagedRequirementsOn_of_not_memdischarges them.tableSoundness_of_stagedRequirementsOndropsverifier_emptyand takes:verifier_covered: every verifier pull lies in a finished stage.verifier_staged: the verifier's requirements on each stage.tableSoundness_of_stagedRequirements(the channel form) takes:verifier_subset_finished: the verifier's guarantee channels are finished.verifier_no_requirements: the verifier pushes to no finished channel.A verifier push whose requirement follows from its earlier guarantees needs the stage form.
Example (
Clean/Examples/RangeCheckedCount.lean)bytes. Its spec, "the input is a byte", is proved.seenBytes. Its requirement there is paid by its guarantee on the earlierbytesstage.Not covered: a staged counterpart of
addVm_soundVmChannel_of_soundChannels.Breaking: callers of the two staged theorems pass the new verifier hypotheses instead of
verifier_empty. With an empty verifier, each one closes bysimp [circuit_norm, Verifier.Program.empty].Verified:
lake build --wfailandlake build CleanTestspass. The new theorems use onlypropext,Classical.choiceandQuot.sound.