coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Greg Morrisett <greg AT eecs.harvard.edu>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] totality and consistency
- Date: Mon, 10 Feb 2014 13:16:32 -0500
I'm curious about the interaction of this feature with extraction.
In the example you gave:
> Fixpoint f (x:nat) : nat := let y := f x in 0.
extraction to Ocaml yields:
let rec f x = 0
This suggests that the body of a recursive function is
normalized before extraction. But this example:
Fixpoint g (x:nat) : nat :=
let z1 := x * x in
let z2 := z1 * z1 in
let z3 := z2 * z2 in
let z4 := g z3 * g z3 in
z3 * z3.
yields the following Ocaml:
let rec g x =
let z1 = mult x x in
let z2 = mult z1 z1 in
let z3 = mult z2 z2 in
mult z3 z3
so obviously, something more clever is happening.
-Greg
- [Coq-Club] totality and consistency, Kirill Taran, 02/08/2014
- Re: [Coq-Club] totality and consistency, Guillaume Melquiond, 02/08/2014
- Re: [Coq-Club] totality and consistency, Kirill Taran, 02/08/2014
- Re: [Coq-Club] totality and consistency, Frédéric Blanqui, 02/10/2014
- Re: [Coq-Club] totality and consistency, Arnaud Spiwack, 02/10/2014
- Re: [Coq-Club] totality and consistency, Kirill Taran, 02/10/2014
- Re: [Coq-Club] totality and consistency, Matthieu Sozeau, 02/10/2014
- Re: [Coq-Club] totality and consistency, Arnaud Spiwack, 02/10/2014
- Re: [Coq-Club] totality and consistency, Greg Morrisett, 02/10/2014
- Re: [Coq-Club] totality and consistency, Guillaume Melquiond, 02/10/2014
- Re: [Coq-Club] totality and consistency, Kirill Taran, 02/11/2014
- Re: [Coq-Club] totality and consistency, Greg Morrisett, 02/12/2014
- Re: [Coq-Club] totality and consistency, Mitchell Wand, 02/12/2014
- Re: [Coq-Club] totality and consistency, Greg Morrisett, 02/12/2014
- Re: [Coq-Club] totality and consistency, Arnaud Spiwack, 02/12/2014
- Re: [Coq-Club] totality and consistency, Matthieu Sozeau, 02/12/2014
- Re: [Coq-Club] totality and consistency, Bruno Barras, 02/12/2014
- Re: [Coq-Club] totality and consistency, Matthieu Sozeau, 02/12/2014
- Re: [Coq-Club] totality and consistency, Arnaud Spiwack, 02/10/2014
- Re: [Coq-Club] totality and consistency, Matthieu Sozeau, 02/10/2014
- Re: [Coq-Club] totality and consistency, Kirill Taran, 02/10/2014
- Re: [Coq-Club] totality and consistency, Arnaud Spiwack, 02/10/2014
- Re: [Coq-Club] totality and consistency, Guillaume Melquiond, 02/08/2014
Archive powered by MHonArc 2.6.18.