Skip to content

Commit 144b9b0

Browse files
update Lean to version 4.14.0
1 parent 560470f commit 144b9b0

File tree

4 files changed

+78
-56
lines changed

4 files changed

+78
-56
lines changed

Katydid/Std/Lists.lean

+25-22
Original file line numberDiff line numberDiff line change
@@ -44,21 +44,12 @@ theorem nat_pred_le_succ' : {n m : Nat} -> Nat.le n (succ m) -> Nat.le (pred n)
4444
have h_n_le_succ_n := Nat.le_succ n
4545
exact (Nat.le_trans h_n_le_succ_n h)
4646

47-
theorem nat_min_zero {n: Nat}: min 0 n = 0 := by
48-
unfold min
49-
unfold instMinNat
50-
unfold minOfLe
51-
simp
5247

53-
theorem nat_zero_min {n: Nat}: min n 0 = 0 := by
54-
cases n with
55-
| zero =>
56-
simp
57-
| succ n =>
58-
unfold min
59-
unfold instMinNat
60-
unfold minOfLe
61-
simp only [nonpos_iff_eq_zero, ite_false]
48+
theorem nat_min_zero {n: Nat}: min 0 n = 0 :=
49+
Nat.min_eq_left (Nat.zero_le _)
50+
51+
theorem nat_zero_min {n: Nat}: min n 0 = 0 :=
52+
Nat.min_eq_right (Nat.zero_le _)
6253

6354
theorem nat_add_succ_is_succ_add (n m: Nat): succ n + m = succ (n + m) := by
6455
cases n with
@@ -116,7 +107,8 @@ theorem list_length_zero_is_empty (xs: List α):
116107
· intro _
117108
rfl
118109
· intro h'
119-
simp only [length, add_eq_zero, and_false] at h'
110+
-- simp? at h'
111+
simp only [length_cons, AddLeftCancelMonoid.add_eq_zero, length_eq_zero, one_ne_zero, and_false] at h'
120112

121113
theorem list_app_nil_l (xs: List α):
122114
[] ++ xs = xs := by
@@ -231,7 +223,8 @@ theorem list_app_inj_tail {xs ys: List α} {x y: α}:
231223
cases ys with
232224
| nil =>
233225
intro h'
234-
simp only [cons_append, nil_append, cons.injEq, append_eq_nil, and_false] at h'
226+
-- simp? at h'
227+
simp only [cons_append, nil_append, cons.injEq, append_eq_nil, cons_ne_self, and_false] at h'
235228
| cons heady taily =>
236229
intro h'
237230
simp only [cons_append, cons.injEq] at h'
@@ -319,7 +312,8 @@ theorem list_rev_empty (xs : List α) :
319312
| cons head tail =>
320313
intro h
321314
have h' : (reverse (reverse (head :: tail)) = []) := congrArg reverse h
322-
simp only [reverse_cons, reverse_append, reverse_nil, nil_append, reverse_reverse, singleton_append] at h'
315+
-- simp? at h'
316+
simp only [reverse_cons, reverse_append, reverse_nil, nil_append, reverse_reverse, singleton_append, reduceCtorEq] at h'
323317

