coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: "gallais @ ensl.org" <guillaume.allais AT ens-lyon.org>
- Cc: coq-club AT inria.fr
- Subject: Re: [Coq-Club] Generalizing dependently typed functions
- Date: Mon, 28 May 2012 22:19:27 -0400
I discovered that replacing "intros []" with "intro r; dependent destruction r" fixes things, if I [Require Import Program].
-Jason
On Mon, May 28, 2012 at 6:31 PM, Jason Gross <jasongross9 AT gmail.com> wrote:
Thanks!However, if I replace [T a] with [T a a] in the definition of [f], then the second proof fails; on "intros []", I getError: Illegal application (Type Error):The term "f" of type"forall (T : Type -> Type -> Type) (a : Type), T a a -> Prop"cannot be applied to the terms"T" : "Type -> Type -> Type""b" : "Type""x0" : "T a b"The 3rd term has type "T a b" which should be coercible to"T b b".-JasonParameter f : forall T (a : Type), T a -> Prop.Inductive g T (a : Type) : forall (b : Type) (x : T a b), Prop :=
Implicit Arguments f [T a].
| injf : forall (t : T a a), f t -> g T a a t.
intros H gx ; inversion gx ; contradiction.
Implicit Arguments g [T a b].
Theorem g_ne T (a b : Type) (x : T a b) : a <> b -> ~g x.
Qed.
split.
Theorem f_eq_g T (a : Type) (x : T a a) : f x <-> g x.
intro fx ; constructor ; assumption.
intros [] ; firstorder.
Qed.
- [Coq-Club] Generalizing dependently typed functions, Jason Gross, 05/28/2012
- Re: [Coq-Club] Generalizing dependently typed functions, gallais @ ensl.org, 05/28/2012
- Re: [Coq-Club] Generalizing dependently typed functions, Jason Gross, 05/29/2012
- Re: [Coq-Club] Generalizing dependently typed functions, Jason Gross, 05/29/2012
- Re: [Coq-Club] Generalizing dependently typed functions, Robbert Krebbers, 05/29/2012
- Re: [Coq-Club] Generalizing dependently typed functions, Jason Gross, 05/29/2012
- Re: [Coq-Club] Generalizing dependently typed functions, Jason Gross, 05/29/2012
- Re: [Coq-Club] Generalizing dependently typed functions, gallais @ ensl.org, 05/28/2012
Archive powered by MHonArc 2.6.18.