coq-club AT inria.fr
Subject: The Coq mailing list
List archive
Re: [Coq-Club] Getting Program's postcondition with a two-level dependent pattern matching?
chronological Thread
- From: Adam Koprowski <adam.koprowski AT gmail.com>
- To: Matthieu Sozeau <mattam AT mattam.org>
- Cc: Coq Club <coq-club AT pauillac.inria.fr>
- Subject: Re: [Coq-Club] Getting Program's postcondition with a two-level dependent pattern matching?
- Date: Sun, 28 Jun 2009 01:53:51 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=X9zPftoEXjiY8NGmxcgicMCggk6zy60RLcyJbGN2dErBFjP9O/YPP2ZUdowoJc43bg 061VIFC0wuk7clg9V+PiuUjdb2ID8KKG0UZAx/vfurRkay4P26UMj5G7rv/9on+LjPUM uMj1hLZdBNiGDulTMlm8cgwyUxm85CnaxXXmc=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
In short, this works: [...]
Thanks! I'll try to see whether I can make it work on my real problem...
For the generation of equalities for the toplevel dependent pattern-matching,
you should get them for free! The automatic inference of the return predicate
was not getting the dependency of the return type in [x], but this can be fixed.
As a result, you get to prove the [correct] tcc in each branch instead of having
to destruct the whole term again and get into these dependency problems.
Indeed in my previous (simpler) version of this function, when [x] was not dependently typed, that was the case: I got one tcc per branch, with equality constraints and everything worked beautifully.
By 'this can be fixed' you mean the treatment of such cases by Program? Or is there anything I can do to avoid providing the return clause and benefiting from the Program's extra treatment of pattern matching?
By 'this can be fixed' you mean the treatment of such cases by Program? Or is there anything I can do to avoid providing the return clause and benefiting from the Program's extra treatment of pattern matching?
Cheers,
Adam
--
=====================================================
Adam.Koprowski AT gmail.com, http://www.cs.ru.nl/~Adam.Koprowski
The difference between impossible and possible
lies in determination (Tommy Lasorda)
=====================================================
- [Coq-Club] Getting Program's postcondition with a two-level dependent pattern matching?, Adam Koprowski
- Re: [Coq-Club] Getting Program's postcondition with a two-level dependent pattern matching?,
Matthieu Sozeau
- Re: [Coq-Club] Getting Program's postcondition with a two-level dependent pattern matching?, Adam Koprowski
- Re: [Coq-Club] Getting Program's postcondition with a two-level dependent pattern matching?,
Matthieu Sozeau
Archive powered by MhonArc 2.6.16.