Skip to content

Commit f6fad9d

Browse files
committed
try?の説明を丁寧にする
1 parent caa4188 commit f6fad9d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

LeanByExample/Tactic/TryQuestion.lean

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ example (as : List α) : (reverse as).head? = as.last? := by
1717
-- grind 単体では証明ができない
1818
fail_if_success grind
1919

20+
-- 帰納法を適当に使ってみてもダメ
21+
fail_if_success induction as with grind
22+
fail_if_success fun_induction last? <;> grind
23+
2024
-- try? なら証明を見つけることができる
2125
try?
2226

27+
example (as : List α) : (reverse as).head? = as.last? := by
28+
-- 証明の一例
29+
fun_induction last? <;> grind [= last?.eq_def]
30+
2331
end List

0 commit comments

Comments
 (0)