Skip to content

Commit fc031be

Browse files
committed
add test
1 parent caced32 commit fc031be

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

tests/lean/run/discrTreeLambda.lean

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/-- info: fun <other> -/
2+
#guard_msgs in
3+
#discr_tree_key fun x => x
4+
5+
/-- info: @bind _ _ _ _ _ (fun @pure _ _ _ _) -/
6+
#guard_msgs in
7+
#discr_tree_simp_key bind_pure_comp
8+
9+
/-- info: @List.foldlM _ _ _ _ (fun fun @pure _ _ _ _) _ _ -/
10+
#guard_msgs in
11+
#discr_tree_simp_key List.foldlM_pure
12+
13+
/-- info: @List.foldr _ (List _) (fun @List.cons _ _) _ _ -/
14+
#guard_msgs in
15+
#discr_tree_simp_key List.foldr_cons_eq_append
16+
17+
/-- info: @Eq Sort _ _ -/
18+
#guard_msgs in
19+
#discr_tree_key propext
20+
21+
/--
22+
error: unsolved goals
23+
a b : List Nat
24+
⊢ List.map (fun x => x + 1) b ++ a = sorry
25+
-/
26+
#guard_msgs in
27+
example : List.foldr (fun x y => (x + 1) :: y) a b = sorry := by
28+
simp only [List.foldr_cons_eq_append]
29+
30+
/--
31+
error: unsolved goals
32+
α✝ : Type u_1
33+
a b : List α✝
34+
⊢ List.map (fun x => x) b ++ a = sorry
35+
-/
36+
#guard_msgs in
37+
example : List.foldr (fun x y => x :: y) a b = sorry := by
38+
simp only [List.foldr_cons_eq_append]
39+
40+
theorem fun_self_eq_id : (fun x : α => x) = id := rfl
41+
42+
/--
43+
error: unsolved goals
44+
m : Type u_1 → Type u_2
45+
α : Type u_1
46+
inst✝¹ : Monad m
47+
inst✝ : LawfulMonad m
48+
x : m α
49+
⊢ id <$> x = sorry
50+
-/
51+
#guard_msgs in
52+
example [Monad m] [LawfulMonad m] (x : m α) : x >>= pure = sorry := by
53+
simp only [bind_pure_comp, fun_self_eq_id]

0 commit comments

Comments
 (0)