-
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
917afd8
commit f63f860
Showing
7 changed files
with
97 additions
and
59 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 |
---|---|---|
@@ -1,15 +1,26 @@ | ||
data N : U where | ||
| zero : ... | ||
| succ : (pre : N) -> ... | ||
data Bool : U where | ||
| true : ... | ||
| false : ... | ||
|
||
higher inductive Int : U where | ||
| pos : (n : N) -> ... | ||
| neg : (n : N) -> ... | ||
unmatchable data Interval : U where | ||
| i0 : ... | ||
| i1 : ... | ||
|
||
-- This is ok | ||
def reflTrue (i : Interval) : Bool | ||
| i = true | ||
|
||
-- -- This is error | ||
-- def trueToFalse (i : Interval) : Bool | ||
-- | i0 = true | ||
-- | i1 = false | ||
|
||
higher inductive S1 : U where | ||
| base : ... | ||
| loop : (i : Interval) -> ... | ||
when | ||
| zero = pos zero | ||
| i0 = base | ||
| i1 = base | ||
|
||
#eval neg zero -- pos zero | ||
#eval loop i0 | ||
|
||
def abs (n : Int) : N where | ||
| pos n = n | ||
| neg n = n |
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
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