coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Lars Rasmusson <Lars.Rasmusson AT sics.se>
- To: coq-club AT inria.fr
- Subject: Re: [Coq-Club] arg-min existential instantiation of an inequality
- Date: Wed, 16 Mar 2016 19:44:22 +0100
- Authentication-results: mail2-smtp-roc.national.inria.fr; spf=None smtp.pra=Lars.Rasmusson AT sics.se; spf=Pass smtp.mailfrom=lra AT sics.se; spf=None smtp.helo=postmaster AT mail-lf0-f49.google.com
- Ironport-phdr: 9a23:MGIq1B/8d8SVPv9uRHKM819IXTAuvvDOBiVQ1KB91+gcTK2v8tzYMVDF4r011RmSDdWds6gP0rOM+4nbGkU+or+5+EgYd5JNUxJXwe43pCcHRPC/NEvgMfTxZDY7FskRHHVs/nW8LFQHUJ2mPw6anHS+4HYoFwnlMkItf6KuSt6U1578jrnos7ToICx2xxOFKYtoKxu3qQiD/uI3uqBFbpgL9x3Sv3FTcP5Xz247bXianhL7+9vitMU7q3cY6Lod8JtLVry/dKAlR5RZCi4nOiY7/p7Frx7GGC+G/GBUaGwNlwdTGA/DpEXeV43q9BHzre9gwzKdO+XtTLsvHy+vufQ4ACT0gTsKYmZquFrcjdZ92fpW
Hi,
if you can prove that there is an x for which f takes a minimal value,
Hypothesis Hmin: exists x, forall y, f x < f y.
(which should be doable) then you can prove it like this.
Require Import Omega.
Variable x : nat.
Variable f : {n : nat | n < x} -> nat.
Variable g : {n : nat | n < x} -> nat.
Hypothesis Hmin: exists x, forall y, f x < f y.
Lemma arg_min_inequality :
(forall x,
(f x < g x) ->
(exists x, f x < g x
/\ forall y, f y < f x ->
f y >= g y)).
intros x0 H. clear x0 H. (* not needed *)
destruct Hmin as [x1 H1]; exists x1. (* get the x for the smallest element *)
split.
specialize (H1 x1); omega.
intro y; specialize (H1 y); omega.
Qed.
On Wed, Mar 16, 2016 at 2:35 PM, David Asher <asher AT informatik.hu-berlin.de> wrote:
Dear Coq-Club,
I asked a similar question a while ago. I have an existentially quantified Proposition in my hypothesis set, say "exists x, f(x) < g(x)", where f and g are functions of type "{x : nat | x < n} -> nat". Now I want, as I did my pencil and paper proof, to instantiate x such that "f(x) < g(x)" holds and for every y < x implies that f(y)>=g(y). In other words I'm trying to proof the following:
Variable x : nat.
Variable f : {n : nat | n < x} -> nat.
Variable g : {n : nat | n < x} -> nat.
Lemma arg_min_inequality : forall x,
(f x < g x) -> (exists x, f x < g x /\
forall y, f y < f x -> f y >= g y).
I suspect that the answer will have to do something with well founded induction on natural numbers. At least that was the answer to my previous question, where I wanted to know how to instantiate x for a Relation s.t. x is minimal. Xavier Leroy pointed me into the right direction to use well-founded induction on natural numbers with the lt-relation:
Lemma P_upto_n_dec:
forall n, (exists m, m < n /\ P m) \/ (forall m, m < n -> ~ P m).
Proof.
intros.
destruct (classic(exists m, m < n /\ P m)) ; firstorder.
Qed.
Lemma minimal_exists:
forall n, P n -> exists m, P m /\ forall p, p < m -> ~ P p.
Proof.
induction n using lt_wf_ind; intros.
destruct (P_upto_n_dec n) as [[m [A B]] | C].
- eauto.
- exists n; auto.
Qed.
However, I think for my Problem this won't work. I suspect, I have to define my own relation, proving that it is well-founded and than using this relation in order to perform a well-founded induction on natural numbers. Unfortunately I don't have any clue how to do this.
Thank you
David
- [Coq-Club] arg-min existential instantiation of an inequality, David Asher, 03/16/2016
- Message not available
- Re: [Coq-Club] arg-min existential instantiation of an inequality, David Asher, 03/16/2016
- Message not available
- Re: [Coq-Club] arg-min existential instantiation of an inequality, Abhishek Anand, 03/16/2016
- Re: [Coq-Club] arg-min existential instantiation of an inequality, David Asher, 03/16/2016
- Re: [Coq-Club] arg-min existential instantiation of an inequality, Abhishek Anand, 03/18/2016
- Re: [Coq-Club] arg-min existential instantiation of an inequality, Emilio Jesús Gallego Arias, 03/18/2016
- Re: [Coq-Club] arg-min existential instantiation of an inequality, Abhishek Anand, 03/18/2016
- Re: [Coq-Club] arg-min existential instantiation of an inequality, David Asher, 03/16/2016
- Message not available
- Message not available
- Message not available
- Re: [Coq-Club] arg-min existential instantiation of an inequality, David Asher, 03/16/2016
- Message not available
- Message not available
- Re: [Coq-Club] arg-min existential instantiation of an inequality, Lars Rasmusson, 03/16/2016
- Re: [Coq-Club] arg-min existential instantiation of an inequality, Lars Rasmusson, 03/17/2016
Archive powered by MHonArc 2.6.18.