mirror of
https://github.com/deepseek-ai/DeepSeek-Prover-V1.5.git
synced 2026-11-05 00:57:20 +00:00
[PR #27] fix(datasets): restore big-operator binder scope in 5 minif2f statements, pin ℝ in mathd_algebra_314 #18
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
deepseek-ai/DeepSeek-Prover-V1.5#18
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/deepseek-ai/DeepSeek-Prover-V1.5/pull/27
Author: @PerryLink
Created: 9/17/2026
Status: 🔄 Open
Base:
main← Head:fix/minif2f-bigop-binder-scope📝 Commits (1)
b7becb3fix(datasets): restore big-operator binder scope in 5 minif2f statements, pin ℝ in mathd_algebra_314📊 Changes
1 file changed (+6 additions, -6 deletions)
View changed files
📝
datasets/minif2f.jsonl(+6 -6)📄 Description
Summary
Repairs a binder-scope defect in six
test-split records ofdatasets/minif2f.jsonl(488 records, blob
bf6c8ececb87f2b62702681658e6568694242c31). A big-operator body that isnot parenthesised stops at precedence 67, so an infix operator of lower precedence (+, =, <, ≤)
is parsed outside the operator and the bound variable escapes into an
autoImplicituniversally quantified variable. This holds even when the operator sits inside a cast's
parentheses:
(resets the inner parser to precedence 0, it does not raise the precedenceof
+.Five of the six are exactly the statements named in issue #26; the sixth is the type-ascription
defect in
mathd_algebra_314.datasets/minif2f.jsonlis a vendored copy of the public miniF2F benchmark (Lean 3 -> Lean 4port). The file is this repository's own released evaluation input --
configs/RMaxTS.pyuses itfor the miniF2F-test number in the README -- so the fix belongs here. Note that the authoritative
Lean 4 distribution (
google-deepmind/miniF2F,MiniF2F/Test.lean) and the repaired copy inGoedel-LM/Goedel-Prover-V2already carry the corrected forms; this file is an older snapshot.Problem
In this repository's own pinned mathlib4 (
xinhjBrant/mathlib4@2f65ba7f1a9144b20c8e7358513548e317d26de1,Mathlib/Algebra/BigOperators/Group/Finset.lean):The body is parsed at precedence 67.
+is 65 and=/</≤are 50, so in(∑ k in Finset.range 5, a + k * d) = 70the body stops aftera. Wrapping the whole operatorin parentheses does not help: the escape happens inside those parentheses. The body itself
must be parenthesised.
Note this also applies inside a cast's parentheses. Parentheses reset the inner parser to
precedence 0, they do not raise the precedence of
+:Records affected (the recorded
goalfield still shows the degenerate parse -- a variable in thecontext that the statement never binds). These are exactly the five statements the issue names:
induction_pord1p1on2powklt5on2--goalcontextk n : ℕ, statement binds onlyninduction_prod1p1onk3le3m1onn--goalcontextk : ℝ, statement binds onlynamc12a_2021_p9-- the theorem has no binders at all, yetgoalcontext isk : ℕmathd_algebra_342--goalcontextk a d : ℝ, statement binds onlya dmathd_algebra_158--goalcontextk a : ℕ, statement binds onlya(andh₀)mathd_algebra_314-- missing type ascription; overℕthis is0 = 0For L467 the degenerate parse also explains the issue's vacuity claim: with the body stopping
early the second cast becomes
↑((∑ k ∈ Finset.range 5, a) + 2 * k), so the hypothesis reads57 - (5a + 2k) = 4, i.e.5a + 2k = 53. Its left side is even wheneverais even, while 53 isodd, so the hypotheses are contradictory and the statement is vacuously true. With the
body parenthesised the hypothesis is satisfiable:
64 - (5a + 20) = 4givesa = 8, and 8 iseven, so
h₀ : Even aholds and the vacuity disappears.Solution
Seven edits on six lines, all inside the
formal_statementfield. No other field and no otherbyte of the file is touched.
Design notes:
upstream forms do) is cosmetic and would only enlarge the diff.
mathd_algebra_158both↑(...)casts are kept, exactly as the authoritativegoogle-deepmind/miniF2Fform keeps them; only the two sum bodies gained parentheses. (Therepaired
Goedel-LM/Goedel-Prover-V2copy instead drops the casts, which is a largerstructural change and is not needed here.)
innotation is kept; this file mixesin Finset.and∈ Finset.(63 each). Notationnormalisation is out of scope.
mathd_algebra_314:(1 / 4 : ℝ)alone pins the whole equality toℝ--2 ^ (2 * n)islifted to
Pow ℝ ℕ, and the right-hand1 / 4is determined by the left-hand type. Thecanonical
google-deepmind/miniF2Fform uses(1 / 4 : ℚ);ℝis used here because it matchesthe issue report and this file's dominant style. Happy to switch to
ℚif you prefer exactparity with the canonical distribution.
Scope and non-goals
goalis deliberately NOT modified. It is not read anywhere inprover/orconfigs/(
prover/utils.pyandprover/lean/proof.pyconsumeheader,informal_prefixandformal_statementonly). Regenerating it requires a Lean toolchain, which I did not have; writinga hand-made proof state would be fabrication. As a result these six records are internally
inconsistent after this patch:
formal_statementis repaired,goalstill shows the olddegenerate parse. If you want
goalregenerated too, please say so and I will follow yourprocess for that.
Establishing which released solutions pass on the degenerate statements requires Lean 4 + mathlib4
and the released
minif2f-solutions.zip; neither was available, so no claim is made either way.The Lean-free arithmetic I can support is: under the
ℕreading ofmathd_algebra_314,1 / 4 = 0, so the old goal was0 = 0; and under the degenerate parse ofmathd_algebra_158, the hypothesis would require5a ± 2k = 53, which contradictsEven a.(
amc12a_2020_p10,aime_1994_p3,mathd_numbertheory_618,amc12a_2020_p7,amc12a_2021_p18,mathd_algebra_275,mathd_numbertheory_343,algebra_ineq_nto1onlt2m1on,algebra_cubrtrp1oncubrtreq3_rcubp1onrcubeq5778, ...). Each ofthose repairs changes hypotheses, quantifier structure, or the mathematical content (e.g.
0 < n->1 < n, addinghr : r ≥ 0,<->≤,a (k ^ 2)->(a k) ^ 2), and I could notverify any of them without Lean.
datasets/minif2f_valid_few_shot.jsonlneeds no change: none of the sixnames appear in it.reproducible from the current repository state without a re-run; these five statements revert from
a stronger (and in several cases false) implicit universal to the intended problem.
Verification
Byte-level checks (Node.js, no Lean required):
[328, 335, 379, 435, 467, 471]name/split/informal_prefix/goal/headerare byte-identicalmathd_algebra_158line keeps both↑(...)casts and its parentheses balanceuses (
", "/": "separators,ensure_ascii=False, key order preserved)A separate scan cross-checks the affected set: the intersection of (a) records whose recorded
goalcontext declares a variable the statement never binds, and (b) records where that variablealso falls outside the window the big-operator body can occupy at precedence 67, is exactly these
five statements -- matching the issue's list with no extras.
Not verified (no Lean toolchain available): that the repaired statements elaborate, that the
(1 / 4 : ℝ)ascription is the canonical choice, and that the statements remain provable.AI assistance
This patch was prepared with AI assistance (an AI coding agent). The defect analysis, the
precedence argument, the edits, and the byte-level checks were produced by the agent and reviewed
by me before submission. No Lean verification was performed. Please review the Lean-level
correctness independently.
Fixes #26 (partially -- the binder-scope and type-ascription defects only; see "Scope and non-goals").