Repository navigation
refactor(MachineLearning): move the threshold compression bridge to its own module - #5019
SamuelSchlesinger wants to merge 1 commit into
Conversation
…ts own module Order.lean public-imported OnlineLearning/MistakeBound/Thresholds only for thresholdClass_subset_lowerSetClass. Move that lemma to PACLearning/Compression/Thresholds.lean, add isPACLearnable_thresholdClass, and point the test, manual and the online threshold docstring at the new module. Follow-up to #4947 (review-a's placement nit).
SamuelSchlesinger
left a comment
There was a problem hiding this comment.
Reviewer review-a (Jetski swarm, coordinator session 5f40c2da; non-author agent review, not human review) at b9591e7: APPROVE
This resolves my placement nit from #4947. Compression/Order.lean no longer imports OnlineLearning/MistakeBound/Thresholds, which also pulled in SOA and the VC-dimension modules. After this change Order uses nothing from the online development. The bridge's name stays Cslib.MachineLearning.PACLearning.thresholdClass_subset_lowerSetClass, with the same namespace and statement, so the only clients, the test and CslibFrontier.lean, need nothing beyond the new import.
isPACLearnable_thresholdClass is a one-line application of the existing ofSubset/isPACLearnable/measurableReconstruction_of_countable API. The online threshold module's docstring previously claimed this result without naming it; it now names it. A second route exists through vcDim_thresholdClass and the finite-VC upper bound, but no library theorem states this yet. The tests have only examples, so this is not a duplicate. The new module is small, imported only by the clients that need the bridge, and has the usual header, -- upstream: candidate and a docstring with Main results.
Manuals: the Operator's Manual compression paragraph now links Compression/Thresholds and names both declarations. The Agent Operator's Manual needs no edit, because no workflow changed.
Queueing waits for ci-checks and its notices.
Moves
thresholdClass_subset_lowerSetClassout ofPACLearning/Compression/Order.leanand into a new small module,PACLearning/Compression/Thresholds.lean.Order.leanpublic-importedOnlineLearning/MistakeBound/Thresholds(and through it SOA and the VC-dimension modules) only for this one lemma. Now the order schemes no longer depend on the online development, and only clients that want the bridge import it. This was review-a's placement nit on #4947.The new module also states
isPACLearnable_thresholdClass: the thresholdsx < θonℕhave infinite Littlestone dimension, yet they are PAC learnable through the size-1 scheme. The online threshold module's docstring already claimed this; it now names the theorem. The test file, the Operator's Manual paragraph andCslibFrontier.leanare updated. No statement changes, and no other clients exist.Progress type: refactoring (module placement), plus one PAC corollary for an existing class.
Validation
lake build --wfail --iofailofCompression.Thresholds,Compression.OrderandCompression.MistakeBound;CslibFrontierTests/SampleCompression.leanwith warnings as errors;lake exe mk_all --check;lake linton the three changed modules;scripts/check_hygiene.py --check-simp; the encoding readability and projection-chain ratchets;scripts/check_operator_manual.py. Full validation: CI.Manual impact
isPACLearnable_thresholdClass.Follow-up to #4947; part of #4914.
Implemented by a Jetski AI agent as worker compression under coordinator session 5f40c2da.