Skip to content

Commit a1de50b

Browse files
Fix a few tests
1 parent de07032 commit a1de50b

10 files changed

+29
-27
lines changed

test/all_tactics-20250622.expected.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"tactic": "exact hp",
44
"proofState": 0,
55
"pos": {"line": 2, "column": 2},
6+
"parentDecl": "_example",
67
"goals": "P : Prop\nhp : P\n⊢ P",
78
"endPos": {"line": 2, "column": 10}}],
89
"env": 0}

test/app_type_mismatch2.expected.out

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@
4242
"proofState": 5,
4343
"goals": ["case succ\nn✝ : Nat\n⊢ true = true"]}
4444

45-
{"message":
46-
"Lean error:\ntactic 'apply' failed, could not unify the type of `?succ`\n n✝ + 1 = 0\nwith the goal\n true = true\nn✝ : Nat\n⊢ true = true"}
45+
{"proofStatus":
46+
"Error: kernel type check failed: (kernel) application type mismatch\n @Eq.ndrec Nat (n✝ + 1) (fun x => x = 0)\n (have this := of_decide_eq_true (id (Eq.refl true));\n of_decide_eq_true (id (Eq.refl true)))\nargument has type\n true = true\nbut function has type\n (fun x => x = 0) (n✝ + 1) → ∀ {b : Nat}, n✝ + 1 = b → (fun x => x = 0) b",
47+
"proofState": 6,
48+
"goals": []}
4749

test/by_cases.expected.out

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@
2323

2424
{"proofStatus": "Incomplete: open goals remain",
2525
"proofState": 3,
26-
"goals": ["x : Int\nh : ¬x < 0\n⊢ x = x", "x : Int\nh : x < 0\n⊢ x = x"]}
26+
"goals": ["x : Int\nh : x < 0\n⊢ x = x", "x : Int\nh : ¬x < 0\n⊢ x = x"]}
2727

test/file2.expected.out

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
"tactic": "rw [Nat.add_assoc, Nat.add_comm y, h1]",
1818
"proofState": 0,
1919
"pos": {"line": 7, "column": 2},
20+
"parentDecl": "h",
2021
"goals": "x y z : Nat\n⊢ x + y + (z + a) = x + (z + b + y)",
2122
"endPos": {"line": 7, "column": 40}}],
2223
"env": 0}

test/line_breaks.expected.out

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{"sorries":
22
[{"proofState": 0,
33
"pos": {"line": 2, "column": 0},
4-
"goal": "⊢ 1 = 1",
4+
"parentDecl": "foo",
5+
"goals": ["⊢ 1 = 1"],
56
"endPos": {"line": 2, "column": 5}}],
67
"messages":
78
[{"severity": "warning",

test/line_breaks.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{"cmd": "theorem foo : 1 = 1 := by\n
2-
sorry"}
2+
sorry", "sorries": "individual"}
33

44
{"cmd": "theorem bar : 1 = 1 := by\n
55
/- Some long comment here -/\n

test/sketch_file.expected.out

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
"pos": {"line": 1, "column": 70},
44
"parentDecl": "add_comm_proved_formal_sketch",
55
"goals":
6-
["m : Nat\n⊢ 0 + m = m",
6+
["m : Nat\nh_base : 0 + m = m\n⊢ m + 0 = m",
77
"m : Nat\nh_base : 0 + m = m\nh_symm : m + 0 = m\n⊢ 0 + m = m + 0",
88
"m n : Nat\nih : n + m = m + n\n⊢ n + 1 + m = m + (n + 1)",
9-
"m : Nat\nh_base : 0 + m = m\n⊢ m + 0 = m"],
9+
"m : Nat\n⊢ 0 + m = m"],
1010
"endPos": {"line": 8, "column": 24}},
1111
{"proofState": 1,
1212
"pos": {"line": 11, "column": 49},
@@ -18,10 +18,6 @@
1818
"pos": {"line": 1, "column": 8},
1919
"endPos": {"line": 1, "column": 37},
2020
"data": "declaration uses 'sorry'"},
21-
{"severity": "info",
22-
"pos": {"line": 10, "column": 0},
23-
"endPos": {"line": 10, "column": 62},
24-
"data": "Goals accomplished!"},
2521
{"severity": "warning",
2622
"pos": {"line": 11, "column": 8},
2723
"endPos": {"line": 11, "column": 16},
@@ -33,17 +29,17 @@
3329
"goals":
3430
["m : Nat\nh_base : 0 + m = m\nh_symm : m + 0 = m\n⊢ 0 + m = m + 0",
3531
"m n : Nat\nih : n + m = m + n\n⊢ n + 1 + m = m + (n + 1)",
36-
"m : Nat\nh_base : 0 + m = m\n⊢ m + 0 = m"]}
32+
"m : Nat\n⊢ 0 + m = m"]}
3733

3834
{"proofStatus": "Incomplete: open goals remain",
3935
"proofState": 3,
4036
"goals":
4137
["m n : Nat\nih : n + m = m + n\n⊢ n + 1 + m = m + (n + 1)",
42-
"m : Nat\nh_base : 0 + m = m\n⊢ m + 0 = m"]}
38+
"m : Nat\n⊢ 0 + m = m"]}
4339

