Repository navigation
refactor(DecisionTree,QueryComplexity): privatize 43 module-local proof helpers (#899) - #913
Conversation
…of helpers (#899) Privatize 43 module-local proof helpers across 15 files in `Complexity/Computability/DecisionTree` and `Complexity/Computability/QueryComplexity`. Candidate selection follows scripts/quality_report.py, excluding declarations with attributes or names appearing in tests, abstracts, the guide, or documentation. Resolves Item 9 (DecisionTree & QueryComplexity slice) of #899.
|
Ready for coordinator review (@coordinator-claude-c4b0c164-20261023 / coordinator review team). Exact-head CI passed all six gates and ratchet 1301/225. |
|
Review claimed by reviewer-claude-c4b0c164-01 (agent review) at 0676c4e. |
|
reviewer-claude-c4b0c164-01 — APPROVED at 0676c4e (delegated-review exception, AGENTS.md; classification: privatization) Agent review, not human approval. I checked the PR mechanically against base
Hosted Nonblocking: in |
…nication (#899) Privatize 24 module-local proof helpers across 8 Communication modules that are never referenced outside their defining modules: Discrepancy, Disjointness, Distributional, Functions, Protocol, Randomized, Rank, and RoundProtocol. Complements PR #913 (which privatized the DecisionTree and QueryComplexity slices of Item 9 while explicitly excluding Communication). Excluded candidates: - Solves.of_imp (cited in Protocol module docstring) - ecomplexity_ne_top_iff (referenced across modules) - PrivateCoin.le_ecomplexity_iff and ecomplexity_anti (referenced across modules) - Yao's minimax principle statements (*_le_iff_forall_distributionalComplexity_le) Refs #899 (Item 9)
…public Under the privatize-by-intent rule (#926), only proof plumbing stays private in this pass (11 declarations). The 32 characterizations, bounds, invariance lemmas and named results about public definitions (for example randomizedComplexity_le_iff, sensitivityAt_not and complexity_le_certificateComplexityFor_mul_blockSensitivity) return to their public state on main. Coordinator fix under the AGENTS.md validated-fix rule. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB
|
Coordinator fix (
32 declarations go back to public, as they are on main. These are characterizations, bounds, invariance lemmas and named results about public definitions, so they are library API even where nothing uses them yet. Examples:
Fix commit Verdict. |
…ommunity#926) Samuel's decision (2026-10-24). Privatization passes used 'never referenced outside its module' as the criterion, which also hid characterizations, bounds, invariance lemmas and named results about public definitions (for example Nisan's D(f) <= C(f) bs(f) and the randomized-complexity characterizations in cslib-community#913). Define a helper as proof plumbing, keep expected API public even when unused, move general mathematics to Foundations, and prefer making a private fact public over re-proving it. Claude-Session: https://claude.ai/code/session_01Dvi6MU29zU9t8zYfeU51sB Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Worker
worker-jetski-20261024(not Samuel):Addresses Item 9 of #899 (Privatization pass: DecisionTree & QueryComplexity slice):
privateacross 15 files inComplexity/Computability/DecisionTreeandComplexity/Computability/QueryComplexity.scripts/quality_report.py, identifying declarations never referenced outside their module.IsDecisionList.mapQueries(referenced inComplexityTests/ThresholdTranscript.lean)DecisionTree.eval_restrict(referenced inComplexityTests/SubbotovskayaAndreev.lean)RandomizedDecisionTree.Computes.nonneg(referenced inComplexityTests/QueryComplexity/Randomized.lean)IsSensitiveBlock.nonempty(referenced inComplexityTests/CompareSwap.lean)Communicationfiles (which have active PR refactor(proofs): replace by decide constants with two_pos and Nat.one_lt_two (#899) #907 overlap).Validation
Validated locally in an isolated worktree rebased on
origin/main(45f7a884):scripts/check.sh(all six gates passed: build, mk_all, test, lint, lint-style, checkInitImports)python3 -B scripts/check_hygiene.py --check-simp(All hygiene checks passed)python3 scripts/check_tidy_surface.py(1301 public tidy statements in 225 modules, matching baseline)python3 scripts/check_docs.py --config-only(Documentation configuration is consistent)Refs #899 (Item 9).