You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the following example. F* complains that the typeclass instance is not captured by the SMT pattern, but the SMT pattern works fine.
assumevalt:Type0classtoto={f:t->t->t;g:t->t->t;f_lemma:x:t->y:t->squash(fxy==gyx);}// Lemma that can be proven using f_lemma twicevaltest_lemma:{|toto|}->x:t->y:t->z:t->Lemma(fx(fyz)==g(gzy)x)// It can't be proven automatically[@@expect_failure]lettest_lemma#toto_instancexyz=()// We create a lemma with SMT pattern.// F* says: Pattern misses at least one bound variable: ...valf_lemma_smtpat:{|toto|}->x:t->y:t->Lemma(fxy==gyx)[SMTPat(fxy)]letf_lemma_smtpat#toto_instancexy=f_lemmaxy// However the SMT pattern works welllettest_lemma#toto_instancexyz=()
If we write the instance explicitly the error disappear, although I would have thought it is equivalent to the code above?
Thanks for the report Théophile! Pushing a fix for this. What is happening is that F* is checking that all arguments of the lemma are mentioned in the pattern before doing typeclass resolution, and giving a false warning. The pattern is itself fine.
See the following example. F* complains that the typeclass instance is not captured by the SMT pattern, but the SMT pattern works fine.
If we write the instance explicitly the error disappear, although I would have thought it is equivalent to the code above?
What is happening here, is there really something wrong with the first SMT pattern?
The text was updated successfully, but these errors were encountered: