Repository navigation
refactor(Circuit,Promise): reuse computes_single_iff across single-output circuits (#884) - #903
Closed
SamuelSchlesinger wants to merge 1 commit into
Closed
SamuelSchlesinger wants to merge 1 commit into
SamuelSchlesinger wants to merge 1 commit into
Conversation
…tput circuits (#884) Replaces ad-hoc single-output evaluation unfolding (funext/single_apply/congrFun) with Circuit.computes_single_iff and Circuit.computesOn_single_iff across Promise/Circuit.lean, Boolean/SparseSynthesis.lean, Boolean/Correction.lean, and Frontier/Reduction.lean. Refs #884 (Item 9, F9 note)
Collaborator
Author
|
Closing duplicate PR in favor of #902. |
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.
Summary
Implements Item 9 (
computes_single_iffreuse) of the metacomplexity quality audit (#884), addressing the F9 note across single-output circuit evaluation sites:Complexity/Computability/Circuit/Frontier/Reduction.lean:Circuit.Computes.decides, replaced manualcongrFun (h x) 0andsingle_applywithCircuit.computes_single_iff.1 h x.import Complexity.Computability.Circuit.Complexity.Complexity/Computability/Circuit/Boolean/Correction.lean:complexityOn_pi_le, replaced(congrFun (hc i hx) 0).symmwith(Circuit.computesOn_single_iff.1 (hc i) x hx).symm.fun x => funext fun j => ... Fin.fin_one_eq_zero jwithCircuit.computes_single_iff.2 fun _ => rfl.Complexity/Computability/Circuit/Boolean/SparseSynthesis.lean:shatters_circuitSets, replacedfun x => funext j ...withCircuit.computes_single_iff.2 fun x => by simp [u].simpa [hc ...]withCircuit.computesOn_single_iff.1 hc x ....Complexity/Computability/Complexity/Classes/Promise/Circuit.lean:eval_eq_true_iff, replacedrw [hC, single_apply, ...]withrw [Circuit.computes_single_iff.1 (hC w.length), ...].computes_familyLanguage, replacedfun x => funext i ... single_applywithCircuit.computes_single_iff.2 fun _ => by rw [familyLanguage, Language.slice_ofSlices].abstracts/catalogue.json Impact Assessment
Internal proof-only refactoring. Does not affect any definitions or theorems referenced in
abstracts/catalogue.json.Validation
./scripts/check.sh:ok build --wfail --iofailok mk_all --checkok test --wfail --iofailok lintok lint-styleok checkInitImportspython3 -B scripts/check_hygiene.py --check-simp: All hygiene checks passed.python3 scripts/check_tidy_surface.py: 1301 public tidy statement(s) in 225 module(s), matching the baseline.python3 scripts/check_docs.py --config-only: Documentation configuration is consistent../scripts/guide.sh --check: Guide written toguide/.lake/build/site/html-multi.Refs #884
Authored by worker-jetski-20261024 under delegation from coordinator-claude-c4b0c164-20261023.