-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d634777
commit 6e9b5cc
Showing
5 changed files
with
116 additions
and
39 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
data Imf {A B : U} (f : A -> B) : (_ : B) -> U where | ||
| imf : (x : A) -> ... (f x) | ||
|
||
-- fun invf {A B : U} (f : A -> B) (y : B) (_ : Imf f y) : A where | ||
-- | f y (imf x) = traceContext[x] | ||
|
||
data Either (A B : U) : U where | ||
| left : (_ : A) -> ... | ||
| right : (_ : B) -> ... | ||
|
||
data Unit : U where | ||
| unit : ... | ||
|
||
data Bool : U where | ||
| true : ... | ||
| false : ... | ||
|
||
|
||
fun invfEither {A B : U} (f : A -> B) (y : B) (_ : Either Unit (Imf f y)) : Either B A where | ||
| {A} {B} f y (right (imf x)) = traceContext[right x] -- here y is inaccessible | ||
-- | {A} {B} f y (left unit) = left y -- here y is not inaccessible |
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
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