coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: "Terrell, Jeffrey" <jeffrey.terrell AT kcl.ac.uk>
- To: Coq Club <coq-club AT inria.fr>
- Subject: [Coq-Club] Guarded command
- Date: Sun, 19 Jan 2014 18:49:26 +0000
- Accept-language: en-GB, en-US
Hi,
In the manual, it says that [Guarded] verifies that the guard condition
hasn't been violated at some point in a proof.
1. What does that mean in the context of the following example?
2. Why does the first [Guarded] fail?
3. Is [Guarded] automatically called by [Qed]?
4. Presumably, [Guarded] can be used to debug a proof based on [fix].
However, is there another, possibly better, way?
Thanks.
Inductive C : Set :=
Build_C : option C -> C.
Fixpoint F (c : C) : Prop :=
match c with |
Build_C None => True |
Build_C (Some c') => F c'
end.
Lemma L : forall c : C, F c.
Proof.
fix H 1.
(* Guarded - Fails *)
intro c.
Guarded.
destruct c as [o].
Guarded.
destruct o as [| c'].
Guarded.
unfold F.
Guarded.
exact (H c).
Guarded.
unfold F.
Guarded.
trivial.
Qed.
Regards,
Jeff.
- [Coq-Club] Guarded command, Terrell, Jeffrey, 01/19/2014
- Re: [Coq-Club] Guarded command, Abhishek Anand, 01/19/2014
- Re: [Coq-Club] Guarded command, Terrell, Jeffrey, 01/19/2014
- Re: [Coq-Club] Guarded command, Adam Chlipala, 01/19/2014
- Re: [Coq-Club] Guarded command, Abhishek Anand, 01/19/2014
- Re: [Coq-Club] Guarded command, Julien Forest, 01/20/2014
- Re: [Coq-Club] Guarded command, Terrell, Jeffrey, 01/20/2014
- Re: [Coq-Club] Guarded command, Abhishek Anand, 01/20/2014
- Re: [Coq-Club] Guarded command, Terrell, Jeffrey, 01/20/2014
- Re: [Coq-Club] Guarded command, Julien Forest, 01/20/2014
- Re: [Coq-Club] Guarded command, Terrell, Jeffrey, 01/20/2014
- Re: [Coq-Club] Guarded command, Julien Forest, 01/20/2014
- Re: [Coq-Club] Guarded command, Terrell, Jeffrey, 01/19/2014
- Re: [Coq-Club] Guarded command, Abhishek Anand, 01/19/2014
Archive powered by MHonArc 2.6.18.