Skip to content

Instantly share code, notes, and snippets.

@siraben
Created August 2, 2021 17:10
Show Gist options
  • Save siraben/7c043d30c0c99364c06e018dac1d4eb9 to your computer and use it in GitHub Desktop.
Save siraben/7c043d30c0c99364c06e018dac1d4eb9 to your computer and use it in GitHub Desktop.
"countable choice" according to wikipedia
(* P is a family of nat-indexed sets of nat such that:
H: for all n, there is an m such that m ∈ P n
-----------
Then we show that there is a choice function f
*)
Theorem countable_choice_wikipedia
(P : nat -> (nat -> Prop)) (H : forall n, { m | P n m }) : { f | forall n, (exists m, P n m /\ f n = m)}.
Proof.
set (f := fun (n : nat) => let (m, Hm) := H n in m).
exists f.
intros n. exists (f n).
split; auto.
unfold f. now destruct (H n) as [m' Hm'].
Qed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment