-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import Std.Tactic.GuardExpr | ||
|
||
-- ANCHOR: first | ||
example (hP : P) : P := by | ||
-- 現在ローカルコンテキストにある命題を確認できる | ||
guard_hyp hP : P | ||
|
||
exact hP | ||
-- ANCHOR_END: first |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# guard_hyp | ||
|
||
needs: `import Std.Tactic.GuardExpr` | ||
|
||
`guard_hyp` は,ローカルコンテキストにある命題を確認するタクティクです.指定した仮定が存在すれば成功し,そうでなければ失敗します. | ||
|
||
```lean | ||
{{#include ../Examples/GuardHyp.lean:first}} | ||
``` | ||
|
||
通常の証明で使うことはあまりないかもしれません.このタクティクリストでは,ローカルコンテキストの変化を説明するために使用することがあります. |