{"assumptions": ["The state space is countable, carries a measurable space, and every singleton is measurable.", "\\(\\mu\\) is a nonnegative measure and \\(K\\) is a measurable kernel; neither is assumed finite or normalized.", "For every pair \\(x,y\\), \\(\\mu(\\{x\\})K(x,\\{y\\})=\\mu(\\{y\\})K(y,\\{x\\})\\) in the extended nonnegative reals."], "binding_sha256": "ac978a2c81f53d2c0ce45bb253fdafd93de190bb9ff64e1eab954ea9e29249b8", "boundary": "The Lean target covers the flux identity. The explanatory non-implications are assessed in the natural-language track, not certified by that Lean target.", "context": "open MeasureTheory ProbabilityTheory\nopen scoped ENNReal\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Probability.KernelReversibility.isReversible_of_singleton_balance", "dependencies": {"astis": [], "mathlib": ["lintegral_countable", "ENNReal.tsum_mul_right", "ENNReal.tsum_comm", "tsum_congr"]}, "difficulty": "foundation", "difficulty_reason": "Coordinate two nonnegative countable expansions, justify their exchange and audit infinite/null masses; Lean also reconstructs that argument.", "domain": "sampling", "family": "atomic-detailed-balance", "id": "sogb-001", "imports": ["Mathlib.Probability.Kernel.Invariance", "Mathlib.MeasureTheory.Integral.Lebesgue.Countable"], "lean_explanation": "The binders in square brackets supply the measurable and countable structures. The hypothesis h is pairwise flux balance. The proof expands countable lintegrals, rewrites kernel masses as sums, then uses ENNReal.tsum_comm and h. The final proposition is Mathlib's kernel reversibility, not a mixing theorem.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport Mathlib.Probability.Kernel.Invariance\nimport Mathlib.MeasureTheory.Integral.Lebesgue.Countable\n\nopen MeasureTheory ProbabilityTheory\nopen scoped ENNReal\n\nexample {α : Type*} [MeasurableSpace α]\n    [Countable α] [MeasurableSingletonClass α] (κ : Kernel α α) (μ : Measure α)\n    (h : ∀ x y, μ {x} * κ x {y} = μ {y} * κ y {x}) :\n    Kernel.IsReversible κ μ := by\n  intro A B _ _\n  have hm (ν : Measure α) (s : Set α) : ν s = ∑' y : s, ν {(y : α)} := by\n    simpa using (lintegral_countable (μ := ν) (fun _ => 1) (Set.to_countable s))\n  rw [lintegral_countable _ (Set.to_countable A),\n    lintegral_countable _ (Set.to_countable B)]\n  conv_lhs => enter [1, x]; rw [hm (κ x) B, ← ENNReal.tsum_mul_right]\n  conv_rhs => enter [1, y]; rw [hm (κ y) A, ← ENNReal.tsum_mul_right]\n  rw [ENNReal.tsum_comm]\n  apply tsum_congr\n  intro y\n  apply tsum_congr\n  intro x\n  simpa only [mul_comm] using h (x : α) (y : α)\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport Mathlib.Probability.Kernel.Invariance\nimport Mathlib.MeasureTheory.Integral.Lebesgue.Countable\n\nopen MeasureTheory ProbabilityTheory\nopen scoped ENNReal\n\nexample {α : Type*} [MeasurableSpace α]\n    [Countable α] [MeasurableSingletonClass α] (κ : Kernel α α) (μ : Measure α)\n    (h : ∀ x y, μ {x} * κ x {y} = μ {y} * κ y {x}) :\n    Kernel.IsReversible κ μ := by\n  -- Replace this comment with your proof.\n", "library_domains": ["mcmc", "discrete-sampling"], "question": "Prove that for all measurable sets A,B, \\(\\int_A K(x,B)\\,d\\mu(x)=\\int_B K(y,A)\\,d\\mu(y)\\). Explain why infinite total mass and zero-mass states cause no cancellation problem. Does this imply convergence to a probability law?", "rubric": [{"criterion": "States the countability and measurable-singleton hypotheses and uses nonnegative extended-valued sums.", "points": 1}, {"criterion": "Expands both the outer restricted integral and the inner kernel mass.", "points": 1}, {"criterion": "Uses balance termwise and justifies sum exchange without dividing by masses or subtracting infinities.", "points": 1}, {"criterion": "Separates reversibility from normalization, convergence and computational cost.", "points": 1}], "skills": ["proof", "assumption-audit", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Probability/KernelReversibility.lean", "source_line": 19, "source_note": "Original exercise over the existing Samplinglib declaration; not a quotation of a paper theorem.", "source_sha256_lf": "439e00b3aea2e674925eecde68ce43d62a7b9b168762f07d414c1feb51e8408a", "split": "public-dev", "steps": ["On a countable measurable-singleton space, expand each restricted integral and each kernel mass into singleton masses. The left side becomes \\[\\sum_{x\\in A}\\sum_{y\\in B}K(x,\\{y\\})\\mu(\\{x\\}).\\] These sums take values in \\([0,\\infty]\\).", "Apply the assumed balance identity to each summand. Nonnegativity permits exchanging the two sums even when the result is infinite: \\[\\sum_{x\\in A}\\sum_{y\\in B}\\mu(\\{y\\})K(y,\\{x\\})=\\sum_{y\\in B}K(y,A)\\mu(\\{y\\}).\\]", "Recognize the last expression as the right restricted integral. No division by a singleton mass, subtraction of infinities, or signed Fubini argument occurred. A zero atom needs no special conditional version for this flux identity.", "Reversibility alone proves neither normalization, irreducibility, convergence, nor a mixing or query-cost bound. Those require separate assumptions and arguments."], "title": "From atomic balance to reversibility", "track_levels": {"lean": "L3", "natural-language": "L3"}}
{"assumptions": ["\\(E\\) is a complete real inner-product space, \\(f:E\\to\\mathbb R\\), and \\(z\\) is an attained global minimizer.", "The real parameters \\(\\alpha,\\beta,h\\) satisfy \\(h\\ge0\\) and \\(\\beta h\\le1\\). For all \\(x,y\\), the quadratic upper model holds: \\[f(y)\\le f(x)+\\langle\\nabla f(x),y-x\\rangle+\\tfrac\\beta2\\|y-x\\|^2.\\]", "For every \\(x\\), \\(2\\alpha(f(x)-f(z))\\le\\|\\nabla f(x)\\|^2\\). Here \\(\\nabla f\\) is the representing vector of the derivative where \\(f\\) is Fréchet differentiable, and zero otherwise. The upper-model and PL inequalities are supplied assumptions; global differentiability is not inferred from the notation."], "binding_sha256": "f5d34b22cd89382ed252b2d1ed63a8b0763a005dbe5940fd24174b14710d19e8", "boundary": "This exercises the supplied upper-model/PL formulation. It does not derive those hypotheses from smoothness or infer differentiability from a totalized gradient. The broader natural-language discussion is not an extra Lean theorem.", "context": "open Set\nopen scoped RealInnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.Analysis\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentPL.gradient_descent_pl_value_bound", "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentBasic.gradient_step_descent_of_quadratic_upper_bound"], "mathlib": ["le_geom", "Function.iterate_succ_apply'", "mul_le_mul_of_nonneg_left"]}, "difficulty": "intermediate", "difficulty_reason": "Derive an actual-step recurrence and handle both signs before iterating; proof length is not the difficulty measure.", "domain": "optimisation", "family": "pl-gradient-iteration", "id": "sogb-002", "imports": ["AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentBasic", "Mathlib.Analysis.SpecificLimits.Basic"], "lean_explanation": "IsMinOn f univ z supplies nonnegative gaps. Function.iterate describes actual gradient iterates. The proof calls the existing gradient-step bound, combines it with hpl using nlinarith, and splits on the sign of q before invoking le_geom. Completeness is retained from the existing Lean API; it is not asserted to be a sharp mathematical hypothesis.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentBasic\nimport Mathlib.Analysis.SpecificLimits.Basic\n\nopen Set\nopen scoped RealInnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.Analysis\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]\n\nexample {f : E → ℝ} {α β h : ℝ} {z : E}\n    (hz : IsMinOn f univ z) (hh : 0 ≤ h) (hstep : β * h ≤ 1)\n    (hu : ∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2)\n    (hpl : ∀ x, 2 * α * (f x - f z) ≤ ‖gradient f x‖ ^ 2)\n    (x₀ : E) (N : ℕ) :\n    f ((fun x => x - h • gradient f x)^[N] x₀) - f z ≤\n      (1 - α * h) ^ N * (f x₀ - f z) := by\n  let T : E → E := fun x => x - h • gradient f x\n  let q : ℝ := 1 - α * h\n  have hnonneg (x : E) : 0 ≤ f x - f z := sub_nonneg.mpr (hz (mem_univ x))\n  have hrec (x : E) : f (T x) - f z ≤ q * (f x - f z) := by\n    have hd := GradientDescentBasic.gradient_step_descent_of_quadratic_upper_bound hh hstep hu x\n    have hp := mul_le_mul_of_nonneg_left (hpl x) (show 0 ≤ h / 2 by positivity)\n    dsimp [T, q]\n    nlinarith\n  by_cases hq : 0 ≤ q\n  · have hr := le_geom (u := fun n => f (T^[n] x₀) - f z) hq N (by\n      intro k _\n      rw [Function.iterate_succ_apply']\n      exact hrec _)\n    exact hr\n  · have hzero (x : E) : f x - f z = 0 := by\n      have hc : q * (f x - f z) ≥ 0 := (hnonneg (T x)).trans (hrec x)\n      have hneg : q < 0 := lt_of_not_ge hq\n      have hx := hnonneg x\n      nlinarith\n    change f (T^[N] x₀) - f z ≤ q ^ N * (f x₀ - f z)\n    rw [hzero, hzero, mul_zero]\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentBasic\nimport Mathlib.Analysis.SpecificLimits.Basic\n\nopen Set\nopen scoped RealInnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.Analysis\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]\n\nexample {f : E → ℝ} {α β h : ℝ} {z : E}\n    (hz : IsMinOn f univ z) (hh : 0 ≤ h) (hstep : β * h ≤ 1)\n    (hu : ∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2)\n    (hpl : ∀ x, 2 * α * (f x - f z) ≤ ‖gradient f x‖ ^ 2)\n    (x₀ : E) (N : ℕ) :\n    f ((fun x => x - h • gradient f x)^[N] x₀) - f z ≤\n      (1 - α * h) ^ N * (f x₀ - f z) := by\n  -- Replace this comment with your proof.\n", "library_domains": ["optimisation"], "question": "For the actual iterates \\(x_{n+1}=x_n-h\\nabla f(x_n)\\), prove \\(f(x_N)-f(z)\\le(1-\\alpha h)^N(f(x_0)-f(z))\\). Do not add convexity or assume \\(1-\\alpha h\\ge0\\). Explain separately what happens when this factor is negative, and when the bound describes genuine geometric decay.", "rubric": [{"criterion": "Derives the descent estimate from the actual update and the supplied quadratic model.", "points": 1}, {"criterion": "Uses nonnegative h/2 to combine PL with descent and obtains a nonnegative gap recurrence.", "points": 1}, {"criterion": "Proves the iteration bound for q≥0 and handles q<0 by showing every gap vanishes.", "points": 1}, {"criterion": "Does not add convexity or a hidden sign premise; distinguishes a bound from strict geometric decay.", "points": 1}], "skills": ["calculation", "proof", "assumption-audit"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Analysis/GradientDescentPL.lean", "source_line": 24, "source_note": "Original exercise over Samplinglib's PL theorem. Its module cites Chewi, Lectures on Optimization, arXiv:2605.07006v1, Definition 2.5 and Theorem 3.6; the exercise explicitly retains the Lean upper-model formulation.", "source_sha256_lf": "382c8a5ba9dae70074114a205eb03c44826cb03c9b20c0f64931ced25fd9bea2", "split": "public-dev", "steps": ["Substitute the actual gradient step into the quadratic model. Using \\(h\\ge0\\) and \\(\\beta h\\le1\\) yields \\[f(x-h\\nabla f(x))\\le f(x)-\\tfrac h2\\|\\nabla f(x)\\|^2.\\]", "Multiply the PL bound by h/2≥0. With \\(g(x)=f(x)-f(z)\\ge0\\) and \\(q=1-\\alpha h\\), obtain \\(0\\le g(x-h\\nabla f(x))\\le qg(x)\\).", "If q≥0, multiplication preserves order. Induction along the actual iterates gives \\(g(x_N)\\le q^N g(x_0)\\), including N=0.", "If q<0, the same one-step inequality holds for every x and forces g(x)=0: otherwise qg(x)<0 contradicts nonnegativity of the next gap. Hence every gap is zero and the displayed bound still holds. Nontrivial geometric decay requires \\(0\\le q<1\\), rather than merely the existence of a real power q^N."], "title": "PL descent: the sign of the contraction factor", "track_levels": {"lean": "L3", "natural-language": "L3"}}
{"assumptions": ["\\(E\\) is a real normed vector space; \\(V:E\\to\\mathbb R\\); \\(x_0\\) is an attained global minimizer; \\(k\\) is real.", "Use the following strong-convexity convention (also used by Mathlib): on all of \\(E\\), for \\(a,b\\ge0\\) with \\(a+b=1\\), \\[V(ax+by)\\le aV(x)+bV(y)-\\tfrac k2 ab\\|x-y\\|^2.\\]", "No differentiability or finite-dimensionality assumption is made."], "binding_sha256": "b65dd9a70ee7e52100bc85f865904dc278535225ecc2eaa01929897f888543c2", "boundary": "This is a normed-vector-space statement, not a Riemannian or geodesic-convexity theorem. The Lean target proves the k/4 envelope only; neither the sharper bound nor Gibbs normalization is supplied.", "context": "open Set\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Geometry.StrongConvexity.centered_quadratic_lower_bound_of_strongConvexOn_minimizer", "dependencies": {"astis": [], "mathlib": ["StrongConvexOn", "isMinOn_univ_iff", "norm_sub_rev"]}, "difficulty": "foundation", "difficulty_reason": "One midpoint mechanism plus scalar rearrangement; the natural-language view additionally distinguishes the envelope from normalization.", "domain": "geometry", "family": "strong-convex-midpoint-envelope", "id": "sogb-003", "imports": ["AutoSamplingTheory.TechnicalLemmas.Geometry.LogConcavity", "Mathlib.Analysis.Convex.Strong"], "lean_explanation": "StrongConvexOn contains a convex-domain component and a two-point inequality; hV.2 selects the latter. IsMinOn on univ is expanded to compare the minimizer with every point. The midpoint coefficients are checked by norm_num, the squared distance is rewritten symmetrically, and nlinarith performs the final scalar rearrangement.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Geometry.LogConcavity\nimport Mathlib.Analysis.Convex.Strong\n\nopen Set\n\nexample\n    {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]\n    {V : E → ℝ} {k : ℝ} (hV : StrongConvexOn (Set.univ : Set E) k V)\n    (x₀ : E) (hx₀ : IsMinOn V (Set.univ : Set E) x₀) :\n    ∀ x : E, V x₀ + (k / 4) * ‖x - x₀‖ ^ 2 ≤ V x := by\n  intro x\n  have hx₀_min : ∀ y : E, V x₀ ≤ V y := isMinOn_univ_iff.mp hx₀\n  have hmid_min : V x₀ ≤ V ((1 / 2 : ℝ) • x₀ + (1 / 2 : ℝ) • x) := hx₀_min _\n  have hstrong :=\n    hV.2 (by simp : x₀ ∈ (Set.univ : Set E)) (by simp : x ∈ (Set.univ : Set E))\n      (by norm_num : 0 ≤ (1 / 2 : ℝ)) (by norm_num : 0 ≤ (1 / 2 : ℝ))\n      (by norm_num : (1 / 2 : ℝ) + (1 / 2 : ℝ) = 1)\n  have hstrong' :\n      V ((1 / 2 : ℝ) • x₀ + (1 / 2 : ℝ) • x) ≤\n        (1 / 2 : ℝ) * V x₀ + (1 / 2 : ℝ) * V x - (k / 8) * ‖x - x₀‖ ^ 2 := by\n    rw [norm_sub_rev x₀ x] at hstrong\n    convert hstrong using 1\n    · simp [smul_eq_mul]\n      ring_nf\n  have hle := hmid_min.trans hstrong'\n  nlinarith\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Geometry.LogConcavity\nimport Mathlib.Analysis.Convex.Strong\n\nopen Set\n\nexample\n    {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E]\n    {V : E → ℝ} {k : ℝ} (hV : StrongConvexOn (Set.univ : Set E) k V)\n    (x₀ : E) (hx₀ : IsMinOn V (Set.univ : Set E) x₀) :\n    ∀ x : E, V x₀ + (k / 4) * ‖x - x₀‖ ^ 2 ≤ V x := by\n  -- Replace this comment with your proof.\n", "library_domains": ["log-concave-sampling", "optimisation"], "question": "Use only the midpoint instance and global minimality to prove \\(V(x)\\ge V(x_0)+\\tfrac k4\\|x-x_0\\|^2\\) for every x. Track the constant. Does this proof establish the sharper k/2 envelope, or finiteness of a Gibbs normalizer?", "rubric": [{"criterion": "States the convention and obtains the midpoint correction k/8 exactly.", "points": 1}, {"criterion": "Uses the exposed global minimizer at the midpoint.", "points": 1}, {"criterion": "Rearranges to k/4 without silently upgrading it to k/2 or assuming differentiability.", "points": 1}, {"criterion": "Separates the quadratic envelope from Gibbs integrability and normalization.", "points": 1}], "skills": ["calculation", "assumption-audit", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Geometry/StrongConvexity.lean", "source_line": 57, "source_note": "Original exercise over the existing Samplinglib midpoint lemma. It is not presented as a verbatim textbook statement.", "source_sha256_lf": "4ff7d1a85259002e0a3f947ea509935eb9866bf3741daa361733ed041968f1f1", "split": "public-dev", "steps": ["At \\(m=(x_0+x)/2\\), strong convexity gives \\[V(m)\\le\\tfrac12V(x_0)+\\tfrac12V(x)-\\tfrac k8\\|x-x_0\\|^2.\\] The factor \\(k/8\\) comes from \\((k/2)(1/2)(1/2)\\).", "Global minimality gives \\(V(x_0)\\le V(m)\\). Combine the two inequalities and multiply by 2 to obtain \\(V(x_0)+\\tfrac k4\\|x-x_0\\|^2\\le V(x)\\). No derivative or limit was used.", "This midpoint calculation proves the k/4 envelope, not the sharper k/2 constant. Obtaining a sharper result needs another argument; it must not be credited to this calculation.", "The envelope alone is not a normalization theorem. One sufficient route assumes k>0, a finite-dimensional Euclidean space with Lebesgue reference measure and measurable V, then compares exp(−V) with an integrable Gaussian and separately checks positivity of the normalizer. These are conditions for that route, not necessary conditions for every Gibbs normalization: on ℝ, V(x)=|x| is convex with k=0 and exp(−|x|) has integral 2."], "title": "A quadratic envelope from one midpoint", "track_levels": {"lean": "L2", "natural-language": "L2"}}
{"assumptions": ["Let E be a finite-dimensional real Euclidean space with its Borel sigma-algebra. Let μ,ν be probability measures with finite second moments.", "A coupling γ has marginals μ,ν. Define W₂(μ,ν) as the infimum of the square root of ∫‖x−y‖² dγ over such couplings. Do not assume an infimizing coupling is attained."], "binding_sha256": "2274ba27f6d700779d832ff90a2b26d881f2bf5f23c3dfc78689f556020559cf", "boundary": "A supporting formal symmetry theorem is not a verified Lean translation of every sentence of this QA. This question neither proves an optimal coupling exists nor derives the triangle inequality.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinSymmetry.wassersteinDistance_comm", "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinSymmetry.isCoupling_map_swapPair", "AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinSymmetry.lintegral_quadraticCost_map_swapPair"], "mathlib": ["Measure.map_map", "lintegral_map"]}, "difficulty": "intermediate", "difficulty_reason": "Transport both marginals, preserve cost, and pass from near-optimal plans to an infimum without assuming attainment.", "domain": "transport", "family": "coupling-swap-near-optimality", "id": "sogb-004", "imports": [], "lean_enabled": false, "lean_explanation": "Formal support exists for swapping marginals, preserving cost and comparing near-optimal values. No single aligned Lean task for the entire finite-second-moment explanation is admitted in this batch.", "lean_reference": "", "lean_task": "", "library_domains": ["statistical-optimal-transport"], "question": "Prove symmetry of W₂ by swapping coordinates of near-optimal couplings. Which measurability and marginal identities are used, and where does the finite-cost hypothesis prevent an invalid subtraction of infinities?", "rubric": [{"criterion": "Checks swap measurability and both pushforward marginal identities.", "points": 1}, {"criterion": "Proves nonnegative quadratic-cost preservation.", "points": 1}, {"criterion": "Supplies finite product-coupling cost and near-optimal selection rather than assuming attainment.", "points": 1}, {"criterion": "Passes ε to zero in both directions without subtracting infinities.", "points": 1}], "skills": ["proof", "assumption-audit"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Measure/WassersteinSymmetry.lean", "source_line": 93, "source_note": "Original exercise over the existing project-owned coupling-swap route; not copied textbook text.", "source_sha256_lf": "91b6540103d3d9dca557bae308266fb84ea922ce1e2fbc0a4b90a79a0b473ae4", "split": "public-dev", "steps": ["The coordinate swap S(x,y)=(y,x) is continuous and hence Borel measurable. For γ′=S#γ, the identities π₁∘S=π₂ and π₂∘S=π₁ give marginals ν,μ by composition of pushforwards.", "Nonnegative change of variables and symmetry of the norm give \\[\\int\\|x-y\\|^2\\,d(S_\\#\\gamma)=\\int\\|y-x\\|^2\\,d\\gamma=\\int\\|x-y\\|^2\\,d\\gamma.\\] No signed Fubini theorem is required.", "The product coupling has finite quadratic cost since ‖x−y‖²≤2‖x‖²+2‖y‖². Thus the infimum is finite and, for each ε>0, an admissible coupling can be selected with square-root cost less than W₂(μ,ν)+ε. This is near-optimal selection, not an optimal-plan existence theorem.", "Swapping this plan gives W₂(ν,μ)≤W₂(μ,ν)+ε. Let ε decrease to zero, then interchange μ and ν to obtain equality. Finiteness justifies the real-valued ε argument; there was no operation ∞−∞. The library also treats an extended-valued generalization, which is not silently identified with this question."], "title": "Wasserstein symmetry without an optimal plan", "track_levels": {"natural-language": "L3"}}
{"assumptions": ["E,H are real Hilbert spaces. F:E→H is Fréchet differentiable at w, with bounded linear derivative D(w). Fix r∈H and V(w)=2⟨r,F(w)⟩.", "Assume ‖w‖=1 and ‖D(w)‖≤M with M≥0. The tangent space of the unit sphere at w is {v:⟨w,v⟩=0}."], "binding_sha256": "ce37724e97b715e2330e57378f5795759da21f91c6f477b863d897b48fe93f74", "boundary": "Only the unit sphere with its induced metric is treated. No general Riemannian gradient theorem, retraction guarantee or optimization convergence result is asserted.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Geometry.QuadraticFeatureTangentGradient.quadratic_feature_potential_tangent_gradient", "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Geometry.QuadraticFeatureTangentGradient.quadratic_feature_potential_tangent_gradient"], "mathlib": ["ContinuousLinearMap.adjoint_inner_left", "ContinuousLinearMap.adjoint.norm_map", "norm_sub_sq_real"]}, "difficulty": "intermediate", "difficulty_reason": "Connect a derivative, an adjoint and an orthogonal projection, then diagnose the failure of the unit-normal convention.", "domain": "geometry", "family": "sphere-tangent-projection", "id": "sogb-005", "imports": [], "lean_enabled": false, "lean_explanation": "The existing bundled theorem proves a stronger regularity package. It is support, not a frozen equivalent task for this shorter question and its counterexample.", "lean_reference": "", "lean_task": "", "library_domains": ["riemannian-optimization"], "question": "Set g=2D(w)*r and G=g−⟨g,w⟩w. Prove tangency, the directional-derivative identity on tangent vectors and ‖G‖≤2M‖r‖. Explain precisely why the same formula need not project onto w-perpendicular when w is not a unit vector.", "rubric": [{"criterion": "Derives the ambient derivative using the chain rule and adjoint, with genuine differentiability.", "points": 1}, {"criterion": "Uses the unit-normal condition to prove tangency and the tangent directional identity.", "points": 1}, {"criterion": "Proves the norm bound by orthogonal projection and the adjoint operator norm.", "points": 1}, {"criterion": "Gives a valid nonunit counterexample and states the correction and manifold boundary.", "points": 1}], "skills": ["calculation", "proof", "assumption-audit", "counterexample"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Geometry/QuadraticFeatureTangentGradient.lean", "source_line": 41, "source_note": "Original exercise over the local quadratic-feature tangent-gradient theorem and elementary Hilbert-space algebra.", "source_sha256_lf": "3594fc8e7b381a90921b25f2e30ef8b87aa2851fbd2dd8320411a29d8b58e3f1", "split": "public-dev", "steps": ["The chain rule and the adjoint identity give DV(w)[v]=2⟨r,D(w)v⟩=⟨g,v⟩. This uses genuine differentiability, not an assertion about a default derivative value.", "Since ‖w‖²=1, \\[\\langle w,G\\rangle=\\langle w,g\\rangle-\\langle g,w\\rangle\\|w\\|^2=0.\\] For v perpendicular to w, ⟨G,v⟩=⟨g,v⟩=DV(w)[v], which identifies the sphere gradient by the induced metric.", "The Pythagorean calculation gives ‖G‖²=‖g‖²−⟨g,w⟩²≤‖g‖². Hence ‖G‖≤‖g‖≤2‖D(w)*‖‖r‖=2‖D(w)‖‖r‖≤2M‖r‖.", "Without normalization, ⟨w,G⟩=⟨g,w⟩(1−‖w‖²). For example, take E=ℝ, w=2 and g=2: G=−6 is not perpendicular to w. For a nonzero general normal, the projector instead divides the coefficient by ‖w‖². This is not a formula for an arbitrary manifold without its own tangent and metric data."], "title": "Why a sphere gradient is a projected ambient gradient", "track_levels": {"natural-language": "L3"}}
{"assumptions": ["μ is any probability measure on the finite Boolean cube with n+1 coordinates. K is its uniform random-site heat-bath kernel, with the project's fixed conditional versions at null fibers.", "At any start y with μ({y})>0, the exact singleton transition formula is the sum over coordinates of the retained-coordinate indicator times μ({x}) divided by the corresponding fiber mass, averaged by 1/(n+1). No such formula is assumed at an unsupported start."], "binding_sha256": "74f08b42811ce2c35e4669f9e631246262c6038119faa990aea98efb42431cb3", "boundary": "No mixing time, spectral independence, full-support theorem or hard-core ergodicity claim follows from this balance argument.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Probability.RandomScanHeatBath.randomScan_isReversible", "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Probability.RandomScanHeatBath.randomScan_apply_singleton"], "mathlib": []}, "difficulty": "intermediate", "difficulty_reason": "Separate two null-mass cases, apply a conditional formula only at supported starts, then distinguish balance from irreducibility.", "domain": "sampling", "family": "random-scan-null-atoms", "id": "sogb-006", "imports": [], "lean_enabled": false, "lean_explanation": "The null-start split follows the existing private balance proof, while the explanatory counterexample is not an aligned checked Lean task.", "lean_reference": "", "lean_task": "", "library_domains": ["discrete-sampling", "mcmc"], "question": "In the detailed-balance proof, handle a target-null atom x without applying the positive-start singleton formula at x. Why is zero mass alone insufficient for an arbitrary kernel? Give a reversible heat-bath example which is not irreducible.", "rubric": [{"criterion": "Separates the both-null and single-null cases without dividing by zero.", "points": 1}, {"criterion": "Uses the singleton formula at the positive-mass reverse start and proves fiber positivity.", "points": 1}, {"criterion": "Explains why an arbitrary kernel need not avoid a target-null atom.", "points": 1}, {"criterion": "Checks the 00/11 heat-bath counterexample and distinguishes reversibility from irreducibility.", "points": 1}], "skills": ["proof", "assumption-audit", "counterexample"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Probability/RandomScanHeatBathReversibility.lean", "source_line": 54, "source_note": "Original question based on the actual finite heat-bath implementation, retaining its null-fiber boundary.", "source_sha256_lf": "9e4e6b3d792884660e1b9da65f804e7e497e046f3986613731dd9289ad026ac8", "split": "public-dev", "steps": ["If μ({x})=μ({y})=0, both weighted transition masses vanish: finite Markov transition masses make multiplication by zero harmless.", "If μ({x})=0 but μ({y})>0, use the positive-start formula at y, not x. Each relevant fiber contains y, so its mass is at least μ({y})>0. Every summand for a jump from y to x contains μ({x})=0, hence K(y,{x})=0. Both fluxes are again zero.", "For an arbitrary kernel, a zero target atom does not imply K(y,{x})=0: that conclusion used the actual heat-bath transition law. Target-null starts may have nontrivial transition rules, but their outgoing flux is multiplied by zero.", "On the two-bit cube, let μ give mass 1/2 to each of 00 and 11 and zero to the other states. Updating a single coordinate from either supported state leaves it unchanged. The kernel is reversible for μ, but 00 and 11 cannot communicate. Thus balance supplies neither irreducibility nor convergence from every start."], "title": "Null atoms in a random-scan balance proof", "track_levels": {"natural-language": "L3"}}
{"assumptions": ["There are finitely many n adjacent hybrid pairs. At slot i the pair shares a probability law ρᵢ on histories, conditional Markov kernels Kᵢ,Lᵢ and a common downstream Markov kernel Sᵢ.", "A measurable integrable real εᵢ bounds |Kᵢ(x,A)−Lᵢ(x,A)| for ρᵢ-almost every x and every measurable event A. Let βᵢ=∫εᵢ dρᵢ. Total variation means the supremum of absolute event-probability differences, with no extra factor of two."], "binding_sha256": "a4e2d5d2fd1273d0cadc2054858c9597b4e090dd0fec5fda5ecdfd5c7d206b78", "boundary": "No recursive algorithm, stopping theorem, uncapped/capped comparison, expected oracle cost theorem or full paper result is claimed.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Probability.KernelHybridTelescope.abs_real_comp_commonSuffix_sub_le_integral_eventBound", "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Probability.KernelHybridTelescope.abs_real_comp_sub_le_integral_eventBound", "AutoSamplingTheory.TechnicalLemmas.Probability.KernelHybridTelescope.abs_sub_zero_le_sum_range_of_adjacent", "AutoSamplingTheory.TechnicalLemmas.Probability.KernelTotalVariation.abs_real_comp_sub_le"], "mathlib": []}, "difficulty": "advanced", "difficulty_reason": "Compose conditional error averaging, common-suffix contraction and finite telescoping under actual history laws; reject an invalid unbounded-cost transfer.", "domain": "sampling", "family": "adaptive-hybrid-cost-boundary", "id": "sogb-007", "imports": [], "lean_enabled": false, "lean_explanation": "Existing formal components support averaging and common-suffix contraction; this multi-component QA and its cost counterexample have no single admitted equivalent Lean view yet.", "lean_reference": "", "lean_task": "", "library_domains": ["samplewiki", "mcmc"], "question": "Derive an eventwise discrepancy bound Σᵢβᵢ between the first and last output laws. State why actual history laws and a fixed finite call range matter. Then refute the claim that vanishing TV distance alone transfers an unbounded expected query-cost bound.", "rubric": [{"criterion": "Justifies event measurability/integrability and error averaging under the actual history law.", "points": 1}, {"criterion": "Uses the same downstream kernel and finite adjacent telescoping with the stated TV convention.", "points": 1}, {"criterion": "Computes both TV=1/N and expected-cost gap=N in a valid probability example.", "points": 1}, {"criterion": "Keeps recursive stopping, cap comparison and actual-input cost as separate obligations.", "points": 1}], "skills": ["composition", "assumption-audit", "counterexample"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Probability/KernelHybridTelescope.lean", "source_line": 59, "source_note": "Original exercise based on local hybrid-kernel components. Their module cites arXiv:2609.38710v1 Lemma 6.3; this exercise is not a reproduction or completion of that paper statement.", "source_sha256_lf": "9f5a28c56daeafdfd141d4f66411ff10e0276b4b0ca8ff34e1e98a679097577b", "split": "public-dev", "steps": ["For each slot and fixed event A, Markov event probabilities are measurable and bounded by one, hence integrable under ρᵢ. Integrating the almost-everywhere conditional bound yields an averaged discrepancy at most βᵢ. The error function εᵢ is explicitly integrable; measurability of a supremum over all events was not assumed for free.", "A common downstream Markov kernel preserves this uniform event bound by total-variation data processing. The same suffix must be used for the two members of the adjacent pair; otherwise that contraction argument is not applicable.", "For a fixed final event A, telescope the n adjacent probability differences and use the triangle inequality: \\[|P_n(A)-P_0(A)|\\le\\sum_{i=0}^{n-1}\\beta_i.\\] Take the event supremum if desired. Each βᵢ uses its actual shared prefix-history law, not an unrelated ideal or proxy input law.", "For integers N≥2 on the nonnegative reals, take μ_N=δ₀, ν_N=(1−1/N)δ₀+(1/N)δ_{N²} and c(x)=x. Then TV(μ_N,ν_N)=1/N→0, but E_{ν_N}c−E_{μ_N}c=N. All these individual expectations are finite; their gap is unbounded. A uniform cost bound, uniform integrability/tail control, or a separate actual-input cost analysis is needed.", "A random recursion depth or stopping cap is not automatically this deterministic finite telescope. Its history construction, stopping/cap comparison, accumulated errors and actual-input expected cost remain separate obligations. This argument alone does not complete the Gaussian Cloud paper."], "title": "Adaptive hybrid error does not certify expected cost", "track_levels": {"natural-language": "L4"}}
{"assumptions": ["On ℝᵈ with d≥1 and Lebesgue reference measure, V is a finite real-valued Borel measurable convex function. Set ρ(x)=exp(−V(x))."], "binding_sha256": "ae0a2d0d8f65fbe39a5c2ed55cbe7b93bde710026ec00ed08132abeedefb2794", "boundary": "No Gibbs normalization or tail-integrability theorem is supplied by the log-concavity leaf.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Geometry.LogConcavity.logConcaveOn_exp_neg_of_convexOn", "dependencies": {"astis": [], "mathlib": []}, "difficulty": "foundation", "difficulty_reason": "Identify the positive shape, logarithm, reference measure and normalizing constant; no tail-integrability proof is requested.", "domain": "sampling", "family": "gibbs-shape-normalization", "id": "sogb-008", "imports": [], "lean_enabled": false, "lean_explanation": "The existing declaration supports the positive log-concavity claim only. This full definition/normalization QA has no aligned Lean view.", "lean_reference": "", "lean_task": "", "library_domains": ["log-concave-sampling"], "question": "Identify the log-concave shape and its logarithm. What additional numerical condition on Z=∫ρ(x)dx is required before ρ/Z defines a probability density? State which reference measure the word density refers to.", "rubric": [{"criterion": "Identifies ρ=exp(−V)>0 and log ρ=−V.", "points": 1}, {"criterion": "Relates concavity of log ρ to convexity of V.", "points": 1}, {"criterion": "States 0<Z<∞ and p=ρ/Z rather than treating shape as already normalized.", "points": 1}, {"criterion": "Names Lebesgue reference measure and keeps integrability separate from shape.", "points": 1}], "skills": ["definition", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Geometry/LogConcavity.lean", "source_line": 232, "source_note": "Original introductory exercise over the local positive log-concavity API; no textbook prose is reproduced.", "source_sha256_lf": "671a445ebc61dc54dd234b0d24158369bc5f5846ea896069f920f85fcd54bb9b", "split": "public-dev", "steps": ["The shape ρ is strictly positive and Borel measurable. Its logarithm is −V, a concave function by convexity of V, so this is a positive log-concave shape.", "The normalizing quantity is \\[Z=\\int_{\\mathbb R^d}e^{-V(x)}\\,dx.\\] A probability normalization requires 0<Z<∞, after which p(x)=ρ(x)/Z integrates to one against Lebesgue measure.", "Log-concavity of the shape is a pointwise convex-analysis property; the finite integral is a separate analytic condition. This question asks to identify that obligation, not to prove that it holds for every convex potential.", "For example V=0 has the log-concave shape ρ=1 but infinite Lebesgue integral on ℝᵈ. Thus the shape alone is not a normalized sampling target."], "title": "A log-concave shape is not yet a probability density", "track_levels": {"natural-language": "L1"}}
{"assumptions": ["π and ν are probability measures. K is a Markov transition kernel. C is the nonnegative random number of oracle calls in a specified run, under its actual input law."], "binding_sha256": "a01b6366bfff653a1e2d2d7304b4e284d28669bfebdcfb82e663f26765274315", "boundary": "No actual algorithm law, invariant distribution or query-cost result is constructed here.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Probability.KernelTotalVariation.abs_real_comp_sub_le", "dependencies": {"astis": [], "mathlib": []}, "difficulty": "foundation", "difficulty_reason": "Distinguish the objects and quantities in three common research guarantees without proving their implications.", "domain": "sampling", "family": "adaptive-hybrid-cost-boundary", "id": "sogb-009", "imports": [], "lean_enabled": false, "lean_explanation": "The cited formal component concerns event discrepancy under a common Markov kernel. It is support for one guarantee type, not an aligned proof of this terminology QA or an expected-cost theorem.", "lean_reference": "", "lean_task": "", "library_domains": ["samplewiki"], "question": "Explain separately the meanings of TV(ν,π)≤ε, πK=π and E[C]≤B. Which objects occur in each claim, and why should a theorem statement name the run/input law when discussing expected cost? No implication among the claims needs to be proved.", "rubric": [{"criterion": "Defines the event-supremum TV comparison and identifies both laws.", "points": 1}, {"criterion": "Explains πK=π as a one-step invariance identity.", "points": 1}, {"criterion": "Identifies the nonnegative cost variable and its governing run/input law.", "points": 1}, {"criterion": "Does not conflate output error, invariance and expected cost.", "points": 1}], "skills": ["definition", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Probability/KernelTotalVariation.lean", "source_line": 35, "source_note": "Original introductory classification exercise for source-grounded sampling research claims.", "source_sha256_lf": "7995000cf384916314bca2d844d2eb0e54ae9983951dfe2b42571b691124238e", "split": "public-dev", "steps": ["The first claim compares two probability laws: \\[\\operatorname{TV}(\\nu,\\pi)=\\sup_{A\\text{ measurable}}|\\nu(A)-\\pi(A)|\\le\\varepsilon.\\] Here the convention has no extra factor of two.", "The identity πK=π is invariance of the law π under one application of K. It is a statement about the kernel and its target law, not a bound on ν or a running time.", "The expectation E[C]≤B concerns an algorithmic cost random variable and the probability law governing the run. Different input laws or stopping/cap rules can change that expectation.", "These are different theorem outputs. A proof of one should not be relabelled as a proof of another; mixing, actual-input error and expected query cost require their own links."], "title": "What kind of guarantee does a sampling claim describe?", "track_levels": {"natural-language": "L1"}}
{"assumptions": ["f is differentiable on a real finite-dimensional Euclidean space and attains its global minimum f* at z. Let α>0. Use the convention 2α(f(x)−f*)≤‖∇f(x)‖² for all x."], "binding_sha256": "7e2364e8fcf6653f355ba88b88d71d81b69d2e3959e42df0e523a13352a1b94d", "boundary": "No convexity equivalence, error bound in distance, or convergence rate is asserted by this terminology question.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentPL.gradient_descent_pl_value_bound", "dependencies": {"astis": [], "mathlib": []}, "difficulty": "foundation", "difficulty_reason": "Read the PL inequality, objective gap and parameter normalization; do not derive an iteration bound.", "domain": "optimisation", "family": "pl-gradient-iteration", "id": "sogb-010", "imports": [], "lean_enabled": false, "lean_explanation": "The local iteration theorem uses a more general algebraic PL hypothesis and a totalized gradient. This introductory differentiable-function QA is not an exact aligned Lean task.", "lean_reference": "", "lean_task": "", "library_domains": ["optimisation"], "question": "What is the objective gap, what does the PL inequality compare, and is convexity part of this definition? Identify the roles of α and the gradient. Do not infer a gradient-descent rate without a step rule and a descent estimate.", "rubric": [{"criterion": "Identifies f(x)−f* and explains its nonnegativity.", "points": 1}, {"criterion": "States the gap versus squared-gradient comparison with the correct factor 2α.", "points": 1}, {"criterion": "Does not include convexity or a distance conclusion in the definition.", "points": 1}, {"criterion": "Separates the condition from an algorithmic convergence theorem.", "points": 1}], "skills": ["definition", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Analysis/GradientDescentPL.lean", "source_line": 24, "source_note": "Original definition-reading companion to the existing local PL iteration result.", "source_sha256_lf": "382c8a5ba9dae70074114a205eb03c44826cb03c9b20c0f64931ced25fd9bea2", "split": "public-dev", "steps": ["The objective gap is f(x)−f*, which is nonnegative by global minimality. The parameter α is a positive PL modulus in the stated factor-two convention.", "The inequality \\[2\\alpha(f(x)-f_*)\\le\\|\\nabla f(x)\\|^2\\] compares an objective-value gap with squared gradient norm. It is not a bound on distance to z.", "Convexity is not one of the stated PL hypotheses. Do not insert a convexity or strong-convexity premise just because these conditions often appear in nearby optimization theorems.", "An algorithmic rate additionally needs an actual update, a step restriction and a suitable decrease estimate. This question is about the condition itself, not that convergence proof."], "title": "Reading a PL inequality before using an algorithm", "track_levels": {"natural-language": "L1"}}
{"assumptions": ["S is the unit sphere in ℝᵈ with d≥2, equipped with its induced Euclidean metric. A real-valued function f is smooth on a neighborhood of S. Let w∈S."], "binding_sha256": "a5cda7d4b9f7caaf24bf4dbab8205dae1f0a82e2ebb6b9fdc92d81c748863408", "boundary": "No general manifold gradient API, retraction theorem, curvature comparison or optimization rate is claimed.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Geometry.QuadraticFeatureTangentGradient.quadratic_feature_potential_tangent_gradient", "dependencies": {"astis": [], "mathlib": []}, "difficulty": "foundation", "difficulty_reason": "Identify the tangent-vector domain and metric-dependent gradient characterization before carrying out a projection proof.", "domain": "geometry", "family": "sphere-tangent-projection", "id": "sogb-011", "imports": [], "lean_enabled": false, "lean_explanation": "The local theorem verifies this characterization for a specific feature potential. It is not a complete formalization of this general introductory definition QA.", "lean_reference": "", "lean_task": "", "library_domains": ["riemannian-optimization"], "question": "Identify the tangent space at w and the defining directional-derivative identity for the gradient of f restricted to S. In what sense does this differ from the ambient Euclidean gradient? Do not prove an optimization convergence theorem.", "rubric": [{"criterion": "States the tangent space as the orthogonal complement of the unit normal w.", "points": 1}, {"criterion": "Places G in the tangent space and quantifies the derivative identity over tangent directions.", "points": 1}, {"criterion": "Distinguishes ambient directions from induced-metric tangent directions.", "points": 1}, {"criterion": "Keeps the sphere/metric setting explicit without claiming arbitrary-manifold or convergence results.", "points": 1}], "skills": ["definition", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Geometry/QuadraticFeatureTangentGradient.lean", "source_line": 41, "source_note": "Original induced-sphere-metric definition exercise, supported by the existing feature-gradient instance.", "source_sha256_lf": "3594fc8e7b381a90921b25f2e30ef8b87aa2851fbd2dd8320411a29d8b58e3f1", "split": "public-dev", "steps": ["The tangent space is \\[T_wS=\\{v\\in\\mathbb R^d:\\langle w,v\\rangle=0\\}.\\] Its vectors are ambient vectors subject to an orthogonality condition.", "The sphere gradient is the tangent vector G satisfying ⟨G,v⟩=Df(w)[v] for every v∈T_wS, using the induced inner product.", "The ambient gradient represents derivatives in all ambient directions; it need not itself be tangent. Its orthogonal projection onto T_wS represents the same derivative on the allowed tangent directions.", "This is the induced-metric sphere setting. Other manifolds and metrics need their own tangent spaces and gradient characterizations, not an automatic reuse of an ambient formula."], "title": "Which space contains the sphere gradient?", "track_levels": {"natural-language": "L1"}}
{"assumptions": ["μ,ν are Borel probability measures on ℝᵈ. A candidate joint measure γ is defined on ℝᵈ×ℝᵈ. No transport cost function or independence assumption is imposed on a general coupling."], "binding_sha256": "d61f3a0414d8d767ef90fd31733e4fb71d9b47d0f6a62b5844c939a7ee915c7f", "boundary": "No existence of an optimal plan, uniqueness, or Wasserstein metric theorem is asserted.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Measure.Transport.isCoupling_prod", "dependencies": {"astis": [], "mathlib": []}, "difficulty": "foundation", "difficulty_reason": "Identify the two marginal constraints and distinguish a feasible coupling from an optimal one.", "domain": "transport", "family": "coupling-swap-near-optimality", "id": "sogb-012", "imports": [], "lean_enabled": false, "lean_explanation": "The local coupling definition and product-coupling theorem support the stated concepts. No equivalent Lean task for the entire explanation is admitted.", "lean_reference": "", "lean_task": "", "library_domains": ["statistical-optimal-transport"], "question": "State the two marginal identities that make γ a coupling of μ and ν. Is independence part of the definition? Identify a canonical feasible coupling and explain why feasibility alone does not mean optimality.", "rubric": [{"criterion": "States both marginal identities with the correct coordinate order.", "points": 1}, {"criterion": "Does not assume independence for every coupling.", "points": 1}, {"criterion": "Identifies the product measure as a feasible probability coupling.", "points": 1}, {"criterion": "Distinguishes feasibility from cost optimality.", "points": 1}], "skills": ["definition", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Measure/Transport.lean", "source_line": 92, "source_note": "Original coupling-definition exercise over the local transport foundation.", "source_sha256_lf": "d3eff4916a04ab9473ee86b839fa13b8447fa1c4d162874a4ceddbce4003e414", "split": "public-dev", "steps": ["For every Borel A,B, the marginal constraints are \\[\\gamma(A\\times\\mathbb R^d)=\\mu(A),\\qquad\\gamma(\\mathbb R^d\\times B)=\\nu(B).\\] Equivalently the coordinate pushforwards are μ and ν.", "A coupling specifies a joint law with these marginals; it need not be independent. Correlation is allowed as long as the marginal constraints remain satisfied.", "The independent product is a canonical feasible coupling: \\[(\\mu\\otimes\\nu)(A\\times B)=\\mu(A)\\nu(B).\\] Its marginals use the total masses equal to one.", "Optimality requires a specified cost and a comparison of its integral over feasible plans. No optimality follows from the marginal identities alone."], "title": "What information does a coupling contain?", "track_levels": {"natural-language": "L1"}}
{"assumptions": ["The state space is a Boolean cube with m≥1 sites and target probability μ. For each site i, Kᵢ is the fixed coordinate heat-bath kernel, including its specified version on target-null fibers."], "binding_sha256": "84145f82f459d1cb080b714a85ebad040ad8fd4d034c441b45d77e02c77830ca", "boundary": "No efficient conditional-sampling implementation, ergodicity, mixing time or sweep complexity is asserted.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Probability.RandomScanHeatBath.randomScan", "dependencies": {"astis": [], "mathlib": []}, "difficulty": "foundation", "difficulty_reason": "Read the time unit and update law of random scan without deriving balance, mixing or computational cost.", "domain": "sampling", "family": "random-scan-null-atoms", "id": "sogb-013", "imports": [], "lean_enabled": false, "lean_explanation": "The source defines the actual uniform random-site mixture, with m=n+1. The complete terminology and time-convention QA is not an aligned proof-completion task.", "lean_reference": "", "lean_task": "", "library_domains": ["discrete-sampling"], "question": "Describe one uniform random-scan step and its mixture kernel. How does that time unit differ from a sweep of all sites? Does the mixture-law description itself specify a mixing time or an oracle-query cost?", "rubric": [{"criterion": "Describes one uniformly chosen coordinate update with other coordinates retained.", "points": 1}, {"criterion": "States the 1/m mixture kernel and allows an unchanged state.", "points": 1}, {"criterion": "Distinguishes a single step from a scheduled sweep.", "points": 1}, {"criterion": "Does not infer a mixing or query-cost bound from the law definition.", "points": 1}], "skills": ["definition", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Probability/RandomScanHeatBath.lean", "source_line": 21, "source_note": "Original introductory reading of the local noncomputable random-scan transition law.", "source_sha256_lf": "1e13857e6f317ae22ccbb0f5a0c47b395d20ee950a3e8968489afefaff7db42d", "split": "public-dev", "steps": ["One step first chooses one site I uniformly among the m sites, then draws the new state with kernel K_I, retaining the other coordinates.", "The transition law is the state-independent mixture \\[K(x,A)=\\frac1m\\sum_{i=1}^{m}K_i(x,A).\\] A coordinate resampling may return its previous value, so an update need not change the state.", "A sweep applies coordinate updates across all sites according to a specified schedule; it is not this single random-site kernel step. Comparing bounds requires the same time convention.", "A noncomputable transition-law definition alone supplies neither an implemented conditional sampler, its query cost, nor a mixing-time estimate. Those guarantees require additional algorithmic and analytic results."], "title": "One random-site step is not one sweep", "track_levels": {"natural-language": "L1"}}
{"assumptions": ["P is a finite row-stochastic transition matrix: P(x,y)≥0 and Σ_y P(x,y)=1. π and ρ are probability row vectors. Use total variation when discussing convergence."], "binding_sha256": "8b10bef6bc3088ea8188089bb960aed747ddeded576261956464483947b6db38", "boundary": "No irreducibility, aperiodicity, mixing-rate theorem or general-state-space ergodic theorem is proved.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Probability.KernelReversibility.isReversible_of_singleton_balance", "dependencies": {"astis": [], "mathlib": []}, "difficulty": "foundation", "difficulty_reason": "Distinguish three standard finite-chain definitions and keep the Markov normalization explicit.", "domain": "sampling", "family": "atomic-detailed-balance", "id": "sogb-014", "imports": [], "lean_enabled": false, "lean_explanation": "The local atomic-balance result supports the reversibility notion. The finite-matrix definition comparison and identity-kernel example have no admitted aligned Lean view here.", "lean_reference": "", "lean_task": "", "library_domains": ["mcmc"], "question": "Write the identities defining invariance and detailed balance for π. State what convergence from ρ means in this setting. Which identity controls one step started exactly in π, and why is that not the definition of convergence from an arbitrary start?", "rubric": [{"criterion": "States πP=π with the correct one-step meaning.", "points": 1}, {"criterion": "States pairwise detailed balance and retains row-stochastic normalization.", "points": 1}, {"criterion": "Defines convergence from ρ as a limit of its time-t output laws in the given metric.", "points": 1}, {"criterion": "Does not substitute invariance or reversibility for an arbitrary-start convergence statement.", "points": 1}], "skills": ["definition", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Probability/KernelReversibility.lean", "source_line": 19, "source_note": "Original finite-chain terminology exercise with an elementary identity-matrix illustration.", "source_sha256_lf": "439e00b3aea2e674925eecde68ce43d62a7b9b168762f07d414c1feb51e8408a", "split": "public-dev", "steps": ["Invariance is πP=π, or Σ_x π(x)P(x,y)=π(y) for each y. Starting exactly in π therefore gives the same law after one step.", "Detailed balance is π(x)P(x,y)=π(y)P(y,x) for every x,y. Summing over x and using the row sum of P at y yields invariance; the stochastic normalization is part of that deduction.", "Convergence from ρ is \\[\\operatorname{TV}(\\rho P^t,\\pi)\\longrightarrow0\\quad(t\\to\\infty).\\] It concerns an entire sequence of laws from the specified start, not just the identity πP=π.", "For the identity matrix P, every π is invariant and reversible, but ρP^t=ρ for all t. If ρ≠π, convergence to π fails. Thus one-step invariance is not a definition of general-start convergence."], "title": "Invariant, reversible and convergent are different claims", "track_levels": {"natural-language": "L1"}}
{"assumptions": ["The spaces \\(\\alpha,\\beta\\) carry arbitrary measurable structures, with the product measurable structure on \\(\\alpha\\times\\beta\\).", "The measure \\(\\gamma\\) couples \\(\\mu\\) and \\(\\nu\\): its coordinate pushforwards satisfy \\(\\gamma.\\mathrm{fst}=\\mu\\) and \\(\\gamma.\\mathrm{snd}=\\nu\\).", "Only \\(\\mu\\) is assumed to be a probability measure. No finiteness or probability assumption on \\(\\gamma\\) or \\(\\nu\\) is supplied independently."], "binding_sha256": "0bf552e05112c84a48c1bb862da7870035eb715a9cd61d0a95474c6694d37a7f", "boundary": "The Lean target proves the joint probability interface under exactly the displayed marginal assumptions. Surrounding nonclaims about optimality, unbounded integrability and moments are not separate Lean results. No new production theorem or Registry leaf is introduced.", "context": "open MeasureTheory\nnamespace AutoSamplingTheory.TechnicalLemmas.Measure.Transport\ndef IsCoupling {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n    (γ : Measure (α × β)) (μ : Measure α) (ν : Measure β) : Prop :=\n  γ.fst = μ ∧ γ.snd = ν\nend AutoSamplingTheory.TechnicalLemmas.Measure.Transport\nopen AutoSamplingTheory.TechnicalLemmas.Measure.Transport\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Measure.Transport.isProbabilityMeasure_of_isCoupling_left", "decoder_definitions": ["Measures take values in the nonnegative extended reals. IsProbabilityMeasure η is a Prop-valued typeclass asserting that η assigns mass one to the whole underlying space.", "For a measure η on a product measurable space, η.fst and η.snd are its pushforwards under the first and second coordinate projections.", "IsCoupling γ μ ν is the conjunction γ.fst=μ and γ.snd=ν, as defined in the given Lean context."], "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Measure.Transport.IsCoupling"], "mathlib": ["Measure.fst_univ", "measure_univ", "IsProbabilityMeasure"]}, "difficulty": "foundation", "difficulty_reason": "Use the mass identity for a measurable coordinate pushforward and one prescribed probability marginal to recover the joint probability interface. This is one local measure-theoretic mechanism, not a code-length label.", "domain": "transport", "family": "coupling-swap-near-optimality", "id": "sogb-015", "imports": ["Mathlib.MeasureTheory.Measure.Prod"], "lean_explanation": "The given context reproduces the existing public IsCoupling definition exactly; it is not a new library lemma, and the target module is not imported. The constructor tactic reduces IsProbabilityMeasure γ to its total-mass field. Rewriting by the reverse of Measure.fst_univ turns joint mass into first-marginal mass, hγ.1 substitutes μ, and measure_univ uses the existing probability instance for μ. The second conjunct hγ.2 is not needed. This is a fixed-target reconstruction, not a claim of finite moments or a solved transport problem.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport Mathlib.MeasureTheory.Measure.Prod\n\nopen MeasureTheory\nnamespace AutoSamplingTheory.TechnicalLemmas.Measure.Transport\ndef IsCoupling {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n    (γ : Measure (α × β)) (μ : Measure α) (ν : Measure β) : Prop :=\n  γ.fst = μ ∧ γ.snd = ν\nend AutoSamplingTheory.TechnicalLemmas.Measure.Transport\nopen AutoSamplingTheory.TechnicalLemmas.Measure.Transport\n\nexample\n    {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n    {γ : Measure (α × β)} {μ : Measure α} {ν : Measure β}\n    [IsProbabilityMeasure μ] (hγ : IsCoupling γ μ ν) :\n    IsProbabilityMeasure γ := by\n  constructor\n  rw [← Measure.fst_univ, hγ.1, measure_univ]\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport Mathlib.MeasureTheory.Measure.Prod\n\nopen MeasureTheory\nnamespace AutoSamplingTheory.TechnicalLemmas.Measure.Transport\ndef IsCoupling {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n    (γ : Measure (α × β)) (μ : Measure α) (ν : Measure β) : Prop :=\n  γ.fst = μ ∧ γ.snd = ν\nend AutoSamplingTheory.TechnicalLemmas.Measure.Transport\nopen AutoSamplingTheory.TechnicalLemmas.Measure.Transport\n\nexample\n    {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n    {γ : Measure (α × β)} {μ : Measure α} {ν : Measure β}\n    [IsProbabilityMeasure μ] (hγ : IsCoupling γ μ ν) :\n    IsProbabilityMeasure γ := by\n  -- Replace this comment with your proof.\n", "library_domains": ["statistical-optimal-transport"], "question": "Prove that γ is a probability measure by calculating its total mass from the coupling identities. Identify which marginal identity this argument uses and explain whether ν needs an additional probability assumption. Do not assume the desired joint normalization at the outset.", "rubric": [{"criterion": "Reduces joint probability normalization to proving γ has total mass one, without assuming γ is already finite or a probability measure.", "points": 1}, {"criterion": "Uses the measurable first projection and its inverse image of the whole space to identify joint mass with first-marginal mass.", "points": 1}, {"criterion": "Uses γ.fst=μ and μ being a probability measure to obtain the exact mass one.", "points": 1}, {"criterion": "Identifies that the second-marginal identity is unused in this calculation and does not add a probability premise on ν.", "points": 1}], "skills": ["calculation", "proof", "assumption-audit"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Measure/Transport.lean", "source_line": 81, "source_note": "Original exercise over the local coupling-normalization lemma, a reusable probability-interface dependency for coupling and transport arguments. It is not a quotation or completion of a textbook transport theorem. The family was already public before this QA was authored.", "source_sha256_lf": "d3eff4916a04ab9473ee86b839fa13b8447fa1c4d162874a4ceddbce4003e414", "split": "public-dev", "steps": ["Let \\(\\pi_1:\\alpha\\times\\beta\\to\\alpha\\) be the first projection, which is measurable for the product measurable structure. The inverse image of the whole first space is the whole product space: \\[\\pi_1^{-1}(\\alpha)=\\alpha\\times\\beta.\\]", "By the definition of pushforward mass and the prescribed first marginal, \\[\\gamma(\\alpha\\times\\beta)=(\\gamma.\\mathrm{fst})(\\alpha)=\\mu(\\alpha)=1.\\] The last equality is exactly the probability assumption on μ.", "A measure of total mass one is a probability measure. Thus γ has the required probability interface; its finiteness is a consequence, not an extra premise used to obtain the mass identity.", "This deduction uses only the first marginal identity. The second marginal remains part of the coupling data but no separate probability assumption on ν is needed. This local mass result asserts no optimality, moment bound or integrability of arbitrary unbounded functions."], "title": "Recovering joint probability mass from one marginal", "track_levels": {"lean": "L2", "natural-language": "L2"}}
{"assumptions": ["\\(E\\) is a finite-dimensional real inner-product space with \\(\\dim E=n+1\\), where \\(n\\in\\mathbb N\\). Let \\(S=\\{x\\in E:\\|x\\|=1\\}\\) have its standard smooth sphere structure.", "\\(A:E\\to E\\) is a symmetric continuous linear map and \\(q(y)=\\langle y,Ay\\rangle\\). Fix \\(x\\in S\\), let \\(i:S\\hookrightarrow E\\) be the actual inclusion, and put \\(K=(\\mathbb R x)^\\perp\\).", "Tangent directions \\(w\\in T_xS\\) are paired through \\(D i_x w\\in K\\) using the ambient inner product. No default inner product on chart coordinates is identified with this induced pairing."], "binding_sha256": "69fee45c9a7a53e9d1a4ec5295d530811736ff3e8dec9fbd435f1293d9bc1cd7", "boundary": "The Lean conclusion is the displayed representation equivalence for each tangent vector. Stationarity/eigenvector equivalences, optimization rates and arbitrary-manifold or arbitrary-metric claims are separate results. The surrounding explanation is not an additional formal theorem.", "context": "noncomputable section\nopen Metric InnerProductSpace\nopen scoped Manifold InnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.Geometry\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]\n  [FiniteDimensional ℝ E]\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Geometry.SphereRayleigh.sphere_rayleigh_characterization", "decoder_definitions": ["E →L[ℝ] E is the space of real continuous linear endomorphisms. A.IsSymmetric means ⟨A u,v⟩=⟨u,A v⟩ for all u,v.", "sphere (0:E) 1 is the subtype of unit-norm ambient vectors. The orthogonal complement (ℝ ∙ x)ᗮ is an ambient-vector subtype; coercion forgets its membership proof.", "𝓡 n is the standard real smooth-manifold model for the n-dimensional unit sphere in an ambient space of dimension n+1. TangentSpace (𝓡 n) x is its tangent fiber.", "mvfderiv is Mathlib's manifold differential, totalized to zero outside differentiability. The coercion from the sphere into E is the literal inclusion, and the displayed inner product is the ambient real inner product.", "Fact P is a typeclass packaging a proof of proposition P; Module.finrank ℝ E is the finite real dimension."], "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Geometry.SphereGradient.sphere_gradient_characterization"], "mathlib": ["LinearMap.IsSymmetric.hasStrictFDerivAt_reApplyInnerSelf", "hasGradientAt_iff_hasFDerivAt", "Submodule.starProjection_orthogonal_val", "Submodule.starProjection_unit_singleton", "Subtype.ext"]}, "difficulty": "intermediate", "difficulty_reason": "Combine a genuine derivative of a symmetric quadratic, the actual sphere-inclusion differential and an explicit orthogonal projection, then establish both directions of the tangent-vector characterization. The level reflects these mechanisms, not tactic length.", "domain": "geometry", "family": "sphere-tangent-projection", "id": "sogb-016", "imports": ["AutoSamplingTheory.TechnicalLemmas.Geometry.SphereGradient", "Mathlib.Analysis.InnerProductSpace.Rayleigh"], "lean_explanation": "The task retains the exact ambient variables and finrank Fact from the source section. The proof first constructs HasGradientAt, using the symmetric quadratic derivative, rather than interpreting a totalized value as differentiability. It then computes the orthogonal projection using unit sphere membership and specializes the imported sphere-gradient characterization. The final subtype/coercion steps identify ambient tangent vectors in both directions. No proof of the target theorem is supplied in the context, and its module is not imported.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Geometry.SphereGradient\nimport Mathlib.Analysis.InnerProductSpace.Rayleigh\n\nnoncomputable section\nopen Metric InnerProductSpace\nopen scoped Manifold InnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.Geometry\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]\n  [FiniteDimensional ℝ E]\n\nexample\n    (n : ℕ) [Fact (Module.finrank ℝ E = n + 1)]\n    (A : E →L[ℝ] E) (hA : A.IsSymmetric) (x : sphere (0 : E) 1) :\n    ∀ z : (ℝ ∙ (x : E))ᗮ,\n      ((∀ w : TangentSpace (𝓡 n) x,\n        mvfderiv (𝓡 n) (fun y : sphere (0 : E) 1 => ⟪(y : E), A (y : E)⟫_ℝ) x w =\n          ⟪mvfderiv (𝓡 n) ((↑) : sphere (0 : E) 1 → E) x w, (z : E)⟫_ℝ) ↔\n        (z : E) = (2 : ℝ) • (A (x : E) - ⟪(x : E), A (x : E)⟫_ℝ • (x : E))) := by\n  have hx : ‖(x : E)‖ = 1 := mem_sphere_zero_iff_norm.mp x.property\n  have hg : HasGradientAt (fun y : E => ⟪y, A y⟫_ℝ) ((2 : ℝ) • A (x : E)) (x : E) := by\n    apply hasGradientAt_iff_hasFDerivAt.mpr\n    have hraw := (hA.hasStrictFDerivAt_reApplyInnerSelf (x : E)).hasFDerivAt\n    have hfun : (fun y : E => ⟪y, A y⟫_ℝ) = A.reApplyInnerSelf := by\n      funext y\n      simp [ContinuousLinearMap.reApplyInnerSelf_apply, real_inner_comm]\n    have hlin : toDual ℝ E ((2 : ℝ) • A (x : E)) =\n        (2 : ℕ) • innerSL ℝ (A (x : E)) := by\n      ext v\n      simp [toDual_apply_apply, two_smul]\n    rw [hfun, hlin]\n    exact hraw\n  let K := (ℝ ∙ (x : E))ᗮ\n  have hproj (u : E) : (K.orthogonalProjectionOnto u : E) =\n      u - ⟪(x : E), u⟫_ℝ • (x : E) := by\n    change (ℝ ∙ (x : E))ᗮ.starProjection u = _\n    rw [Submodule.starProjection_orthogonal_val,\n      Submodule.starProjection_unit_singleton ℝ hx]\n  have hp : (K.orthogonalProjectionOnto ((2 : ℝ) • A (x : E)) : E) =\n      (2 : ℝ) • (A (x : E) - ⟪(x : E), A (x : E)⟫_ℝ • (x : E)) := by\n    rw [hproj]\n    simp [inner_smul_right, smul_sub, smul_smul]\n  intro z\n  rw [SphereGradient.sphere_gradient_characterization n x hg z]\n  constructor\n  · intro hz\n    exact (congrArg (fun v : K => (v : E)) hz).trans hp\n  · intro hz\n    apply Subtype.ext\n    exact hz.trans hp.symm\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Geometry.SphereGradient\nimport Mathlib.Analysis.InnerProductSpace.Rayleigh\n\nnoncomputable section\nopen Metric InnerProductSpace\nopen scoped Manifold InnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.Geometry\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]\n  [FiniteDimensional ℝ E]\n\nexample\n    (n : ℕ) [Fact (Module.finrank ℝ E = n + 1)]\n    (A : E →L[ℝ] E) (hA : A.IsSymmetric) (x : sphere (0 : E) 1) :\n    ∀ z : (ℝ ∙ (x : E))ᗮ,\n      ((∀ w : TangentSpace (𝓡 n) x,\n        mvfderiv (𝓡 n) (fun y : sphere (0 : E) 1 => ⟪(y : E), A (y : E)⟫_ℝ) x w =\n          ⟪mvfderiv (𝓡 n) ((↑) : sphere (0 : E) 1 → E) x w, (z : E)⟫_ℝ) ↔\n        (z : E) = (2 : ℝ) • (A (x : E) - ⟪(x : E), A (x : E)⟫_ℝ • (x : E))) := by\n  -- Replace this comment with your proof.\n", "library_domains": ["riemannian-optimization"], "question": "For every z in K, prove that D(q restricted to S)_x(w)=⟨D i_x(w),z⟩ for all w in T_xS if and only if z=2(Ax−⟨x,Ax⟩x). Justify the ambient derivative, the unit-normal projection and the uniqueness direction. Use genuine differentiability, not the totalized derivative's fallback value.", "rubric": [{"criterion": "Uses symmetry and genuine differentiability to obtain ambient gradient 2Ax with the correct factor two.", "points": 1}, {"criterion": "Uses the actual sphere inclusion differential and its range K, retaining the induced pairing rather than assuming a chart metric.", "points": 1}, {"criterion": "Uses unit norm to derive the projection and the exact Rayleigh coefficient ⟨x,Ax⟩.", "points": 1}, {"criterion": "Proves both representation and uniqueness using tangent directions and the range of the inclusion derivative.", "points": 1}], "skills": ["calculation", "proof", "assumption-audit"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Geometry/SphereRayleigh.lean", "source_line": 25, "source_note": "Original QA over the existing sphere-Rayleigh API. Its module places the result at Boumal Example 3.62, and the subsequent sphere_rayleigh_stationary_iff consumes it. This exercise checks the local characterization, not a whole textbook chapter or convergence theorem.", "source_sha256_lf": "295739bce48b7068d100acd61acf38353b6230c106386f03696fa9c1034b22cd", "split": "public-dev", "steps": ["Symmetry gives the genuine ambient derivative \\[Dq_x(v)=\\langle v,Ax\\rangle+\\langle x,Av\\rangle=2\\langle v,Ax\\rangle.\\] Hence the real gradient is \\(g=2Ax\\). The bounded linear map and quadratic operations supply differentiability; the equality is not an inference from a totalized zero derivative.", "For the actual inclusion, \\(\\operatorname{range}(D i_x)=K\\). The chain rule therefore gives \\[D(q|_S)_x(w)=\\langle D i_x(w),g\\rangle.\\] This uses the inclusion-induced pairing, not an assumed isometry from an arbitrary chart metric.", "Because \\(\\|x\\|=1\\), orthogonal projection onto K satisfies \\[P_Ku=u-\\langle x,u\\rangle x.\\] Substituting g yields the tangent vector \\[G=P_K(2Ax)=2(Ax-\\langle x,Ax\\rangle x).\\]", "Every \\(D i_x(w)\\) lies in K, so orthogonal projection preserves its pairing with g. Thus G represents the restricted differential. Conversely, if a tangent vector z has the same pairing for every w, surjectivity onto K makes \\(z-G\\) orthogonal to every vector in K. Taking its inner product with itself gives \\(z=G\\), proving the equivalence."], "title": "A quadratic gradient through the actual sphere differential", "track_levels": {"lean": "L3", "natural-language": "L3"}}
{"assumptions": ["\\(A,B\\) are arbitrary measurable spaces, \\(\\mu\\) is a probability measure on A, and \\(K,L:A\\leadsto B\\) are Markov kernels.", "\\(\\varepsilon:A\\to\\mathbb R\\) is integrable under μ. On one common μ-full-measure set of inputs x, every measurable event s satisfies \\[|K(x,s)-L(x,s)|\\le\\varepsilon(x).\\] Event masses in this inequality are finite real probabilities."], "binding_sha256": "37f2cef51769619910cd718b9d66acd2d57f6a5a5956a6940a4d4dc2ba60eeba", "boundary": "Only the displayed one-step averaged event discrepancy is formally concluded. Common-suffix contraction, finite telescoping, actual recursive-history construction, stopping/cap comparisons and expected query costs remain distinct results. It does not align the full earlier hybrid/cost QA or complete a paper theorem.", "context": "open MeasureTheory ProbabilityTheory Set Finset\nopen scoped ProbabilityTheory BigOperators\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Probability.KernelHybridTelescope.abs_real_comp_sub_le_integral_eventBound", "decoder_definitions": ["Kernel A B assigns a measure on B measurably to each input in A. IsMarkovKernel means every such output measure has total mass one.", "For any measure η, η.real t means (η t).toReal in Mathlib. ENNReal.toReal is totalized, with infinity sent to zero; probability assumptions give finite event masses in the displayed statement.", "K ∘ₘ μ is the measure obtained by drawing an input with law μ and then using kernel K.", "Integrable ε μ is real Bochner integrability, including almost-everywhere strong measurability and finite integral of the norm.", "The binder ∀ᵐ x ∂μ, ∀ s, MeasurableSet s → ... asserts one common input null-set exception outside which the bound holds for every measurable event; it is not written with separate exceptional sets chosen after each event."], "dependencies": {"astis": [], "mathlib": ["ProbabilityTheory.Kernel.measurable_coe", "MeasureTheory.measureReal_le_one", "MeasureTheory.Measure.bind_apply", "MeasureTheory.integral_toReal", "MeasureTheory.integral_sub", "MeasureTheory.abs_integral_le_integral_abs", "MeasureTheory.integral_mono_ae"]}, "difficulty": "intermediate", "difficulty_reason": "Justify measurability and integrability of kernel event probabilities, convert finite extended-measure masses to real expectations, then apply the integral triangle inequality and almost-everywhere domination. No recursion or unbounded-cost transfer is folded into this local theorem.", "domain": "sampling", "family": "adaptive-hybrid-cost-boundary", "id": "sogb-017", "imports": ["AutoSamplingTheory.TechnicalLemmas.Probability.KernelTotalVariation"], "lean_explanation": "The reference builds integrability separately for each fixed event from kernel measurability, Markov mass bounds and the probability input law. The bind_apply and integral_toReal steps expose the finite-mass conversion. It then uses integral_sub, abs_integral_le_integral_abs and integral_mono_ae, specializing the common almost-everywhere bound to the chosen event. The complete proof is reconstructed from the existing component; its target module is not imported.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Probability.KernelTotalVariation\n\nopen MeasureTheory ProbabilityTheory Set Finset\nopen scoped ProbabilityTheory BigOperators\n\nexample\n    {A B : Type*} [MeasurableSpace A] [MeasurableSpace B]\n    (μ : Measure A) [IsProbabilityMeasure μ]\n    (K L : Kernel A B) [IsMarkovKernel K] [IsMarkovKernel L]\n    (ε : A → ℝ) (hε : Integrable ε μ)\n    (hbound : ∀ᵐ x ∂μ, ∀ s, MeasurableSet s →\n      |(K x).real s - (L x).real s| ≤ ε x) :\n    ∀ t, MeasurableSet t →\n      |(K ∘ₘ μ).real t - (L ∘ₘ μ).real t| ≤ ∫ x, ε x ∂μ := by\n  intro t ht\n  have hint (M : Kernel A B) [IsMarkovKernel M] :\n      Integrable (fun x => (M x).real t) μ := by\n    apply (integrable_const (1 : ℝ)).mono'\n      (M.measurable_coe ht).ennreal_toReal.aestronglyMeasurable\n    exact Filter.Eventually.of_forall fun x => by\n      rw [Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg]\n      exact (measureReal_le_one : (M x).real t ≤ 1)\n  have happly (M : Kernel A B) [IsMarkovKernel M] :\n      (M ∘ₘ μ).real t = ∫ x, (M x).real t ∂μ := by\n    change (Measure.bind μ M t).toReal = ∫ x, (M x t).toReal ∂μ\n    rw [Measure.bind_apply ht M.aemeasurable]\n    exact (integral_toReal (M.measurable_coe ht).aemeasurable\n      (Filter.Eventually.of_forall fun x => measure_lt_top (M x) t)).symm\n  rw [happly K, happly L, ← integral_sub (hint K) (hint L)]\n  exact abs_integral_le_integral_abs.trans <|\n    integral_mono_ae ((hint K).sub (hint L)).abs hε <|\n      hbound.mono fun x hx => hx t ht\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Probability.KernelTotalVariation\n\nopen MeasureTheory ProbabilityTheory Set Finset\nopen scoped ProbabilityTheory BigOperators\n\nexample\n    {A B : Type*} [MeasurableSpace A] [MeasurableSpace B]\n    (μ : Measure A) [IsProbabilityMeasure μ]\n    (K L : Kernel A B) [IsMarkovKernel K] [IsMarkovKernel L]\n    (ε : A → ℝ) (hε : Integrable ε μ)\n    (hbound : ∀ᵐ x ∂μ, ∀ s, MeasurableSet s →\n      |(K x).real s - (L x).real s| ≤ ε x) :\n    ∀ t, MeasurableSet t →\n      |(K ∘ₘ μ).real t - (L ∘ₘ μ).real t| ≤ ∫ x, ε x ∂μ := by\n  -- Replace this comment with your proof.\n", "library_domains": ["samplewiki", "mcmc"], "question": "For every measurable event t, prove |(K composed with μ)(t)−(L composed with μ)(t)|≤∫ε dμ. Give the measurability, finiteness and integrability justifications required to subtract the two real integrals and use almost-everywhere domination. Do not assume a measurable total-variation supremum or a query-cost conclusion.", "rubric": [{"criterion": "Establishes event measurability and boundedness by one, hence integrability under the probability input law.", "points": 1}, {"criterion": "Uses the bind law with finite event masses to justify the real expectation identities.", "points": 1}, {"criterion": "Justifies integral subtraction and the triangle inequality using integrability, not a formal subtraction of infinities.", "points": 1}, {"criterion": "Applies the common almost-everywhere event bound and integrability of ε without assuming a measurable TV supremum or an expected-cost theorem.", "points": 1}], "skills": ["proof", "assumption-audit", "calculation"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Probability/KernelHybridTelescope.lean", "source_line": 28, "source_note": "Original QA over the local mean conditional-kernel error component. Its module cites arXiv:2609.38710v1 Lemma 6.3 and the common-suffix theorem consumes this component, but this QA does not reproduce the full paper lemma or its algorithmic adapters. No paper text is copied.", "source_sha256_lf": "9f5a28c56daeafdfd141d4f66411ff10e0276b4b0ca8ff34e1e98a679097577b", "split": "public-dev", "steps": ["Fix a measurable event t. Kernel measurability makes \\(k_t(x)=K(x,t)\\) and \\(l_t(x)=L(x,t)\\) measurable real functions. Markov normalization gives \\(0\\le k_t,l_t\\le1\\); since μ is a probability measure, both are integrable.", "The bind/composition law gives \\[(K\\circ_m\\mu)(t)=\\int k_t\\,d\\mu,\\qquad(L\\circ_m\\mu)(t)=\\int l_t\\,d\\mu.\\] In Lean the underlying masses are extended nonnegative reals. Their finiteness, supplied by the probability-kernel assumptions, justifies conversion to real integrals; the totalized toReal API is not used as if infinity were finite.", "The two integrable event functions can be subtracted inside the integral. The integral triangle inequality gives \\[\\left|\\int k_t\\,d\\mu-\\int l_t\\,d\\mu\\right|\\le\\int|k_t-l_t|\\,d\\mu.\\] The absolute difference is integrable as well.", "The common almost-everywhere hypothesis supplies \\(|k_t-l_t|\\le\\varepsilon\\) almost everywhere for this event. Monotonicity for integrable real functions yields \\[|(K\\circ_m\\mu)(t)-(L\\circ_m\\mu)(t)|\\le\\int\\varepsilon\\,d\\mu.\\] No measurable supremum over all events is needed, and no new global nonnegativity premise on ε is inserted."], "title": "Averaging a conditional event-error bound", "track_levels": {"lean": "L3", "natural-language": "L3"}}
{"assumptions": ["\\(E\\) is a nonempty normed additive commutative group, with its Borel measurable structure, second-countable topology and a standard Borel measurable space. No vector-space or finite-dimensional structure is assumed.", "\\(\\mu_1,\\mu_2,\\mu_3\\) are probability measures on E. Couplings have exactly the two prescribed coordinate marginals. Define \\[C(\\gamma)=\\left(\\int\\|x-y\\|^2\\,d\\gamma(x,y)\\right)^{1/2}.\\] Both costs and \\(W_2\\) take values in \\([0,\\infty]\\); \\(W_2\\) is the square root of the infimum of squared coupling costs.", "The external thresholds \\(r_{12},r_{23}\\in[0,\\infty]\\) satisfy \\[W_2(\\mu_1,\\mu_2)<r_{12},\\qquad W_2(\\mu_2,\\mu_3)<r_{23}.\\] Neither optimal-plan existence nor finite individual second moments is given."], "binding_sha256": "237b6a126e4672415b58ea7f7621fe69ef5d541dac41fb1b42336f828922a1e2", "boundary": "The Lean target concludes only the strict-threshold endpoint bound. It does not separately formalize this exercise's Bernoulli shortcut audit, assert optimal-plan existence, or construct a general metric-space instance. The non-strict triangle consumer exists in WassersteinTriangleExact, but is not imported as a shortcut or counted as another QA. The listed disintegration, pushforward and Minkowski Mathlib facts are used in ancestor proofs; the target join calls their ASTIS interfaces.", "context": "noncomputable section\nopen MeasureTheory\nopen scoped ENNReal\nopen AutoSamplingTheory.TechnicalLemmas.Measure\nopen AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore\nopen AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleMarginals\nvariable {E : Type*} [NormedAddCommGroup E]\n  [MeasurableSpace E] [BorelSpace E] [SecondCountableTopology E]\n  [StandardBorelSpace E] [Nonempty E]\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangle.wassersteinDistance_lt_add_of_lt", "decoder_definitions": ["Measure E is a nonnegative extended-real measure on E. IsProbabilityMeasure μ means its total mass is one. StandardBorelSpace is the standard Borel measurable-space condition; Nonempty provides an inhabitant but adds no geometric dimension restriction.", "WassersteinSpace.wassersteinDistance μ ν is the real-power square root of the infimum of ∫‖x−y‖² dγ over couplings γ. A coupling means the coordinate pushforwards equal μ and ν. Empty infima and nonintegrable costs are interpreted in the nonnegative extended reals.", "ℝ≥0∞ includes infinity. All comparisons and addition displayed in the statement use this extended order and arithmetic. NormedAddCommGroup supplies a norm and additive commutative group, not a scalar/vector-space structure. BorelSpace identifies the measurable structure with the Borel σ-algebra of that topology."], "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinSpace.exists_isCoupling_sqrt_lintegral_lt_of_wassersteinDistance_lt", "AutoSamplingTheory.TechnicalLemmas.Measure.TransportGluing.exists_gluing_of_isCoupling", "AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleMarginals.isCoupling_map_pair13_of_pair12_pair23", "AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleMarginals.l2Seminorm_edge12_eq_pairCost", "AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleMarginals.l2Seminorm_edge23_eq_pairCost", "AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleMarginals.l2Seminorm_edge13_eq_pairCost", "AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinSpace.wassersteinDistance_le_sqrt_lintegral_of_isCoupling", "AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore.l2_edge_triangle"], "mathlib": ["ENNReal.add_lt_add", "MeasureTheory.Measure.disintegrate", "MeasureTheory.lintegral_map", "ENNReal.lintegral_Lp_add_le"]}, "difficulty": "advanced", "difficulty_reason": "Join near-optimal plan selection, probability interfaces, conditional-kernel disintegration, pair-marginal transport identities and extended L² Minkowski. Diagnose an independent-third-coordinate shortcut with a concrete counterexample. The formal task reconstructs the actual multi-module join; the counterexample explanation is separate from its conclusion.", "domain": "transport", "family": "coupling-gluing-triangle", "id": "sogb-018", "imports": ["AutoSamplingTheory.TechnicalLemmas.Measure.TransportGluing", "AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleMarginals", "Mathlib.Tactic"], "lean_explanation": "The target is the actual strict-threshold composition theorem, not a new wrapper. Its module is not imported: only the original ancestor modules are allowed. Two near-optimal-selection calls produce concrete plans. exists_gluing_of_isCoupling produces one triple law and the two exact marginal identities. The reference explicitly adapts projection encodings, reconstructs the endpoint coupling and rewrites three L² seminorm/cost bridges before calling l2_edge_triangle and ENNReal.add_lt_add. Its conclusion certifies the strict endpoint bound; the explanatory Bernoulli counterexample is not a separate Lean conclusion. The exact-threshold closure is a later consumer, not silently supplied here.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Measure.TransportGluing\nimport AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleMarginals\nimport Mathlib.Tactic\n\nnoncomputable section\nopen MeasureTheory\nopen scoped ENNReal\nopen AutoSamplingTheory.TechnicalLemmas.Measure\nopen AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore\nopen AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleMarginals\nvariable {E : Type*} [NormedAddCommGroup E]\n  [MeasurableSpace E] [BorelSpace E] [SecondCountableTopology E]\n  [StandardBorelSpace E] [Nonempty E]\n\nexample\n    (μ₁ μ₂ μ₃ : Measure E)\n    [IsProbabilityMeasure μ₁] [IsProbabilityMeasure μ₂] [IsProbabilityMeasure μ₃]\n    {r₁₂ r₂₃ : ℝ≥0∞}\n    (hr₁₂ : WassersteinSpace.wassersteinDistance μ₁ μ₂ < r₁₂)\n    (hr₂₃ : WassersteinSpace.wassersteinDistance μ₂ μ₃ < r₂₃) :\n    WassersteinSpace.wassersteinDistance μ₁ μ₃ < r₁₂ + r₂₃ := by\n  rcases\n      WassersteinSpace.exists_isCoupling_sqrt_lintegral_lt_of_wassersteinDistance_lt\n        μ₁ μ₂ hr₁₂ with\n    ⟨γ₁₂, hγ₁₂, hcost₁₂⟩\n  rcases\n      WassersteinSpace.exists_isCoupling_sqrt_lintegral_lt_of_wassersteinDistance_lt\n        μ₂ μ₃ hr₂₃ with\n    ⟨γ₂₃, hγ₂₃, hcost₂₃⟩\n  rcases TransportGluing.exists_gluing_of_isCoupling γ₁₂ γ₂₃ hγ₁₂ hγ₂₃ with\n    ⟨γ₁₂₃, hfst, hmap₂₃⟩\n\n  have hmap₁₂ : Measure.map (pair12 (E := E)) γ₁₂₃ = γ₁₂ := by\n    change Measure.map Prod.fst γ₁₂₃ = γ₁₂\n    exact hfst\n  have hmap₂₃' : Measure.map (pair23 (E := E)) γ₁₂₃ = γ₂₃ := by\n    change Measure.map (fun p : ((E × E) × E) => (p.1.2, p.2)) γ₁₂₃ = γ₂₃\n    exact hmap₂₃\n\n  have hpair₁₂ :\n      Transport.IsCoupling (Measure.map (pair12 (E := E)) γ₁₂₃) μ₁ μ₂ := by\n    rw [hmap₁₂]\n    exact hγ₁₂\n  have hpair₂₃ :\n      Transport.IsCoupling (Measure.map (pair23 (E := E)) γ₁₂₃) μ₂ μ₃ := by\n    rw [hmap₂₃']\n    exact hγ₂₃\n  have hpair₁₃ :\n      Transport.IsCoupling (Measure.map (pair13 (E := E)) γ₁₂₃) μ₁ μ₃ :=\n    isCoupling_map_pair13_of_pair12_pair23 γ₁₂₃ hpair₁₂ hpair₂₃\n\n  have hedge₁₂ :\n      l2Seminorm γ₁₂₃ (edgeLength12 (E := E)) =\n        (∫⁻ z, WassersteinSpace.quadraticCost (E := E) z ∂γ₁₂) ^\n          (1 / (2 : ℝ)) := by\n    rw [l2Seminorm_edge12_eq_pairCost, hmap₁₂]\n  have hedge₂₃ :\n      l2Seminorm γ₁₂₃ (edgeLength23 (E := E)) =\n        (∫⁻ z, WassersteinSpace.quadraticCost (E := E) z ∂γ₂₃) ^\n          (1 / (2 : ℝ)) := by\n    rw [l2Seminorm_edge23_eq_pairCost, hmap₂₃']\n  have hendpoint :\n      WassersteinSpace.wassersteinDistance μ₁ μ₃ ≤\n        l2Seminorm γ₁₂₃ (edgeLength13 (E := E)) := by\n    calc\n      WassersteinSpace.wassersteinDistance μ₁ μ₃ ≤\n          (∫⁻ z, WassersteinSpace.quadraticCost (E := E) z\n            ∂Measure.map (pair13 (E := E)) γ₁₂₃) ^ (1 / (2 : ℝ)) :=\n        WassersteinSpace.wassersteinDistance_le_sqrt_lintegral_of_isCoupling\n          μ₁ μ₃ (Measure.map (pair13 (E := E)) γ₁₂₃) hpair₁₃\n      _ = l2Seminorm γ₁₂₃ (edgeLength13 (E := E)) :=\n        (l2Seminorm_edge13_eq_pairCost γ₁₂₃).symm\n\n  calc\n    WassersteinSpace.wassersteinDistance μ₁ μ₃ ≤\n        l2Seminorm γ₁₂₃ (edgeLength13 (E := E)) := hendpoint\n    _ ≤ l2Seminorm γ₁₂₃ (edgeLength12 (E := E)) +\n          l2Seminorm γ₁₂₃ (edgeLength23 (E := E)) :=\n      l2_edge_triangle γ₁₂₃\n    _ = (∫⁻ z, WassersteinSpace.quadraticCost (E := E) z ∂γ₁₂) ^\n          (1 / (2 : ℝ)) +\n        (∫⁻ z, WassersteinSpace.quadraticCost (E := E) z ∂γ₂₃) ^\n          (1 / (2 : ℝ)) := by rw [hedge₁₂, hedge₂₃]\n    _ < r₁₂ + r₂₃ := ENNReal.add_lt_add hcost₁₂ hcost₂₃\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Measure.TransportGluing\nimport AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleMarginals\nimport Mathlib.Tactic\n\nnoncomputable section\nopen MeasureTheory\nopen scoped ENNReal\nopen AutoSamplingTheory.TechnicalLemmas.Measure\nopen AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleCore\nopen AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleMarginals\nvariable {E : Type*} [NormedAddCommGroup E]\n  [MeasurableSpace E] [BorelSpace E] [SecondCountableTopology E]\n  [StandardBorelSpace E] [Nonempty E]\n\nexample\n    (μ₁ μ₂ μ₃ : Measure E)\n    [IsProbabilityMeasure μ₁] [IsProbabilityMeasure μ₂] [IsProbabilityMeasure μ₃]\n    {r₁₂ r₂₃ : ℝ≥0∞}\n    (hr₁₂ : WassersteinSpace.wassersteinDistance μ₁ μ₂ < r₁₂)\n    (hr₂₃ : WassersteinSpace.wassersteinDistance μ₂ μ₃ < r₂₃) :\n    WassersteinSpace.wassersteinDistance μ₁ μ₃ < r₁₂ + r₂₃ := by\n  -- Replace this comment with your proof.\n", "library_domains": ["statistical-optimal-transport", "log-concave-sampling"], "question": "Prove \\(W_2(\\mu_1,\\mu_3)<r_{12}+r_{23}\\) by choosing strictly near-optimal adjacent plans and gluing them over their common middle marginal. Identify the measure used in Minkowski, justify all three pair-marginal cost identities and explain the measurability/conditional-version requirements. Audit the shortcut \\(\\Gamma'=\\gamma_{12}\\otimes\\mu_3\\): use identical Bernoulli marginals and diagonal adjacent plans to show exactly which identification fails. Do not assume optimal-plan attainment or convert extended costs to real numbers.", "rubric": [{"criterion": "Selects actual strictly near-optimal adjacent couplings and derives their probability interfaces without assuming attainment or individual finite second moments.", "points": 1}, {"criterion": "Constructs the common-middle conditional gluing with measurable kernels and both pair marginals, respecting the almost-everywhere meaning of conditional versions.", "points": 1}, {"criterion": "Uses measurable pushforward cost identities and extended L² Minkowski on one triple law to obtain the endpoint coupling bound and exact strict sum.", "points": 1}, {"criterion": "Gives the diagonal Bernoulli/independent-third-coordinate counterexample with discrepancy probability 1/2 and edge norm 1/√2, identifying a failed marginal/cost identity rather than claiming the true triangle inequality fails.", "points": 1}], "skills": ["proof", "composition", "assumption-audit", "counterexample"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Measure/WassersteinTriangle.lean", "source_line": 42, "source_note": "Original QA and counterexample explanation over the existing ASTIS-owned strict-threshold transport join and its source-present gluing, marginal and L² components. No textbook passage, paper text, external dataset or restricted index is reproduced. The exact-order consumer is AutoSamplingTheory.TechnicalLemmas.Measure.WassersteinTriangleExact.wassersteinDistance_triangle. This composition family shares probability/coupling foundations with the earlier symmetry questions but is not a relabeled variant; all remain public-dev.", "source_sha256_lf": "70734431850472a3a175858173dfbff49e469fb23384a5e927bbd718456193e0", "split": "public-dev", "steps": ["Strict near-optimal selection gives actual couplings \\(\\gamma_{12},\\gamma_{23}\\) with \\[C(\\gamma_{12})<r_{12},\\qquad C(\\gamma_{23})<r_{23}.\\] These are consequences of the transport infimum and positive square-root order, not an assumption that the infimum is attained. A coupling of a probability marginal has total mass one, so both plans are probability measures.", "Disintegrate the second plan with respect to its first coordinate. The finite standard-Borel conditional-kernel theorem supplies a Markov version \\(\\kappa(y,dz)\\) with \\[\\gamma_{23}(dy,dz)=\\mu_2(dy)\\kappa(y,dz).\\] Define \\[\\Gamma(d(x,y),dz)=\\gamma_{12}(dx,dy)\\kappa(y,dz).\\] Markov normalization preserves its first pair marginal. Equality \\(\\gamma_{12}.\\mathrm{snd}=\\mu_2=\\gamma_{23}.\\mathrm{fst}\\), kernel measurability and the disintegration identity preserve the second pair marginal. Conditional representatives need only have the correct \\(\\mu_2\\)-almost-everywhere meaning; an unsupported pointwise conditional formula is not used.", "Write \\(\\pi_{ij}\\) for the measurable pair projections from the same triple space. The identities are \\[(\\pi_{12})_\\#\\Gamma=\\gamma_{12},\\qquad(\\pi_{23})_\\#\\Gamma=\\gamma_{23}.\\] Put \\(\\gamma_{13}=(\\pi_{13})_\\#\\Gamma\\). Composing measurable coordinate projections proves that its marginals are \\(\\mu_1,\\mu_3\\). The Borel norm and the product/projection measurability justify nonnegative pushforward integration; no subtraction of infinite integrals occurs.", "For \\(e_{ij}(x,y,z)=\\|x_i-x_j\\|\\), all edge functions are measurable. Nonnegative pushforward integration gives \\[\\|e_{12}\\|_{L^2(\\Gamma)}=C(\\gamma_{12}),\\qquad\\|e_{23}\\|_{L^2(\\Gamma)}=C(\\gamma_{23}).\\] The endpoint identity is \\[\\|e_{13}\\|_{L^2(\\Gamma)}=C(\\gamma_{13}).\\] Pointwise \\(e_{13}\\le e_{12}+e_{23}\\) and extended-nonnegative L² Minkowski apply on this single law Γ, not on two unrelated pair spaces.", "Using the endpoint coupling to bound the infimum, then the preceding identities, yields \\[\\begin{aligned}W_2(\\mu_1,\\mu_3)&\\le C(\\gamma_{13})\\\\&\\le C(\\gamma_{12})+C(\\gamma_{23})\\\\&<r_{12}+r_{23}.\\end{aligned}\\] The coefficient is exactly one on each cost. Strict extended-order addition handles the thresholds without an infinity-minus-infinity operation. No optimal plan, density or individual second-moment assumption is added.", "For the shortcut audit, take \\(E=\\mathbb R\\) and all three marginals equal to \\(\\frac12\\delta_0+\\frac12\\delta_1\\), with both adjacent plans diagonal. Their costs are zero. Under \\(\\Gamma'=\\gamma_{12}\\otimes\\mu_3\\), Y and Z are independent, so \\[\\mathbb P_{\\Gamma'}(Y\\ne Z)=\\tfrac12,\\qquad\\|e_{23}\\|_{L^2(\\Gamma')}=1/\\sqrt2.\\] Its second pair marginal is the independent product, not the diagonal \\(\\gamma_{23}\\), and cannot have cost zero. This refutes the shortcut's cost identification, not the true Wasserstein inequality. Correct conditional gluing makes X=Y=Z in this example."], "title": "Gluing the right joint law before applying Minkowski", "track_levels": {"lean": "L4", "natural-language": "L4"}}
{"assumptions": ["E is a real inner-product space, not necessarily complete or finite dimensional. The function f:E→ℝ is globally G-Lipschitz, where G≥0.", "A supplied vector g supports f at x globally: \\[f(x)+\\langle g,y-x\\rangle\\le f(y)\\qquad\\text{for every }y\\in E.\\] Existence of supporting vectors, convexity of f and differentiability are not additional premises."], "binding_sha256": "b12bf7bd53d4c8c85dd4e1658b22f05ea7752e13bfa48a3bbfba72f620c3d52f", "boundary": "This bounds each supplied global supporting vector. It constructs neither a subgradient nor a measurable/random oracle, gives no constrained-normal bound, and proves no optimization rate by itself. The existing sum_weighted_gap_le theorem consumes this estimate; Bench examples add no Registry credit.", "context": "/- Copyright (c) 2024 Hongjia Chen, Chenyi Li, Wanyi He, Zaiwen Wen.\nReleased under Apache 2.0; retain LICENSE and NOTICE.\nUpstream Optlib 5da27c5f95aa6a8a45b8c14b968ade4c13ff18c3,\nOptlib/Algorithm/SubgradientMethod.lean:80–118,137–232.\nModified for Samplinglib: native Lean 4.33.0, global SupportsAt and unbundled inputs. -/\nopen AutoSamplingTheory.TechnicalLemmas.Analysis.ConvexSubgradient\nopen scoped NNReal RealInnerProductSpace\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod.norm_le_of_supportsAt", "decoder_definitions": ["SupportsAt f x g means ∀ y:E, f x + ⟨g,y-x⟩ ≤ f y, with the real inner product. The quantifier ranges over the entire space, not a constraint subset.", "LipschitzWith G f means dist(f u,f v) ≤ G*dist(u,v) for all u,v. G:ℝ≥0 is a nonnegative real, coerced into ℝ in the conclusion. NormedAddCommGroup plus InnerProductSpace ℝ supplies the real norm and inner product; no completeness is specified."], "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Analysis.ConvexSubgradient.SupportsAt"], "mathlib": ["LipschitzWith.dist_le_mul", "real_inner_self_eq_norm_sq", "norm_nonneg", "le_abs_self"]}, "difficulty": "intermediate", "difficulty_reason": "The formal norm estimate combines one global support test with Lipschitz growth and a zero/nonzero case split (L2). The prose task additionally audits the global-domain requirement by constructing a constrained-support counterexample (L3). Neither level is experimentally calibrated.", "domain": "optimisation", "family": "subgradient-energy-average", "id": "sogb-019", "imports": ["AutoSamplingTheory.TechnicalLemmas.Analysis.ConvexSubgradient", "Mathlib.Topology.MetricSpace.Lipschitz", "Mathlib.Data.Finset.Max", "Mathlib.Algebra.Order.BigOperators.Group.Finset", "Mathlib.Tactic.Linarith", "Mathlib.Tactic.Positivity", "Mathlib.Tactic.Ring"], "lean_explanation": "The reference tests hs at x+g, rewrites the inner product with itself as a squared norm, and obtains the upper increment bound with hf.dist_le_mul. It splits on a zero norm before the final ordered-field inference. SupportsAt is the existing global relation from ConvexSubgradient, not a new predicate. The source module is not imported into the task, and its norm theorem is not supplied as a premise. The Lean conclusion covers the norm bound only; the constrained counterexample is the separate prose audit.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Analysis.ConvexSubgradient\nimport Mathlib.Topology.MetricSpace.Lipschitz\nimport Mathlib.Data.Finset.Max\nimport Mathlib.Algebra.Order.BigOperators.Group.Finset\nimport Mathlib.Tactic.Linarith\nimport Mathlib.Tactic.Positivity\nimport Mathlib.Tactic.Ring\n\n/- Copyright (c) 2024 Hongjia Chen, Chenyi Li, Wanyi He, Zaiwen Wen.\nReleased under Apache 2.0; retain LICENSE and NOTICE.\nUpstream Optlib 5da27c5f95aa6a8a45b8c14b968ade4c13ff18c3,\nOptlib/Algorithm/SubgradientMethod.lean:80–118,137–232.\nModified for Samplinglib: native Lean 4.33.0, global SupportsAt and unbundled inputs. -/\nopen AutoSamplingTheory.TechnicalLemmas.Analysis.ConvexSubgradient\nopen scoped NNReal RealInnerProductSpace\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]\n\nexample {f : E → ℝ} {G : ℝ≥0} {x g : E}\n    (hf : LipschitzWith G f) (hs : SupportsAt f x g) : ‖g‖ ≤ (G : ℝ) := by\n  have hs' := hs (x + g)\n  change f x + inner ℝ g (x + g - x) ≤ f (x + g) at hs'\n  rw [add_sub_cancel_left, real_inner_self_eq_norm_sq] at hs'\n  have hl : f (x + g) - f x ≤ (G : ℝ) * ‖g‖ := by\n    calc\n      f (x + g) - f x ≤ |f (x + g) - f x| := le_abs_self _\n      _ ≤ (G : ℝ) * ‖g‖ := by\n        simpa [Real.dist_eq, dist_eq_norm] using hf.dist_le_mul (x + g) x\n  by_cases hg : ‖g‖ = 0\n  · simp [hg]\n  · have hp : 0 < ‖g‖ := lt_of_le_of_ne (norm_nonneg _) (Ne.symm hg)\n    nlinarith\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Analysis.ConvexSubgradient\nimport Mathlib.Topology.MetricSpace.Lipschitz\nimport Mathlib.Data.Finset.Max\nimport Mathlib.Algebra.Order.BigOperators.Group.Finset\nimport Mathlib.Tactic.Linarith\nimport Mathlib.Tactic.Positivity\nimport Mathlib.Tactic.Ring\n\n/- Copyright (c) 2024 Hongjia Chen, Chenyi Li, Wanyi He, Zaiwen Wen.\nReleased under Apache 2.0; retain LICENSE and NOTICE.\nUpstream Optlib 5da27c5f95aa6a8a45b8c14b968ade4c13ff18c3,\nOptlib/Algorithm/SubgradientMethod.lean:80–118,137–232.\nModified for Samplinglib: native Lean 4.33.0, global SupportsAt and unbundled inputs. -/\nopen AutoSamplingTheory.TechnicalLemmas.Analysis.ConvexSubgradient\nopen scoped NNReal RealInnerProductSpace\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]\n\nexample {f : E → ℝ} {G : ℝ≥0} {x g : E}\n    (hf : LipschitzWith G f) (hs : SupportsAt f x g) : ‖g‖ ≤ (G : ℝ) := by\n  -- Replace this comment with your proof.\n", "library_domains": ["optimisation"], "question": "Prove \\(\\|g\\|\\le G\\), making the test point and zero case explicit. Is the same conclusion valid if the support inequality holds only for y in a constraint set C containing x? Give a counterexample with a globally Lipschitz function and explain exactly which step no longer applies.", "rubric": [{"criterion": "Uses the globally admissible point y=x+g to obtain the exact squared-norm lower bound without assuming subgradient existence.", "points": 1}, {"criterion": "Applies global Lipschitz growth to bound the same increment by G times the norm.", "points": 1}, {"criterion": "Separates the zero case before dividing, retaining only the stated inner-product-space hypotheses.", "points": 1}, {"criterion": "Gives any valid constrained-support counterexample with globally Lipschitz f, checks its support and failed norm bound, and explains the unavailable global test point; the reference half-line example is sufficient, not required.", "points": 1}], "skills": ["proof", "assumption-audit", "counterexample"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Analysis/SubgradientMethod.lean", "source_line": 40, "source_note": "Original QA and half-line counterexample over the Samplinglib-native Apache-2.0 port of Optlib. Upstream authors: Hongjia Chen, Chenyi Li, Wanyi He, Zaiwen Wen; pinned commit 5da27c5f95aa6a8a45b8c14b968ade4c13ff18c3, Optlib/Algorithm/SubgradientMethod.lean:80–118,137–232. The extracted reference retains the copyright, source and modification notice. The actual local norm bound is consumed by SubgradientMethod.sum_weighted_gap_le. No textbook passage or restricted dataset is copied.", "source_sha256_lf": "0913d624dae26a627474f56dc2d0e394af2cf059b8237ee3ee5db8833035683f", "split": "public-dev", "steps": ["Because the support relation is global, its test point may be y=x+g. Thus \\[\\|g\\|^2=\\langle g,g\\rangle\\le f(x+g)-f(x).\\] This tests the supplied relation; it does not use a theorem constructing subgradients.", "Global Lipschitz growth and the absolute-value bound give \\[f(x+g)-f(x)\\le|f(x+g)-f(x)|\\le G\\|g\\|.\\] Combining the inequalities yields \\(\\|g\\|^2\\le G\\|g\\|\\).", "If g=0 the conclusion is immediate from G≥0. Otherwise \\(\\|g\\|>0\\), so division by this strictly positive number gives \\(\\|g\\|\\le G\\). No completeness, differentiability or finite-dimensional compactness is used.", "For constrained support take E=ℝ, f≡0, G=0, C=[0,∞), x=0 and g=−1. Then \\[f(0)+g(y-0)=-y\\le0=f(y)\\qquad(y\\in C),\\] but \\(\\|g\\|=1>0=G\\). The chosen point x+g=−1 is outside C. This refutes the constrained variant, not the globally quantified theorem."], "title": "Why a global Lipschitz function bounds its supporting vectors", "track_levels": {"lean": "L2", "natural-language": "L3"}}
{"assumptions": ["E is a real inner-product space and f:E→ℝ is globally G-Lipschitz with G≥0. Supplied sequences xₖ,gₖ satisfy the global supporting inequality f(xₖ)+⟨gₖ,y−xₖ⟩≤f(y) for every y∈E and every k≥0.", "The actual recurrence is \\[x_{k+1}=x_k-a_k g_k.\\] For the energy estimate take aₖ≥0; for the normalized best-iterate statement assume aₖ>0 and N>0. The comparator z∈E is arbitrary, not necessarily a minimizer.", "For the positive-parameter rate corollary fix N>0, R>0, G>0 and ‖x₀−z‖≤R, then choose the constant step aₖ=R/(G√N). This schedule is selected for that finite horizon."], "binding_sha256": "15a19933c0cbddea0e5e89962c7375f05183709493c77749fe4f0115c0155931", "boundary": "This is a deterministic comparator bound for already supplied iterates, supports and steps. It does not construct a subgradient, prove a measurable/random algorithm or establish query complexity, constrained/projected convergence, last-iterate convergence or a global minimizer's existence. Strict positive steps are retained for the source best-iterate theorem even though some weaker sufficient conditions could also be mathematically valid. The full Lean module supports the energy/best-iterate portion, not every corollary in this QA.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod.exists_gap_le", "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Analysis.ConvexSubgradient.SupportsAt", "AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod.norm_le_of_supportsAt", "AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod.sum_weighted_gap_le"], "mathlib": ["norm_sub_sq_real", "Finset.sum_range_succ", "Finset.exists_min_image", "Finset.sum_pos", "le_div_iff₀"]}, "difficulty": "intermediate", "difficulty_reason": "A standard multi-step energy estimate, finite weighted-minimum argument and step-size calculation with sign and degenerate-case audits. This is L3 rather than a new cross-module research composition; the constant-step corollary is not an aligned Lean target. Calibration remains pending.", "domain": "optimisation", "family": "subgradient-energy-average", "id": "sogb-020", "imports": [], "lean_enabled": false, "lean_explanation": "The existing module proves norm_le_of_supportsAt, then sum_weighted_gap_le (nonnegative steps, including N=0), then exists_gap_le (strictly positive steps and N>0). Its finite-index minimum and positive denominator match the first four proof steps. The full module is shown below unchanged, including imports, namespaces and upstream notices. The explicit step optimization and degenerate-case explanations are additional prose, not a matching formal conclusion. No aligned Lean QA is exported: extracting exists_gap_le alone would leave its same-module energy helper unavailable under the current no-target-module-import task policy. This is a task-context limitation, not an unproved library theorem.", "lean_reference": "", "lean_task": "", "library_domains": ["optimisation"], "question": "Derive the terminal-distance-retaining weighted energy bound, then show that some i<N satisfies \\[f(x_i)-f(z)\\le\\frac{\\|x_0-z\\|^2+G^2\\sum_{k=0}^{N-1}a_k^2}{2\\sum_{k=0}^{N-1}a_k}.\\] Deduce the exact RG/√N bound for the stated constant step. Explain what happens at N=0, R=0 or G=0 and which existence/domain claims this reasoning does not provide.", "rubric": [{"criterion": "Derives the one-step squared-distance bound from the actual update, supplied global support and derived norm control, tracking the nonnegative step sign.", "points": 1}, {"criterion": "Telescopes with the terminal term intact and obtains the normalized bound via a finite nonempty minimum and strictly positive weight sum, without a global minimizer assumption.", "points": 1}, {"criterion": "Calculates the exact RG/√N constant for the positive finite-horizon step schedule and states its horizon dependence.", "points": 1}, {"criterion": "Handles N=0, R=0 and G=0 separately, rejecting a nonexistent empty-horizon witness and avoiding unproved oracle/existence/completeness claims.", "points": 1}], "skills": ["proof", "composition", "assumption-audit", "calculation"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Analysis/SubgradientMethod.lean", "source_line": 90, "source_note": "Original formula exercise over the Samplinglib-native Optlib port, sharing a family with sogb-019 (both public-dev; never independent train/test families). Copyright (c) 2024 Hongjia Chen, Chenyi Li, Wanyi He, Zaiwen Wen, Apache-2.0; upstream Optlib 5da27c5f95aa6a8a45b8c14b968ade4c13ff18c3, Optlib/Algorithm/SubgradientMethod.lean:80–118,137–232. The optional module source preserves its full notice and Samplinglib modifications. The constant-step corollary and edge-case explanation are ASTIS-authored mathematics, not a claim that a new formal theorem or QA pair exists.", "source_sha256_lf": "0913d624dae26a627474f56dc2d0e394af2cf059b8237ee3ee5db8833035683f", "split": "public-dev", "steps": ["For each k, test global support at y=xₖ+gₖ and bound the same increment by Lipschitz growth: \\[\\|g_k\\|^2\\le f(x_k+g_k)-f(x_k)\\le G\\|g_k\\|.\\] If gₖ=0 the norm bound is immediate; otherwise divide by its strictly positive norm to get \\(\\|g_k\\|\\le G\\). Test support again at z to obtain \\[f(x_k)-f(z)\\le\\langle g_k,x_k-z\\rangle.\\] No minimizing comparator or differentiability is needed.", "Expanding the actual update in the inner-product space gives \\[\\|x_{k+1}-z\\|^2=\\|x_k-z\\|^2-2a_k\\langle g_k,x_k-z\\rangle+a_k^2\\|g_k\\|^2.\\] Since aₖ≥0, multiplication preserves the support inequality; since aₖ²≥0, the norm bound gives \\[2a_k(f(x_k)-f(z))\\le\\|x_k-z\\|^2-\\|x_{k+1}-z\\|^2+G^2a_k^2.\\] A negative step would invalidate the first inference.", "Sum these finite inequalities; the distance terms telescope exactly: \\[2\\sum_{k<N}a_k(f(x_k)-f(z))\\le\\|x_0-z\\|^2+G^2\\sum_{k<N}a_k^2-\\|x_N-z\\|^2.\\] This statement permits zero steps and N=0. It retains, rather than assumes away, the nonnegative terminal distance.", "For N>0 choose i minimizing f(xₖ) over the finite nonempty index set {0,…,N−1}. This is a finite minimum, not existence of a global minimizer of f. Put \\(A=\\sum_{k=0}^{N-1}a_k>0\\). Positive weights imply \\[A(f(x_i)-f(z))\\le\\sum_{k<N}a_k(f(x_k)-f(z)).\\] Drop the nonpositive terminal term from the upper bound and divide by 2A>0 to obtain the requested ratio.", "When a=R/(G√N)>0, the ratio is at most \\[\\frac{R^2+G^2Na^2}{2Na}=\\frac{R^2}{2Na}+\\frac{G^2a}{2}=\\frac{RG}{\\sqrt N}.\\] The chosen schedule depends on N; this does not establish that one fixed infinite run uses all these horizon-dependent schedules simultaneously.", "At N=0 the energy inequality reduces to 0≤0, but there is no i<0 and division by a zero sum cannot create one (Lean's totalized 0/0 does not repair existence). If R=0 then z=x₀ and, for N>0, i=0 already has zero gap. If G=0 global Lipschitz growth makes f constant and the norm lemma forces all supplied gₖ=0; the positive-parameter step formula is unnecessary. These degenerate cases are separate arguments, not a substitution into a formula requiring positive parameters."], "support_lean_source": "/-\nCopyright (c) 2024 Hongjia Chen, Chenyi Li, Wanyi He, Zaiwen Wen. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors of the upstream mathematical development: Hongjia Chen, Chenyi Li, Wanyi He, Zaiwen Wen\nModified for Samplinglib: native Lean 4.33.0 statements and proofs; reuse SupportsAt,\nunbundle algorithm inputs and expose the weighted telescope and a finite index witness.\n-/\nimport AutoSamplingTheory.TechnicalLemmas.Analysis.ConvexSubgradient\nimport Mathlib.Topology.MetricSpace.Lipschitz\nimport Mathlib.Data.Finset.Max\nimport Mathlib.Algebra.Order.BigOperators.Group.Finset\nimport Mathlib.Tactic.Linarith\nimport Mathlib.Tactic.Positivity\nimport Mathlib.Tactic.Ring\n\n/-!\n# Nonsmooth subgradient method\n\nNative port of the norm bound and finite-horizon convergence argument in Optlib\n`5da27c5f95aa6a8a45b8c14b968ade4c13ff18c3`,\n`Optlib/Algorithm/SubgradientMethod.lean:80–118,137–232` (Apache-2.0).\n\nThe existing `ConvexSubgradient.SupportsAt` relation is exactly the global\nsubgradient inequality. No duplicate predicate or upstream algorithm class is\nintroduced. Lipschitz growth bounds supplied subgradients, the actual update\ntelescopes squared distances, and a finite minimizer index supplies the best\niterate bound. Completeness, differentiability and existence of a minimizer are\nnot needed. This does not construct subgradients or a measurable/random oracle.\n-/\n\nnamespace AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod\n\nopen ConvexSubgradient Finset\nopen scoped NNReal RealInnerProductSpace\n\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]\n\n/-- Global Lipschitz growth controls every supplied supporting vector.\nThis is consumed inside the subgradient telescope, not supplied as an extra premise. -/\ntheorem norm_le_of_supportsAt {f : E → ℝ} {G : ℝ≥0} {x g : E}\n    (hf : LipschitzWith G f) (hs : SupportsAt f x g) : ‖g‖ ≤ (G : ℝ) := by\n  have hs' := hs (x + g)\n  change f x + inner ℝ g (x + g - x) ≤ f (x + g) at hs'\n  rw [add_sub_cancel_left, real_inner_self_eq_norm_sq] at hs'\n  have hl : f (x + g) - f x ≤ (G : ℝ) * ‖g‖ := by\n    calc\n      f (x + g) - f x ≤ |f (x + g) - f x| := le_abs_self _\n      _ ≤ (G : ℝ) * ‖g‖ := by\n        simpa [Real.dist_eq, dist_eq_norm] using hf.dist_le_mul (x + g) x\n  by_cases hg : ‖g‖ = 0\n  · simp [hg]\n  · have hp : 0 < ‖g‖ := lt_of_le_of_ne (norm_nonneg _) (Ne.symm hg)\n    nlinarith\n\n/-- The actual subgradient recurrence controls the finite weighted objective gaps,\nretaining the terminal squared distance. Zero steps and the empty horizon are allowed. -/\ntheorem sum_weighted_gap_le {f : E → ℝ} {G : ℝ≥0} {x g : ℕ → E} {a : ℕ → ℝ}\n    (hf : LipschitzWith G f) (ha : ∀ k, 0 ≤ a k)\n    (hs : ∀ k, SupportsAt f (x k) (g k))\n    (hx : ∀ k, x (k + 1) = x k - a k • g k) (z : E) (N : ℕ) :\n    2 * (∑ k ∈ Finset.range N, a k * (f (x k) - f z)) ≤\n      ‖x 0 - z‖ ^ 2 + (G : ℝ) ^ 2 * (∑ k ∈ Finset.range N, (a k) ^ 2) - ‖x N - z‖ ^ 2 := by\n  have hstep (k : ℕ) :\n      2 * a k * (f (x k) - f z) ≤\n        ‖x k - z‖ ^ 2 - ‖x (k + 1) - z‖ ^ 2 + (G : ℝ) ^ 2 * (a k) ^ 2 := by\n    have hs' := hs k z\n    change f (x k) + inner ℝ (g k) (z - x k) ≤ f z at hs'\n    have hpair : f (x k) - f z ≤ inner ℝ (g k) (x k - z) := by\n      rw [inner_sub_right] at hs' ⊢\n      linarith\n    have hg := norm_le_of_supportsAt hf (hs k)\n    have hgsq : ‖g k‖ ^ 2 ≤ (G : ℝ) ^ 2 :=\n      pow_le_pow_left₀ (norm_nonneg _) hg 2\n    have hnorm : ‖x (k + 1) - z‖ ^ 2 =\n        ‖x k - z‖ ^ 2 - 2 * a k * inner ℝ (g k) (x k - z) + (a k) ^ 2 * ‖g k‖ ^ 2 := by\n      rw [hx k, sub_right_comm, norm_sub_sq_real, inner_smul_right,\n        norm_smul, Real.norm_eq_abs, mul_pow, sq_abs, real_inner_comm (x k - z)]\n      ring\n    have hp := mul_le_mul_of_nonneg_left hpair (mul_nonneg (by norm_num : (0 : ℝ) ≤ 2) (ha k))\n    have hn := mul_le_mul_of_nonneg_left hgsq (sq_nonneg (a k))\n    nlinarith\n  induction N with\n  | zero => simp\n  | succ N ih =>\n      rw [Finset.sum_range_succ, Finset.sum_range_succ]\n      nlinarith [hstep N]\n\n/-- A positive finite run contains an iterate satisfying the normalized Optlib\nsubgradient bound, relative to any comparator (not necessarily a minimizer). -/\ntheorem exists_gap_le {f : E → ℝ} {G : ℝ≥0} {x g : ℕ → E} {a : ℕ → ℝ}\n    (hf : LipschitzWith G f) (ha : ∀ k, 0 < a k)\n    (hs : ∀ k, SupportsAt f (x k) (g k))\n    (hx : ∀ k, x (k + 1) = x k - a k • g k) (z : E) {N : ℕ} (hN : 0 < N) :\n    ∃ i < N, f (x i) - f z ≤\n      (‖x 0 - z‖ ^ 2 + (G : ℝ) ^ 2 * (∑ k ∈ Finset.range N, (a k) ^ 2)) /\n        (2 * ∑ k ∈ Finset.range N, a k) := by\n  have hne : (Finset.range N).Nonempty := ⟨0, Finset.mem_range.mpr hN⟩\n  obtain ⟨i, hi, hmin⟩ := Finset.exists_min_image (Finset.range N) (fun k => f (x k)) hne\n  refine ⟨i, Finset.mem_range.mp hi, ?_⟩\n  have hsumpos : 0 < ∑ k ∈ Finset.range N, a k :=\n    Finset.sum_pos (fun k _ => ha k) hne\n  have hlower : (∑ k ∈ Finset.range N, a k) * (f (x i) - f z) ≤\n      ∑ k ∈ Finset.range N, a k * (f (x k) - f z) := by\n    rw [Finset.sum_mul]\n    exact Finset.sum_le_sum fun k hk =>\n      mul_le_mul_of_nonneg_left (sub_le_sub_right (hmin k hk) _) (ha k).le\n  have he := sum_weighted_gap_le hf (fun k => (ha k).le) hs hx z N\n  apply (le_div_iff₀ (mul_pos (by norm_num : (0 : ℝ) < 2) hsumpos)).mpr\n  nlinarith [sq_nonneg ‖x N - z‖]\n\nend AutoSamplingTheory.TechnicalLemmas.Analysis.SubgradientMethod\n", "support_source_view": true, "title": "From subgradient energy to a finite-run best iterate", "track_levels": {"natural-language": "L3"}}
{"assumptions": ["α and β are measurable spaces; β is nonempty and standard Borel. μ is any finite nonnegative measure on α×β, including the zero measure. No standard-Borel or nonempty assumption is imposed on α.", "Let μ₁ be the first marginal and κ(a,db) a selected measurable regular conditional Markov kernel for the second coordinate given the first. You may use the existing finite-measure disintegration identity \\[\\mu(da,db)=\\mu_1(da)\\kappa(a,db).\\] Its conditional characterization is only μ₁-almost everywhere; the selected version has mass one at every input.", "The actual update retains a and resamples b: \\[K((a,b),d(a',b'))=\\delta_a(da')\\kappa(a,db').\\] Invariant means the measure equality μK=μ, not convergence from every starting measure."], "binding_sha256": "3d72820e315cae6cebacdbed3bc8475fb4479d4a4a6cc7c302f4d534b54fe173", "boundary": "This proves one actual conditional-resampling kernel preserves its finite joint target. It does not establish reversibility, irreducibility, uniqueness, convergence, a mixing rate, a generator-domain theorem or the Gibbs law of a continuous-time process. Conditional disintegration is allowed background, not reproved by this short task. The NL finite-state counterexample is not a separate Lean conclusion.", "context": "open MeasureTheory ProbabilityTheory\nnamespace AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath\nnoncomputable def heatBathSnd {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n    [StandardBorelSpace β] [Nonempty β] (μ : Measure (α × β)) [IsFiniteMeasure μ] :\n    Kernel (α × β) (α × β) :=\n  (Kernel.id ×ₖ condDistrib Prod.snd Prod.fst μ) ∘ₖ\n    Kernel.deterministic Prod.fst measurable_fst\nend AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath\nopen AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath\nopen AutoSamplingTheory.TechnicalLemmas.Probability\nvariable {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n  [StandardBorelSpace β] [Nonempty β]\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath.heatBathSnd_invariant", "decoder_definitions": ["Measure X is a nonnegative extended-real measure. IsFiniteMeasure μ means μ(X)<∞ and permits μ=0. Kernel α β is a measurable assignment of measures on β; a Markov kernel has total mass one at every input.", "Kernel.Invariant K μ means μ.bind K=μ. κ∘ₖη is kernel composition, κ∘ₘμ means μ.bind κ, and Kernel.deterministic f hf sends x to the Dirac measure at f(x). Kernel.id sends a to δ_a; ×ₖ is the product of two output kernels sharing an input.", "condDistrib Prod.snd Prod.fst μ is a chosen regular conditional Markov kernel for the second coordinate given the first, for finite μ and nonempty standard-Borel β. Its disintegration/conditional meaning is characterized only almost everywhere for the first marginal; its selected normalization is pointwise. α has only a measurable-space assumption."], "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Probability.ConditionalResampling.fst_compProd_condDistrib_snd_eq_self"], "mathlib": ["ProbabilityTheory.Kernel.Invariant", "MeasureTheory.Measure.comp_assoc", "MeasureTheory.Measure.deterministic_comp_eq_map", "MeasureTheory.Measure.compProd_eq_comp_prod", "ProbabilityTheory.compProd_map_condDistrib"]}, "difficulty": "intermediate", "difficulty_reason": "The formal task is a short but semantic kernel-composition/disintegration calculation (L2). The prose task additionally audits finite versus probability measures, conditional null-fiber representatives and a concrete failure of convergence from other starts (L3).", "domain": "mcmc", "family": "conditional-resampling-invariance", "id": "sogb-021", "imports": ["AutoSamplingTheory.TechnicalLemmas.Probability.ConditionalResampling", "Mathlib.Probability.Kernel.Invariance"], "lean_explanation": "The context supplies only the exact existing heatBathSnd definition, not its invariance theorem or Markov instance. The reference unfolds that kernel in the measure equality, reassociates composition, rewrites deterministic composition as the first pushforward and the identity-product composition as a composition product, then calls ConditionalResampling.fst_compProd_condDistrib_snd_eq_self. This is the actual finite-target invariance theorem, not an assumed stationarity premise. Its conclusion does not separately formalize the prose's identity-kernel counterexample or a mixing assertion.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Probability.ConditionalResampling\nimport Mathlib.Probability.Kernel.Invariance\n\nopen MeasureTheory ProbabilityTheory\nnamespace AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath\nnoncomputable def heatBathSnd {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n    [StandardBorelSpace β] [Nonempty β] (μ : Measure (α × β)) [IsFiniteMeasure μ] :\n    Kernel (α × β) (α × β) :=\n  (Kernel.id ×ₖ condDistrib Prod.snd Prod.fst μ) ∘ₖ\n    Kernel.deterministic Prod.fst measurable_fst\nend AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath\nopen AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath\nopen AutoSamplingTheory.TechnicalLemmas.Probability\nvariable {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n  [StandardBorelSpace β] [Nonempty β]\n\nexample (μ : Measure (α × β)) [IsFiniteMeasure μ] :\n    (heatBathSnd μ).Invariant μ := by\n  change ((Kernel.id ×ₖ condDistrib Prod.snd Prod.fst μ) ∘ₖ\n    Kernel.deterministic Prod.fst measurable_fst) ∘ₘ μ = μ\n  rw [← Measure.comp_assoc, Measure.deterministic_comp_eq_map,\n    ← Measure.compProd_eq_comp_prod]\n  exact ConditionalResampling.fst_compProd_condDistrib_snd_eq_self\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Probability.ConditionalResampling\nimport Mathlib.Probability.Kernel.Invariance\n\nopen MeasureTheory ProbabilityTheory\nnamespace AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath\nnoncomputable def heatBathSnd {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n    [StandardBorelSpace β] [Nonempty β] (μ : Measure (α × β)) [IsFiniteMeasure μ] :\n    Kernel (α × β) (α × β) :=\n  (Kernel.id ×ₖ condDistrib Prod.snd Prod.fst μ) ∘ₖ\n    Kernel.deterministic Prod.fst measurable_fst\nend AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath\nopen AutoSamplingTheory.TechnicalLemmas.Probability.HeatBath\nopen AutoSamplingTheory.TechnicalLemmas.Probability\nvariable {α β : Type*} [MeasurableSpace α] [MeasurableSpace β]\n  [StandardBorelSpace β] [Nonempty β]\n\nexample (μ : Measure (α × β)) [IsFiniteMeasure μ] :\n    (heatBathSnd μ).Invariant μ := by\n  -- Replace this comment with your proof.\n", "library_domains": ["mcmc", "discrete-sampling"], "question": "Prove μK=μ by identifying the measure after projecting to the retained coordinate and after applying the product kernel. Explain the role of measurability, the finite-measure disintegration, and the chosen conditional version on null fibers. Must μ be a probability measure? Give a finite-state example showing why this invariance result alone does not imply convergence from another initial probability law.", "rubric": [{"criterion": "Identifies the measurable deterministic projection and its exact pushforward μ₁ under the actual input law.", "points": 1}, {"criterion": "Expresses the actual kernel as a deterministic composition and uses associativity and the measure–kernel product, not an independent product, to obtain μ₁⊗κ.", "points": 1}, {"criterion": "Applies the finite standard-Borel disintegration with the precise β hypotheses, permits zero μ and distinguishes global Markov normalization from almost-everywhere conditional support claims.", "points": 1}, {"criterion": "Gives any valid finite-state instance of this conditional-resampling kernel that preserves its target yet fails to converge from a different initial probability law, with a correct persistent discrepancy calculation; the reference identity-kernel example and TV=1/2 are sufficient, not required.", "points": 1}], "skills": ["proof", "assumption-audit", "counterexample"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Probability/HeatBath.lean", "source_line": 54, "source_note": "Original QA over the existing Samplinglib-owned HeatBath kernel and its finite-measure ConditionalResampling interface. Uses Mathlib's selected regular conditional distribution, kernel composition and Invariant definition. The discrete example specializes this general measurable-space result; this is not the earlier atomic-detailed-balance task or a new wrapper. No paper text, external dataset or restricted index is reproduced.", "source_sha256_lf": "f246c8fd89c1555de29cc899e7b00e7bce9f6a5b3acb7e303973430fc549bf4f", "split": "public-dev", "steps": ["The deterministic projection (a,b)↦a is measurable. Pushing μ through it gives exactly its first marginal \\(\\mu_1=(\\mathrm{fst})_\\#\\mu\\). This assertion uses the actual input μ, not an arbitrary starting law with a different first marginal.", "The product kernel a↦δₐ⊗κ(a,·) is measurable because it is the product of the identity kernel and the measurable conditional kernel. Composition with the deterministic projection gives K. Associativity of kernel/measure composition yields \\[\\mu K=\\mu_1(\\mathrm{id}\\times\\kappa)=\\mu_1\\otimes\\kappa.\\] The last expression is a measure–kernel composition product, not the independent product of μ₁ and a fixed marginal.", "The supplied finite-measure disintegration identity now gives \\[\\mu K=\\mu_1\\otimes\\kappa=\\mu.\\] It is justified by the standard-Borel, nonempty β and finite μ interface. No density, positivity, normalization to mass one or division by a marginal density is required. For μ=0 both sides are zero; this is invariant as a finite measure, not a probability law.", "Conditional versions agree in their prescribed conditional meaning only for μ₁-almost every a. Replacing them on a μ₁-null set does not change the integrated identity. The chosen global Markov version still yields a legitimate mass-one update there, but no claim about conditional support or convergence from such exceptional starting states follows.", "For lack of convergence take α={0,1}, β={∗} with discrete measurable structures and \\(\\mu=(\\tfrac12\\delta_0+\\tfrac12\\delta_1)\\otimes\\delta_\\ast\\). The update never changes either coordinate, so K is the identity kernel. Starting from \\(\\rho=\\delta_{(0,\\ast)}\\), \\[\\rho K^n=\\rho,\\qquad d_{\\mathrm{TV}}(\\rho K^n,\\mu)=\\tfrac12\\quad(n\\ge0).\\] Thus the actual invariant target does not imply uniqueness, irreducibility, mixing or convergence from a different first marginal."], "title": "Why retaining one coordinate and conditionally resampling the other is invariant", "track_levels": {"lean": "L2", "natural-language": "L3"}}
{"assumptions": ["M is a metric space, F:M→ℝ, α∈ℝ, and P selects curves γ:ℝ→M. For every selected curve and 0≤t≤1 assume \\[F(\\gamma(t))\\le(1-t)F(\\gamma(0))+tF(\\gamma(1))-\\frac{\\alpha t(1-t)}2d(\\gamma(0),\\gamma(1))^2.\\] The predicate P itself does not certify geodesicity, speed, regularity or existence of curves between all endpoints.", "A particular γ with P(γ) is supplied. The scalar composition φ(t)=F(γ(t)) has the genuine two-sided derivative φ′(0)=g. Neither a Riemannian/Wasserstein gradient nor a logarithmic map is supplied. α may have either sign."], "binding_sha256": "2cfe0ffa4f03a84301a91017152eea5265cf548015c4f28f0d9d9fa9f12817b5", "boundary": "The supplied selector is not certified geometric data. No metric/geodesic existence, manifold regularity, Wasserstein first variation, subgradient existence, flow, sampling rate or invariance is concluded. HasDerivAt is retained exactly as in the source; no claim that all its hypotheses are mathematically minimal is made. The actual StrongConvexFirstOrder.firstOrder_lower_bound_of_strongConvexOn supplies an affine-segment/gradient adapter and consumes this limiting lemma.", "context": "open Filter Set\nopen scoped Topology\nnamespace AutoSamplingTheory.TechnicalLemmas.Geometry.GeodesicConvexity\ndef IsAlphaGeodesicallyConvex\n    {M : Type*} [MetricSpace M]\n    (isGeodesic : (ℝ → M) → Prop) (F : M → ℝ) (alpha : ℝ) : Prop :=\n  ∀ path : ℝ → M, isGeodesic path →\n    ∀ t : ℝ, t ∈ Icc (0 : ℝ) 1 →\n      F (path t) ≤\n        (1 - t) * F (path 0) + t * F (path 1) -\n          (alpha * t * (1 - t) / 2) * dist (path 0) (path 1) ^ 2\nend AutoSamplingTheory.TechnicalLemmas.Geometry.GeodesicConvexity\nopen AutoSamplingTheory.TechnicalLemmas.Geometry.GeodesicConvexity\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Geometry.GeodesicConvexity.firstOrder_geodesicConvexity", "decoder_definitions": ["MetricSpace supplies a distance but no tangent spaces, vector-space structure or gradient. The curve selector is an arbitrary predicate; its name alone asserts no geometric property. Its exact chord-inequality definition is supplied in the context.", "HasDerivAt φ g 0 means a genuine scalar derivative of φ:ℝ→ℝ at zero equal to g. The conclusion's ≥ is real order; α is any real and dist is the metric distance. Curve endpoint existence outside the given selected curve is not part of these data."], "dependencies": {"astis": [], "mathlib": ["HasDerivAt.tendsto_slope", "nhdsWithin_mono", "eventually_lt_nhds", "div_le_iff₀", "le_of_tendsto_of_tendsto"]}, "difficulty": "intermediate", "difficulty_reason": "Coordinate a positive-time quotient, eventual interval membership, a genuine scalar derivative restricted to a right filter, continuity of an upper envelope and preservation of inequalities under limits. Audit which geometric gradient/velocity identifications are absent. No level is empirically calibrated.", "domain": "geometry", "family": "convex-flow-first-order-rate", "id": "sogb-022", "imports": ["Mathlib.Analysis.Calculus.Deriv.Slope", "Mathlib.Topology.MetricSpace.Basic"], "lean_explanation": "The context supplies only the exact existing chord predicate. The reference constructs a scalar upper envelope, restricts hderiv.tendsto_slope to 𝓝[>]0, proves the quotient inequality eventually by positive division, and calls le_of_tendsto_of_tendsto before algebraic rearrangement. No source theorem or geometric gradient identity is imported as an answer. The Lean conclusion is the scalar endpoint inequality; the discussion about absent adapters is an explanation of its scope, not a new Riemannian/Wasserstein theorem.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport Mathlib.Analysis.Calculus.Deriv.Slope\nimport Mathlib.Topology.MetricSpace.Basic\n\nopen Filter Set\nopen scoped Topology\nnamespace AutoSamplingTheory.TechnicalLemmas.Geometry.GeodesicConvexity\ndef IsAlphaGeodesicallyConvex\n    {M : Type*} [MetricSpace M]\n    (isGeodesic : (ℝ → M) → Prop) (F : M → ℝ) (alpha : ℝ) : Prop :=\n  ∀ path : ℝ → M, isGeodesic path →\n    ∀ t : ℝ, t ∈ Icc (0 : ℝ) 1 →\n      F (path t) ≤\n        (1 - t) * F (path 0) + t * F (path 1) -\n          (alpha * t * (1 - t) / 2) * dist (path 0) (path 1) ^ 2\nend AutoSamplingTheory.TechnicalLemmas.Geometry.GeodesicConvexity\nopen AutoSamplingTheory.TechnicalLemmas.Geometry.GeodesicConvexity\n\nexample\n    {M : Type*} [MetricSpace M]\n    {isGeodesic : (ℝ → M) → Prop} {F : M → ℝ} {alpha : ℝ}\n    (hconvex : IsAlphaGeodesicallyConvex isGeodesic F alpha)\n    {path : ℝ → M} (hpath : isGeodesic path)\n    {gradientPairing : ℝ}\n    (hderiv : HasDerivAt (fun t => F (path t)) gradientPairing 0) :\n    F (path 1) ≥\n      F (path 0) + gradientPairing +\n        alpha / 2 * dist (path 0) (path 1) ^ 2 := by\n  let phi : ℝ → ℝ := fun t => F (path t)\n  let upper : ℝ → ℝ := fun t =>\n    F (path 1) - F (path 0) -\n      alpha * (1 - t) / 2 * dist (path 0) (path 1) ^ 2\n  have hslope :\n      Tendsto (slope phi 0) (𝓝[>] 0) (𝓝 gradientPairing) := by\n    apply hderiv.tendsto_slope.mono_left\n    apply nhdsWithin_mono\n    intro t ht\n    simpa only [mem_compl_iff, mem_singleton_iff] using ne_of_gt ht\n  have hupper :\n      Tendsto upper (𝓝[>] 0) (𝓝 (upper 0)) := by\n    have hcontinuous : ContinuousAt upper 0 := by\n      dsimp only [upper]\n      fun_prop\n    have hfilter : 𝓝[>] (0 : ℝ) ≤ 𝓝 0 := inf_le_left\n    exact hcontinuous.tendsto.mono_left hfilter\n  have hslope_le : slope phi 0 ≤ᶠ[𝓝[>] 0] upper := by\n    filter_upwards [self_mem_nhdsWithin,\n      (eventually_lt_nhds zero_lt_one).filter_mono inf_le_left]\n      with t ht htle\n    have htpos : 0 < t := ht\n    have hchord := hconvex path hpath t ⟨htpos.le, htle.le⟩\n    have hquotient :\n        (F (path t) - F (path 0)) / t ≤ upper t := by\n      apply (div_le_iff₀ htpos).2\n      dsimp only [upper]\n      nlinarith\n    rw [div_eq_inv_mul] at hquotient\n    simpa [phi, slope, htpos.ne'] using hquotient\n  have hfirst := le_of_tendsto_of_tendsto hslope hupper hslope_le\n  dsimp only [upper, sub_zero, one_mul] at hfirst\n  linarith\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport Mathlib.Analysis.Calculus.Deriv.Slope\nimport Mathlib.Topology.MetricSpace.Basic\n\nopen Filter Set\nopen scoped Topology\nnamespace AutoSamplingTheory.TechnicalLemmas.Geometry.GeodesicConvexity\ndef IsAlphaGeodesicallyConvex\n    {M : Type*} [MetricSpace M]\n    (isGeodesic : (ℝ → M) → Prop) (F : M → ℝ) (alpha : ℝ) : Prop :=\n  ∀ path : ℝ → M, isGeodesic path →\n    ∀ t : ℝ, t ∈ Icc (0 : ℝ) 1 →\n      F (path t) ≤\n        (1 - t) * F (path 0) + t * F (path 1) -\n          (alpha * t * (1 - t) / 2) * dist (path 0) (path 1) ^ 2\nend AutoSamplingTheory.TechnicalLemmas.Geometry.GeodesicConvexity\nopen AutoSamplingTheory.TechnicalLemmas.Geometry.GeodesicConvexity\n\nexample\n    {M : Type*} [MetricSpace M]\n    {isGeodesic : (ℝ → M) → Prop} {F : M → ℝ} {alpha : ℝ}\n    (hconvex : IsAlphaGeodesicallyConvex isGeodesic F alpha)\n    {path : ℝ → M} (hpath : isGeodesic path)\n    {gradientPairing : ℝ}\n    (hderiv : HasDerivAt (fun t => F (path t)) gradientPairing 0) :\n    F (path 1) ≥\n      F (path 0) + gradientPairing +\n        alpha / 2 * dist (path 0) (path 1) ^ 2 := by\n  -- Replace this comment with your proof.\n", "library_domains": ["riemannian-optimization", "statistical-optimal-transport"], "question": "Prove \\[F(\\gamma(1))\\ge F(\\gamma(0))+g+\\frac\\alpha2d(\\gamma(0),\\gamma(1))^2.\\] Show the positive-time quotient and its right-hand limit, retaining the exact constant. Explain why this does not itself identify g with a geometric gradient pairing or supply geodesics for arbitrary endpoint pairs. Is an arbitrary value returned by a totalized derivative enough to replace the differentiability hypothesis?", "rubric": [{"criterion": "Derives the exact chord quotient for strictly positive t with the α/2 normalization and without assuming α≥0.", "points": 1}, {"criterion": "Justifies eventual 0<t<1 and the right-hand slope limit from the genuine derivative hypothesis rather than a totalized value.", "points": 1}, {"criterion": "Passes the inequality to the limit using the continuous upper envelope and rearranges the exact endpoint bound.", "points": 1}, {"criterion": "Separates selected-curve/scalar facts from curve existence, constant-speed geodesicity and geometric gradient-pairing adapters, retaining the actual differentiability premise.", "points": 1}], "skills": ["proof", "calculation", "assumption-audit", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Geometry/GeodesicConvexity.lean", "source_line": 40, "source_note": "Original exercise over the existing ASTIS-owned scalar/geodesic limiting proof. Its module records Chewi Definition 1.3.26's chord normalization and the limiting mechanism behind display (1.4.7); this QA is an ASTIS restatement/explanation, not copied textbook wording or a claim that the full geometric statement is proved. The real local consumer is AutoSamplingTheory.TechnicalLemmas.Analysis.StrongConvexFirstOrder.firstOrder_lower_bound_of_strongConvexOn. No external dataset or restricted source is used.", "source_sha256_lf": "9ed8c8f65014e5494a8ae8a9c6afdbe4c5d628886505b86bc832895c0780b0ff", "split": "public-dev", "steps": ["Put \\(D=d(\\gamma(0),\\gamma(1))^2\\). For 0<t<1, subtract F(γ(0)) from the chord bound and divide by the strictly positive t: \\[\\frac{\\varphi(t)-\\varphi(0)}t\\le F(\\gamma(1))-F(\\gamma(0))-\\frac\\alpha2(1-t)D.\\] No sign restriction on α is used, and division at t=0 is not performed.", "The condition 0<t<1 holds eventually as t approaches 0 from the right. Genuine differentiability gives the restricted limit \\[\\lim_{t\\downarrow0}\\frac{\\varphi(t)-\\varphi(0)}t=g.\\] The formal proof restricts HasDerivAt.tendsto_slope to the right-neighborhood filter; a defined-but-totalized slope value at zero is irrelevant.", "The upper envelope \\(U(t)=F(\\gamma(1))-F(\\gamma(0))-\\frac\\alpha2(1-t)D\\) is continuous at zero. Taking limits in the eventual ordered inequality gives \\[g\\le F(\\gamma(1))-F(\\gamma(0))-\\frac\\alpha2D.\\] Rearranging proves the assertion with the exact coefficient α/2.", "The proof uses the selected curve's chord inequality and scalar derivative only. It does not construct paths, prove that P encodes constant-speed geodesics, identify their velocities or define a gradient. An empty selection would make the global chord condition vacuous, but would not provide the required witness P(γ). To obtain a Riemannian or transport gradient statement one must separately identify the path derivative with the intended geometric pairing under that geometry's regularity hypotheses.", "A totalized derivative API returns some value even when a derivative does not exist. Merely assigning that value does not justify the slope limit. The local statement explicitly supplies HasDerivAt; its proof uses only the right restriction of that stronger assumption. A genuinely one-sided variant would need its own correctly stated API, not deletion of the current premise."], "title": "From a selected-curve chord inequality to its first-order bound", "track_levels": {"lean": "L3", "natural-language": "L3"}}
{"assumptions": ["E is a complete real inner-product space. f:E→ℝ is differentiable everywhere and α-strongly convex on E for α≥0, in the chord convention \\[f((1-s)x+sy)\\le(1-s)f(x)+sf(y)-\\frac\\alpha2s(1-s)\\|y-x\\|^2\\qquad(0\\le s\\le1).\\] The corresponding first-order inequality is a derived adapter, not an extra premise. A global minimizer z is supplied, not constructed.", "T≥0 and X:ℝ→E is continuous on [0,T]. For every u∈[0,T), X has the genuine derivative within the forward ray [u,∞) at u equal to −∇f(X(u)). This is the actual trajectory/regularity premise; a scalar gap recurrence is not given.", "The observation t lies in (0,T]. Gradient notation is the Hilbert/Riesz gradient supplied by differentiability, not an arbitrary value of a totalized API. If T=0 there is no such observation."], "binding_sha256": "4a0607efb0c7bf22a09cc2d1ced0f8033582c57fd04e0225279f2e0782d169dc", "boundary": "The Lean conclusion is the nonnegative finite objective-gap bound at positive observation time for a supplied complete-space trajectory and minimizer. It is not flow existence/uniqueness, discrete gradient-descent complexity, stochastic sampling convergence, Riemannian or Wasserstein gradient flow, or a formalization of the explanatory time-zero counterexample. T≥0 is retained from the actual statement; no necessity/minimality claim is made for every source/API premise. This exercise shares a public family with the first-order limiting task, not an independent private split.", "context": "open Set\nopen scoped RealInnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.Analysis\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.Analysis.GradientFlowValue.value_le", "decoder_definitions": ["StrongConvexOn univ α f is global α-strong convexity with the quadratic first-order normalization α/2. IsMinOn f univ z means f z≤f x for every x. The domain is a complete real inner-product space, not an arbitrary metric space or manifold.", "Differentiable ℝ f supplies genuine real Frechet differentiability everywhere and hence the Hilbert gradient. HasDerivWithinAt X v (Ici u) u specifies a genuine derivative along the forward ray [u,∞) at u equal to v. ContinuousOn X (Icc 0 T) is continuity on the closed interval.", "Ico 0 T=[0,T), Ioc 0 T=(0,T], α,T are real, and Real.exp is the usual exponential. Division in ℝ is totalized but the conclusion is quantified only over positive observation times; if α=0 it explicitly selects the separate 1/(2t) branch."], "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Analysis.StrongConvexFirstOrder.firstOrder_lower_bound_of_strongConvexOn"], "mathlib": ["DifferentiableAt.hasGradientAt", "HasFDerivAt.comp_hasDerivWithinAt", "HasDerivWithinAt.norm_sq", "le_gronwallBound_of_liminf_deriv_right_le", "gronwallBound_K0", "gronwallBound_of_K_ne_0", "Real.one_lt_exp_iff"]}, "difficulty": "advanced", "difficulty_reason": "Compose genuine gradient/derivative chain rules, a strong-convexity first-order adapter and right-derivative scalar Gronwall on a supplied trajectory. Freeze the later objective gap in the distance estimate, keep endpoint continuity and positive denominators, and separate zero curvature from positive curvature. This is a multi-interface proof, not an assumed decay recurrence.", "domain": "optimisation", "family": "convex-flow-first-order-rate", "id": "sogb-023", "imports": ["AutoSamplingTheory.TechnicalLemmas.Analysis.StrongConvexFirstOrder", "Mathlib.Analysis.InnerProductSpace.Calculus", "Mathlib.Analysis.ODE.Gronwall"], "lean_explanation": "The target is the source's actual trajectory theorem. It derives the objective's one-sided derivative by composing the supplied HasFDerivAt/gradient with hflow, proves monotonicity through a zero-forcing Gronwall comparison, and computes the squared-distance derivative. It calls StrongConvexFirstOrder's existing adapter and a second comparison with K=−α and ε=−2 times the frozen later gap. The final branches use nonnegative distance, positive t and, when α>0, a positive exponential denominator. The target module is not imported; no decay lemma is supplied as a substitute for the trajectory. The time-zero example and geometric-transfer warning explain the conclusion's boundary, not additional Lean conclusions.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Analysis.StrongConvexFirstOrder\nimport Mathlib.Analysis.InnerProductSpace.Calculus\nimport Mathlib.Analysis.ODE.Gronwall\n\nopen Set\nopen scoped RealInnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.Analysis\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]\n\nexample {f : E → ℝ} {X : ℝ → E} {z : E} {α T : ℝ}\n    (hα : 0 ≤ α) (_hT : 0 ≤ T) (hf : Differentiable ℝ f)\n    (hsc : StrongConvexOn univ α f) (hz : IsMinOn f univ z)\n    (hX : ContinuousOn X (Icc 0 T))\n    (hflow : ∀ t ∈ Ico 0 T, HasDerivWithinAt X (-gradient f (X t)) (Ici t) t) :\n    ∀ t ∈ Ioc 0 T, 0 ≤ f (X t) - f z ∧\n      f (X t) - f z ≤ if α = 0 then ‖X 0 - z‖ ^ 2 / (2 * t)\n        else α / (2 * (Real.exp (α * t) - 1)) * ‖X 0 - z‖ ^ 2 := by\n  have hd (u : ℝ) (hu : u ∈ Ico 0 T) :\n      HasDerivWithinAt (fun s => f (X s)) (-‖gradient f (X u)‖ ^ 2) (Ici u) u := by\n    have hgrad : HasFDerivAt f (InnerProductSpace.toDual ℝ E (gradient f (X u))) (X u) :=\n      (hf (X u)).hasGradientAt\n    simpa only [Function.comp_def, InnerProductSpace.toDual_apply_apply,\n      inner_neg_right, real_inner_self_eq_norm_sq] using\n      hgrad.comp_hasDerivWithinAt u (hflow u hu)\n  have hmono : AntitoneOn (fun s => f (X s)) (Icc 0 T) := by\n    intro a ha b hb hab\n    have hc := (hf.continuous.comp_continuousOn hX).mono\n      (show Icc a b ⊆ Icc 0 T from fun u hu => ⟨ha.1.trans hu.1, hu.2.trans hb.2⟩)\n    have hg := le_gronwallBound_of_liminf_deriv_right_le\n      (f' := fun u => -‖gradient f (X u)‖ ^ 2) (δ := f (X a)) (K := 0) (ε := 0) hc\n      (fun u hu r hr => by\n        simpa [slope] using (hd u ⟨ha.1.trans hu.1, hu.2.trans_le hb.2⟩).liminf_right_slope_le hr)\n      le_rfl (fun u _ => by nlinarith [sq_nonneg ‖gradient f (X u)‖]) b ⟨hab, le_rfl⟩\n    simpa [gronwallBound_K0] using hg\n  have hdist (u : ℝ) (hu : u ∈ Ico 0 T) :\n      HasDerivWithinAt (fun s => ‖X s - z‖ ^ 2)\n        (-2 * inner ℝ (gradient f (X u)) (X u - z)) (Ici u) u := by\n    have h := ((hflow u hu).sub_const z).norm_sq\n    simp only [inner_neg_right, real_inner_comm] at h\n    convert h using 1; ring\n  intro t ht\n  refine ⟨sub_nonneg.mpr (hz (mem_univ _)), ?_⟩\n  have hbound := le_gronwallBound_of_liminf_deriv_right_le\n    (f := fun s => ‖X s - z‖ ^ 2)\n    (f' := fun u => -2 * inner ℝ (gradient f (X u)) (X u - z))\n    (δ := ‖X 0 - z‖ ^ 2) (K := -α) (ε := -2 * (f (X t) - f z))\n    (((hX.sub continuousOn_const).norm.pow 2).mono\n      (show Icc 0 t ⊆ Icc 0 T from fun u hu => ⟨hu.1, hu.2.trans ht.2⟩))\n    (fun u hu r hr => by\n      simpa [slope] using (hdist u ⟨hu.1, hu.2.trans_le ht.2⟩).liminf_right_slope_le hr)\n    le_rfl (fun u hu => by\n      have hs := StrongConvexFirstOrder.firstOrder_lower_bound_of_strongConvexOn\n        hsc (fun x _ => (hf x).hasGradientAt) (mem_univ (X u)) (mem_univ z)\n      rw [show z - X u = -(X u - z) by abel, inner_neg_right, norm_neg] at hs\n      have hm := hmono ⟨hu.1, hu.2.le.trans ht.2⟩ ⟨ht.1.le, ht.2⟩ hu.2.le\n      nlinarith) t ⟨ht.1.le, le_rfl⟩\n  have hn := (sq_nonneg ‖X t - z‖).trans hbound\n  by_cases ha : α = 0\n  · simp only [ha, neg_zero, gronwallBound_K0, sub_zero] at hn ⊢\n    apply (le_div_iff₀ (mul_pos (by norm_num) ht.1)).mpr\n    nlinarith\n  · rw [if_neg ha]\n    have hap : 0 < α := lt_of_le_of_ne hα (Ne.symm ha)\n    rw [gronwallBound_of_K_ne_0 (neg_ne_zero.mpr ha), sub_zero] at hn\n    have hmul := mul_nonneg hn hap.le\n    have heq : (‖X 0 - z‖ ^ 2 * Real.exp (-α * t) +\n        (-2 * (f (X t) - f z)) / -α * (Real.exp (-α * t) - 1)) * α =\n        α * ‖X 0 - z‖ ^ 2 * Real.exp (-α * t) +\n          2 * (f (X t) - f z) * (Real.exp (-α * t) - 1) := by\n      field_simp\n    rw [heq] at hmul\n    have he : Real.exp (-α * t) * Real.exp (α * t) = 1 := by\n      rw [← Real.exp_add, show -α * t + α * t = 0 by ring, Real.exp_zero]\n    have hp := mul_nonneg hmul (Real.exp_pos (α * t)).le\n    have hcancel : (α * ‖X 0 - z‖ ^ 2 * Real.exp (-α * t) +\n        2 * (f (X t) - f z) * (Real.exp (-α * t) - 1)) * Real.exp (α * t) =\n        α * ‖X 0 - z‖ ^ 2 - 2 * (f (X t) - f z) * (Real.exp (α * t) - 1) := by\n      calc\n        _ = α * ‖X 0 - z‖ ^ 2 * (Real.exp (-α * t) * Real.exp (α * t)) +\n          2 * (f (X t) - f z) * (Real.exp (-α * t) * Real.exp (α * t)) -\n          2 * (f (X t) - f z) * Real.exp (α * t) := by ring\n        _ = _ := by rw [he]; ring\n    rw [hcancel] at hp\n    rw [div_mul_eq_mul_div]\n    apply (le_div_iff₀ (mul_pos (by norm_num) (sub_pos.mpr (Real.one_lt_exp_iff.mpr\n      (mul_pos hap ht.1))))).mpr\n    nlinarith\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.Analysis.StrongConvexFirstOrder\nimport Mathlib.Analysis.InnerProductSpace.Calculus\nimport Mathlib.Analysis.ODE.Gronwall\n\nopen Set\nopen scoped RealInnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.Analysis\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]\n\nexample {f : E → ℝ} {X : ℝ → E} {z : E} {α T : ℝ}\n    (hα : 0 ≤ α) (_hT : 0 ≤ T) (hf : Differentiable ℝ f)\n    (hsc : StrongConvexOn univ α f) (hz : IsMinOn f univ z)\n    (hX : ContinuousOn X (Icc 0 T))\n    (hflow : ∀ t ∈ Ico 0 T, HasDerivWithinAt X (-gradient f (X t)) (Ici t) t) :\n    ∀ t ∈ Ioc 0 T, 0 ≤ f (X t) - f z ∧\n      f (X t) - f z ≤ if α = 0 then ‖X 0 - z‖ ^ 2 / (2 * t)\n        else α / (2 * (Real.exp (α * t) - 1)) * ‖X 0 - z‖ ^ 2 := by\n  -- Replace this comment with your proof.\n", "library_domains": ["optimisation"], "question": "Starting from the actual flow, prove the nonnegative objective-gap estimate \\[0\\le f(X(t))-f(z)\\le\\begin{cases}\\|X(0)-z\\|^2/(2t),&\\alpha=0,\\\\\\alpha\\|X(0)-z\\|^2/[2(e^{\\alpha t}-1)],&\\alpha>0.\\end{cases}\\] Derive objective monotonicity and the distance inequality needed for the fixed later time t rather than assuming them. Explain the time/curvature/domain conditions, why the theorem constructs no flow, and why directly substituting t=0 in totalized division is invalid; give a valid positive-initial-gap example for that last point.", "rubric": [{"criterion": "Derives the true objective derivative and monotonicity from differentiability, forward flow and interval continuity, rather than assuming an energy recurrence.", "points": 1}, {"criterion": "Derives the squared-distance inequality via first-order strong convexity and correctly freezes the later nonnegative objective gap with the proper sign.", "points": 1}, {"criterion": "Solves the comparison in both curvature branches and tracks the exact coefficient, positive observation time and denominator signs.", "points": 1}, {"criterion": "Explains closed-endpoint versus forward-derivative domains, supplied rather than constructed flow/minimizer and missing geometric-transfer adapters; supplies any valid positive-initial-gap gradient-flow example refuting totalized t=0 substitution.", "points": 1}], "skills": ["proof", "composition", "calculation", "assumption-audit", "counterexample"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Analysis/GradientFlowValue.lean", "source_line": 22, "source_note": "Original QA over the existing ASTIS-owned GradientFlowValue.value_le proof and its real first-order/Gronwall adapters. The module cites Chewi arXiv:2605.07006v1, Theorem 2.4; this is ASTIS-authored exposition of the exact local theorem, not copied book prose or a claim that its wider chapter is complete. StrongConvexFirstOrder records its Optlib mathematical provenance; it remains an installed dependency rather than a copied transitive source tree. No external dataset or restricted source is exported.", "source_sha256_lf": "17ef3289cc2553d16fb00941203999fbac698adeb684833151b40c0b90e9dfd3", "split": "public-dev", "steps": ["The differentiability and actual one-sided flow law give, for u<T, \\[\\frac{d}{du^+}f(X(u))=\\langle\\nabla f(X(u)),-\\nabla f(X(u))\\rangle=-\\|\\nabla f(X(u))\\|^2\\le0.\\] Continuity on closed subintervals and the right-derivative comparison theorem imply f∘X is nonincreasing on [0,T]. Thus for 0≤u≤t, \\(f(X(u))-f(z)\\ge f(X(t))-f(z)\\). The source does not assume this monotonicity as an input.", "Write \\(D(u)=\\|X(u)-z\\|^2\\) and \\(h_t=f(X(t))-f(z)\\ge0\\), the latter by global minimality of z. The norm-square derivative and first-order strong-convexity bound give \\[D'(u^+)=-2\\langle\\nabla f(X(u)),X(u)-z\\rangle\\le-\\alpha D(u)-2(f(X(u))-f(z))\\le-\\alpha D(u)-2h_t.\\] The last step freezes the objective gap at the later observation time, using the proved monotonicity and the correct negative sign.", "On the fixed interval [0,t], scalar Gronwall/comparison with constant forcing −2hₜ gives for α=0 \\[D(t)\\le D(0)-2t h_t.\\] Since D(t)≥0 and t>0, \\(h_t\\le D(0)/(2t)\\). Division by 2t requires the positive observation time, not just T≥0.", "For α>0, the same comparison gives \\[D(t)\\le e^{-\\alpha t}D(0)-\\frac{2h_t}{\\alpha}(1-e^{-\\alpha t}).\\] Multiply its nonnegative upper bound by αe^{αt}>0 and rearrange: \\[2h_t(e^{\\alpha t}-1)\\le\\alpha D(0).\\] Because αt>0, e^{αt}−1>0, and division yields the exact stated coefficient. No extra smoothness, Lipschitz-gradient constant or finite dimension is introduced.", "The derivative premise is required only before T; continuity at T supports the closed-endpoint comparison and permits observation t=T. The supplied minimizer and trajectory are never obtained from the rate estimate. If T=0 the observation set is empty. At α=0 the zero-curvature comparison is a separate branch, not evaluating α/(e^{αt}−1) as 0/0.", "For failure at time zero take E=ℝ, f(x)=x²/2, z=0, α=1 and X(u)=e^{-u} on [0,1]. This satisfies the actual gradient-flow equation, with \\[f(X(0))-f(0)=\\tfrac12>0,\\qquad D(0)=1.\\] Direct t=0 substitution in a totalized denominator would return zero and falsely assert a zero initial gap. This refutes only the forbidden endpoint substitution. The positive-time theorem is valid. Transferring it to a curved manifold or a law-valued flow requires new geometric/chain-rule/distance adapters; these data are not automatically present."], "title": "An actual gradient flow: objective decay with the zero-curvature branch", "track_levels": {"lean": "L4", "natural-language": "L4"}}
{"assumptions": ["Ω is an uncountable set equipped with the countable/co-countable σ-algebra: a measurable set is countable or has countable complement. Define μ(B)=0 for countable B and μ(B)=1 for co-countable B. Both input and output spaces use this σ-algebra.", "For measurable B define K(x,B)=1_B(x) and L(x,B)=μ(B). A Markov kernel must be a probability measure in B for each x, and measurable in x for every measurable B. The total-variation event supremum is not assumed measurable.", "Compare the statements \\[(\\forall B\\text{ measurable})\\;(K(x,B)=L(x,B)\\text{ for }\\mu\\text{-a.e. }x)\\] and \\[\\mu\\text{-a.e. }x\\;(\\forall B\\text{ measurable})\\;K(x,B)=L(x,B).\\] In the second statement the same exceptional set must work for all events."], "binding_sha256": "a64992f051cc8dbb2603c11d72a720f0121aeb064ca12a66d0efd321c5e014da", "boundary": "The counterexample is on the explicitly non-countably-generated measurable output, not ℝ with its Borel sets or a standard-Borel state space. It does not refute the source averaging theorem, conditional-law uniqueness with the proper countability assumptions, or measurability of any particular supplied bound. The supporting compiled module is not a formal proof of this QA. No claim about joint diagonal measurability, a measurable total-variation supremum, adaptive process construction or expected query cost is made.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Probability.KernelHybridTelescope.abs_real_comp_sub_le_integral_eventBound", "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Probability.KernelHybridTelescope.abs_real_comp_sub_le_integral_eventBound"], "mathlib": ["ProbabilityTheory.Kernel.ae_eq_of_compProd_eq", "MeasurableSpace.CountableOrCountablyGenerated"]}, "difficulty": "intermediate", "difficulty_reason": "Build a finite measure and two measurable kernels, audit the order of an uncountable family of almost-everywhere quantifiers, and distinguish equality after averaging from equality of conditional versions. This is a multi-step foundational diagnosis, not a claimed research-level L5 theorem or an equivalent Lean task.", "domain": "mcmc", "family": "adaptive-hybrid-cost-boundary", "id": "sogb-024", "imports": [], "lean_enabled": false, "lean_explanation": "The exact supporting source requires ∀ᵐ x, ∀ measurable event s, an event discrepancy bound. Its proof fixes the requested output event before integrating, so this source premise is sufficient, not established necessary. The folded module shows that quantifier order, the integrability/finite-mass checks and its common-suffix/telescope consumers. It does not formalize the countable/co-countable construction or this counterexample. No equivalent Lean task or compiler credit for the complete QA is invented. The external finite-kernel uniqueness interface is separately named with its countability hypothesis.", "lean_reference": "", "lean_task": "", "library_domains": ["mcmc", "samplewiki"], "question": "Verify that μ is a probability measure and K,L are measurable Markov kernels. Prove the first quantified statement but refute the second. Compute both output laws after averaging over μ: does this example refute equality of the averaged laws? Explain exactly what it does—and does not—show about the uniform eventwise hypothesis in the local conditional-error bound, and why it is not a standard-Borel counterexample.", "rubric": [{"criterion": "Proves countable additivity and normalization of the countable/co-countable measure and checks both Markov-kernel measurability requirements without assuming a measurable diagonal.", "points": 1}, {"criterion": "Establishes eventwise almost-everywhere equality and refutes a common exceptional set using measurable singletons, correctly distinguishing uncountable from countable null unions.", "points": 1}, {"criterion": "Computes both averaged output laws as μ and identifies quantifier interchange, not averaged equality, as the failed inference; does not call the source's stronger premise necessary for averaging.", "points": 1}, {"criterion": "Explains why the output σ-algebra is not countably generated and the input is uncountable, keeping standard-Borel/countability uniqueness interfaces and the absent formal QA distinct.", "points": 1}], "skills": ["proof", "assumption-audit", "counterexample", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Probability/KernelHybridTelescope.lean", "source_line": 28, "source_note": "Original ASTIS-authored quantifier exercise and proof, anchored to the exact hbound order in the existing local conditional-kernel averaging theorem (the reusable probability core associated with Gaussian Cloud Lemma 6.3). It is not quoted from that paper and does not assert a flaw in it. The fixed Mathlib file Mathlib/Probability/Kernel/CompProdEqIff.lean supplies Kernel.ae_eq_of_compProd_eq under MeasurableSpace.CountableOrCountablyGenerated plus finite-measure/kernel assumptions; that external interface is context, not an ASTIS-owned new leaf. This QA conservatively shares the public adaptive-hybrid family with sogb-017. No restricted source or external dataset is used.", "source_sha256_lf": "9f5a28c56daeafdfd141d4f66411ff10e0276b4b0ca8ff34e1e98a679097577b", "split": "public-dev", "steps": ["Uncountability ensures a set cannot be both countable and co-countable, so μ is well defined, with μ(Ω)=1 and μ(∅)=0. For a disjoint sequence of measurable sets, if one is co-countable, all the others are countable and their union is co-countable; the sum and union mass are one. If none is co-countable, the countable union is countable and both masses are zero. This proves countable additivity.", "For each x, K(x,·)=δₓ and L(x,·)=μ are probability measures. For each fixed measurable B, x↦K(x,B)=1_B(x) is measurable and x↦L(x,B)=μ(B) is constant. Hence both assignments are Markov kernels; no diagonal-subset measurability in the product space is asserted or needed.", "If B is countable, L(x,B)=0 and K differs only on the μ-null set B. If B is co-countable, L(x,B)=1 and K differs only on its μ-null complement. Thus \\[\\forall B\\text{ measurable},\\qquad K(\\cdot,B)=L(\\cdot,B)\\quad\\mu\\text{-a.e.}\\] The exceptional set depends on B.", "For every x choose the measurable singleton B={x}. Then \\[K(x,\\{x\\})=1,\\qquad L(x,\\{x\\})=0.\\] Consequently no x has equality for all measurable events. There cannot be a common full-measure set. An uncountable union of the individual null exceptions may be all of Ω; countable closure of null sets does not justify that union.", "Nevertheless, for each measurable B, \\[(\\mu K)(B)=\\int 1_B(x)\\,d\\mu(x)=\\mu(B),\\qquad(\\mu L)(B)=\\int\\mu(B)\\,d\\mu=\\mu(B).\\] Both output measures are μ. This refutes the quantifier interchange and equality of kernel versions almost everywhere, not the true averaged-law equality. For a fixed output event an averaging proof can use that event's own exceptional set; a common null set is a sufficient stronger API premise, not shown mathematically necessary for the averaged conclusion.", "The output σ-algebra here is not countably generated: any countable family of countable/co-countable generators involves a countable union C of their countable sides, and every generator is constant on Ω∖C. Every generated measurable set is therefore constant there, but the full σ-algebra contains a singleton inside Ω∖C and can separate it from another such point. The uncountable input also is not a countable type. Thus this is outside the countable-input-or-countably-generated-output interface used by Mathlib's finite-kernel uniqueness theorem. Standard-Borel outputs have countably generated σ-algebras; this example does not refute that theorem or the selected conditional-distribution interface."], "support_lean_source": "import AutoSamplingTheory.TechnicalLemmas.Probability.KernelTotalVariation\n\n/-!\n# Mean conditional-kernel errors and finite hybrid telescopes\n\nThis module isolates the reusable probability-kernel core of Chen--Chewi--Lu--\nZhang, arXiv:2609.38710v1, Lemma 6.3.  If two conditional Markov kernels differ\neventwise by an integrable history-dependent bound, their output laws differ by\nat most the mean of that bound.  A common downstream Markov kernel preserves\nthe same estimate, so later adaptive computation is absorbed by data\nprocessing.  A finite real-valued telescope then adds the adjacent hybrid\nerrors.\n\nThe declarations do not construct the paper's dummy-filled history kernels,\nidentify its `δ_t` with a measurable total-variation function, or compare the\ncapped ideal algorithm with its uncapped version.  Those adapters remain\nseparate source obligations.\n-/\n\nopen MeasureTheory ProbabilityTheory Set Finset\nopen scoped ProbabilityTheory BigOperators\n\nnamespace AutoSamplingTheory.TechnicalLemmas.Probability.KernelHybridTelescope\n\n/-- An integrable pointwise event bound between two Markov kernels controls the\ncorresponding event discrepancy after averaging over the input law.  This is\nthe mean-replacement step in the adaptive hybrid argument. -/\ntheorem abs_real_comp_sub_le_integral_eventBound\n    {A B : Type*} [MeasurableSpace A] [MeasurableSpace B]\n    (μ : Measure A) [IsProbabilityMeasure μ]\n    (K L : Kernel A B) [IsMarkovKernel K] [IsMarkovKernel L]\n    (ε : A → ℝ) (hε : Integrable ε μ)\n    (hbound : ∀ᵐ x ∂μ, ∀ s, MeasurableSet s →\n      |(K x).real s - (L x).real s| ≤ ε x) :\n    ∀ t, MeasurableSet t →\n      |(K ∘ₘ μ).real t - (L ∘ₘ μ).real t| ≤ ∫ x, ε x ∂μ := by\n  intro t ht\n  have hint (M : Kernel A B) [IsMarkovKernel M] :\n      Integrable (fun x => (M x).real t) μ := by\n    apply (integrable_const (1 : ℝ)).mono'\n      (M.measurable_coe ht).ennreal_toReal.aestronglyMeasurable\n    exact Filter.Eventually.of_forall fun x => by\n      rw [Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg]\n      exact (measureReal_le_one : (M x).real t ≤ 1)\n  have happly (M : Kernel A B) [IsMarkovKernel M] :\n      (M ∘ₘ μ).real t = ∫ x, (M x).real t ∂μ := by\n    change (Measure.bind μ M t).toReal = ∫ x, (M x t).toReal ∂μ\n    rw [Measure.bind_apply ht M.aemeasurable]\n    exact (integral_toReal (M.measurable_coe ht).aemeasurable\n      (Filter.Eventually.of_forall fun x => measure_lt_top (M x) t)).symm\n  rw [happly K, happly L, ← integral_sub (hint K) (hint L)]\n  exact abs_integral_le_integral_abs.trans <|\n    integral_mono_ae ((hint K).sub (hint L)).abs hε <|\n      hbound.mono fun x hx => hx t ht\n\n/-- The same mean replacement bound survives a common downstream Markov\nkernel.  In an adjacent adaptive hybrid, the downstream kernel represents all\nlater calls after the one conditional rule being replaced. -/\ntheorem abs_real_comp_commonSuffix_sub_le_integral_eventBound\n    {A B C : Type*} [MeasurableSpace A] [MeasurableSpace B] [MeasurableSpace C]\n    (μ : Measure A) [IsProbabilityMeasure μ]\n    (K L : Kernel A B) [IsMarkovKernel K] [IsMarkovKernel L]\n    (S : Kernel B C) [IsMarkovKernel S]\n    (ε : A → ℝ) (hε : Integrable ε μ)\n    (hbound : ∀ᵐ x ∂μ, ∀ s, MeasurableSet s →\n      |(K x).real s - (L x).real s| ≤ ε x) :\n    ∀ t, MeasurableSet t →\n      |((S ∘ₖ K) ∘ₘ μ).real t - ((S ∘ₖ L) ∘ₘ μ).real t| ≤\n        ∫ x, ε x ∂μ := by\n  have hKL := abs_real_comp_sub_le_integral_eventBound μ K L ε hε hbound\n  have hS := KernelTotalVariation.abs_real_comp_sub_le\n    (K ∘ₘ μ) (L ∘ₘ μ) S hKL\n  simpa only [← Measure.comp_assoc] using hS\n\n/-- Finite adjacent-hybrid errors telescope.  Applying this to the output laws\nof hybrids `0, ..., n` turns the one-slot bounds into their accumulated error.\nThe result is deliberately stated for real sequences so it does not invent a\nsecond total-variation definition. -/\ntheorem abs_sub_zero_le_sum_range_of_adjacent\n    (a δ : ℕ → ℝ) (n : ℕ)\n    (hstep : ∀ i < n, |a (i + 1) - a i| ≤ δ i) :\n    |a n - a 0| ≤ ∑ i ∈ range n, δ i := by\n  induction n with\n  | zero => simp\n  | succ n ih =>\n      calc\n        |a (n + 1) - a 0| ≤ |a (n + 1) - a n| + |a n - a 0| := by\n          exact abs_sub_le _ _ _\n        _ ≤ δ n + ∑ i ∈ range n, δ i :=\n          add_le_add (hstep n (Nat.lt_succ_self n))\n            (ih fun i hi => hstep i (hi.trans (Nat.lt_succ_self n)))\n        _ = ∑ i ∈ range (n + 1), δ i := by\n          rw [sum_range_succ, add_comm]\n\nend AutoSamplingTheory.TechnicalLemmas.Probability.KernelHybridTelescope\n", "support_source_view": true, "title": "One null set for every event, or a different null set for each event?", "track_levels": {"natural-language": "L3"}}
{"assumptions": ["E is a finite-dimensional complete real inner-product space with its Borel measurable structure and volume measure, including the zero-dimensional case.", "W:E→ℝ is C². The density exp(−W) is integrable and its real normalizer Z=∫exp(−W) is strictly positive. Write μ(dx)=Z⁻¹exp(−W(x))dx.", "Real constants satisfy 0<m≤M and, for every x,a, m‖a‖²≤D²W(x)[a,a]≤M‖a‖². The actual position map id is in L²(μ). Retain both curvature bounds and this moment premise of the current source API.", "The imported Gibbs C¹ Poincaré theorem gives m Varμ(f)≤∫‖∇f‖²dμ for genuinely C¹ observables with f and ∇f in L²(μ), under the displayed Gibbs hypotheses."], "binding_sha256": "9331f23fb1a4e9f66961f15c1233923302255d9b4ff3c953d01a7ad61d76e7b6", "boundary": "The aligned Lean target is exactly this isotropic directional covariance upper bound with the stated premises. It is not the full anisotropic Brascamp–Lieb inequality, a new proof of position L², an invariant-law or sampling-complexity result. Prose explanations of API necessity and downstream roles are not extra Lean conclusions. No production declaration or Registry credit is added.", "context": "open MeasureTheory ProbabilityTheory InnerProductSpace\nopen scoped RealInnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities\nnoncomputable section\nset_option autoImplicit false\nset_option backward.isDefEq.respectTransparency false\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GibbsLinearCovarianceUpper.gibbs_linear_covariance_upper", "decoder_definitions": ["volume is the canonical volume measure of the finite-dimensional real inner-product space, and BorelSpace identifies the measurable structure with its Borel sigma algebra.", "For a real measurable potential g with integrable positive exponential, volume.tilted g is the probability measure obtained by normalizing the density exp(g). The separate positive real normalizer is an explicit premise here.", "ContDiff ℝ 2 W is genuine twice continuous real Fréchet differentiability. fderiv is totalized to zero outside differentiability; the supplied ContDiff hypothesis gives genuine Hessians in this statement.", "MemLp id 2 μ says that the position vector is in L²(μ). covarianceBilin μ a a is the real covariance bilinear form evaluated on a,a; on this L² domain it equals the variance of x↦⟨a,x⟩.", "All displayed m,M are real numbers, ‖a‖² is the squared Hilbert norm, and the let binder fixes μ to the given tilted volume measure rather than quantifying over arbitrary μ."], "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GibbsC1Poincare.gibbs_c1_variance_poincare", "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.Poincare.dirichletEnergy", "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.Poincare.variance"], "mathlib": ["isProbabilityMeasure_tilted", "MemLp.const_inner", "memLp_const", "toDual_gradient", "covarianceBilin_self", "variance_eq_integral", "le_div_iff₀"]}, "difficulty": "intermediate", "difficulty_reason": "Coordinate genuine linear differentiation, two L2 interfaces, probability normalization, a Dirichlet-energy identity and covariance/variance conversion before dividing by the positive curvature. This is a multi-step proof, not an anisotropic Brascamp–Lieb theorem or research-level novelty claim.", "domain": "sampling", "family": "posterior-curvature-smoothing", "id": "sogb-025", "imports": ["AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GibbsC1Poincare", "Mathlib.Probability.Moments.CovarianceBilin"], "lean_explanation": "The exact existing theorem is extracted with its own imports; its module and conclusion are not imported as a shortcut. The proof installs IsProbabilityMeasure μ, introduces f as the continuous linear functional innerSL, derives MemLp f by hX.const_inner, and proves gradient f is constant through toDual_gradient and the genuine fderiv of innerSL. memLp_const supplies the gradient domain. GibbsC1Poincare gives the scalar variance estimate; henergy uses probability normalization. covarianceBilin_self and variance_eq_integral connect the actual covariance to that variance, then le_div_iff₀ hm performs the final positive division. These are imported ASTIS/Mathlib ingredients, not new Bench-owned lemmas.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GibbsC1Poincare\nimport Mathlib.Probability.Moments.CovarianceBilin\n\nopen MeasureTheory ProbabilityTheory InnerProductSpace\nopen scoped RealInnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities\nnoncomputable section\nset_option autoImplicit false\nset_option backward.isDefEq.respectTransparency false\n\nexample\n    {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]\n    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [CompleteSpace E]\n    (W : E → ℝ) (hW : ContDiff ℝ 2 W)\n    (hI : Integrable (fun x => Real.exp (-W x)))\n    (hZ : 0 < ∫ x, Real.exp (-W x))\n    (m M : ℝ) (hm : 0 < m) (hmM : m ≤ M)\n    (hlower : ∀ x a, m*‖a‖^2 ≤ fderiv ℝ (fderiv ℝ W) x a a)\n    (hupper : ∀ x a, fderiv ℝ (fderiv ℝ W) x a a ≤ M*‖a‖^2)\n    (hX : MemLp id 2 ((volume : Measure E).tilted (fun x => -W x))) :\n    let μ := (volume : Measure E).tilted (fun x => -W x)\n    ∀ a : E, ProbabilityTheory.covarianceBilin μ a a ≤ ‖a‖^2/m := by\n  let μ := (volume : Measure E).tilted (fun x => -W x)\n  let : IsProbabilityMeasure μ := isProbabilityMeasure_tilted hI\n  dsimp only\n  intro a\n  let f : E → ℝ := fun x => inner ℝ a x\n  have hf : ContDiff ℝ 1 f := (innerSL ℝ a).contDiff\n  have hp : MemLp f 2 μ := hX.const_inner a\n  have hgrad : gradient f = fun _ => a := by\n    funext x\n    apply (toDual ℝ E).injective\n    rw [toDual_gradient]\n    exact (innerSL ℝ a).fderiv\n  have hq : MemLp (gradient f) 2 μ := hgrad ▸ memLp_const a\n  obtain ⟨_, hb⟩ := GibbsC1Poincare.gibbs_c1_variance_poincare\n    W hW hI hZ m M hm hmM hlower hupper f hf hp hq\n  have henergy : Poincare.dirichletEnergy μ f = ‖a‖^2 := by\n    simp only [Poincare.dirichletEnergy, hgrad]\n    simp\n  rw [henergy] at hb\n  have hcov : covarianceBilin μ a a = Poincare.variance μ f := by\n    rw [covarianceBilin_self hX a, variance_eq_integral hp.aemeasurable]\n    rfl\n  rw [hcov]\n  exact (le_div_iff₀ hm).2 (by simpa only [mul_comm] using hb)\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GibbsC1Poincare\nimport Mathlib.Probability.Moments.CovarianceBilin\n\nopen MeasureTheory ProbabilityTheory InnerProductSpace\nopen scoped RealInnerProductSpace\nopen AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities\nnoncomputable section\nset_option autoImplicit false\nset_option backward.isDefEq.respectTransparency false\n\nexample\n    {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]\n    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [CompleteSpace E]\n    (W : E → ℝ) (hW : ContDiff ℝ 2 W)\n    (hI : Integrable (fun x => Real.exp (-W x)))\n    (hZ : 0 < ∫ x, Real.exp (-W x))\n    (m M : ℝ) (hm : 0 < m) (hmM : m ≤ M)\n    (hlower : ∀ x a, m*‖a‖^2 ≤ fderiv ℝ (fderiv ℝ W) x a a)\n    (hupper : ∀ x a, fderiv ℝ (fderiv ℝ W) x a a ≤ M*‖a‖^2)\n    (hX : MemLp id 2 ((volume : Measure E).tilted (fun x => -W x))) :\n    let μ := (volume : Measure E).tilted (fun x => -W x)\n    ∀ a : E, ProbabilityTheory.covarianceBilin μ a a ≤ ‖a‖^2/m := by\n  -- Replace this comment with your proof.\n", "library_domains": ["log-concave-sampling", "samplewiki"], "question": "Prove Covμ(a,a)≤‖a‖²/m for every a∈E, interpreting Covμ(a,a) as the covariance of the linear observable x↦⟨a,x⟩ with itself. Establish its smoothness and L² properties, evaluate its Dirichlet energy, and justify the covariance/variance identification. Separate premises of this current API from stronger claims about when moments or an upper curvature bound are mathematically necessary.", "rubric": [{"criterion": "Uses normalized probability and genuine smoothness to identify the linear observable's constant gradient a.", "points": 1}, {"criterion": "Checks scalar L² from the supplied vector L² hypothesis and gradient L² from finite probability mass.", "points": 1}, {"criterion": "Computes energy exactly ‖a‖² and justifies covarianceBilin(a,a)=variance of the linear observable on the L² domain.", "points": 1}, {"criterion": "Applies the stated Poincaré estimate and positive-m division with constant 1/m, retaining the actual API premises and not asserting full anisotropic Brascamp–Lieb.", "points": 1}], "skills": ["proof", "calculation", "assumption-audit"], "source_file": "AutoSamplingTheory/TechnicalLemmas/FunctionalInequalities/GibbsLinearCovarianceUpper.lean", "source_line": 19, "source_note": "Original library-grounded QA over the existing GibbsLinearCovarianceUpper proof. SmoothedPicardHMC.SmoothedHessianBounds.smoothed_hessian_bounds actually calls this producer for its RGO posterior covariance upper bound, corresponding to the upper-covariance ingredient of arXiv:2609.06906v1 §4.1, Lemma 4.1. The local route uses scalar Poincaré; it does not purport to reproduce an anisotropic statement not present in its target. The mathematical family is conservatively shared with the original smoothing-transfer audit sogb-026. No paper prose or restricted source is copied.", "source_sha256_lf": "2ee3ea7afbedde94d75b1056226baaf6171f330b582949b89a8ccbff90b915f2", "split": "public-dev", "steps": ["The density assumptions make μ the normalized Gibbs probability measure. This is used in the energy calculation; the notation tilted alone is not permission to treat an arbitrary totalized density expression as a probability measure.", "For a fixed a, set f_a(x)=⟨a,x⟩. The continuous linear functional is genuinely C¹ with derivative v↦⟨a,v⟩ and gradient a at every x. These derivative facts are proved from the continuous-linear-map API, not from a fallback value of totalized fderiv.", "The supplied vector L² hypothesis implies f_a∈L²(μ), by continuity of inner product with a. The gradient is the constant vector a; a constant is in L² of a probability measure. Thus both integrability interfaces of Gibbs C¹ Poincaré have been checked.", "Normalization and the constant gradient give the exact energy \\[\\mathcal E_\\mu(f_a)=\\int\\|\\nabla f_a(x)\\|^2\\,d\\mu(x)=\\|a\\|^2.\\] There is no hidden dimension factor.", "With these L² hypotheses, the actual covariance bilinear form satisfies \\[\\operatorname{Cov}_\\mu(a,a)=\\operatorname{Var}_\\mu(f_a).\\] The proof uses covarianceBilin_self followed by the integral formula for variance. The vector L² hypothesis is important for interpreting this totalized covariance API as the intended second moment.", "Apply the imported Poincaré estimate and substitute the energy identity: \\[m\\operatorname{Cov}_\\mu(a,a)\\le\\|a\\|^2.\\] Since m>0, division preserves the inequality and gives the required bound. This also covers a=0 and the zero-dimensional space.", "Both curvature bounds and the position L² premise remain part of this exact Lean interface, although the final constant depends only on m. This proof neither establishes their sharp mathematical necessity nor produces the vector moment from scratch. The SPHMC posterior consumer separately supplies that moment before applying this lemma."], "title": "From Gibbs Poincaré to a directional covariance bound", "track_levels": {"lean": "L3", "natural-language": "L3"}}
{"additional_source_declarations": ["AutoSamplingTheory.TechnicalLemmas.Analysis.GibbsGradientMoment.gibbs_covariance_lower", "AutoSamplingTheory.TechnicalLemmas.Measure.GaussianConvolutionRegularity.gaussian_convolution_derivatives", "AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedHessianUpper.smoothed_hessian_upper", "AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedHessianBounds.smoothed_hessian_bounds"], "assumptions": ["Work on ℝᵈ with d≥1 and Lebesgue measure. Let V∈C²(ℝᵈ), with real constants m≤M satisfying mI≼∇²V≼MI everywhere; m and M need not be nonnegative.", "Fix η>0 with c=m+η⁻¹>0. Define Cη=(2πη)⁻ᵈᐟ², qη(y)=Cη∫exp(−V(x)−‖x−y‖²/(2η))dx and Uη(y)=−log qη(y). Do not assume ∫exp(−V)<∞ or a probability prior at the outset.", "The existing Gibbs covariance producers may be used once their actual C², positive lower/finite upper posterior curvature, normalization and moment hypotheses are verified. A Gaussian kernel has integral one; elementary polynomial-Gaussian integrability, dominated parameter differentiation and Tonelli are available with their hypotheses checked.", "This is an original extension/audit question motivated by SPHMC v1 §4.1, equation (4.1) and Lemma 4.1, not a claim that the paper states a weakly convex extension. Its original strong-convexity setting and algorithmic conclusions must not be silently replaced."], "binding_sha256": "fd49b5de54ddc240ba020368b624adc6d081d39a2c3e4378761f243fc0827279", "boundary": "An original, independently reviewable natural-language transfer/audit exercise, not a new production theorem, paper flaw, fully formalized weakly convex sampler or empirical L5 result. The cited local results support only their exact existing strong-convexity/probability interfaces or the positive-curvature posterior substeps. The unnormalized analytic adapter and the entire extended QA have no aligned Lean view. No claim is made at m+η⁻¹≤0, in infinite dimension, or about algorithmic convergence, initialization or cost.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GibbsLinearCovarianceUpper.gibbs_linear_covariance_upper", "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GibbsLinearCovarianceUpper.gibbs_linear_covariance_upper", "AutoSamplingTheory.TechnicalLemmas.Analysis.GibbsGradientMoment.gibbs_covariance_lower", "AutoSamplingTheory.TechnicalLemmas.Measure.GaussianConvolutionRegularity.gaussian_convolution_derivatives", "AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedHessianUpper.smoothed_hessian_upper", "AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedHessianBounds.smoothed_hessian_bounds"], "mathlib": []}, "difficulty": "advanced", "difficulty_reason": "An original advanced graduate-level transfer and source-interface audit: the supplied positive-curvature covariance producers are combined with locally uniform Gaussian domination, signed endpoint algebra and an exact normalization counterexample. Editorial difficulty remains uncalibrated.", "domain": "sampling", "family": "posterior-curvature-smoothing", "id": "sogb-026", "imports": [], "lean_enabled": false, "lean_explanation": "The optional module proves only the actual directional Gibbs covariance upper producer, with normalization, vector L² and both curvature bounds in its interface. Additional hash-bound source links expose the separate covariance lower producer, the probability-input Gaussian derivative identity, and the strong-convexity SPHMC consumers. Their exact statements explain what can and cannot be reused. They do not prove this weak-convexity extension, its unnormalized domination argument, its counterexample or its full formula proof. There is deliberately no equivalent Lean task or compiler certificate for this QA.", "lean_reference": "", "lean_task": "", "library_domains": ["samplewiki", "log-concave-sampling", "optimisation"], "question": "A proposed extension says: ‘Drop positive curvature of V, retain m+η⁻¹>0, and reuse the SPHMC smoothing proof unchanged; the result is a normalized smoothed sampling law with gradient Lipschitz constant M/(1+Mη).’ Audit and repair this claim. Establish the pointwise analytic and posterior interfaces rather than assuming the covariance identity, derive sharp two-sided Hessian bounds and a valid nonnegative gradient Lipschitz constant, and decide which normalization and existing Lean API steps still require new work. Give an exact concave-quadratic counterexample to the overclaims. Do not infer an algorithmic complexity theorem.", "rubric": [{"criterion": "Constructs the posterior Gaussian lower bound locally uniformly in y, checks polynomial-Gaussian domination for first/second y derivatives and L² moments, and derives the genuine log-Hessian covariance identity without assuming prior normalization.", "points": 1}, {"criterion": "Verifies both positive posterior curvature interfaces, uses both covariance directions with the correct order reversal, and derives the exact signed endpoints m/(1+mη), M/(1+Mη) with positive denominators.", "points": 1}, {"criterion": "Derives the nonnegative operator-norm/Lipschitz constant max of absolute endpoints and computes the concave-quadratic example that falsifies the proposed negative constant and probability claim.", "points": 1}, {"criterion": "Uses Tonelli to distinguish finite pointwise convolution from finite total mass, states the separate Z normalization condition, and identifies the actual probability/positive-prior-curvature Lean API gaps without claiming a transferred sampling algorithm theorem.", "points": 1}], "skills": ["proof", "composition", "assumption-audit", "counterexample", "semantic-boundary"], "source_file": "AutoSamplingTheory/TechnicalLemmas/FunctionalInequalities/GibbsLinearCovarianceUpper.lean", "source_line": 19, "source_note": "Original ASTIS-authored extension and counterexample, motivated by Fan Chen, Sinho Chewi, Jianfeng Lu and Matthew S. Zhang, Smoothed Picard Hamiltonian Monte Carlo, arXiv:2609.06906v1 §4.1, equation (4.1), Lemma 4.1. Primary source: https://arxiv.org/html/2609.06906v1 . That lemma concerns the paper's strongly convex prior and 0<η≤1; this QA explicitly changes the problem to an unnormalized weakly convex potential rather than attributing that extension to the authors. The v1 paper has an arXiv non-exclusive distribution grant, not a blanket permission to copy its text into ML data; only an original mathematical exercise/proof and bibliographic correspondence are included. All additional local support modules and their import closures are bound to editorial review. No restricted source or derivative dataset is used.", "source_sha256_lf": "2ee3ea7afbedde94d75b1056226baaf6171f330b582949b89a8ccbff90b915f2", "split": "public-dev", "steps": ["Set W_y(x)=V(x)+‖x−y‖²/(2η). Its Hessian in x lies between cI and bI, where c=m+η⁻¹>0 and b=M+η⁻¹≥c. Positive posterior curvature is available even when V itself is concave. In particular both 1+mη and 1+Mη are positive.", "The lower Taylor bound V(x)≥V(0)+⟨∇V(0),x⟩+(m/2)‖x‖² implies \\[W_y(x)\\ge\\frac c2\\|x\\|^2+\\langle\\nabla V(0)-y/\\eta,x\\rangle+V(0)+\\frac{\\|y\\|^2}{2\\eta}.\\] On every ball ‖y‖≤R, Young's inequality absorbs the linear term and gives W_y(x)≥(c/4)‖x‖²−A_R for a finite constant A_R. Thus the posterior normalizer is finite and strictly positive for every y, with all polynomial position moments finite.", "The integrand is positive and continuous. Its first y derivatives are (x_i−y_i)/η times itself; its second derivatives have factors (x_i−y_i)(x_j−y_j)/η²−δ_ij/η. On ‖y‖≤R their absolute values are bounded by B_R(1+‖x‖²)exp(−c‖x‖²/4), an integrable function independent of y. Dominated parameter differentiation, including continuity of these derivatives, gives qη∈C² and qη>0; hence Uη∈C². This establishes an unnormalized analytic interface without first declaring exp(−V) integrable.", "Normalize exp(−W_y) to obtain the actual posterior Π_y; its position is in L² by the same Gaussian bound. Differentiating qη and then its logarithm gives \\[\\nabla U_\\eta(y)=\\eta^{-1}(y-\\mathbb E_{\\Pi_y}X),\\qquad\\nabla^2U_\\eta(y)=\\eta^{-1}I-\\eta^{-2}\\operatorname{Cov}_{\\Pi_y}(X).\\] The moments and dominated differentiation justify these identities; they are not merely identities assigned to totalized derivatives.", "Apply the Gibbs covariance upper producer to W_y, retaining its normalization, vector L² and both curvature hypotheses. Apply the covariance lower producer to the same potential, representing c,b as positive nonnegative-real parameters where its Lean interface requires them. They give \\[b^{-1}I\\preceq\\operatorname{Cov}_{\\Pi_y}(X)\\preceq c^{-1}I.\\] The upper covariance bound is the Poincaré ingredient; the reverse bound is a separate Cramér–Rao ingredient. Neither direction supplies the other.", "Subtracting a covariance from η⁻¹I reverses its order. Substitution and exact algebra therefore yield \\[\\frac{m}{1+m\\eta}I\\preceq\\nabla^2U_\\eta(y)\\preceq\\frac{M}{1+M\\eta}I.\\] For example the lower endpoint is η⁻¹−η⁻²/c=m/(1+mη). These signed bounds remain meaningful when m or M is negative; denominators are positive by the first step.", "A one-sided Hessian upper bound is not an operator-norm bound in the presence of negative eigenvalues. Since the Hessian is self-adjoint, the two-sided bounds imply \\[\\|\\nabla^2U_\\eta(y)\\|_{\\rm op}\\le L_\\eta:=\\max\\!\\left\\{\\left|\\frac m{1+m\\eta}\\right|,\\left|\\frac M{1+M\\eta}\\right|\\right\\}.\\] Integrating the genuine derivative of ∇Uη along a line segment proves global Lη-Lipschitz continuity. If m≥0 this reduces to M/(1+Mη), but not in general.", "For the exact failure example take V(x)=−a‖x‖²/2, a>0 and 0<η<1/a, so m=M=−a and c>0. Completing the square gives \\[q_\\eta(y)=(1-a\\eta)^{-d/2}\\exp\\!\\left(\\frac{a\\|y\\|^2}{2(1-a\\eta)}\\right).\\] Hence \\[U_\\eta(y)=\\frac d2\\log(1-a\\eta)-\\frac{a\\|y\\|^2}{2(1-a\\eta)},\\qquad\\nabla^2U_\\eta=-\\frac a{1-a\\eta}I.\\] Its gradient has Lipschitz constant a/(1−aη)>0, whereas the proposed M/(1+Mη) is negative. The two-sided Hessian bound is attained exactly.", "For nonnegative densities Tonelli and the unit-mass Gaussian kernel give, as extended nonnegative integrals, \\[\\int q_\\eta(y)\\,dy=\\int e^{-V(x)}\\,dx.\\] Pointwise finiteness of qη therefore does not imply a probability law. In the example both total masses are infinite. To define the normalized smoothed sampling law one separately needs 0<Z=∫e⁻ⱽ<∞ and then uses qη/Z; its potential Uη+log Z has the same derivatives. These extended-integral conclusions must not be read as Lean real Bochner integrals returning infinity: those real integrals are totalized outside integrability.", "The local GaussianConvolutionRegularity.gaussian_convolution_derivatives assumes a probability input μ; it cannot be called on an unnormalizable prior to replace the new domination proof above. SmoothedHessianUpper.smoothed_hessian_upper assumes positive lower curvature of V, and the paper-specialized SmoothedHessianBounds also assumes its κ and η regime; neither is an unchanged weak-convexity interface. Their posterior covariance ingredients can be reused after the new analytic/normalization adapters, whose complete Lean realization is absent here. No SPHMC dynamics, warm-start, error, query-cost or main-theorem claim follows from this QA."], "support_lean_source": "import AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GibbsC1Poincare\nimport Mathlib.Probability.Moments.CovarianceBilin\n\n/-! Actual isotropic covariance upper from the original closed-gradient Poincare\nproducer. The observable is the genuine linear functional, its gradient is the\nconstant direction, and normalized Dirichlet energy is exactly its squared norm.\nActual vectorL2 is explicit in this canonical interface because Mathlib's\ncovarianceBilin is totalized outside that domain. The source SPHMC consumer must\nproduce this moment internally. BOTH curvature bounds are explicit; no full\nanisotropic Brascamp-Lieb or sampler/main claim. -/\n\nnamespace AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GibbsLinearCovarianceUpper\nopen MeasureTheory ProbabilityTheory InnerProductSpace\nopen scoped RealInnerProductSpace\nnoncomputable section\nset_option autoImplicit false\nset_option backward.isDefEq.respectTransparency false\n\ntheorem gibbs_linear_covariance_upper\n    {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E]\n    [FiniteDimensional ℝ E] [MeasurableSpace E] [BorelSpace E] [CompleteSpace E]\n    (W : E → ℝ) (hW : ContDiff ℝ 2 W)\n    (hI : Integrable (fun x => Real.exp (-W x)))\n    (hZ : 0 < ∫ x, Real.exp (-W x))\n    (m M : ℝ) (hm : 0 < m) (hmM : m ≤ M)\n    (hlower : ∀ x a, m*‖a‖^2 ≤ fderiv ℝ (fderiv ℝ W) x a a)\n    (hupper : ∀ x a, fderiv ℝ (fderiv ℝ W) x a a ≤ M*‖a‖^2)\n    (hX : MemLp id 2 ((volume : Measure E).tilted (fun x => -W x))) :\n    let μ := (volume : Measure E).tilted (fun x => -W x)\n    ∀ a : E, ProbabilityTheory.covarianceBilin μ a a ≤ ‖a‖^2/m := by\n  let μ := (volume : Measure E).tilted (fun x => -W x)\n  let : IsProbabilityMeasure μ := isProbabilityMeasure_tilted hI\n  dsimp only\n  intro a\n  let f : E → ℝ := fun x => inner ℝ a x\n  have hf : ContDiff ℝ 1 f := (innerSL ℝ a).contDiff\n  have hp : MemLp f 2 μ := hX.const_inner a\n  have hgrad : gradient f = fun _ => a := by\n    funext x\n    apply (toDual ℝ E).injective\n    rw [toDual_gradient]\n    exact (innerSL ℝ a).fderiv\n  have hq : MemLp (gradient f) 2 μ := hgrad ▸ memLp_const a\n  obtain ⟨_, hb⟩ := GibbsC1Poincare.gibbs_c1_variance_poincare\n    W hW hI hZ m M hm hmM hlower hupper f hf hp hq\n  have henergy : Poincare.dirichletEnergy μ f = ‖a‖^2 := by\n    simp only [Poincare.dirichletEnergy, hgrad]\n    simp\n  rw [henergy] at hb\n  have hcov : covarianceBilin μ a a = Poincare.variance μ f := by\n    rw [covarianceBilin_self hX a, variance_eq_integral hp.aemeasurable]\n    rfl\n  rw [hcov]\n  exact (le_div_iff₀ hm).2 (by simpa only [mul_comm] using hb)\n\nend\nend AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GibbsLinearCovarianceUpper\n", "support_source_view": true, "supporting_declarations": [{"declaration": "AutoSamplingTheory.TechnicalLemmas.Analysis.GibbsGradientMoment.gibbs_covariance_lower", "source_file": "AutoSamplingTheory/TechnicalLemmas/Analysis/GibbsGradientMoment.lean", "source_line": 511, "source_sha256_lf": "14edaf4edde91c9d4e01c66deccab7302b2d6bd428e054cf77f3e4b834cf951d"}, {"declaration": "AutoSamplingTheory.TechnicalLemmas.Measure.GaussianConvolutionRegularity.gaussian_convolution_derivatives", "source_file": "AutoSamplingTheory/TechnicalLemmas/Measure/GaussianConvolutionRegularity.lean", "source_line": 435, "source_sha256_lf": "37fac669ee54535870e2b7e46cb5a848966a2e02100b90cb168db5a11bf9f043"}, {"declaration": "AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedHessianUpper.smoothed_hessian_upper", "source_file": "AutoSamplingTheory/ExampleCases/SmoothedPicardHMC/SmoothedHessianUpper.lean", "source_line": 31, "source_sha256_lf": "48ca3942ab5a690d332f2cf86af6989a283dbff1f7e338ff912bdb8dfc3e2650"}, {"declaration": "AutoSamplingTheory.ExampleCases.SmoothedPicardHMC.SmoothedHessianBounds.smoothed_hessian_bounds", "source_file": "AutoSamplingTheory/ExampleCases/SmoothedPicardHMC/SmoothedHessianBounds.lean", "source_line": 21, "source_sha256_lf": "21fb86ff7d3e3a2d31ccc202afc2489fae90f52c17b322a4ef4e21c80c4ad172"}], "title": "Can the SPHMC smoothing argument survive weak convexity?", "track_levels": {"natural-language": "L4"}}
{"additional_source_declarations": ["AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.TwoPointEntropy.two_point_squared_entropy_le_half_sq_sub"], "assumptions": ["For each n≥0 let Ωₙ={0,1}ⁿ with the full sigma algebra and uniform probability μₙ, giving every configuration mass 2⁻ⁿ. The space Ω₀ has one configuration, not zero configurations. All functions considered are finite real-valued, with no positivity or normalization assumption on h.", "Write φ(s)=s log s for s>0 and φ(0)=0. Define Entₙ(h²)=Eμₙφ(h²)−φ(Eμₙh²). This convention agrees with h²*Real.log(h²), including zeros.", "For j<n, εʲ is obtained by toggling only coordinate j. Define Dₙh(ε) as the sum over all j<n of (h(ε)−h(εʲ))², not divided by n.", "You may use the existing two-point inequality, valid for all real a,b: [φ(a²)+φ(b²)]/2−φ((a²+b²)/2)≤(a−b)²/2. Do not assume the n-dimensional conclusion or an entropy tensorization theorem."], "binding_sha256": "7da6ccd4e2fbac80e8597c8d5421fb083791810652c7a3838214fa305763cf89", "boundary": "An original NL exercise over an existing compiled finite-product theorem, with no equivalent fixed Lean task and no new production declaration. The supporting module does prove the displayed log-Sobolev bound with actual normalization and L¹ conclusions, but not the separate counterexample or every explanatory sentence. General entropy tensorization, noncompact/Hilbert extensions and sampler convergence remain outside this QA.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.BernoulliLogSobolev.bernoulli_function_logSobolev", "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.TwoPointEntropy.two_point_squared_entropy_le_half_sq_sub"], "mathlib": ["Integrable.of_finite", "Real.sq_sqrt", "Fin.snocEquiv", "Fin.sum_univ_castSucc", "Finset.sum_le_sum"]}, "difficulty": "intermediate", "difficulty_reason": "Coordinate a conditional entropy identity, a nonlinear RMS contraction, a full coordinate-flip energy decomposition and dimension induction with exact normalization. Diagnose an arithmetic-mean shortcut using an explicit signed example. This is a multi-step finite-product proof, not empirical difficulty calibration.", "domain": "discrete sampling", "family": "bernoulli-gaussian-entropy-limit", "id": "sogb-027", "imports": [], "lean_enabled": false, "lean_explanation": "The folded exact module includes the real normalized-counting law, finite-integrability obligations and private entropy/RMS induction. Its private entropy_chain, energy_chain and rms_energy helpers implement the three mathematical ingredients above; these short helper names are not advertised as new public declarations. The final public theorem packages the bound and probability/L¹ conclusions by calling the proved induction. The module is supplied intact, retaining its upstream Apache notices, authors and pinned SLT provenance. There is no aligned Lean QA: extracting only its final constructor call would test a wrapper rather than reconstruct the substantive induction. The arithmetic-mean counterexample is original prose, not an extra compiled conclusion.", "lean_reference": "", "lean_task": "", "library_domains": ["discrete-sampling", "log-concave-sampling"], "question": "Prove Entₙ(h²)≤(1/2)EμₙDₙh for all n≥0 and all signed h. Construct the conditional RMS after separating the last coordinate; derive the entropy identity, its energy contraction and the dimension induction with the exact factor. Justify finite-law normalization and all integral domains, including n=0 and zero values. Finally exhibit why replacing that RMS by the ordinary conditional mean can invalidate the entropy identity.", "rubric": [{"criterion": "Normalizes the finite law, checks finite measurability/integrability and derives the exact conditional entropy identity using preservation of the squared mean.", "points": 1}, {"criterion": "Proves the RMS contraction and the prefix/last-coordinate energy decomposition, without losing the factor from averaging the two orientations of the last flip.", "points": 1}, {"criterion": "Combines the given two-point bound with dimension induction to obtain the exact 1/2 constant, including the singleton n=0 base and signed/zero functions.", "points": 1}, {"criterion": "Gives a valid explicit failure of the ordinary conditional-mean entropy identity, such as the sign-cancelling unequal-amplitude example, rather than asserting a counterexample to the true log-Sobolev inequality.", "points": 1}], "skills": ["proof", "calculation", "assumption-audit", "counterexample"], "source_file": "AutoSamplingTheory/TechnicalLemmas/FunctionalInequalities/BernoulliLogSobolev.lean", "source_line": 265, "source_note": "Original library-grounded formulation and proof guide, not copied textbook prose. The exact BernoulliLogSobolev module credits minimally adapted law/snoc helpers to the Apache-2.0 SLT BernoulliLSI source at commit d0f506f0a695018265dccb33bcb05e2f5ca1c876, retaining its Yuanhe Zhang / Jason D. Lee / Fanghui Liu notice; its entropy/RMS induction is the local authored alternative. Its actual consumer GaussianCompactLogSobolev.compact_gaussian_logSobolev applies the finite bound to normalized Rademacher sums. This core shares a public family with sogb-028; their common source/proof route must not be split into nominally independent train/test families. No restricted material or external dataset is used.", "source_sha256_lf": "eb2cab559551d03001cf9f6679ce69864a974d317316f80a870203ed120a46c0", "split": "public-dev", "steps": ["The uniform law has total mass 2ⁿ·2⁻ⁿ=1, also for n=0. Every displayed finite real function is measurable and integrable on this finite space. The value φ(0)=0 removes any fictitious strict-positivity requirement on h or its squared mean; no logarithm of a positive normalizer is used.", "Separate a configuration into (x,β)∈Ωₙ×{0,1}. Put a(x)=h(x,0), b(x)=h(x,1) and \\[R(x)=\\sqrt{\\frac{a(x)^2+b(x)^2}{2}},\\qquad\\ell(x)=\\frac{\\phi(a(x)^2)+\\phi(b(x)^2)}2-\\phi(R(x)^2).\\] Uniform counting gives Eμₙ₊₁g=Eμₙ[(g(x,0)+g(x,1))/2].", "Because R²=(a²+b²)/2, the squared mean is preserved: EμₙR²=Eμₙ₊₁h². Add and subtract Eμₙφ(R²) to get the exact identity \\[\\operatorname{Ent}_{n+1}(h^2)=\\mathbb E_{\\mu_n}\\ell+\\operatorname{Ent}_n(R^2).\\] All subtractions concern finite integrals. This is a proved identity for this finite law, not an invocation of general tensorization.", "Define P(x) as the sum over j<n of [(a(x)−a(xʲ))²+(b(x)−b(xʲ))²]/2, and L(x)=(a(x)−b(x))². Toggling a prefix coordinate preserves the last bit; toggling the last bit exchanges the two slices. Therefore \\[\\mathbb E_{\\mu_{n+1}}D_{n+1}h=\\mathbb E_{\\mu_n}(P+L).\\] Averaging the two last-coordinate square differences gives L, not L/2: they are equal after reversing the subtraction.", "For u=(a,b)/√2 and v=(c,d)/√2 in ℝ², the reverse triangle inequality gives \\[(\\sqrt{(a^2+b^2)/2}-\\sqrt{(c^2+d^2)/2})^2\\le\\frac{(a-c)^2+(b-d)^2}{2}.\\] Apply this to each pair of neighboring prefix configurations and sum over coordinates. It yields DₙR≤P pointwise and hence EμₙDₙR≤EμₙP. The existing Lean helper proves this same RMS contraction by Cauchy–Schwarz algebra.", "The supplied two-point inequality gives ℓ(x)≤L(x)/2 for every prefix x, for arbitrary signs and zeros. Integrating preserves that inequality. Assuming the n-dimensional bound for R, combine the three ingredients: \\[\\operatorname{Ent}_{n+1}(h^2)\\le\\frac12\\mathbb E L+\\frac12\\mathbb E D_nR\\le\\frac12\\mathbb E(L+P)=\\frac12\\mathbb E D_{n+1}h.\\] This keeps the same factor at every dimension.", "At n=0, there is one atom, so Eφ(h²)=φ(Eh²) and entropy is zero; the empty coordinate sum is zero as well. This starts induction without dividing by n or assuming a positive squared mean. It also covers the identically zero function in every dimension.", "For a counterexample to replacing RMS by conditional mean, take a prefix x∈{0,1}, set A(0)=1,A(1)=2, and let h(x,0)=A(x), h(x,1)=−A(x). Then the conditional mean M is identically zero and the actual local entropy ℓ is identically zero. But \\[\\operatorname{Ent}_2(h^2)=\\frac{\\phi(1)+\\phi(4)}2-\\phi(5/2)>0,\\] by strict convexity of φ on the positive interval [1,4]. The proposed replacement would give 0+Ent₁(M²)=0, contradicting the identity. The squared mean must be preserved; averaging signs does not do that.", "The energy here is the full sum of coordinate-flip squared differences under a probability law. Replacing it by an average over coordinates changes constants. The result is a finite functional inequality, not by itself a convergence theorem for a chosen discrete-time sampler or a noncompact Gaussian inequality."], "support_lean_source": "/-\nCopyright (c) 2026 Yuanhe Zhang. All rights reserved.\nReleased under Apache 2.0 license as described in the file LICENSE.\nAuthors: Yuanhe Zhang, Jason D. Lee, Fanghui Liu\n-/\nimport AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.TwoPointEntropy\nimport Mathlib.MeasureTheory.Measure.Count\nimport Mathlib.MeasureTheory.Integral.Bochner.Basic\nimport Mathlib.MeasureTheory.Measure.ProbabilityMeasure\nimport Mathlib.Data.Fin.Tuple.Basic\n\n/-!\n# Bernoulli function log-Sobolev inequality\n\nThe genuine law is normalized counting measure. Law/snoc helpers are minimally\nadapted from the pinned SLT BernoulliLSI source (Apache 2.0, commit\nd0f506f0a695018265dccb33bcb05e2f5ca1c876). The entropy/RMS induction below is\nan authored alternative to Han tensorization. Gaussian limits remain separate.\n-/\nopen MeasureTheory ProbabilityTheory Real Set Filter Function\nopen scoped ENNReal NNReal BigOperators Topology\nnoncomputable section\nnamespace AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.BernoulliLogSobolev\nvariable {n : ℕ}\nprivate def flipCoord (j : Fin n) (ε : Fin n → Bool) : Fin n → Bool :=\n  update ε j (!ε j)\n\n@[simp] private theorem flipCoord_same (j : Fin n) (ε : Fin n → Bool) :\n    (flipCoord j ε) j = !ε j := by\n  simp [flipCoord]\n\nprivate theorem flipCoord_noteq (j i : Fin n) (ε : Fin n → Bool) (h : i ≠ j) :\n    (flipCoord j ε) i = ε i := by\n  simp only [flipCoord, update_of_ne h]\n\nprivate def bernoulliUniform (n : ℕ) : Measure (Fin n → Bool) :=\n  ((Finset.univ : Finset (Fin n → Bool)).card : ℝ≥0∞)⁻¹ • Measure.count\n\nprivate theorem card_fin_bool (n : ℕ) : Finset.card (Finset.univ : Finset (Fin n → Bool)) = 2^n := by\n  simp only [Finset.card_univ, Fintype.card_fun, Fintype.card_fin, Fintype.card_bool]\n\nprivate theorem bernoulli_integral_eq_sum {n : ℕ} (f : (Fin n → Bool) → ℝ) :\n    ∫ ε, f ε ∂(bernoulliUniform n) = (∑ ε : Fin n → Bool, f ε) / 2^n := by\n  unfold bernoulliUniform\n  rw [integral_smul_measure]\n  rw [MeasureTheory.integral_fintype (Integrable.of_finite : Integrable f Measure.count)]\n  rw [card_fin_bool n]\n  simp only [Nat.cast_pow, Nat.cast_ofNat, smul_eq_mul, count_real_singleton, one_mul]\n  rw [ENNReal.toReal_inv, ENNReal.toReal_pow, ENNReal.toReal_ofNat]\n  ring\n\nprivate theorem sum_fin_succ_bool_eq_sum_snoc {n : ℕ} (f : (Fin (n+1) → Bool) → ℝ) :\n    ∑ ε : Fin (n+1) → Bool, f ε =\n    ∑ ε' : Fin n → Bool, (f (Fin.snoc ε' true) + f (Fin.snoc ε' false)) := by\n  -- Use Fin.snocEquiv: (Fin (n+1) → α) ≃ α × (Fin n → α) at last position\n  -- But we need (Fin n → α) × α, so use Prod.swap\n  let h_equiv : (Fin (n+1) → Bool) ≃ (Fin n → Bool) × Bool :=\n    (Fin.snocEquiv (fun _ => Bool)).symm.trans (Equiv.prodComm _ _)\n  calc ∑ ε : Fin (n+1) → Bool, f ε\n      = ∑ p : (Fin n → Bool) × Bool, f (h_equiv.symm p) := by\n          rw [Fintype.sum_equiv h_equiv.symm]\n          simp\n    _ = ∑ ε' : Fin n → Bool, ∑ b : Bool, f (h_equiv.symm (ε', b)) := by\n          rw [Fintype.sum_prod_type]\n    _ = ∑ ε' : Fin n → Bool, (f (h_equiv.symm (ε', true)) + f (h_equiv.symm (ε', false))) := by\n          congr 1\n          ext ε'\n          simp only [Fintype.sum_bool]\n    _ = ∑ ε' : Fin n → Bool, (f (Fin.snoc ε' true) + f (Fin.snoc ε' false)) := by\n          congr 1\n\nprivate theorem bernoulli_integral_succ_split {n : ℕ} (f : (Fin (n+1) → Bool) → ℝ) :\n    ∫ ε, f ε ∂(bernoulliUniform (n+1)) =\n    ∫ ε', (f (Fin.snoc ε' true) + f (Fin.snoc ε' false)) / 2 ∂(bernoulliUniform n) := by\n  rw [bernoulli_integral_eq_sum, bernoulli_integral_eq_sum]\n  rw [sum_fin_succ_bool_eq_sum_snoc]\n  rw [pow_succ]\n  rw [Finset.sum_div]\n  -- Goal: ∑ i, (f true + f false) / (2^n * 2) = (∑ i, (f true + f false) / 2) / 2^n\n  -- Rewrite RHS: (∑ (x/2)) / 2^n = ∑ (x / (2 * 2^n)) = ∑ (x / (2^n * 2))\n  rw [Finset.sum_div]\n  congr 1\n  ext i\n  ring\n\nprivate def gradientNormSq (n : ℕ) (h : (Fin n → Bool) → ℝ) (ε : Fin n → Bool) : ℝ :=\n  ∑ j : Fin n, (h ε - h (flipCoord j ε))^2\n\nprivate theorem gradientNormSq_succ_decomposition {n : ℕ} (h : (Fin (n + 1) → Bool) → ℝ)\n    (ε : Fin (n + 1) → Bool) :\n    gradientNormSq (n + 1) h ε =\n    (∑ j : Fin n, (h ε - h (flipCoord (Fin.castSucc j) ε))^2) +\n    (h ε - h (flipCoord (Fin.last n) ε))^2 := by\n  simp only [gradientNormSq]\n  rw [Fin.sum_univ_castSucc]\n\nprivate theorem flipCoord_last_snoc {n : ℕ} (ε' : Fin n → Bool) (b : Bool) :\n    flipCoord (Fin.last n) (Fin.snoc ε' b) = Fin.snoc ε' (!b) := by\n  ext i\n  by_cases h : i = Fin.last n\n  · simp only [h, flipCoord_same, Fin.snoc_last]\n  · have hi : i.val < n := by\n      have hlt := i.isLt\n      have hne : i.val ≠ n := by\n        intro heq\n        apply h; ext; simp [Fin.last, heq]\n      omega\n    have hne' : i ≠ Fin.last n := fun heq => h heq\n    rw [flipCoord_noteq (Fin.last n) i _ hne']\n    simp only [Fin.snoc, hi, ↓reduceDIte]\n\nprivate theorem flipCoord_castSucc_snoc {n : ℕ} (j : Fin n) (ε' : Fin n → Bool) (b : Bool) :\n    flipCoord (Fin.castSucc j) (Fin.snoc ε' b) = Fin.snoc (flipCoord j ε') b := by\n  ext i\n  by_cases hi_last : i = Fin.last n\n  · -- i is the last index\n    simp only [hi_last, Fin.snoc_last]\n    have hne : Fin.last n ≠ Fin.castSucc j := by\n      intro heq\n      have hval : (Fin.last n).val = (Fin.castSucc j).val := congrArg Fin.val heq\n      simp only [Fin.last, Fin.val_castSucc] at hval\n      omega\n    rw [flipCoord_noteq (Fin.castSucc j) (Fin.last n) _ hne]\n    simp [Fin.snoc]\n  · -- i is not the last index\n    have hi : i.val < n := by\n      have hlt := i.isLt\n      have hne : i.val ≠ n := by\n        intro heq\n        apply hi_last; ext; simp [Fin.last, heq]\n      omega\n    by_cases hj : i = Fin.castSucc j\n    · -- i = castSucc j\n      subst hj\n      simp only [flipCoord_same, Fin.snoc]\n      have hi' : (Fin.castSucc j).val < n := by simp [Fin.val_castSucc]\n      simp only [hi', ↓reduceDIte]\n      -- Need to show !ε'(castLT (castSucc j)) = flipCoord j ε' (castLT (castSucc j))\n      have hcast_eq : Fin.castLT (Fin.castSucc j) hi' = j := by\n        ext; simp [Fin.castLT, Fin.castSucc]\n      simp only [hcast_eq, flipCoord_same, cast_eq]\n    · -- i ≠ castSucc j\n      have hne' : i ≠ Fin.castSucc j := hj\n      rw [flipCoord_noteq (Fin.castSucc j) i _ hne']\n      simp only [Fin.snoc, hi, ↓reduceDIte]\n      have hj' : Fin.castLT i hi ≠ j := by\n        intro heq\n        apply hj\n        ext\n        simp only [Fin.val_castSucc]\n        exact congrArg Fin.val heq\n      rw [flipCoord_noteq j (Fin.castLT i hi) _ hj']\n\nprivate instance probability (n : ℕ) : IsProbabilityMeasure (bernoulliUniform n) := by\n  constructor\n  unfold bernoulliUniform\n  simp only [Measure.smul_apply, smul_eq_mul]\n  rw [Measure.count_apply_finite Set.univ Set.finite_univ]\n  simp only [Set.Finite.toFinset_univ, Finset.card_univ, Fintype.card_fun,\n    Fintype.card_fin, Fintype.card_bool, Nat.cast_pow, Nat.cast_ofNat]\n  rw [ENNReal.inv_mul_cancel]\n  · exact pow_ne_zero _ (by norm_num)\n  · exact ENNReal.pow_ne_top (by norm_num : (2 : ℝ≥0∞) ≠ ⊤)\n\n/-- Reverse Euclidean norm inequality, squared, at the actual conditional RMS. -/\nprivate theorem rms_contraction (a b c d : ℝ) :\n    (sqrt ((a^2+b^2)/2) - sqrt ((c^2+d^2)/2))^2 ≤\n      ((a-c)^2+(b-d)^2)/2 := by\n  set s := sqrt ((a^2+b^2)/2)\n  set t := sqrt ((c^2+d^2)/2)\n  have hs : 0 ≤ s := sqrt_nonneg _\n  have ht : 0 ≤ t := sqrt_nonneg _\n  have hs2 : s^2 = (a^2+b^2)/2 := sq_sqrt (by positivity)\n  have ht2 : t^2 = (c^2+d^2)/2 := sq_sqrt (by positivity)\n  have hcs : (a*c+b*d)^2 ≤ (2*s*t)^2 := by\n    nlinarith [sq_nonneg (a*d-b*c)]\n  have hst : 0 ≤ 2*s*t := by positivity\n  have hcross : a*c+b*d ≤ 2*s*t := by\n    nlinarith [sq_nonneg (a*c+b*d-2*s*t)]\n  nlinarith\n\nprivate def entropy (n : ℕ) (h : (Fin n → Bool) → ℝ) : ℝ :=\n  (∫ x, h x^2 * log (h x^2) ∂bernoulliUniform n) -\n    (∫ x, h x^2 ∂bernoulliUniform n) * log (∫ x, h x^2 ∂bernoulliUniform n)\n\nprivate def rms {n : ℕ} (h : (Fin (n+1) → Bool) → ℝ) (x : Fin n → Bool) : ℝ :=\n  sqrt ((h (Fin.snoc x true)^2 + h (Fin.snoc x false)^2)/2)\n\nprivate theorem rms_sq (h : (Fin (n+1) → Bool) → ℝ) (x : Fin n → Bool) :\n    rms h x^2 = (h (Fin.snoc x true)^2 + h (Fin.snoc x false)^2)/2 :=\n  sq_sqrt (by positivity)\n\nprivate def localEntropy {n : ℕ} (h : (Fin (n+1) → Bool) → ℝ)\n    (x : Fin n → Bool) : ℝ :=\n  (h (Fin.snoc x true)^2 * log (h (Fin.snoc x true)^2) +\n    h (Fin.snoc x false)^2 * log (h (Fin.snoc x false)^2))/2 -\n    (rms h x)^2 * log ((rms h x)^2)\n\nprivate theorem entropy_chain (h : (Fin (n+1) → Bool) → ℝ) :\n    entropy (n+1) h = (∫ x, localEntropy h x ∂bernoulliUniform n) + entropy n (rms h) := by\n  unfold entropy localEntropy\n  rw [bernoulli_integral_succ_split, bernoulli_integral_succ_split,\n    integral_sub (Integrable.of_finite) (Integrable.of_finite)]\n  simp_rw [rms_sq]\n  ring\n\nprivate def prefixEnergy {n : ℕ} (h : (Fin (n+1) → Bool) → ℝ)\n    (x : Fin n → Bool) : ℝ :=\n  ∑ j : Fin n,\n    ((h (Fin.snoc x true)-h (Fin.snoc (flipCoord j x) true))^2 +\n      (h (Fin.snoc x false)-h (Fin.snoc (flipCoord j x) false))^2)/2\n\nprivate def lastEnergy {n : ℕ} (h : (Fin (n+1) → Bool) → ℝ)\n    (x : Fin n → Bool) : ℝ :=\n  (h (Fin.snoc x true)-h (Fin.snoc x false))^2\n\nprivate theorem energy_chain (h : (Fin (n+1) → Bool) → ℝ) :\n    (∫ x, gradientNormSq (n+1) h x ∂bernoulliUniform (n+1)) =\n      ∫ x, prefixEnergy h x + lastEnergy h x ∂bernoulliUniform n := by\n  rw [bernoulli_integral_succ_split]\n  apply integral_congr_ae\n  filter_upwards [] with x\n  simp only [gradientNormSq_succ_decomposition, flipCoord_castSucc_snoc,\n    flipCoord_last_snoc, Bool.not_true, Bool.not_false, prefixEnergy, lastEnergy]\n  rw [← Finset.sum_div, Finset.sum_add_distrib]\n  have hs : (h (Fin.snoc x false)-h (Fin.snoc x true))^2 =\n      (h (Fin.snoc x true)-h (Fin.snoc x false))^2 := by ring\n  rw [hs]\n  ring\n\nprivate theorem rms_energy (h : (Fin (n+1) → Bool) → ℝ) (x : Fin n → Bool) :\n    gradientNormSq n (rms h) x ≤ prefixEnergy h x := by\n  unfold gradientNormSq prefixEnergy\n  apply Finset.sum_le_sum\n  intro j _\n  exact rms_contraction _ _ _ _\n\nprivate theorem entropy_bound (n : ℕ) (h : (Fin n → Bool) → ℝ) :\n    entropy n h ≤ (1/2 : ℝ) * ∫ x, gradientNormSq n h x ∂bernoulliUniform n := by\n  induction n with\n  | zero =>\n    unfold entropy gradientNormSq\n    simp only [bernoulli_integral_eq_sum]\n    simp\n  | succ n ih =>\n    have hlocal : (∫ x, localEntropy h x ∂bernoulliUniform n) ≤\n        (1/2 : ℝ) * ∫ x, lastEnergy h x ∂bernoulliUniform n := by\n      rw [← integral_const_mul]\n      apply integral_mono (Integrable.of_finite) (Integrable.of_finite)\n      intro x\n      unfold localEntropy lastEnergy\n      rw [rms_sq]\n      calc\n        _ ≤ (h (Fin.snoc x true)-h (Fin.snoc x false))^2/2 :=\n          TwoPointEntropy.two_point_squared_entropy_le_half_sq_sub _ _\n        _ = _ := by ring\n    have hprefix : (∫ x, gradientNormSq n (rms h) x ∂bernoulliUniform n) ≤\n        ∫ x, prefixEnergy h x ∂bernoulliUniform n :=\n      integral_mono (Integrable.of_finite) (Integrable.of_finite) (rms_energy h)\n    rw [entropy_chain, energy_chain,\n      integral_add (Integrable.of_finite) (Integrable.of_finite)]\n    have hi := ih (rms h)\n    linarith\n\ntheorem bernoulli_function_logSobolev (n : ℕ) (h : (Fin n → Bool) → ℝ) :\n    let μ : Measure (Fin n → Bool) :=\n      (Fintype.card (Fin n → Bool) : ℝ≥0∞)⁻¹ • Measure.count\n    let D := fun ε : Fin n → Bool =>\n      ∑ j : Fin n, (h ε - h (Function.update ε j (!ε j))) ^ 2\n    IsProbabilityMeasure μ ∧\n      Integrable (fun ε => (h ε) ^ 2) μ ∧\n      Integrable (fun ε => (h ε) ^ 2 * Real.log ((h ε) ^ 2)) μ ∧\n      Integrable D μ ∧\n      ((∫ ε, (h ε) ^ 2 * Real.log ((h ε) ^ 2) ∂μ) -\n        (∫ ε, (h ε) ^ 2 ∂μ) * Real.log (∫ ε, (h ε) ^ 2 ∂μ) ≤\n      (1 / 2 : ℝ) * ∫ ε, D ε ∂μ) := by\n  dsimp only\n  change IsProbabilityMeasure (bernoulliUniform n) ∧\n    Integrable (fun ε => (h ε)^2) (bernoulliUniform n) ∧\n    Integrable (fun ε => (h ε)^2 * log ((h ε)^2)) (bernoulliUniform n) ∧\n    Integrable (gradientNormSq n h) (bernoulliUniform n) ∧\n    entropy n h ≤ (1/2 : ℝ) * ∫ ε, gradientNormSq n h ε ∂bernoulliUniform n\n  exact ⟨inferInstance, Integrable.of_finite, Integrable.of_finite,\n    Integrable.of_finite, entropy_bound n h⟩\n\nend AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.BernoulliLogSobolev\n", "support_source_view": true, "supporting_declarations": [{"declaration": "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.TwoPointEntropy.two_point_squared_entropy_le_half_sq_sub", "source_file": "AutoSamplingTheory/TechnicalLemmas/FunctionalInequalities/TwoPointEntropy.lean", "source_line": 544, "source_sha256_lf": "11ccdd552603eb128af3a8de174b8dd2d7d60a003423c88b7413d018be6a32b0"}], "title": "Tensorizing a two-point entropy bound without losing the flip constant", "track_levels": {"natural-language": "L3"}}
{"additional_source_declarations": ["AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.BernoulliLogSobolev.bernoulli_function_logSobolev", "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianCompactEntropy.compact_count_gaussian_entropy_limits", "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianFlipEnergy.compact_count_gaussian_flip_energy_limit", "AutoSamplingTheory.TechnicalLemmas.Probability.BalancedRademacherCLT.balanced_count_sum_tendsto_gaussian"], "assumptions": ["Let f:ℝ→ℝ be genuinely C² with compact support, and let γ=N(0,1). The function may be signed or zero. No normalization ∫f²dγ=1 and no positive lower bound on f or that integral are assumed.", "For m≥1, μₘ is uniform probability on {0,1}ᵐ and Sₘ(ε)=m⁻¹ᐟ²Σⱼr(εⱼ), where r(1)=1 and r(0)=−1. The actual pushforward laws of Sₘ converge weakly to γ; this balanced Rademacher CLT is available. Use m=n+1 when taking the limit.", "The finite-product inequality Entμₘ(h²)≤(1/2)EμₘΣⱼ(h(ε)−h(εʲ))² is available for every real h, with finite-law normalization and integrability. Write φ(s)=s log s on s>0 and φ(0)=0.", "Standard weak convergence against bounded continuous observables, finite counting integrals, compact-support derivative bounds, the real mean-value theorem and closedness of real order under limits may be used after checking their hypotheses. Do not assume the entropy or full flip-energy limits as unexplained hypotheses of the NL proof."], "binding_sha256": "1be26d5f3c790d72f77813c7277245953ea18975cdadb455721f7a972b11f302", "boundary": "The aligned Lean conclusion is exactly scalar Gaussian homogeneous log-Sobolev for signed compact C² functions, under only those public regularity/support premises. Imported producers close the actual finite-law, moment and convergence obligations; the explanatory constants and warning examples are not new production declarations. No full noncompact, arbitrary Sobolev, finite-Hilbert or infinite-dimensional theorem, sampler rate or SPHMC main-result completion is asserted.", "context": "open MeasureTheory ProbabilityTheory Filter\nopen scoped Topology BigOperators ENNReal\nopen AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities\n", "declaration": "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianCompactLogSobolev.compact_gaussian_logSobolev", "decoder_definitions": ["gaussianReal 0 1 is the real Gaussian probability measure with mean zero and variance one.", "ContDiff ℝ 2 f is genuine twice continuous real differentiability. HasCompactSupport f means that the closure of {x | f x ≠ 0} is compact in ℝ.", "deriv f is the totalized real derivative; the given ContDiff hypothesis makes it the genuine derivative everywhere here.", "Real.log 0=0 in the totalized Lean definition, so s*Real.log s has its continuous value zero at s=0 for nonnegative s.", "The real integrals are Bochner integrals with their usual integrability domain and totalized behavior outside it. The proposition supplies regularity/support hypotheses, not separate integrability or positive-mass hypotheses.", "The let binder fixes γ to the standard real Gaussian. The difference of the two displayed terms is homogeneous entropy of f²; no ∫f²=1 constraint is implicit."], "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.BernoulliLogSobolev.bernoulli_function_logSobolev", "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianCompactEntropy.compact_count_gaussian_entropy_limits", "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianFlipEnergy.compact_count_gaussian_flip_energy_limit", "AutoSamplingTheory.TechnicalLemmas.Probability.BalancedRademacherCLT.balanced_count_sum_tendsto_gaussian"], "mathlib": ["le_of_tendsto_of_tendsto", "Eventually.of_forall", "sub_sq_comm", "ProbabilityMeasure.tendsto_iff_forall_integral_tendsto", "Real.continuous_mul_log", "squeeze_zero_norm"]}, "difficulty": "advanced", "difficulty_reason": "The NL task builds the changing-law entropy and full-flip-energy limits with real regularity/domain adapters and exact 1/2×4 constant tracking. The fixed Lean target composes three existing producers, aligns their concrete finite laws and orientations, and passes inequalities through real limits; it is provisionally L3 rather than borrowing the difficulty of reproving all imported parents. Neither label is empirically calibrated.", "domain": "sampling", "family": "bernoulli-gaussian-entropy-limit", "id": "sogb-028", "imports": ["AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.BernoulliLogSobolev", "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianCompactEntropy", "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianFlipEnergy", "Mathlib.Topology.Order.OrderClosed"], "lean_explanation": "The fixed task reuses exactly the existing source proof with its parent imports, not the completed target module. Local μ and S are concrete normalized counting laws and actual Rademacher sums. The entropy producer supplies its final Tendsto component tEnt; the full-flip producer supplies tEnergy with coefficient four. change aligns their local let expressions with the target calculation. const_mul and ring turn one half of the energy limit into coefficient two. le_of_tendsto_of_tendsto passes the eventual inequalities to the limit; each inequality comes from the actual Bernoulli theorem at n+1, and sub_sq_comm reconciles the flip orientation. The detailed regularity, pushforward and uniform-error proof is inside the linked parent modules, not repeated inline or supplied as opaque extra assumptions. The aligned target certifies the final compact inequality, not each explanatory estimate as a separate Lean theorem.", "lean_reference": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.BernoulliLogSobolev\nimport AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianCompactEntropy\nimport AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianFlipEnergy\nimport Mathlib.Topology.Order.OrderClosed\n\nopen MeasureTheory ProbabilityTheory Filter\nopen scoped Topology BigOperators ENNReal\nopen AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities\n\nexample\n    (f : ℝ → ℝ) (hf : ContDiff ℝ 2 f) (hs : HasCompactSupport f) :\n    let γ : Measure ℝ := gaussianReal 0 1\n    (∫ x, (f x)^2 * Real.log ((f x)^2) ∂γ) -\n      (∫ x, (f x)^2 ∂γ) * Real.log (∫ x, (f x)^2 ∂γ) ≤\n    2 * ∫ x, (deriv f x)^2 ∂γ := by\n  dsimp only\n  let μ : (n : ℕ) → Measure (Fin n → Bool) := fun n =>\n    (Fintype.card (Fin n → Bool) : ℝ≥0∞)⁻¹ • Measure.count\n  let S : (n : ℕ) → (Fin n → Bool) → ℝ := fun n ε =>\n    (Real.sqrt (n : ℝ))⁻¹ * ∑ j : Fin n, if ε j then (1 : ℝ) else -1\n  rcases GaussianCompactEntropy.compact_count_gaussian_entropy_limits f hf hs\n    with ⟨_, _, _, _, _, _, _, tEnt⟩\n  rcases GaussianFlipEnergy.compact_count_gaussian_flip_energy_limit f hf hs\n    with ⟨_, _, tEnergy⟩\n  change Tendsto (fun n : ℕ =>\n    (∫ ε, (f (S (n+1) ε))^2 * Real.log ((f (S (n+1) ε))^2) ∂μ (n+1)) -\n      (∫ ε, (f (S (n+1) ε))^2 ∂μ (n+1)) *\n        Real.log (∫ ε, (f (S (n+1) ε))^2 ∂μ (n+1))) atTop\n    (𝓝 ((∫ x, (f x)^2 * Real.log ((f x)^2) ∂gaussianReal 0 1) -\n      (∫ x, (f x)^2 ∂gaussianReal 0 1) *\n        Real.log (∫ x, (f x)^2 ∂gaussianReal 0 1))) at tEnt\n  change Tendsto (fun n : ℕ => ∫ ε : Fin (n+1) → Bool,\n    (∑ j : Fin (n+1),\n      (f (S (n+1) (Function.update ε j (!ε j))) - f (S (n+1) ε))^2)\n      ∂μ (n+1)) atTop (𝓝 (4 * ∫ x, (deriv f x)^2 ∂gaussianReal 0 1)) at tEnergy\n  have tHalf : Tendsto (fun n : ℕ => (1/2 : ℝ) *\n      ∫ ε : Fin (n+1) → Bool, (∑ j : Fin (n+1),\n        (f (S (n+1) (Function.update ε j (!ε j))) - f (S (n+1) ε))^2)\n        ∂μ (n+1)) atTop (𝓝 (2 * ∫ x, (deriv f x)^2 ∂gaussianReal 0 1)) := by\n    have heq : (1/2 : ℝ) * (4 * ∫ x, (deriv f x)^2 ∂gaussianReal 0 1) =\n        2 * ∫ x, (deriv f x)^2 ∂gaussianReal 0 1 := by ring\n    simpa only [heq] using tEnergy.const_mul (1/2 : ℝ)\n  apply le_of_tendsto_of_tendsto tEnt tHalf\n  exact Eventually.of_forall fun n => by\n    have hn := (BernoulliLogSobolev.bernoulli_function_logSobolev (n+1)\n      (fun ε => f (S (n+1) ε))).2.2.2.2\n    change ((∫ ε, (f (S (n+1) ε))^2 * Real.log ((f (S (n+1) ε))^2) ∂μ (n+1)) -\n      (∫ ε, (f (S (n+1) ε))^2 ∂μ (n+1)) *\n        Real.log (∫ ε, (f (S (n+1) ε))^2 ∂μ (n+1))) ≤\n      (1/2 : ℝ) * ∫ ε : Fin (n+1) → Bool, (∑ j : Fin (n+1),\n        (f (S (n+1) ε) - f (S (n+1) (Function.update ε j (!ε j))))^2)\n        ∂μ (n+1) at hn\n    simpa only [sub_sq_comm] using hn\n", "lean_task": "/- SamplingOptimisationGeometryBench public-dev reference.\n   Reuses the existing project proof; retain LICENSE and NOTICE. -/\nimport AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.BernoulliLogSobolev\nimport AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianCompactEntropy\nimport AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianFlipEnergy\nimport Mathlib.Topology.Order.OrderClosed\n\nopen MeasureTheory ProbabilityTheory Filter\nopen scoped Topology BigOperators ENNReal\nopen AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities\n\nexample\n    (f : ℝ → ℝ) (hf : ContDiff ℝ 2 f) (hs : HasCompactSupport f) :\n    let γ : Measure ℝ := gaussianReal 0 1\n    (∫ x, (f x)^2 * Real.log ((f x)^2) ∂γ) -\n      (∫ x, (f x)^2 ∂γ) * Real.log (∫ x, (f x)^2 ∂γ) ≤\n    2 * ∫ x, (deriv f x)^2 ∂γ := by\n  -- Replace this comment with your proof.\n", "library_domains": ["log-concave-sampling", "discrete-sampling"], "question": "Prove the compact scalar Gaussian inequality Entγ(f²)≤2∫(f′)²dγ. Explain why the homogeneous entropy converges even if its squared mass is zero, derive the limit of the sum over all Boolean flips with its exact factor four and a uniform error bound, and justify the final order passage. Distinguish weak-convergence tests from dominated convergence on a changing probability space. Keep the compact C² boundary: do not infer the full noncompact or infinite-dimensional inequality.", "rubric": [{"criterion": "Checks genuine compact C² regularity, measurable pushforward identities and bounded continuous/integrable test observables; obtains homogeneous entropy convergence via continuous s log s at zero without a positive-mass premise.", "points": 1}, {"criterion": "Uses the exact ±2/√m displacement and bounded/Lipschitz derivative to control each squared increment, then sums all coordinates with factor four and a valid uniform vanishing error bound.", "points": 1}, {"criterion": "Justifies real integration of the error and convergence of the full energy under actual probability laws, rather than invoking dominated convergence across changing spaces or assuming a one-coordinate approximation suffices.", "points": 1}, {"criterion": "Applies the finite inequality with the matching orientation, passes through finite real limits and obtains exactly 2, keeping the signed/zero-mass and compact C² boundary without claiming the noncompact theorem.", "points": 1}], "skills": ["proof", "composition", "calculation", "assumption-audit"], "source_file": "AutoSamplingTheory/TechnicalLemmas/FunctionalInequalities/GaussianCompactLogSobolev.lean", "source_line": 17, "source_note": "Original proof guide over the existing GaussianCompactLogSobolev theorem and its actual Bernoulli, compact-observer, CLT and full-flip parents. Its direct local consumer GaussianCompactProductLogSobolev calls compact_gaussian_logSobolev for scalar sections before the separate product extension. This QA exposes why the Boolean coefficient 1/2 and full-flip limit four produce the Gaussian coefficient two, without copying a textbook passage or claiming a new library result. All additional source declarations are resolved and hash-bound; parent imports and the shared public family connect it to sogb-027. Upstream notices in the Bernoulli supporting module are retained, not reassigned. No restricted source or external dataset is used.", "source_sha256_lf": "af1e17f6963c7bde2ecae3a74dc1b7effbcd0015807aaeeadb9f516a920a0cfc", "split": "public-dev", "steps": ["Each μₘ is a genuine probability law, and Sₘ is measurable on the finite configuration space. The available CLT identifies its actual pushforward distribution, not just an unrelated Gaussian-looking sequence. Working with m=n+1 avoids using the inverse-square-root scaling at zero in the asymptotic calculation.", "Since f is C² and compactly supported, f², φ(f²) and (f′)² are continuous compactly supported functions. In particular f′ is genuinely continuous and supported in the closed support of f. Continuity of s↦s log s at s=0 is understood via its zero extension; continuity of log alone at zero would be false. These observables are bounded, measurable and integrable under γ and every finite law.", "Weak convergence may therefore be tested against each of these three bounded continuous observables. The pushforward integral formula converts the resulting expectations to integrals over the actual cube. Put \\[A_m=\\mathbb E f(S_m)^2,\\quad B_m=\\mathbb E\\phi(f(S_m)^2),\\quad C_m=\\mathbb E f'(S_m)^2.\\] They converge to the corresponding Gaussian integrals. This is weak convergence plus admissible test functions, not an application of dominated convergence to functions on different spaces Ωₘ.", "All Aₘ are nonnegative. Continuity of φ on [0,∞), including zero, gives \\[B_m-\\phi(A_m)\\longrightarrow\\int\\phi(f^2)\\,d\\gamma-\\phi\\!\\left(\\int f^2\\,d\\gamma\\right)=\\operatorname{Ent}_\\gamma(f^2).\\] There is no need to take a separate limit of log Aₘ or assume the limiting squared mass is strictly positive. This includes f≡0.", "Compact C² regularity supplies finite constants B,K≥0 with |f′|≤B and |f′(y)−f′(x)|≤K|y−x| globally. To obtain K, bound the continuous second derivative on its compact support and use the mean-value theorem. Genuine differentiability is used; the totalized deriv API by itself does not supply this regularity.", "Flipping coordinate j changes Sₘ by δⱼ=±2/√m, exactly. For any x,y the mean-value theorem gives a secant a with f(y)−f(x)=a(y−x), |a|≤B and |a−f′(x)|≤K|y−x|; the x=y case is immediate. Thus \\[\\big|(f(y)-f(x))^2-f'(x)^2(y-x)^2\\big|\\le2BK|y-x|^3.\\] This is the squared-increment estimate used by the existing full-flip producer.", "Let Gₘ(ε)=Σⱼ(f(Sₘ(εʲ))−f(Sₘ(ε)))². Summing the last estimate over all m coordinates gives the pointwise bound \\[|G_m(\\varepsilon)-4f'(S_m(\\varepsilon))^2|\\le\\frac{16BK}{\\sqrt m}.\\] The leading term is four because m·(2/√m)²=4; it would not be four for an average over coordinates. No independence assumption on the individual flip errors is needed.", "Finite-space integrability licenses subtraction inside the expectation, and the probability mass is one. Hence \\[\\left|\\mathbb E G_m-4C_m\\right|\\le\\frac{16BK}{\\sqrt m}\\longrightarrow0.\\] Together with the derivative-observer limit, this proves \\[\\mathbb E G_m\\longrightarrow4\\int(f')^2\\,d\\gamma.\\] This uniform error estimate justifies accumulating m small coordinate errors; a pointwise one-coordinate approximation alone would not.", "Apply the finite cube inequality to h(ε)=f(Sₘ(ε)). Its energy may use the opposite subtraction order, but squaring makes the two orientations identical. For every m≥1, \\[B_m-\\phi(A_m)\\le\\frac12\\mathbb E G_m.\\] Both sides have finite real limits by the preceding domain and convergence arguments.", "Pass this family of inequalities through the limits using closedness of ≤ on ℝ. The constant is exactly \\[\\operatorname{Ent}_\\gamma(f^2)\\le\\frac12\\left(4\\int(f')^2\\,d\\gamma\\right)=2\\int(f')^2\\,d\\gamma.\\] This proves the homogeneous compact C² inequality without dividing by ∫f², choosing a representative outside this regular class, or assuming nonzero mass.", "The Lean target invokes the existing entropy and full-flip producers, which internally establish the actual finite/Gaussian L¹ domains and limits described above. It does not take those limits as additional public assumptions. A general Sobolev/noncompact extension would need its own approximation, representative and convergence arguments; this QA supplies none of those conclusions."], "supporting_declarations": [{"declaration": "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.BernoulliLogSobolev.bernoulli_function_logSobolev", "source_file": "AutoSamplingTheory/TechnicalLemmas/FunctionalInequalities/BernoulliLogSobolev.lean", "source_line": 265, "source_sha256_lf": "eb2cab559551d03001cf9f6679ce69864a974d317316f80a870203ed120a46c0"}, {"declaration": "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianCompactEntropy.compact_count_gaussian_entropy_limits", "source_file": "AutoSamplingTheory/TechnicalLemmas/FunctionalInequalities/GaussianCompactEntropy.lean", "source_line": 54, "source_sha256_lf": "f0af532d3e9abb945863945eee412f5159c930de15d8debfb293201af11b2364"}, {"declaration": "AutoSamplingTheory.TechnicalLemmas.FunctionalInequalities.GaussianFlipEnergy.compact_count_gaussian_flip_energy_limit", "source_file": "AutoSamplingTheory/TechnicalLemmas/FunctionalInequalities/GaussianFlipEnergy.lean", "source_line": 168, "source_sha256_lf": "d17513ae399893934017909b358ef354b31e9fdc76d539df7f31fefdc05377f1"}, {"declaration": "AutoSamplingTheory.TechnicalLemmas.Probability.BalancedRademacherCLT.balanced_count_sum_tendsto_gaussian", "source_file": "AutoSamplingTheory/TechnicalLemmas/Probability/BalancedRademacherCLT.lean", "source_line": 116, "source_sha256_lf": "c6ffd8e5af9733eeb7fc19fbdb0591f0dcc67dd54c6b48685d0fec65394ca282"}], "title": "From the Boolean cube to compact Gaussian log-Sobolev", "track_levels": {"lean": "L3", "natural-language": "L4"}}
{"additional_source_declarations": ["AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentOptimalStep.gradient_step_endpoint_bound"], "assumptions": ["This is an original faithful reformulation of Sinho Chewi, Lectures on Optimization, arXiv:2605.07006v1, Chapter 3, Exercise 3.2, printed/PDF p.23. The chapter explicitly works with C² functions; the condition-number regime uses 0<α≤β.", "Let f:ℝᵈ→ℝ be C² and globally α-convex and β-smooth, with the quadratic-model normalization α/2 and β/2. Equivalently under this regularity, αI≼∇²f(z)≼βI for every z. The order α≤β is explicit rather than inferred in a zero-dimensional space.", "For h≥0 define T_h(x)=x−h∇f(x), and write κ=β/α. No minimizer or iterate convergence hypothesis is supplied. The target is a pairwise one-step bound and the optimal uniform curvature-endpoint envelope."], "binding_sha256": "9d9f361a44b9b4cbd33ff6379d61f64ca7b45805e410c4021af25e64ba6013c8", "boundary": "A real source-numbered exercise with a complete authored mathematical reference answer and two existing compiled owned core-answer declarations. There is no separately aligned fixed Lean QA here. The Lean APIs are broader than the source domain and use the equivalent Rayleigh formulation; their exact differences and unformalized context remain visible. No new production declaration, wrapper, Registry credit, full textbook completion, standalone eigenvalue-list theorem, iterate complexity or source-commentary formalization is claimed.", "context": "", "declaration": "AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentOptimalStep.optimal_gradient_step", "dependencies": {"astis": ["AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentOptimalStep.gradient_step_endpoint_bound", "AutoSamplingTheory.TechnicalLemmas.Analysis.ConvexityC2.gradient_mono_iff_fderiv2_lower", "AutoSamplingTheory.TechnicalLemmas.Analysis.SmoothnessEquivalences.upper_model_iff_fderiv2_upper"], "mathlib": ["ContinuousLinearMap.norm_eq_iSup_rayleighQuotient", "intervalIntegral.integral_eq_sub_of_hasDerivAt", "intervalIntegral.norm_integral_le_of_norm_le_const"]}, "difficulty": "intermediate", "difficulty_reason": "Solve a real numbered textbook exercise by combining the actual Hessian interval, a genuine derivative/segment integral and a two-endpoint scalar minimax argument. Distinguish a uniform class bound from an objective-specific optimum. This is a multi-step graduate-course proof, not a research-level difficulty or model-calibration claim.", "domain": "optimisation", "family": "chewi-opt-v1-exercise-3-2", "id": "sogb-029", "imports": [], "lean_enabled": false, "lean_explanation": "This numbered exercise reuses the two actual owned answers in the full source module. The endpoint proof derives Hessian bounds from the existing convexity/smoothness APIs, constructs the Riesz Hessian and genuine update derivative, proves symmetry, bounds its Rayleigh quotients including the zero-vector case, and applies the vector segment FTC with internally established continuity/integrability. The optimal-step proof balances the endpoints and proves their global scalar lower bound. The separate trusted module probe compiles/imports and checks transitive axioms of these named answers; it is not a new theorem or a fixed Lean reconstruction challenge. The optional code is the exact existing module. No target is smuggled into a challenge, and no terminal call is counted as a substantive new leaf.", "lean_reference": "", "lean_task": "", "library_domains": ["optimisation"], "question": "Solve Exercise 3.2 in the positive-curvature regime. Use the genuine derivative of T_h, bound its eigenvalues and operator norm, then justify the vector fundamental theorem of calculus along the segment from x to y. Find the step minimizing the resulting endpoint bound and obtain the factor (κ−1)/(κ+1). Prove minimality of that bound, not merely the value at a proposed step, and explain what is—and is not—being optimized.", "rubric": [{"criterion": "Obtains the actual symmetric update derivative and the correct endpoint eigenvalue/operator-norm bound, keeping the chapter's C² and compatible curvature assumptions explicit.", "points": 1}, {"criterion": "Checks the continuous segment derivative/integrability and applies vector FTC and the norm bound to every x,y without a hidden minimizer or nonzero-displacement premise.", "points": 1}, {"criterion": "Finds h*=2/(alpha+beta), verifies M(h*)=q, proves q<=M(h) for every admissible h>=0 (a stronger all-real comparison also qualifies), justifies any divisions and sign-sensitive steps, and derives exactly (kappa-1)/(kappa+1). Equivalent valid minimax arguments receive credit.", "points": 1}, {"criterion": "Correctly interprets uniform-envelope optimality, handles equal curvatures and the condition-number regime, and does not promote the disclosed Hilbert/α=0 extensions or commentary into stronger source/iterate claims. Equivalent valid proofs of the requested obligations receive credit.", "points": 1}], "skills": ["proof", "calculation", "assumption-audit"], "source_file": "AutoSamplingTheory/TechnicalLemmas/Analysis/GradientDescentOptimalStep.lean", "source_line": 102, "source_note": "Sinho Chewi, Lectures on Optimization, arXiv:2605.07006v1, Chapter 3 Exercise 3.2, printed/PDF p.23. This original mathematical reformulation and solution use the canonical publication item chewi-opt-v1-exercise-3-2 and its two actual part bindings, rather than copying textbook prose or renaming an unrelated original QA. The primary PDF is hash-pinned and its relevant page was visually inspected; the arXiv distribution grant is not treated as a blanket ML-text license. Existing ASTIS-owned answers, source audits, tests and graph placement are reused with their scope disclosed. This public exercise and all variants/subparts share one family; public availability is not evidence of an unseen test.", "source_sha256_lf": "856f336591e9cd23a69b827d5c438ec70628e530974c4b63981e6b13cd77dc83", "split": "public-dev", "steps": ["C² regularity makes the actual Hessian H(z)=∇²f(z) symmetric and continuous. The convexity/smoothness models yield αI≼H(z)≼βI. These are genuine derivative statements, not an interpretation of the fallback value of a totalized derivative. They also ensure continuous segment derivatives for the upcoming integral.", "The actual derivative is DT_h(z)=I−hH(z). For h≥0 and any eigenvalue λ of H(z), α≤λ≤β gives \\[1-h\\beta\\le1-h\\lambda\\le1-h\\alpha.\\] Since the derivative is symmetric, its operator norm is bounded by \\[M(h):=\\max\\{|1-h\\alpha|,|1-h\\beta|\\}.\\] In finite dimensions this follows from orthogonal diagonalization. The existing Hilbert-space Lean proof uses the equivalent symmetric Rayleigh-quotient norm bound rather than constructing an eigenvalue list.", "Put v=y−x and z(t)=x+tv. The chain rule gives dT_h(z(t))/dt=DT_h(z(t))v. This derivative is continuous on [0,1], so it is Bochner integrable and the vector FTC applies: \\[T_h(y)-T_h(x)=\\int_0^1DT_h(x+tv)v\\,dt.\\] Taking norms and using the uniform operator bound yields \\[\\|T_h(y)-T_h(x)\\|\\le M(h)\\|y-x\\|.\\] The case x=y is included; no division by ‖y−x‖ is needed.", "Because α+β>0, take h★=2/(α+β) and q=(β−α)/(α+β)≥0. Direct algebra gives \\[1-h_\\star\\alpha=q,\\qquad1-h_\\star\\beta=-q.\\] Thus M(h★)=q, and the preceding estimate proves the pairwise bound at that step.", "To show global optimality of the endpoint envelope, fix any real h and let M=M(h). The elementary inequalities 1−hα≤M and hβ−1≤M can be multiplied by the nonnegative weights β and α. Their sum gives \\[\\beta-\\alpha=\\beta(1-h\\alpha)+\\alpha(h\\beta-1)\\le(\\alpha+\\beta)M.\\] Divide by α+β>0 to obtain q≤M(h). Hence h★ achieves the smallest endpoint bound, even when the scalar comparison is made over every real h; in particular it is optimal among nonnegative steps.", "Since α>0, κ=β/α is well-defined and κ≥1. Dividing numerator and denominator of q by α gives \\[q=\\frac{\\kappa-1}{\\kappa+1},\\qquad\\|T_{h_\\star}(y)-T_{h_\\star}(x)\\|\\le\\frac{\\kappa-1}{\\kappa+1}\\|y-x\\|.\\] Also q<1, so this is a contraction in the stated source regime. When α=β>0 it gives q=0 and a constant update map, without needing a minimizer premise.", "The optimization concerns the uniform bound derived from the curvature interval, not the actual best step for each individual objective. For example, if f(x)=β‖x‖²/2 and 0<α<β is a valid but loose lower label, the individual map vanishes at h=1/β, whereas the balanced endpoint envelope still has q>0. This does not contradict the minimax result for the supplied class of curvature bounds.", "The owned endpoint theorem permits signed moduli and the optimal-step theorem permits α=0, both on complete real Hilbert spaces. Those are disclosed generalizations. At α=0 the latter is only nonexpansive and κ is not formed. The present exercise uses their positive-curvature Euclidean specialization. Its source's informal large-κ iteration-complexity remark, separate eigenvalue-list output and the explanatory loose-label example are not additional compiled claims of these two declarations."], "support_lean_source": "import AutoSamplingTheory.TechnicalLemmas.Analysis.SmoothnessEquivalences\nimport Mathlib.Analysis.Calculus.FDeriv.Symmetric\nimport Mathlib.Analysis.InnerProductSpace.Rayleigh\n\n/-!\n# Optimal constant step for a gradient map\n\nChewi arXiv:2605.07006v1 Exercise 3.2. Genuine C² regularity supplies Hessian\nsymmetry and affine-segment integrability. The Rayleigh norm formula implements\nthe source spectral bound on a complete real Hilbert space. The endpoint\nmax-envelope is minimized at 2/(α+β); this is a uniform curvature bound, not\nan assertion of an optimal step for every individual objective.\n-/\n\nnamespace AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentOptimalStep\n\nopen Set InnerProductSpace MeasureTheory\nopen scoped RealInnerProductSpace\n\nvariable {E : Type*} [NormedAddCommGroup E] [InnerProductSpace ℝ E] [CompleteSpace E]\n\nset_option backward.isDefEq.respectTransparency false in\n/-- Actual gradient maps satisfy the endpoint spectral bound for nonnegative steps.\nThe curvature moduli may be signed; all Hessians are derived from the C² objective. -/\ntheorem gradient_step_endpoint_bound {f : E → ℝ} {α β h : ℝ}\n    (hf : ContDiff ℝ 2 f) (hsc : StrongConvexOn univ α f) (hh : 0 ≤ h)\n    (hu : ∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2)\n    (x y : E) :\n    ‖(y - h • gradient f y) - (x - h • gradient f x)‖ ≤\n      max |1 - h * α| |1 - h * β| * ‖y - x‖ := by\n  let M := max |1 - h * α| |1 - h * β|\n  have hM : 0 ≤ M := (abs_nonneg _).trans (le_max_left _ _)\n  have hlo := (ConvexityC2.gradient_mono_iff_fderiv2_lower hf).mp (fun a b =>\n    StrongConvexFirstOrder.gradient_inner_lower_bound_of_strongConvexOn hsc\n      (fun z _ => ((hf.of_le (by norm_num) : ContDiff ℝ 1 f).differentiable_one z).hasGradientAt)\n      (mem_univ a) (mem_univ b))\n  have hup := (SmoothnessEquivalences.upper_model_iff_fderiv2_upper hf).mp hu\n  let R : (E →L[ℝ] ℝ) →L[ℝ] E :=\n    { toFun := (toDual ℝ E).symm\n      map_add' := (toDual ℝ E).symm.map_add\n      map_smul' := by intros; simp\n      cont := (toDual ℝ E).symm.continuous }\n  let H (z : E) : E →L[ℝ] E := R.comp (fderiv ℝ (fderiv ℝ f) z)\n  let A (z : E) : E →L[ℝ] E := ContinuousLinearMap.id ℝ E - h • H z\n  let T : E → E := fun z => z - h • gradient f z\n  have hfd : ContDiff ℝ 1 (fderiv ℝ f) := hf.fderiv_right (by norm_num)\n  have hgrad (z : E) : HasFDerivAt (gradient f) (H z) z :=\n    R.hasFDerivAt.comp z (hfd.differentiable_one z).hasFDerivAt\n  have hTd (z : E) : HasFDerivAt T (A z) z :=\n    (hasFDerivAt_id z).sub ((hgrad z).const_smul h)\n  have hT : ContDiff ℝ 1 T := contDiff_id.sub ((R.contDiff.comp hfd).const_smul h)\n  have hinner (z v w : E) : inner ℝ (H z v) w = (fderiv ℝ (fderiv ℝ f) z v) w :=\n    toDual_symm_apply\n  have hsym (z : E) : (A z).IsSymmetric := by\n    intro v w\n    change inner ℝ (v - h • H z v) w = inner ℝ v (w - h • H z w)\n    rw [inner_sub_left, inner_sub_right, real_inner_smul_left, inner_smul_right]\n    have hr : inner ℝ v (H z w) = (fderiv ℝ (fderiv ℝ f) z w) v :=\n      (real_inner_comm v (H z w)).symm.trans (hinner z w v)\n    rw [hinner, hr]\n    rw [hf.contDiffAt.isSymmSndFDerivAt (by norm_num) v w]\n  have hnorm (z : E) : ‖A z‖ ≤ M := by\n    rw [(A z).norm_eq_iSup_rayleighQuotient (hsym z)]\n    apply ciSup_le\n    intro v\n    change |inner ℝ (A z v) v / ‖v‖ ^ 2| ≤ M\n    by_cases hv : v = 0\n    · simp [hv]\n      exact hM\n    · simp only [abs_div, abs_pow, abs_norm]\n      apply (div_le_iff₀ (sq_pos_of_pos (norm_pos_iff.mpr hv))).mpr\n      change |inner ℝ (v - h • H z v) v| ≤ M * ‖v‖ ^ 2\n      rw [inner_sub_left, real_inner_smul_left, real_inner_self_eq_norm_sq, hinner]\n      have hl := mul_le_mul_of_nonneg_left (hlo z v) hh\n      have hu' := mul_le_mul_of_nonneg_left (hup z v) hh\n      have hleft : 1 - h * α ≤ M := (le_abs_self _).trans (le_max_left _ _)\n      have hright : -(1 - h * β) ≤ M := (neg_le_abs _).trans (le_max_right _ _)\n      have hleft' := mul_le_mul_of_nonneg_right hleft (sq_nonneg ‖v‖)\n      have hright' := mul_le_mul_of_nonneg_right hright (sq_nonneg ‖v‖)\n      exact abs_le.mpr ⟨by nlinarith, by nlinarith⟩\n  let v := y - x\n  have hpath (t : ℝ) : HasDerivAt (fun s : ℝ => T (x + s • v)) (A (x + t • v) v) t := by\n    convert (hTd (x + t • v)).comp_hasDerivAt t\n      (((hasDerivAt_id t).smul_const v).const_add x) using 1 <;> simp [Function.comp_def]\n  have hc : Continuous (fun t : ℝ => A (x + t • v) v) := by\n    have hA : A = fderiv ℝ T := funext (fun z => (hTd z).fderiv.symm)\n    rw [hA]\n    exact ((hT.continuous_fderiv (by norm_num)).comp\n      (continuous_const.add (continuous_id.smul continuous_const))).clm_apply continuous_const\n  have hFTC : (∫ t : ℝ in 0..1, A (x + t • v) v) = T y - T x := by\n    simpa [v] using intervalIntegral.integral_eq_sub_of_hasDerivAt\n      (fun t _ => hpath t) (hc.intervalIntegrable 0 1)\n  change ‖T y - T x‖ ≤ M * ‖v‖\n  rw [← hFTC]\n  simpa using intervalIntegral.norm_integral_le_of_norm_le_const (a := (0 : ℝ)) (b := 1)\n    (fun t _ => ((A (x + t • v)).le_opNorm v).trans\n      (mul_le_mul_of_nonneg_right (hnorm _) (norm_nonneg v)))\n\n/-- The step `2/(α+β)` gives the sharp uniform curvature-envelope contraction.\nIts factor minimizes the endpoint max-envelope over every real step.\nThe `α=0` boundary is nonexpansive, and `α=β` is retained. -/\ntheorem optimal_gradient_step {f : E → ℝ} {α β : ℝ}\n    (hf : ContDiff ℝ 2 f) (hsc : StrongConvexOn univ α f)\n    (hα : 0 ≤ α) (hβ : 0 < β) (hαβ : α ≤ β)\n    (hu : ∀ x y, f y ≤ f x + inner ℝ (gradient f x) (y - x) + β / 2 * ‖y - x‖ ^ 2)\n    (x y : E) :\n    ‖(y - (2 / (α + β)) • gradient f y) - (x - (2 / (α + β)) • gradient f x)‖ ≤\n        ((β - α) / (α + β)) * ‖y - x‖ ∧\n      ∀ h : ℝ, (β - α) / (α + β) ≤ max |1 - h * α| |1 - h * β| := by\n  have hD : 0 < α + β := add_pos_of_nonneg_of_pos hα hβ\n  have hq : 0 ≤ (β - α) / (α + β) := div_nonneg (sub_nonneg.mpr hαβ) hD.le\n  have ha : 1 - 2 / (α + β) * α = (β - α) / (α + β) := by field_simp; ring\n  have hb : 1 - 2 / (α + β) * β = -((β - α) / (α + β)) := by field_simp; ring\n  constructor\n  · have hc := gradient_step_endpoint_bound hf hsc (show 0 ≤ 2 / (α + β) by positivity) hu x y\n    simpa only [ha, hb, abs_neg, abs_of_nonneg hq, max_self] using hc\n  · intro h\n    let M := max |1 - h * α| |1 - h * β|\n    have ha' : 1 - h * α ≤ M := (le_abs_self _).trans (le_max_left _ _)\n    have hb' : -(1 - h * β) ≤ M := (neg_le_abs _).trans (le_max_right _ _)\n    apply (div_le_iff₀ hD).mpr\n    have h1 := mul_le_mul_of_nonneg_left ha' hβ.le\n    have h2 := mul_le_mul_of_nonneg_left hb' hα\n    nlinarith\n\nend AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentOptimalStep\n", "support_source_view": true, "supporting_declarations": [{"declaration": "AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentOptimalStep.gradient_step_endpoint_bound", "source_file": "AutoSamplingTheory/TechnicalLemmas/Analysis/GradientDescentOptimalStep.lean", "source_line": 25, "source_sha256_lf": "856f336591e9cd23a69b827d5c438ec70628e530974c4b63981e6b13cd77dc83"}], "textbook_exercise": {"answer_declarations": [{"assumption_deltas": [{"classification": "generalization", "lean": "C² objective on a complete real Hilbert space.", "reason": "The symmetric Rayleigh quotient norm identity replaces the finite-dimensional eigenvalue description and the same vector segment FTC is used.", "source": "C² Euclidean objective."}, {"classification": "same", "lean": "StrongConvexOn univ α f and the global upper quadratic model in the actual gradient.", "reason": "Under C² regularity, existing compiled C² equivalences give exactly the lower and upper Hessian quadratic-form bounds used by the source.", "source": "α-convex and β-smooth objective."}, {"classification": "source-implicit", "lean": "Actual Riesz Hessian derivative, symmetric continuous linear update derivative, continuous segment derivative.", "reason": "C² and completeness discharge the derivative, symmetry and integrability conditions inside the proof; no extra analytic hypothesis is supplied.", "source": "C² Hessian and segment integral."}, {"classification": "generalization", "lean": "Signed α,β with the actual compatible curvature models and h≥0.", "reason": "The intermediate endpoint argument does not use parameter positivity.", "source": "Positive-curvature condition-number regime."}, {"classification": "same", "lean": "Only the bound component.", "reason": "No claim of objective-specific best step or oracle complexity. The derivative/FTC route is retained. The step-selection obligation belongs to the separate declaration.", "source": "Minimize the bound on the update difference."}], "audit_id": "ASTIS-RT-ANDI-OPT-GradientEndpoint", "boundary": "The source works in Euclidean space; the Lean theorem extends the same argument to complete real Hilbert spaces using the symmetric Rayleigh norm formula. Completeness supplies the Riesz map and the vector-valued integral. C² regularity supplies the actual gradient derivative, Hessian symmetry, and continuity/integrability along the closed line segment. No additional domination, measurability, boundary or supplied spectral hypothesis is assumed. These are textbook optimisation edges. No minimizer, N-step convergence, stochastic sampling theorem, oracle lower bound or companion-paper completion is asserted. This is the Exercise3.2 derivative/integral proof component before step selection. It does not by itself assert contraction: M_h can exceed one. It includes h=0 and allows signed curvature bounds.", "cell": "ASTIS-SHARED-gradient-step-endpoint-bound", "declaration": "AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentOptimalStep.gradient_step_endpoint_bound", "source_file": "AutoSamplingTheory/TechnicalLemmas/Analysis/GradientDescentOptimalStep.lean", "source_line": 25, "source_sha256_lf": "856f336591e9cd23a69b827d5c438ec70628e530974c4b63981e6b13cd77dc83", "supports": ["hessian-segment-bound"]}, {"assumption_deltas": [{"classification": "generalization", "lean": "C² objective on a complete real Hilbert space.", "reason": "The symmetric Rayleigh quotient norm identity replaces the finite-dimensional eigenvalue description and the same vector segment FTC is used.", "source": "C² Euclidean objective."}, {"classification": "same", "lean": "StrongConvexOn univ α f and the global upper quadratic model in the actual gradient.", "reason": "Under C² regularity, existing compiled C² equivalences give exactly the lower and upper Hessian quadratic-form bounds used by the source.", "source": "α-convex and β-smooth objective."}, {"classification": "source-implicit", "lean": "Actual Riesz Hessian derivative, symmetric continuous linear update derivative, continuous segment derivative.", "reason": "C² and completeness discharge the derivative, symmetry and integrability conditions inside the proof; no extra analytic hypothesis is supplied.", "source": "C² Hessian and segment integral."}, {"classification": "generalization", "lean": "0≤α≤β and β>0; optimal comparison for all real h.", "reason": "At α=0 the extension is nonexpansive and no κ is formed. β>0 gives a positive denominator; α≤β is explicit rather than inferred in the zero-dimensional space. For α>0 this is the source contraction factor.", "source": "Positive-curvature condition-number regime."}, {"classification": "same", "lean": "Pairwise bound at 2/(α+β) and global scalar minimax inequality for the endpoint envelope.", "reason": "No claim of objective-specific best step or oracle complexity. The derivative/FTC route is retained. The scalar lower bound is proved for all real h, so in particular covers nonnegative descent steps.", "source": "Minimize the bound on the update difference."}], "audit_id": "ASTIS-RT-ANDI-OPT-GradientOptimalStep", "boundary": "The source works in Euclidean space; the Lean theorem extends the same argument to complete real Hilbert spaces using the symmetric Rayleigh norm formula. Completeness supplies the Riesz map and the vector-valued integral. C² regularity supplies the actual gradient derivative, Hessian symmetry, and continuity/integrability along the closed line segment. No additional domination, measurability, boundary or supplied spectral hypothesis is assumed. These are textbook optimisation edges. No minimizer, N-step convergence, stochastic sampling theorem, oracle lower bound or companion-paper completion is asserted. For the source’s condition-number interpretation assume α>0: κ=β/α and q=(κ−1)/(κ+1)<1. At α=0 the extension gives q=1 (nonexpansive) and κ is undefined. At α=β>0 the map has zero pairwise difference; this does not identify a minimizer without further argument. The explicit order α≤β preserves the zero-dimensional case, where curvature inequalities alone do not imply this order. The result minimizes the endpoint upper envelope; it does not state that every individual objective has its actual smallest Lipschitz constant at h★.", "cell": "ASTIS-SHARED-gradient-descent-optimal-step", "declaration": "AutoSamplingTheory.TechnicalLemmas.Analysis.GradientDescentOptimalStep.optimal_gradient_step", "source_file": "AutoSamplingTheory/TechnicalLemmas/Analysis/GradientDescentOptimalStep.lean", "source_line": 102, "source_sha256_lf": "856f336591e9cd23a69b827d5c438ec70628e530974c4b63981e6b13cd77dc83", "supports": ["balanced-minimax-step"]}], "book": {"authors": ["Sinho Chewi"], "edition": "arXiv:2605.07006v1", "html_url": "https://arxiv.org/html/2605.07006v1#S3", "pdf_pages": 149, "pdf_sha256": "9e28afeacb0121b79691fadc6af9c145ccd787bffd2cf9c3f2310806112e644b", "pdf_url": "https://arxiv.org/pdf/2605.07006v1", "rights_boundary": "The source has an arXiv non-exclusive distribution grant. No blanket source-text/solution-manual ML reuse license is inferred; only original mathematical restatement, original solutions and bibliographic correspondence enter the Bench. The PDF/render stays outside ML exports.", "title": "Lectures on Optimization"}, "book_id": "chewi-optimization-v1", "book_page": 23, "canonical_source": {"anchor": "Exercise3.2 and the Section3 C² convention; Definition1.12 smoothness", "attribution": "Sinho Chewi, Lectures on Optimization. ASTIS-authored paraphrase; no endorsement implied.", "edition": "arXiv:2605.07006v1", "url": "https://arxiv.org/html/2605.07006v1#S3", "wording_status": "faithful paraphrase"}, "chapter": "3", "context_notes": ["Chapter 3 explicitly assumes C² regularity. The condition-number interpretation uses 0<α≤β and κ=β/α.", "The owned APIs generalize Euclidean space to complete real Hilbert spaces, and retain signed-modulus or α=0 intermediate extensions. Those are disclosed API generalizations, not changes to the source exercise.", "The answer minimizes a uniform curvature-endpoint bound, not the actual optimal Lipschitz constant of each objective."], "id": "chewi-opt-v1-exercise-3-2", "number": "3.2", "parts": [{"id": "hessian-segment-bound", "label": "Derive the endpoint Lipschitz bound from the actual Hessian and segment integral"}, {"id": "balanced-minimax-step", "label": "Select the balanced step and prove minimality of its curvature envelope"}], "pdf_page": 23, "publication_file": "website/content/publications/optimisation.json", "source_assumptions": ["The surrounding section works with C² Euclidean objectives, an α-strong-convexity lower bound and β-smoothness upper bound.", "The condition-number contraction formula is used in the positive-curvature regime 0<α≤β; κ=β/α. Step h is a nonnegative gradient-descent step in the derivative-bound argument."], "source_entry_sha256": "17c775ef4f10f62057023351cf9aa126d45ebb59f67fc3eed06eee4cdfbb6455", "source_statement": "For an α-convex and β-smooth C² Euclidean objective, apply the fundamental theorem of calculus to T_h=id−h∇f along the segment between two points. Bound the eigenvalues of DT_h to obtain its operator norm bound and show that h=2/(α+β) minimizes the resulting bound. The resulting factor is (κ−1)/(κ+1), where κ=β/α, improving the preceding gradient-descent estimate.", "unformalized_context": ["The source's informal large-condition-number iteration-complexity comparison is contextual commentary, not an output of the two named owned declarations.", "The finite-dimensional eigenvalue presentation and κ notation are explained in the mathematical answer; the actual owned proofs use the symmetric Rayleigh norm formula and the equivalent (β−α)/(α+β) expression. No separate eigenvalue-list or asymptotic-complexity declaration is claimed."], "wording_status": "original faithful mathematical restatement; not reproduced source prose"}, "textbook_exercise_id": "chewi-opt-v1-exercise-3-2", "title": "Chewi Optimization Exercise 3.2: the balanced gradient step", "track_levels": {"natural-language": "L3"}}
