coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Jason Gross <jasongross9 AT gmail.com>
- To: Ilmārs Cīrulis <ilmars.cirulis AT gmail.com>
- Cc: coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Problems when writing function from proof to proof.
- Date: Mon, 1 Jul 2013 11:16:57 -0400
I haven't tried this, but do any of
Theorem pf_3_le_14 : 3 <= 14. ... Qed.
Theorem ttt m n (p : m <= n) : (pred m) <= n. ... Qed.
Eval simpl in @ttt _ _ pf_3_le_14.
Eval unfold pred in @ttt _ _ pf_3_le_14.
Eval cbv beta iota zeta delta [pred] in @ttt _ _ pf_3_le_14.
Check (@ttt _ _ pf_3_le_14 : 2 <= 14).
work?
Alternatively, you can try unfolding pred manually, and state your theorem as either
Theorem ttt m n (p : S m <= n) : m <= n.
or
Theorem ttt m n (p : m <= n)) : match m with | O => O | S m' => m' end <= n.
(Coq might simplify the match for you automatically in the second case.)
-Jason
On Mon, Jul 1, 2013 at 10:56 AM, Ilmārs Cīrulis <ilmars.cirulis AT gmail.com> wrote:
I tried to make function (?) that's transforming proof of m<=n to proof of (pred m)<=n.
My try was:Theorem ttt (m n:nat) (p: m<=n): (pred m) <= n.Proof.destruct m. assumption. simpl. apply le_S_n. inversion p; auto.Qed.
But it always gives proof of (pred m)<=n. For example, proof of 3<=14 is transformed to (pred 3)<=14. I don't know how to simplify it to 2<=14 (using the same function).Is it possible?
- [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/01/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Jason Gross, 07/01/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Pierre Casteran, 07/01/2013
- Message not available
- Fwd: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Cedric Auger, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Adam Chlipala, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., AUGER Cédric, 07/03/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/03/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Kristopher Micinski, 07/11/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Re: [Coq-Club] Problems when writing function from proof to proof., Cedric Auger, 07/02/2013
- Fwd: [Coq-Club] Problems when writing function from proof to proof., Ilmārs Cīrulis, 07/02/2013
- Message not available
Archive powered by MHonArc 2.6.18.