Comparator certificate
Shallow Learning Tends to Ridgelet Transform ·
Latest verification result
Lean default kernel accepts the solution / Your solution is okay!
- Date
- 2026-09-27
- Commit
817f3a4(branchmain), with thecomparator/files of this certificate- Theorems checked
- 116 (all of
comparator/config.json) - Permitted axioms
propext,Quot.sound,Classical.choice- Toolchain
- Lean
v4.32.0, Mathlibv4.32.0, lean4exportv4.32.0, fake-landrun (macOS)
Last three lines of the output of ./script/comparator.sh:
Running Lean default kernel on solution. Lean default kernel accepts the solution Your solution is okay!
What Comparator certifies
Comparator takes a challenge
(theorem statements with the proofs replaced by sorry) and a solution
(the same statements with proofs), exports both environments with
lean4export and checks, for every theorem
listed in the configuration, that:
- Statement equality. The theorem's type in the solution is identical to its type in the challenge, and every constant occurring in the statement is identical in both environments (definitions cannot be silently changed to make the theorem easier).
- Permitted axioms. The proof depends on no axiom outside the permitted list
(
propext,Quot.sound,Classical.choice); in particular nosorryAxand no project-specific axiom. - Kernel replay. Lean's default kernel re-checks the exported solution independently
of the elaborator, so the certificate does not rely on tactics or on
lake buildalone.
Everything in the import closure of the challenge is the trusted vocabulary of the certificate.
comparator/Challenge.lean imports only the definition modules of the library
(LeanTends2Ridgelet.Setting.*). The statements are the paper's theorems in their Lean form,
that is, with the corrections and generalizations described in the
README.
Configuration
comparator/config.json lists the theorems of LeanTends2Ridgelet.Challenge
(challenge module Challenge, solution module Solution; both are Lake libraries
with srcDir = "comparator") and the three permitted axioms. Each challenge statement is copied
verbatim (binders, implicitness, instance arguments, hypothesis order, universe levels) from the library
theorem; every section reproduces the open lines and the variable/include
block of the source module so that both files elaborate to identical kernel terms, and both files set
autoImplicit false.
Two statements are reformulated rather than copied verbatim: the library statements of
bounds_of_isMinimizer and moments_of_isMinimizer mention a proof term of the
theorem module Structure/GibbsMinimizer (memLp_condMeanAmp_of_isMinimizer, the fact
MemLp (condMeanAmp ρ) 2 (hiddenMarginal ρ)); in thm_m1_bounds and
thm_m1_moments this fact is an explicit hypothesis, which is definitionally the same statement
by proof irrelevance.
Not included (only sorry-free library theorems are certified): thm:m1prime (c)
(gradientFlow_convergence, Łojasiewicz argument), the Gaussian log-Sobolev inequality (Gross) used by
lem:lsi/cor:uniform-lsi (satisfiesLSIParam_proximalGibbs) and hence
cor:mfld-unconditional and thm:mfld-wellposed (thm:mfld-convergence is
certified in its conditional form, with a uniform LSI as hypothesis), lem:minimizer (5),
cor:joint-schedule-improved (i)(ii), auxiliary lemmas such as lem:operators (2)–(5),
and the parts of the paper that are not formalized (Section 9, the homogeneous geometry and general spheres of Section 11, propagation of chaos).
Import closure of the challenge: the 17 modules LeanTends2Ridgelet.Setting.*, whose closure
also contains Basic/Operators, ToMathlib/{Pinsker, SignedMeasureIntegral, HalfspaceVC},
ToFoML/{PseudoDimension, SauerShelahCovering}, ToOperatorRidgelet/SpectralPower
and, from the dependencies, FoML.Defs, FoML.Entropy.Dudley and
OperatorRidgelet.ToMathlib.* (general-purpose material needed by the definitions).
Mapping: paper label → challenge theorem → library declaration
| § | Paper label | LeanTends2Ridgelet.Challenge. | Library theorem (LeanTends2Ridgelet.) | Module |
|---|---|---|---|---|
| §2 | lem:operators (1) | lem_operators_norm_synthesis_le | norm_synthesis_le | Setting/Operators |
| §2 | lem:moment | lem_moment | integral_fst_sq_le_of_klDiv_ne_top | Basic/Moment |
| §2 | lem:gibbs-variational | lem_gibbs_variational | gibbs_variational | Basic/GibbsVariational |
| §2 | lem:minimizer (2), existence | lem_minimizer_existence | exists_freeEnergy_minimizer | Basic/Existence |
| §2 | lem:minimizer (3) | lem_minimizer_gibbs | eq_gibbs_of_isMinimizer | Basic/Minimizer |
| §2 | lem:minimizer (4) | lem_minimizer_strong_convexity | freeEnergy_sub_eq | Basic/Minimizer |
| §2 | lem:minimizer (2), uniqueness | lem_minimizer_unique | freeEnergy_minimizer_unique | Basic/Minimizer |
| §3 | thm:m1 (a) | thm_m1_hidden_marginal | hiddenMarginal_eq_of_isMinimizer | Structure/GibbsMinimizer |
| §3 | thm:m1 (b) | thm_m1_conditional_mean | condMeanAmp_eq_of_isMinimizer | Structure/GibbsMinimizer |
| §3 | thm:m1 (b), coefficient measure | thm_m1_coefficient | coeffMeasure_eq_of_isMinimizer | Structure/GibbsMinimizer |
| §3 | thm:m1 (c) | thm_m1_krr | krr_of_isMinimizer | Structure/GibbsMinimizer |
| §3 | thm:m1 (d), bounds (reformulated) | thm_m1_bounds | bounds_of_isMinimizer | Structure/GibbsMinimizer |
| §3 | thm:m1 (d), moments (reformulated) | thm_m1_moments | moments_of_isMinimizer | Structure/GibbsMinimizer |
| §3 | thm:m1prime (a) | thm_m1prime_amplitude | stationary_amplitude | Structure/GradientFlow |
| §3 | thm:m1prime (a′) | thm_m1prime_hidden | stationary_hidden | Structure/GradientFlow |
| §3 | thm:m1prime (b), residual | thm_m1prime_krr | stationary_residual_eq | Structure/GradientFlow |
| §3 | thm:m1prime (b), loss | thm_m1prime_loss | stationary_loss | Structure/GradientFlow |
| §3 | prop:no-regularization (3) | prop_no_regularization_lambda_rate | IsFixedFeatureFlow.norm_sub_ridgeSolution_le | Structure/NoRegularization |
| §3 | prop:no-regularization (1) | prop_no_regularization_endpoint | IsFixedFeatureFlow.tendsto_endpoint | Structure/NoRegularization |
| §3 | prop:no-regularization (2) | prop_no_regularization_nullspace | endpoint_sub_pseudoInverse | Structure/NoRegularization |
| §3 | cor:necessity-amplitude | cor_necessity_amplitude | necessity_amplitude | Structure/NoRegularization |
| §5 | lem:uniform-deviation | lem_uniform_deviation | uniformDev_tail_bound | SampleThreshold/UniformDeviation |
| §5 | cor:m3-threshold | cor_m3_threshold | klDiv_le_of_sampleThreshold_le | SampleThreshold/Main |
| §5 | thm:m3 | thm_m3 | main_bound | SampleThreshold/Main |
| §5 | cor:m3-convergence | cor_m3_convergence | convergence_bound | SampleThreshold/Main |
| §5 | thm:m3-double-prime | thm_m3_double_prime | m3_double_prime | SampleThreshold/Linearization |
| §5 | cor:m3-convergence-prime | cor_m3_convergence_prime | m3_convergence_prime | SampleThreshold/Linearization |
| §5 | lem:tanh-complexity (b) | lem_tanh_complexity_rademacher | tanh_featureRademacher_le | SampleThreshold/Complexity |
| §5 | lem:tanh-complexity (a) | lem_tanh_complexity_pdim | tanhFeature_pdimLE | Setting/SampleThreshold |
| §6 | thm:m4-energy (a) | thm_m4_energy_comparison | energy_comparison_of_isMinimizer | RegularizationLimit/Energy |
| §6 | thm:m4-energy (d) | thm_m4_energy_pythagoras | pythagoras_of_isMinimizer | RegularizationLimit/Energy |
| §6 | thm:m4-strong, L² form | thm_m4_strong_l2 | tendsto_norm_meanAmpLp_sub_canonicalRidgelet | RegularizationLimit/Convergence |
| §6 | thm:m4-strong, TV form | thm_m4_strong_tv | tendsto_massNorm_coeffMeasure_sub | RegularizationLimit/Convergence |
| §6 | thm:m4-weak | thm_m4_weak | coeffMeasure_tendsto_weak | RegularizationLimit/Convergence |
| §6 | cor:m4-little-o | cor_m4_little_o | little_o | RegularizationLimit/Convergence |
| §6 | thm:order-of-limits (1)–(2) | thm_order_of_limits_two_stages | order_of_limits_two_stages | RegularizationLimit/OrderOfLimits |
| §6 | thm:order-of-limits (3) / cor:order-of-limits-static | thm_order_of_limits_three_stages | order_of_limits_three_stages_eps | RegularizationLimit/OrderOfLimitsStage3 |
| §6 | prop:tv-reduction | prop_tv_reduction | sInf_zeroTempEnergy_eq_iInf_tvEnergy | RegularizationLimit/TVReduction |
| §4 | lem:entropy-sandwich | lem_entropy_sandwich | entropy_sandwich | Dynamics/EntropySandwich |
| §4 | thm:mfld-convergence | thm_mfld_convergence | freeEnergy_sub_le_exp_mul_of_isMFLDFlow | Dynamics/Convergence |
| §4 | thm:static-chaos | thm_static_chaos | static_chaos | Dynamics/StaticChaos |
| §4 | cor:static-chaos-test-function | cor_static_chaos_test_function | integral_abs_avg_sub_le_of_isMinimizer_constant | Dynamics/StaticChaos |
| §4 | thm:static-chaos-order | thm_static_chaos_order | eventually_integral_abs_avg_sub_le_of_isErgodic | Dynamics/StaticChaos |
| §10 | cor:rate-sinf | cor_rate_sinf | rates_of_supNormBound | Rates/Main |
| §10 | cor:rate-high-temperature | cor_rate_high_temperature | rates_highTemp | Rates/Main |
| §10 | thm:m4-rate (general (SC_a)) | thm_m4_rate | rate_coefficient_pow | Rates/SourcePower |
| §10 | thm:joint-schedule (i) | thm_joint_schedule_sinf | joint_schedule_sinf | Rates/JointSchedule |
| §10 | thm:joint-schedule (ii) | thm_joint_schedule_high_temperature | joint_schedule_highTemp | Rates/JointSchedule |
How to reproduce
git clone https://github.com/shosonoda/lean-tends2ridgelet.git cd lean-tends2ridgelet lake exe cache get && lake build # once: Comparator and lean4export (for this project's Lean version) in ../comparator-tools/ mkdir -p ../comparator-tools && cd ../comparator-tools git clone https://github.com/leanprover/comparator.git && (cd comparator && lake build comparator) git clone --branch v4.32.0 https://github.com/leanprover/lean4export.git lean4export-v4.32.0 && (cd lean4export-v4.32.0 && lake build) cd - ./script/comparator.sh # about a minute; ends with "Your solution is okay!"
The script builds Challenge and Solution, exports them and runs the checker on
comparator/config.json. On Linux it uses landrun for sandboxing when available and
Comparator's fake-landrun shim otherwise (always on macOS). The tool locations can be overridden
with COMPARATOR_TOOLS, COMPARATOR_BIN, COMPARATOR_LEAN4EXPORT and
COMPARATOR_LANDRUN.