You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Remove dead commented-out code from AsymmEncAlg.lean, LWE.lean, and OracleComp.lean that used obsolete API patterns (guard-based experiments, [= x | ...] notation, ++ₒ, sorry-based DecidableEq).
Replace broken proof stubs with working proofs in CountingOracle.lean: ~250 lines of commented-out attempts are replaced with ~289 lines of complete proofs for counting oracle support characterization lemmas, including:
mem_support_simulate_iff: characterizes membership in support of simulate oa qc in terms of support at initial count 0
le_of_mem_support_simulate: query counts are monotonically non-decreasing through simulation
mem_support_snd_map_simulate_iff and variants: support characterization for the query-count projection
add_right_mem_support_simulate_iff / add_left_mem_support_simulate_iff: shift-invariance of support
mem_support_simulate_queryBind_iff: full characterization of support for query >>= oa patterns
exists_mem_support_of_mem_support: lifts plain support membership into counting simulation support
Overview of Changes:
This diff represents a significant code cleanup and modernization effort across the codebase.
Here is a summary of the key changes:
Refactor Query Counting Logic: The most substantial change is in CountingOracle.lean. A large block of old, commented-out, and incomplete lemmas for reasoning about the support of query-counted computations has been deleted and replaced with a new, fully-proven implementation built on the modern simulateQ framework.
Modernize Cryptographic Experiments: In AsymmEncAlg.lean, outdated definitions for cryptographic correctness and IND-CPA experiments have been removed. These old versions used a guard-based failure model, which has been superseded by a cleaner, Bool-based success/failure model.
General Code Cleanup: The diff removes dead and commented-out code across several files to improve code hygiene. This includes:
Deleting an old, commented-out implementation of the LWE assumption in LWE.lean.
Removing unused helper lemmas and an incomplete DecidableEq instance from OracleComp.lean.
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
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.
Summary
AsymmEncAlg.lean,LWE.lean, andOracleComp.leanthat used obsolete API patterns (guard-based experiments,[= x | ...]notation,++ₒ,sorry-basedDecidableEq).CountingOracle.lean: ~250 lines of commented-out attempts are replaced with ~289 lines of complete proofs for counting oracle support characterization lemmas, including:mem_support_simulate_iff: characterizes membership in support ofsimulate oa qcin terms of support at initial count0le_of_mem_support_simulate: query counts are monotonically non-decreasing through simulationmem_support_snd_map_simulate_iffand variants: support characterization for the query-count projectionadd_right_mem_support_simulate_iff/add_left_mem_support_simulate_iff: shift-invariance of supportmem_support_simulate_queryBind_iff: full characterization of support forquery >>= oapatternsexists_mem_support_of_mem_support: lifts plain support membership into counting simulation supportTest plan
lake buildpasses (single commit, already on CI)Made with Cursor