324318
theorem list_rev_empty2 :
325319
reverse ([] : List α) = [] := by trivial
@@ -470,20 +464,22 @@ theorem list_take_take (n: Nat) (xs: List α):
470464
revert m xs
471465
induction n with
472466
| zero =>
473-
intro m xs
474-
rw [nat_min_zero]
475-
repeat rw [take]
476-
| succ n ihn =>
467+
simp
468+
| succ n ihn =>
477469
intro m xs
478470
cases m with
479471
| zero =>
480472
unfold min
473+
unfold instMin_mathlib
474+
unfold inferInstance
481475
unfold instMinNat
482476
unfold minOfLe
483477
rw [take]
484478
simp only [take]
485479
| succ m =>
486480
unfold min
481+
unfold instMin_mathlib
482+
unfold inferInstance
487483
unfold instMinNat
488484
unfold minOfLe
489485
simp only
@@ -498,6 +494,8 @@ theorem list_take_take (n: Nat) (xs: List α):
498494
apply (congrArg (cons x))
499495
have hmin : min n m = n := by
500496
unfold min
497+
unfold instMin_mathlib
498+
unfold inferInstance
501499
unfold instMinNat
502500
unfold minOfLe
503501
simp only [ite_eq_left_iff, not_le]
@@ -517,6 +515,8 @@ theorem list_take_take (n: Nat) (xs: List α):
517515
apply (congrArg (cons x))
518516
have hmin : min n m = m := by
519517
unfold min
518+
unfold instMin_mathlib
519+
unfold inferInstance
520520
unfold instMinNat
521521
unfold minOfLe
522522
simp only [ite_eq_right_iff]
@@ -683,6 +683,8 @@ theorem list_take_large_length {n: Nat} {xs: List α}:
683683
theorem list_take_length (n: Nat) (xs: List α):
684684
length (take n xs) = min n (length xs) := by
685685
unfold min
686+
unfold instMin_mathlib
687+
unfold inferInstance
686688
unfold instMinNat
687689
unfold minOfLe
688690
simp only [length_take, ge_iff_le]
@@ -904,7 +906,8 @@ theorem list_prefix_is_not_empty_with_index_gt_zero: ∀ (xs: List α) (n: Nat)
904906
| nil =>
905907
contradiction
906908
| cons x xs =>
907-
simp only [succ_pos', take] at *
909+
-- simp? at *
910+
simp only [lt_add_iff_pos_left, add_pos_iff, zero_lt_one, or_true, take_succ_cons, reduceCtorEq] at *
908911

909912
theorem list_app_uncons: ∀ {x: α} {xs ys zs: List α},
910913
ys ++ zs = x :: xs ->

lake-manifest.json

+51-31
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,95 @@
11
{"version": "1.1.0",
22
"packagesDir": ".lake/packages",
33
"packages":
4-
[{"url": "https://github.com/leanprover-community/batteries",
4+
[{"url": "https://github.com/leanprover-community/mathlib4",
5+
"type": "git",
6+
"subDir": null,
7+
"scope": "",
8+
"rev": "4bbdccd9c5f862bf90ff12f0a9e2c8be032b9a84",
9+
"name": "mathlib",
10+
"manifestFile": "lake-manifest.json",
11+
"inputRev": "v4.14.0",
12+
"inherited": false,
13+
"configFile": "lakefile.lean"},
14+
{"url": "https://github.com/leanprover-community/plausible",
515
"type": "git",
616
"subDir": null,
717
"scope": "leanprover-community",
8-
"rev": "d747f070e42dd21e2649b75090f5b0d45c6ec8e0",
9-
"name": "batteries",
18+
"rev": "42dc02bdbc5d0c2f395718462a76c3d87318f7fa",
19+
"name": "plausible",
1020
"manifestFile": "lake-manifest.json",
1121
"inputRev": "main",
1222
"inherited": true,
13-
"configFile": "lakefile.lean"},
14-
{"url": "https://github.com/leanprover-community/quote4",
23+
"configFile": "lakefile.toml"},
24+
{"url": "https://github.com/leanprover-community/LeanSearchClient",
1525
"type": "git",
1626
"subDir": null,
1727
"scope": "leanprover-community",
18-
"rev": "71f54425e6fe0fa75f3aef33a2813a7898392222",
19-
"name": "Qq",
28+
"rev": "d7caecce0d0f003fd5e9cce9a61f1dd6ba83142b",
29+
"name": "LeanSearchClient",
2030
"manifestFile": "lake-manifest.json",
21-
"inputRev": "master",
31+
"inputRev": "main",
2232
"inherited": true,
23-
"configFile": "lakefile.lean"},
24-
{"url": "https://github.com/leanprover-community/aesop",
33+
"configFile": "lakefile.toml"},
34+
{"url": "https://github.com/leanprover-community/import-graph",
2535
"type": "git",
2636
"subDir": null,
2737
"scope": "leanprover-community",
28-
"rev": "c792cfd1efe6e01cb176e158ddb195bedfb7ad33",
29-
"name": "aesop",
38+
"rev": "519e509a28864af5bed98033dd33b95cf08e9aa7",
39+
"name": "importGraph",
3040
"manifestFile": "lake-manifest.json",
31-
"inputRev": "master",
41+
"inputRev": "v4.14.0",
3242
"inherited": true,
3343
"configFile": "lakefile.toml"},
3444
{"url": "https://github.com/leanprover-community/ProofWidgets4",
3545
"type": "git",
3646
"subDir": null,
3747
"scope": "leanprover-community",
38-
"rev": "a96aee5245720f588876021b6a0aa73efee49c76",
48+
"rev": "68280daef58803f68368eb2e53046dabcd270c9d",
3949
"name": "proofwidgets",
4050
"manifestFile": "lake-manifest.json",
41-
"inputRev": "v0.0.41",
51+
"inputRev": "v0.0.47",
4252
"inherited": true,
4353
"configFile": "lakefile.lean"},
44-
{"url": "https://github.com/leanprover/lean4-cli",
54+
{"url": "https://github.com/leanprover-community/aesop",
4555
"type": "git",
4656
"subDir": null,
47-
"scope": "",
48-
"rev": "2cf1030dc2ae6b3632c84a09350b675ef3e347d0",
49-
"name": "Cli",
57+
"scope": "leanprover-community",
58+
"rev": "5a0ec8588855265ade536f35bcdcf0fb24fd6030",
59+
"name": "aesop",
5060
"manifestFile": "lake-manifest.json",
51-
"inputRev": "main",
61+
"inputRev": "v4.14.0",
5262
"inherited": true,
5363
"configFile": "lakefile.toml"},
54-
{"url": "https://github.com/leanprover-community/import-graph",
64+
{"url": "https://github.com/leanprover-community/quote4",
5565
"type": "git",
5666
"subDir": null,
5767
"scope": "leanprover-community",
58-
"rev": "57bd2065f1dbea5e9235646fb836c7cea9ab03b6",
59-
"name": "importGraph",
68+
"rev": "303b23fbcea94ac4f96e590c1cad6618fd4f5f41",
69+
"name": "Qq",
6070
"manifestFile": "lake-manifest.json",
61-
"inputRev": "main",
71+
"inputRev": "master",
72+
"inherited": true,
73+
"configFile": "lakefile.lean"},
74+
{"url": "https://github.com/leanprover-community/batteries",
75+
"type": "git",
76+
"subDir": null,
77+
"scope": "leanprover-community",
78+
"rev": "8d6c853f11a5172efa0e96b9f2be1a83d861cdd9",
79+
"name": "batteries",
80+
"manifestFile": "lake-manifest.json",
81+
"inputRev": "v4.14.0",
6282
"inherited": true,
6383
"configFile": "lakefile.toml"},
64-
{"url": "https://github.com/leanprover-community/mathlib4",
84+
{"url": "https://github.com/leanprover/lean4-cli",
6585
"type": "git",
6686
"subDir": null,
67-
"scope": "",
68-
"rev": "cae1b27ace5330f372b57f1051e228fe9b264d57",
69-
"name": "mathlib",
87+
"scope": "leanprover",
88+
"rev": "726b3c9ad13acca724d4651f14afc4804a7b0e4d",
89+
"name": "Cli",
7090
"manifestFile": "lake-manifest.json",
71-
"inputRev": null,
72-
"inherited": false,
73-
"configFile": "lakefile.lean"}],
91+
"inputRev": "main",
92+
"inherited": true,
93+
"configFile": "lakefile.toml"}],
7494
"name": "katydid",
7595
"lakeDir": ".lake"}

lakefile.lean

+1-2
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ package katydid
77
lean_lib Katydid
88

99
-- dependencies std4, quote4 are obtained transitively through mathlib4
10-
require mathlib from git
11-
"https://github.com/leanprover-community/mathlib4"
10+
require mathlib from git "https://github.com/leanprover-community/mathlib4" @ "v4.14.0"

lean-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
leanprover/lean4:v4.11.0-rc2
1+
leanprover/lean4:v4.14.0

0 commit comments

Comments
 (0)