coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Thery Laurent <thery AT ns.di.univaq.it>
- To: "Ryan J Wisnesky." <ryan AT eecs.harvard.edu>
- Cc: coq-club AT pauillac.inria.fr
- Subject: Re: [Coq-Club]automatically entering proof mode and inlining proofs
- Date: Tue, 27 Feb 2007 10:37:38 +0100 (CET)
- List-archive: <http://pauillac.inria.fr/pipermail/coq-club/>
Here it is
Require Import List.
Require Import Le.
Require Import Compare_dec.
Definition hd (A:Set) (l : list A) :=
match l return (length l > 0 -> A) with
| nil => fun H : length nil > 0 => False_rec A (le_Sn_O 0 H)
| a :: _ => fun _ => a
end.
Definition f (l2: list nat) : option nat.
intros l2.
refine(
if zerop (length l2) then None else
Some (hd nat l2 _)
);
auto.
Defined.
- [Coq-Club]automatically entering proof mode and inlining proofs, Ryan J. Wisnesky
- Re: [Coq-Club]automatically entering proof mode and inlining proofs,
Pierre Courtieu
- Re: [Coq-Club]automatically entering proof mode and inlining proofs,
Ryan J Wisnesky.
- Re: [Coq-Club]automatically entering proof mode and inlining proofs, Pierre Courtieu
- Re: [Coq-Club]automatically entering proof mode and inlining proofs, Thery Laurent
- Re: [Coq-Club]automatically entering proof mode and inlining proofs,
frédéric BESSON
- Re: [Coq-Club]automatically entering proof mode and inlining proofs, Matthieu Sozeau
- Re: [Coq-Club]automatically entering proof mode and inlining proofs, Ryan J. Wisnesky
- Re: [Coq-Club]automatically entering proof mode and inlining proofs,
Ryan J Wisnesky.
- Re: [Coq-Club]automatically entering proof mode and inlining proofs, Matthieu Sozeau
- Re: [Coq-Club]automatically entering proof mode and inlining proofs, Thery Laurent
- Re: [Coq-Club]automatically entering proof mode and inlining proofs,
Pierre Courtieu
Archive powered by MhonArc 2.6.16.