Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] successor/predecessor on tree type

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] successor/predecessor on tree type


chronological Thread 
  • From: Paul Tarau <paul.tarau AT gmail.com>
  • To: Taral <taralx AT gmail.com>
  • Cc: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] successor/predecessor on tree type
  • Date: Mon, 12 Apr 2010 22:52:23 -0500
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=uP0ZLL9TOFNXqE1Eef8V+gp7A97MMgbsYqtTtAzZC0lVXJy5Eb1IOJ43abkroNgcWN 3YAkgQNS2MInXWgUWptJwAKx818f8OyAhxromhTgnTvCI2Qp8TW7D46hGt1w7bROb/JA 52O8VOwlnNF4e1hr3yWlaLFFrbbxKR+E1wK8k=

Interpret (bijectively, with function i : T -> nat)

i E = 0
i (A x y) = 2^(i x)*(2*(i y)+1)

Then i (s x) = (i x) + 1, a formula in Peano arithmetic,
would show that s works like the successor function on nat,
which obviously terminates.

Still, my hope was that given this bijection, a direct
inductive proof that "the mess" implements the equivalent
of the successor function could be found using Coq.

Paul Tarau

On Mon, Apr 12, 2010 at 5:18 PM, Taral 
<taralx AT gmail.com>
 wrote:
> On Sat, Apr 10, 2010 at 4:47 PM, 
> �<paul.tarau AT gmail.com>
>  wrote:
>> -- successor
>> s E = A E E
>> s (A x y) = s0 x y
>>
>> s0 E y = A (s x) z where A x z = s y
>> s0 (A a b) y = A E (A (p0 a b) y)
>>
>> p0 E E = E
>> p0 E (A x y) = A (s x) y
>> p0 (A a b) y = A E (p0 (p0 a b) y)
>>
>> -- predecessor
>> p (A x y) = p0 x y
>
> First prove to me (informally) that this mess _always_ terminates.
>
> --
> Taral 
> <taralx AT gmail.com>
> "Please let me know if there's any further trouble I can give you."
>    -- Unknown
>




Archive powered by MhonArc 2.6.16.

Top of Page