Last active
August 29, 2015 13:57
-
-
Save raichoo/9512895 to your computer and use it in GitHub Desktop.
Theorem of Choice in Agda
This file contains 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
module Choice where | |
record Σ(A : Set)(P : A → Set) : Set where | |
field | |
fst : A | |
snd : P fst | |
choice : {A : Set}{R : A → A → Set} → | |
((n : A) → Σ A (λ m → R n m)) → | |
Σ (A → A) (λ f → ( | |
(n : A) → R n (f n))) | |
choice g = record { fst = λ x → Σ.fst (g x); snd = λ y → Σ.snd (g y) } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment