coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Damien Pous <Damien.Pous AT inrialpes.fr>
- To: Pierre Casteran <pierre.casteran AT labri.fr>
- Cc: coq-club AT inria.fr, Vincent Filou <vincent.filou AT labri.fr>
- Subject: Re: [Coq-Club] A question about unicity of proofs
- Date: Fri, 20 May 2011 09:41:35 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=a02TItfWggcBl0L/rqfm15mkwOHb72vq4eXEfZb4jAhCx6i7466JnGQjnUljHsKDoj Q7xvyvis8Ft2gzOQGOmAeYEzqlKUunwn6AkUtcsJbE8/6qKGpOsBjprG1w7q83r8Px09 VUQnedmibtCkivUZzczlMrddABi5RGqOAON7Y=
Bonjour Pierre,
Here is a proof assuming that equality is decidable on streams (which
is certainly not the case).
This is because I use the lemma eq_dep_eq_dec to transform an eq_dep
into a plain eq.
Would a similar lemma about eq_dep hold assuming proof irrelevance on
A rather than decidability on LList A ?
Best,
Damien
---
Set Implicit Arguments.
Require Import Eqdep Eqdep_dec.
Section s.
Variable (A:Type).
CoInductive LList :=
| LNil: LList
| LCons : A -> LList -> LList.
Inductive Finite : LList -> Prop :=
|Finite_LNil: Finite LNil
|Finite_LCons : forall a l, Finite l -> Finite (LCons a l).
Notation "H == K" := (eq_dep _ Finite _ H _ K) (at level 80).
Fixpoint dep h (H: Finite h): forall k (K: Finite k), h = k -> H == K.
destruct H; destruct K.
reflexivity.
discriminate.
discriminate.
intro E. injection E. intros E1 E2.
rewrite (dep _ H _ K E1). subst. reflexivity.
Defined.
Goal forall l (H K:Finite l), H==K.
Proof.
intros. apply dep. reflexivity.
Qed.
Axiom LList_dec: forall h k: LList, {h=k}+{h<>k}.
Goal forall l (H K:Finite l), H=K.
Proof.
intros. apply Eqdep_dec.eq_dep_eq_dec.
apply LList_dec.
apply dep. reflexivity.
Qed.
2011/5/20 Pierre Casteran
<pierre.casteran AT labri.fr>:
> Hello,
>
> Let us consider a type of finite or infinite lists :
>
> Variable (A:Type).
>
> CoInductive LList :=
> | LNil: LList
> | LCons : A -> LList -> LList.
>
>
> Inductive Finite : LList -> Prop :=
> |Finite_LNil: Finite LNil
> |Finite_LCons : forall a l, Finite l-> Finite (LCons a l).
>
>
> Is it possible to prove unicity of proofs of Finite ?
>
> Goal forall l (H H0:Finite l), H=H0 ?
>
> Pierre
>
>
>
>
>
>
- [Coq-Club] A question about unicity of proofs, Pierre Casteran
- Re: [Coq-Club] A question about unicity of proofs, Damien Pous
- Re: [Coq-Club] A question about unicity of proofs,
AUGER Cedric
- Re: [Coq-Club] A question about unicity of proofs,
Pierre Casteran
- Re: [Coq-Club] A question about unicity of proofs, AUGER Cedric
- Re: [Coq-Club] A question about unicity of proofs,
AUGER Cedric
- Re: [Coq-Club] A question about unicity of proofs,
Pierre Casteran
- Re: [Coq-Club] A question about unicity of proofs, Matthieu Sozeau
- Re: [Coq-Club] A question about unicity of proofs,
Pierre Casteran
- Re: [Coq-Club] A question about unicity of proofs,
Pierre Casteran
- Re: [Coq-Club] A question about unicity of proofs,
AUGER Cedric
- Re: [Coq-Club] A question about unicity of proofs, Damien Pous
Archive powered by MhonArc 2.6.16.