coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "Thomas Nelson" <thomasharrisonnelson AT gmail.com>
- To: coq-club AT pauillac.inria.fr
- Subject: [Coq-Club] trouble with proving min
- Date: Tue, 23 Sep 2008 13:56:12 -0600
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=pSnAJEuGI9Bg3ctwqwyNQvVXklEnVyJYiBEwpbvMg5vED+6Cg5h5+uoEZXzLtQU2NQ RMIQu/B3dRyEFuQYg/m+SrEZqFBou/kIjDvAmhAgRsxa4LwozmOrG3K/fXWKe1KZU73l pXuTELqg7sGO07KiemgbCE5hS6gtyzLNnSlFQ=
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Ok, the comments I recieved helped, but I've become stuck again. I
was working through some simple proofs about the min function on
integers:
Coq < Require Import ZArith.
Coq < Definition min (x y : Z) := if Z_lt_dec x y then x else y.
Theorem min1 : forall x y, Zle (min x y) x.
This solves the proof easily for me:
unfold min in |- *.
intros.
case (Z_lt_dec x y).
auto with *.
auto with *.
However, if I try the same thing with real numbers, the second auto
with * fails.
Definition min (x y : R) := if Rlt_dec x y then x else y.
Theorem min1 : forall x y, Rle (min x y) x.
unfold min in |- *.
intros.
case (Rlt_dec x y).
auto with *.
auto with *.
This brings me to here:
1 subgoal
x : R
y : R
============================
not (Rlt x y) -> Rle y x
using "apply or_to_imply" I can get to:
or (not (not (Rlt x y))) (Rle y x)
Which is very close to
Rle_or_lt: forall r1 r2 : R, or (Rle r1 r2) (Rlt r2 r1)
but I cant get rid of the not not, since
P -> ~~P isn't an equality in the standard library, and I can't figure
out how to prove it so I can use rewrite.
I hope this makes sense, If anyone could point out where I'm going
wrong that would be great.
- [Coq-Club] trouble with proving min, Thomas Nelson
Archive powered by MhonArc 2.6.16.