-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
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
feat: lift to expressions, vacuous and random_search tactics #7
base: main
Are you sure you want to change the base?
feat: lift to expressions, vacuous and random_search tactics #7
Conversation
@@ -262,6 +296,9 @@ instance [SampleableExt α] [SampleableExt β] : SampleableExt ((_ : α) × β) | |||
let p ← prodOf sample sample | |||
return ⟨p.fst, p.snd⟩ | |||
interp s := ⟨interp s.fst, interp s.snd⟩ | |||
proxyExpr? := none -- did not understand the difference with products |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be clear, this is Sigma
not Prod
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. Indeed the documentation said so but I missed this. Will fix.
@@ -242,6 +260,18 @@ section Samplers | |||
|
|||
open SampleableExt | |||
|
|||
instance instToExprSum [ToExpr α] [ToExpr β] : ToExpr (α ⊕ β) := |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note that the use of levelZero
in this instance is incorrect, which means that mathlib will have to make a copy of this instance and the one below (using Mathlib's Lean.ToLevel
)
MetaTestable
is introduced that is similar toTestable
but also keeps track of expressions for counterexamples by copying and modifying the code.MetaTestable
can be inferred. There are limitations as in addition toSampleableExt
we needToExpr
for the proxy type to build expressions.vacuous
andrandom_search
.vacuous
tactic tries to negate (a part of the) hypothesis to prove by vacuous implication.random_search
tactic negates the goal and tries to disprove it.