[Practico 6] - Ej1

[Practico 6] - Ej1

de Pablo Palou Singlet -
Número de respuestas: 2

Buenas! Estaba poniendo Extraction Language Haskell tal como sugiere el practico pero me da Syntax error: illegal begin of vernac. No entiendo por que puede suceder ni como resolverlo. 

Otra consulta que tengo es en el ejercicio 2. Defini inverse y luego estaba intentando probar el Lemma MirrorCI : forall (A : Set) (t : bintree A), {t2 : bintree A | mirror A t t2}.

Para esto hice intros. exists (inverse A t). Aqui me gustaria usar functional induction (inverse A t) como sugiere el practico, pero me dice "The reference functional was not found in the current environment." 

En respuesta a Pablo Palou Singlet

Re: [Practico 6] - Ej1

de Carlos Luna -

Hola.

Hay cosas que cambiaron en la última versión de Coq.

1) Para que funcione Extraction Language Haskell, hay que poner primero algo:

Require Import Coq.extraction.ExtrHaskellBasic.

Extraction Language Haskell.

Extraction "predecesor" predspec.

2) Para usar functional induction en el ejercicio de mirror:

Require Import FunInd.

Functional Scheme inverse_ind := Induction for inverse Sort Prop.

Lemma MirrorC2 : forall (A : Set) (t : bintree A), {t2 : bintree A | mirror A t t2}.

Proof.

  intros A t.

  exists (inverse A t).

  functional induction inverse A t.

...

Saludos, Carlos


 


En respuesta a Pablo Palou Singlet

Re: [Practico 6] - Ej1

de Carlos Luna -
Hola.

Hay cosas que cambiaron en la última versión de Coq.

1) Para que funcione Extraction Language Haskell, hay que poner primero algo:

Require Import Coq.extraction.ExtrHaskellBasic.

Extraction Language Haskell.

Extraction "predecesor" predspec.

2) Para usar functional induction en el ejercicio de mirror:

Require Import FunInd.

Functional Scheme inverse_ind := Induction for inverse Sort Prop.

Lemma MirrorC2 : forall (A : Set) (t : bintree A), {t2 : bintree A | mirror A t t2}.

Proof.

intros A t.

exists (inverse A t).

functional induction inverse A t.

...

Saludos, Carlos