coq-club AT inria.fr
Subject: The Coq mailing list
List archive
[Coq-Club] Applying Rational Absolute value triangle inequality on multiple terms
Chronological Thread
- From: "Daniel Galvez" <dt.galvez AT gmail.com>
- To: coq-club AT inria.fr
- Subject: [Coq-Club] Applying Rational Absolute value triangle inequality on multiple terms
- Date: Tue, 09 Dec 2014 22:04:26 +0100
Hello,
I'm doing a project involving the rationals in the standard library.
I'm trying to convince Coq that:
Qabs (a - b + c - d) <= Qabs(a - b) + Qabs(c - d).
This should follow easily from the lemma Qabs_triangle in the module
Coq.QArith.Qabs.
However, simply writing the following: fails
Lemma triangle_eq_mult: forall a b c d:Q, Qabs ((a - b) + (c - d)) <= Qabs (a
- b) + Qabs (c -d).
intros.
apply Qabs_triangle.
Abort.
But if I do this:
Qabs ((a - b) + (c - d)) <= Qabs(a - b) + Qabs(c - d).
intros.
apply Qabs_triangle.
Qed.
Coq is able to do what I want just fine.
Can anyone describe to me how to add parenthese in an expression (such as
turning the first expression into the second expression)? The larger program I
need this statement in makes it such that I cannot simply insert parantheses
manually where I need this proof.
Thank you,
Daniel Galvez
- [Coq-Club] Applying Rational Absolute value triangle inequality on multiple terms, Daniel Galvez, 12/09/2014
- Re: [Coq-Club] Applying Rational Absolute value triangle inequality on multiple terms, Guillaume Melquiond, 12/09/2014
Archive powered by MHonArc 2.6.18.