Skip to content

Unable to prove lemma with trivial universially quantified precondition (forall x. False ==> False) for most types for x #2546

Answered by nikswamy
klinvill asked this question in Q&A
Discussion options

You must be logged in to vote

For trivially inhabited types t (like int) F*'s simplifier simplifies forall (x:t). False to False

So, your first example becomes False ==> False, which F* proves without going to Z3.

Your second example doesn't get simplified, so Z3 sees (forall (x:nat). False) ==> False, but to instantiate the quantifer in the hypothesis it needs to find a nat, which it can't do. In SMT2, this is roughly (implies (forall ((x Term)). (! (implies (HasType x nat) false) :pattern ((HasType x nat))) false), so Z3 needs to derive (HasType N nat) for some N

In the third example, the goal is still (forall (x:nat). False) ==> False, but now Z3 has in its context an assertion saying that (HasType two nat) /\ (= t…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@klinvill
Comment options

@gowthamk
Comment options

@nikswamy
Comment options

@nikswamy
Comment options

Answer selected by klinvill
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants