Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] (Not) About mutual recursion

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] (Not) About mutual recursion


chronological Thread 
  • From: Gyesik Lee <gslee AT ropas.snu.ac.kr>
  • To: Jean-Francois Monin <jean-francois.monin AT imag.fr>, AUGER Cédric <Cedric.Auger AT lri.fr>
  • Cc: Coq Club <coq-club AT inria.fr>
  • Subject: Re: [Coq-Club] (Not) About mutual recursion
  • Date: Wed, 13 Oct 2010 14:00:01 +0900
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=a6QkVZ1z2xrgar7EnyWakH2tezXVZwcolCsx0jTTtlGDF152IYSxNXz+Ufwi/qxiHh WwGjqpDRKratFGya8P37awaDw8fWafGSsaIzHkEymqKoZalpxDFH/X5uCTfMY3LyrOPd PIdUloMi1I/IjWfMvt0VmbDsmKw8AB1SA3FUo=

Hi,

I think yours ideas show a way how to linearize the propositional
disjunction so that the proof unicity holds. They will be useful in
many situations.

Thanks a lot.

Gyesik


2010/10/13 Jean-Francois Monin 
<jean-francois.monin AT imag.fr>:
> Hello,
>
> There is a simple solution without bool.
>
> Fixpoint VarInk (t:toto) : Prop -> Prop :=
>  fun A =>
>  match t with
>    | Var        => True
>    | Unit       => A
>    | Plus t0 t1 => (VarInk t0 (VarInk t1 A))
>  end.
>
> What you want is (VarInk t False).
>
> Proving
>
> Lemma VarInk_unicity :
>  forall (t : toto) (A: Prop), unicity A -> unicity (VarInk t A).
>
> is a piece of cake.
>
> Of course
> Definition unicity (P:Prop) := forall (p q: P), p=q.
>
>
> If you need the equivalence with your
> original definition, just prove (rather simple):
>
> Lemma varin_varink : forall t A, VarIn t \/ A -> VarInk t A.
> Lemma varink_varin : forall t A, VarInk t A -> VarIn t \/ A.
>
> Hope this helps,
> JF
>
> On Tue, Oct 12, 2010 at 02:40:28AM +0900, Gyesik Lee wrote:
>> Hi,
>>
>> I am not sure if the title of the message is adequate, so I apologize
>> in advance for any possible confusion.
>>
>> ========================
>>
>> (* Consider the following inductive definition.*)
>>
>> Inductive toto : Type :=
>>   Var   : toto
>> | Unit  : toto
>> | Plus  : toto -> toto -> toto.
>>
>> (* Now I would like to check if a (t : toto) contains [Var] or not.
>> One possible definition is as follows *)
>>
>> Fixpoint VarIn (t:toto) : Prop :=
>>   match r with
>>     | Var        => True
>>     | Unit       => False
>>     | Plus t0 t1 => (VarIn t0) \/ (VarIn t1)
>>   end.
>>
>> (* What I don't like with this definition is that I don't have the
>> proof unicity without using proof-irrelevance.
>> This doesn't mean that I don't like proof-irrelevance.
>>
>> Lemma VarIn_unicity : forall (t : toto) (p q : VarIn t), p = q.
>>
>>
>
> --
> Jean-Francois Monin
> CNRS-LIAMA, Project FORMES  &  Universite de Grenoble 1
>
> Office 3-605, FIT, Tsinghua University
> Haidian District, Beijing 100084, CHINA
> Tel: +86 10 62 79 69 79 ext 605
> Fax@LIAMA:
>  +86 10 6264 7458
>




Archive powered by MhonArc 2.6.16.

Top of Page