Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] Question about a lemma concerning vectors

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] Question about a lemma concerning vectors


Chronological Thread 
  • From: gallego AT cri.ensmp.fr (Emilio Jesús Gallego Arias)
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] Question about a lemma concerning vectors
  • Date: Mon, 10 Nov 2014 23:53:22 +0100
  • Cancel-lock: sha1:HHtNTlW8zLANgtm+8VeiYiugKBg=

"John Wiegley"
<johnw AT newartisans.com>
writes:

> Another benefit of this approach is that I was able to make all use of
> vector
> and fin disappear from the extracted Haskell code, where it now reduces down
> to Int and [a], so cheers all around.
>
> Emilio's suggestion about using ssreflect tuples is a great one -- since I'm
> trying to use ssreflect more; I will investigate that avenue next.

tuples in ssr are a pair of a list plus a proof of its size, it may work
well wrt to extraction (I have never extracted ssr code).

IMVHO, programming in this explicit-proof style does requires a bit of
discipline following the conventions and the proper interfaces (subType,
etc...), but when so, everything works very well.

Indeed, my previous code didn't respect quite a few ssr proof and naming
conventions, for instance, the right way to prove vnth_replace_neq is to
use the tnth_tset_nth lemma, not the hack I did. More correct code is
attached.

Best regards,
Emilio.

Attachment: tset_nth.v
Description: Binary data




Archive powered by MHonArc 2.6.18.

Top of Page