@@ -4,8 +4,10 @@ Released under Apache 2.0 license as described in the file LICENSE.
44Authors: Henrik Böving, Simon Hudon
55-/
66
7- import LSpec.SlimCheck.Sampleable
8- import Lean
7+ module
8+ public import LSpec.SlimCheck.Sampleable
9+ public import Lean.Elab.Tactic.Basic
10+ meta import Lean.Elab.Tactic.Basic
911
1012/-!
1113# `Checkable` Class
@@ -61,7 +63,7 @@ random testing
6163 -/
6264
6365namespace SlimCheck
64-
66+ public section
6567/-- Result of trying to disprove `p`
6668The constructors are:
6769 * `success : (PSum Unit p) → TestResult p`
@@ -127,6 +129,7 @@ instance (priority := low) : PrintableProp p where
127129class Checkable (p : Prop ) where
128130 run (cfg : Configuration) (minimize : Bool) : Gen (TestResult p)
129131
132+ @[expose]
130133def NamedBinder (_n : String) (p : Prop ) : Prop := p
131134
132135namespace TestResult
@@ -458,7 +461,7 @@ open Lean
458461
459462/-- Traverse the syntax of a proposition to find universal quantifiers
460463quantifiers and add `NamedBinder` annotations next to them. -/
461- partial def addDecorations (e : Expr) : Expr :=
464+ meta partial def addDecorations (e : Expr) : Expr :=
462465 e.replace fun expr => match expr with
463466 | Expr.forallE name type body data =>
464467 let n := name.toString
@@ -507,4 +510,5 @@ def Checkable.check (p : Prop) (cfg : Configuration := {})
507510-- #eval Checkable.check (∀ (x : (Nat × Nat)), x.fst - x.snd - 10 = x.snd - x.fst - 10) Configuration.verbose
508511-- #eval Checkable.check (∀ (x : Nat) (h : 10 < x), 5 < x) Configuration.verbose
509512
513+ end
510514end SlimCheck
0 commit comments