-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1222 from lean-ja/Seasawher/issue1169
`#test` コマンドを紹介する
- Loading branch information
Showing
3 changed files
with
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/- # \#test | ||
`#test` コマンドは、Plausible ライブラリで定義されているもので、与えられた命題が成り立つかどうか、具体例をランダムに生成してチェックすることで検証します。[`plausible`](#{root}/Tactic/Plausible.md) タクティクと同様の機能を持ちます。 | ||
-/ | ||
import Plausible | ||
|
||
-- 命題 `P : Prop` に対して、`#test P` で `P` が成り立つかどうかを検証する | ||
#test ∀ (n : Nat), n + 0 = n | ||
|
||
-- 反例が見つからなければ「反例が見つからない」と教えてくれる | ||
/-- info: Unable to find a counter-example -/ | ||
#guard_msgs in | ||
#test ∀ (n : Nat), n + n = 2 * n |
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