Skip to content

Conversation

siddhartha-gadgil
Copy link

  • A new class MetaTestable is introduced that is similar to Testable but also keeps track of expressions for counterexamples by copying and modifying the code.
  • Tests show that in many cases MetaTestable can be inferred. There are limitations as in addition to SampleableExt we need ToExpr for the proxy type to build expressions.
  • Using this, we write two new tactics: vacuous and random_search.
  • The vacuous tactic tries to negate (a part of the) hypothesis to prove by vacuous implication.
  • The random_search tactic negates the goal and tries to disprove it.

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
Copy link
Member

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.

Copy link
Author

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.


open SampleableExt

instance instToExprSum [ToExpr α] [ToExpr β] : ToExpr (α ⊕ β) :=
Copy link
Member

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants