We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
https://github.com/leanprover-community/plausible
The text was updated successfully, but these errors were encountered:
MyNat 型を作って、それを plausible で扱えるようにした例を作った。
import Plausible open Plausible /-- 自前で `Nat` を模倣して定義した型 -/ inductive MyNat where | zero : MyNat | succ : MyNat → MyNat deriving Repr open MyNat /-- 組み込みの自然数を `MyNat` に変換する -/ def MyNat.ofNat : Nat → MyNat | 0 => zero | n + 1 => succ (ofNat n) def MyNat.shrink : MyNat → List MyNat | zero => [] | succ n => n :: n.shrink open SampleableExt #check Shrinkable.shrink instance : Shrinkable MyNat where shrink := fun x => x.shrink #eval Shrinkable.shrink (MyNat.succ (MyNat.succ MyNat.zero)) instance : SampleableExt MyNat := mkSelfContained do let x ← SampleableExt.interpSample Nat return MyNat.ofNat x -- ランダムな `MyNat` の例を生成する #sample MyNat -- `DecidableEq` を付加する deriving instance DecidableEq for MyNat /-- error: Found a counter-example! -/ #guard_msgs in example (a b : MyNat) : a = b := by plausible (config := {quiet := true})
Sorry, something went wrong.
bcf294e
Seasawher
Successfully merging a pull request may close this issue.
https://github.com/leanprover-community/plausible
The text was updated successfully, but these errors were encountered: