Created
March 3, 2020 23:38
-
-
Save bergwerf/a49a9309f326efef57aaff9b6f1cfa81 to your computer and use it in GitHub Desktop.
Is this proof fundamentally impossible in Coq? (without resorting to Sigma types)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Require Import Coq.Lists.List. | |
Require Import Coq.micromega.Lia. | |
Import ListNotations. | |
Arguments In {_}. | |
Lemma problem N (P : nat -> Prop) (Q : nat -> nat -> Prop) : | |
(forall n : nat, P n -> n <= N) -> | |
(forall n : nat, n <= N -> exists x, Q n x) -> | |
exists l : list nat, forall n, P n -> exists x, In x l /\ Q n x. | |
Proof. | |
intros H1 H2; induction N. | |
- assert(H0: 0 <= 0). lia. apply H2 in H0 as [x Px]. | |
exists [x]. intros n Hn. apply H1 in Hn. exists x. split. simpl. now left. | |
now replace n with 0 by lia. | |
- (* STUCK *) | |
Admitted. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment