Created
March 21, 2014 08:51
-
-
Save raichoo/9682213 to your computer and use it in GitHub Desktop.
Agda Example
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
data Image : (a -> b) -> b -> Type where | |
Im : {f : a -> b} -> (x : a) -> Image f (f x) | |
inv : (f : a -> b) -> (y : b) -> Image f y -> a | |
inv f y im with (im) | |
inv f _ im | Im x = x | |
{- | |
data Image{A B : Set}(f : A → B) : B → Set where | |
image : (x : A) → Image f (f x) | |
inv : ∀ {A B} (f : A → B) → (y : B) → Image f y → A | |
inv f .(f x) (image x) = x | |
-} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment