Skip to content

feat: lift to expressions, vacuous and random_search tactics#7

Open
siddhartha-gadgil wants to merge 35 commits into
leanprover-community:mainfrom
siddhartha-gadgil:main
Open

feat: lift to expressions, vacuous and random_search tactics#7
siddhartha-gadgil wants to merge 35 commits into
leanprover-community:mainfrom
siddhartha-gadgil:main

Conversation

@siddhartha-gadgil
Copy link
Copy Markdown

  • 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.

Comment thread Plausible/Sampleable.lean
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
Copy Markdown
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
Copy Markdown
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.

Comment thread Plausible/Sampleable.lean
Comment thread Plausible/Sampleable.lean

open SampleableExt

instance instToExprSum [ToExpr α] [ToExpr β] : ToExpr (α ⊕ β) :=
Copy link
Copy Markdown
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