4440
{"proofStatus": "Incomplete: open goals remain",
4541
"proofState": 4,
46-
"goals": ["m : Nat\nh_base : 0 + m = m\n⊢ m + 0 = m"]}
42+
"goals": ["m : Nat\n⊢ 0 + m = m"]}
4743

4844
{"proofStatus": "Completed", "proofState": 5, "goals": []}
4945

test/sketch_file.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{"path": "test/sketch_file.lean", "sorries": "grouped"}
22

3-
{"tactic": "apply Nat.zero_add", "proofState": 0}
3+
{"tactic": "apply Nat.add_zero", "proofState": 0}
44

55
{"tactic": "rw [h_base, h_symm]", "proofState": 2}
66

77
{"tactic": "rw [Nat.succ_add, Nat.add_succ, ih]", "proofState": 3}
88

9-
{"tactic": "apply Nat.add_zero", "proofState": 4}
9+
{"tactic": "apply Nat.zero_add", "proofState": 4}
1010

1111
{"tactic": "(\nintros; rfl)", "proofState": 1}

test/sketch_tactic.expected.out

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,25 +14,27 @@
1414
{"proofStatus": "Incomplete: open goals remain",
1515
"proofState": 1,
1616
"goals":
17-
["m : Nat\nh_base : 0 + m = m\nh_symm : m + 0 = m\n⊢ 0 + m = m + 0",
18-
"m n : Nat\nih : n + m = m + n\n⊢ n + 1 + m = m + (n + 1)",
17+
["m n : Nat\nih : n + m = m + n\n⊢ n + 1 + m = m + (n + 1)",
18+
"m : Nat\n⊢ 0 + m = m",
1919
"m : Nat\nh_base : 0 + m = m\n⊢ m + 0 = m",
20-
"m : Nat\n⊢ 0 + m = m"]}
20+
"m : Nat\nh_base : 0 + m = m\nh_symm : m + 0 = m\n⊢ 0 + m = m + 0"]}
2121

2222
{"proofStatus": "Incomplete: open goals remain",
2323
"proofState": 2,
2424
"goals":
25-
["m n : Nat\nih : n + m = m + n\n⊢ n + 1 + m = m + (n + 1)",
25+
["m : Nat\n⊢ 0 + m = m",
2626
"m : Nat\nh_base : 0 + m = m\n⊢ m + 0 = m",
27-
"m : Nat\n⊢ 0 + m = m"]}
27+
"m : Nat\nh_base : 0 + m = m\nh_symm : m + 0 = m\n⊢ 0 + m = m + 0"]}
2828

2929
{"proofStatus": "Incomplete: open goals remain",
3030
"proofState": 3,
31-
"goals": ["m : Nat\nh_base : 0 + m = m\n⊢ m + 0 = m", "m : Nat\n⊢ 0 + m = m"]}
31+
"goals":
32+
["m : Nat\nh_base : 0 + m = m\n⊢ m + 0 = m",
33+
"m : Nat\nh_base : 0 + m = m\nh_symm : m + 0 = m\n⊢ 0 + m = m + 0"]}
3234

3335
{"proofStatus": "Incomplete: open goals remain",
3436
"proofState": 4,
35-
"goals": ["m : Nat\n⊢ 0 + m = m"]}
37+
"goals": ["m : Nat\nh_base : 0 + m = m\nh_symm : m + 0 = m\n⊢ 0 + m = m + 0"]}
3638

3739
{"proofStatus": "Completed", "proofState": 5, "goals": []}
3840

test/sketch_tactic.in

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,10 @@
22

33
{"tactic": "(\n intros n m\n induction n with\n | zero =>\n have h_base: 0 + m = m := sorry\n have h_symm: m + 0 = m := sorry\n sorry\n | succ n ih => sorry)", "proofState": 0}
44

5-
{"tactic": "rw [h_base, h_symm]", "proofState": 1}
5+
{"tactic": "rw [Nat.succ_add, Nat.add_succ, ih]", "proofState": 1}
66

7-
{"tactic": "rw [Nat.succ_add, Nat.add_succ, ih]", "proofState": 2}
7+
{"tactic": "apply Nat.zero_add", "proofState": 2}
88

99
{"tactic": "apply Nat.add_zero", "proofState": 3}
1010

11-
{"tactic": "apply Nat.zero_add", "proofState": 4}
12-
11+
{"tactic": "rw [h_base, h_symm]", "proofState": 4}

0 commit comments

Comments
 (0)