coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Fabian Schmitthenner <fabian1024 AT googlemail.com>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] use exists to proof finiteness
- Date: Mon, 16 May 2011 09:35:02 +0200
- Domainkey-signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=from:to:subject:date:user-agent:mime-version:content-type :content-transfer-encoding:message-id; b=nwa0UvkVxda1C4gj0t8fQIR1za/LdCjx0YEoK3IpYK/cUFvM3H8RUZhi66iblqY+tN 15xtRcPDIK+WOlX8aTYs+ZPReXq03H4/Qc2W711jkh0vrcZZlOYwwi135YpVawSJtkv/ lkKWhRcFt80LTUFZ15dIFzc2dffXEbZEmWShc=
Hi list,
I've been playing around with coq for a while now and the following problem
came to me.
Consider the following:
Section MySection.
Variable P: nat -> Prop.
Axiom decP: forall n: nat, {P n}+{~P n}.
Axiom existsP: exists n, P n.
(* How to construct a function which gets the lowest value n, for which P n
holds? *)
Definition lowest: nat.
(* ... ? ... *)
Defined.
Lemma lowestIsRight: P lowest /\ forall n: nat, n < lowest -> ~P n.
(* ... *)
Qed.
End MySection.
It's somehow clear from this, that the procedure of sequentially testing O, S
O, ... until P n holds should work, but how to proof that this algorithm ends
(which follows from existsP, but since it's in Prop, I clearly can't do a
destruct on it).
Any help would be appreciated.
Thanks in advance.
Fabian
- [Coq-Club] use exists to proof finiteness, Fabian Schmitthenner
- Re: [Coq-Club] use exists to proof finiteness, Jean-Francois Monin
- Re: [Coq-Club] use exists to proof finiteness, Guillaume Melquiond
Archive powered by MhonArc 2.6.16.