Upgrade to Lean 4.35 and add comparator check
- Move to lean-toolchain v4.35.0 and mathlib v4.35.0 - Opt out of the module-system warning with `allowNonModules` - Adapt to Lean/Mathlib 4.35 changes: drop now-redundant `List.filter_congr` blocks and no-op `ring` calls - Add `Challenge.lean`, `Solution.lean`, and `comparator.json` `lake comparator` now accepts the solution against the trusted challenge.
This commit is contained in:
1 parent
fc8335c380
commit
bd5b3c885c
10 files changed
+48
-30
No files matched your search
@@ -0,0 +1,18 @@
|
||||
import Statement
|
||||
|
||||
/-!
|
||||
# Challenge: minimality of the conflict-range closed form
|
||||
|
||||
This file is the trusted statement side of the comparator check. It states the
|
||||
headline theorem with a placeholder proof; `lake comparator` compares this
|
||||
statement against the proof in `Solution.lean`.
|
||||
-/
|
||||
|
||||
namespace Statement
|
||||
|
||||
/-- **The closed form is minimal.** For every readable read/result pair,
|
||||
`closedForm r res` is a minimal sound conflict range. -/
|
||||
theorem closedFormMinimal : ClosedFormMinimal := by
|
||||
sorry
|
||||
|
||||
end Statement
|
||||
@@ -195,13 +195,10 @@ theorem evalCountToggled_eq_cnt_toggle {db : DB} {bounds : List Key}
|
||||
· simp [hlt, hmem]
|
||||
try ring
|
||||
· simp [hlt]
|
||||
try ring
|
||||
· rw [dite_eq_right hmem, cnt_insert_eq db k hmem e]
|
||||
by_cases hlt : (k : WithTop Key) < e
|
||||
· simp [hlt, hmem]
|
||||
try ring
|
||||
· simp [hlt]
|
||||
try ring
|
||||
|
||||
/-- **One toggle witness in finite count form.** A database satisfying a system
|
||||
`S` while violating every constraint in a chosen list `bad` after toggling `k`
|
||||
|
||||
@@ -163,9 +163,6 @@ theorem cnt_le_intervalCard_nil (db : DB) (w : WithTop Key) :
|
||||
(db.keys.filter (fun k => decide (k < ko))).length := by
|
||||
rw [cnt, List.countP_eq_length_filter]
|
||||
congr 1
|
||||
apply List.filter_congr
|
||||
intro k _
|
||||
simp [WithTop.coe_lt_coe]
|
||||
rw [hcnt, intervalCard_eq_encard_keysIn]
|
||||
exact h1
|
||||
|
||||
|
||||
@@ -63,10 +63,6 @@ theorem countP_lt_eq_add_filter_withTop (l : List Key) (hnd : l.Nodup) {a : Key}
|
||||
Key)))).length =
|
||||
(l.filter (fun x : Key => decide (a ≤ x ∧ x < ke))).length := by
|
||||
congr 1
|
||||
apply List.filter_congr
|
||||
intro k _
|
||||
rw [decide_eq_decide]
|
||||
simp only [WithTop.coe_le_coe, WithTop.coe_lt_coe]
|
||||
rw [hcoe, h, hf]
|
||||
|
||||
/-- **The begin resolution in the nonclamping negative-offset complete cell.** When the
|
||||
|
||||
@@ -983,12 +983,6 @@ theorem filler_count_nonpos_more_nonpos_end {db : DB} {r : RangeRead} {res : Res
|
||||
(k : WithTop Key)) && decide ((k : WithTop Key) < r.end_.key)) := by
|
||||
rw [List.countP_eq_length_filter]
|
||||
congr 1
|
||||
apply List.filter_congr
|
||||
intro k _
|
||||
rw [Bool.decide_and]
|
||||
rw [show decide (last < k) =
|
||||
decide ((↑last : WithTop Key) < (↑k : WithTop Key)) from
|
||||
decide_eq_decide.mpr (WithTop.coe_lt_coe.symm)]
|
||||
rw [hn', ← hs]
|
||||
have hanchor_nonneg : 0 ≤ r.end_.anchor db := by
|
||||
by_contra hneg
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
import Proof
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"challenge_module": "Challenge",
|
||||
"solution_module": "Solution",
|
||||
"theorem_names": ["Statement.closedFormMinimal"],
|
||||
"permitted_axioms": ["propext", "Quot.sound", "Classical.choice"]
|
||||
}
|
||||
+12
-12
@@ -1,21 +1,21 @@
|
||||
{"version": "1.2.0",
|
||||
{"version": "1.3.0",
|
||||
"packagesDir": ".lake/packages",
|
||||
"packages":
|
||||
[{"url": "https://github.com/leanprover-community/mathlib4",
|
||||
"type": "git",
|
||||
"subDir": null,
|
||||
"scope": "leanprover-community",
|
||||
"rev": "5ed2965256430c3649e86755f9576b54eca72435",
|
||||
"rev": "56a005855ea17e0b0958f73ec801ae140b0a1679",
|
||||
"name": "mathlib",
|
||||
"manifestFile": "lake-manifest.json",
|
||||
"inputRev": "v4.34.0",
|
||||
"inputRev": "v4.35.0",
|
||||
"inherited": false,
|
||||
"configFile": "lakefile.lean"},
|
||||
{"url": "https://github.com/leanprover-community/plausible",
|
||||
"type": "git",
|
||||
"subDir": null,
|
||||
"scope": "leanprover-community",
|
||||
"rev": "118aa17ee84656b8bd727fef7c458ee8c833385c",
|
||||
"rev": "dfa4f38190d07c37e315953e08b90fe2d95b3c24",
|
||||
"name": "plausible",
|
||||
"manifestFile": "lake-manifest.json",
|
||||
"inputRev": "main",
|
||||
@@ -25,7 +25,7 @@
|
||||
"type": "git",
|
||||
"subDir": null,
|
||||
"scope": "leanprover-community",
|
||||
"rev": "ddf04cf3949fa556442341e87d47f9f6e6074707",
|
||||
"rev": "d6b4c7be5be75ec4917c873ac50c756dc1436372",
|
||||
"name": "LeanSearchClient",
|
||||
"manifestFile": "lake-manifest.json",
|
||||
"inputRev": "main",
|
||||
@@ -35,7 +35,7 @@
|
||||
"type": "git",
|
||||
"subDir": null,
|
||||
"scope": "leanprover-community",
|
||||
"rev": "e928b72544873815af278d38681b31c0293588e3",
|
||||
"rev": "a41f0e9a4dea23188ea9cc1c41ac9f8bbafe0b93",
|
||||
"name": "importGraph",
|
||||
"manifestFile": "lake-manifest.json",
|
||||
"inputRev": "main",
|
||||
@@ -45,7 +45,7 @@
|
||||
"type": "git",
|
||||
"subDir": null,
|
||||
"scope": "leanprover-community",
|
||||
"rev": "106ff4fafc74ef4ac99d81dbf3ab399118f497a5",
|
||||
"rev": "df72b022e558978a1c50264cfc4d7fec86fa8e04",
|
||||
"name": "proofwidgets",
|
||||
"manifestFile": "lake-manifest.json",
|
||||
"inputRev": "main",
|
||||
@@ -55,7 +55,7 @@
|
||||
"type": "git",
|
||||
"subDir": null,
|
||||
"scope": "leanprover-community",
|
||||
"rev": "355695d523e41d0554926416cba2a2b3544fbbc9",
|
||||
"rev": "4a174c490d8707121c4a9290800489f105d85e07",
|
||||
"name": "aesop",
|
||||
"manifestFile": "lake-manifest.json",
|
||||
"inputRev": "master",
|
||||
@@ -65,7 +65,7 @@
|
||||
"type": "git",
|
||||
"subDir": null,
|
||||
"scope": "leanprover-community",
|
||||
"rev": "6a489d9af5d0c47e5b259e2e8bcdfc1811b5a259",
|
||||
"rev": "dce0ad79c486cb1fb504af04f953c3466b0c6db8",
|
||||
"name": "Qq",
|
||||
"manifestFile": "lake-manifest.json",
|
||||
"inputRev": "master",
|
||||
@@ -75,7 +75,7 @@
|
||||
"type": "git",
|
||||
"subDir": null,
|
||||
"scope": "leanprover-community",
|
||||
"rev": "f2effa3d803fda822b1f97b806c47cf2adfbcbc2",
|
||||
"rev": "66e469188fe07963e5cf666c7d4433f45b8131c5",
|
||||
"name": "batteries",
|
||||
"manifestFile": "lake-manifest.json",
|
||||
"inputRev": "main",
|
||||
@@ -85,10 +85,10 @@
|
||||
"type": "git",
|
||||
"subDir": null,
|
||||
"scope": "leanprover",
|
||||
"rev": "e92c9f15fdfacc8536f31cfb3b7ad26c3c8cd204",
|
||||
"rev": "c24fe6078c630e89b489bffe59b3e20ac30d12c8",
|
||||
"name": "Cli",
|
||||
"manifestFile": "lake-manifest.json",
|
||||
"inputRev": "v4.34.0",
|
||||
"inputRev": "v4.35.0",
|
||||
"inherited": true,
|
||||
"configFile": "lakefile.toml"}],
|
||||
"name": "«conflict-range»",
|
||||
|
||||
+10
-1
@@ -1,6 +1,7 @@
|
||||
name = "conflict-range"
|
||||
version = "0.1.0"
|
||||
defaultTargets = ["Statement", "Proof"]
|
||||
allowNonModules = true
|
||||
|
||||
[leanOptions]
|
||||
relaxedAutoImplicit = false
|
||||
@@ -10,7 +11,7 @@ maxSynthPendingDepth = 3
|
||||
[[require]]
|
||||
name = "mathlib"
|
||||
scope = "leanprover-community"
|
||||
rev = "v4.34.0"
|
||||
rev = "v4.35.0"
|
||||
|
||||
[[lean_lib]]
|
||||
name = "Statement"
|
||||
@@ -22,3 +23,11 @@ globs = ["FormalConflictRange.*"]
|
||||
[[lean_lib]]
|
||||
name = "Proof"
|
||||
globs = ["Proof", "Bridge"]
|
||||
|
||||
[[lean_lib]]
|
||||
name = "Challenge"
|
||||
globs = ["Challenge"]
|
||||
|
||||
[[lean_lib]]
|
||||
name = "Solution"
|
||||
globs = ["Solution"]
|
||||
+1
-1
@@ -1 +1 @@
|
||||
leanprover/lean4:v4.34.0
|
||||
leanprover/lean4:v4.35.0
|
||||
Reference in new issue
Block a user