Last active
January 4, 2020 22:43
-
-
Save Eloitor/1bcee595437791eab189f1461da4631b to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| import Base# | |
| T Integer | |
| | integer(pos: Nat, neg: Nat) | |
| IntEquality(x: Integer, y: Integer): Type | |
| case x | |
| + y: Integer | |
| |integer => case y | |
| |integer => Equal(Nat, add(x.pos, y.neg), add(y.pos, x.neg)) | |
| IntRefelexive(x: Integer): IntEquality(x,x) | |
| case x | |
| + y: Integer | |
| | integer => equal(_ add(x.pos, x.neg);) // Here hole does not work ? | |
| : IntEquality(x,x) | |
| IntSymmetric(x: Integer, y: Integer, e: IntEquality(x,y)): IntEquality(y,x) | |
| case x | |
| + y: Integer | |
| + e: IntEquality(x,y) | |
| | integer => case y | |
| | integer => mirror(Nat;add(x.pos, y.neg);add(y.pos, x.neg); e) | |
| : IntEquality(y,integer(x.pos, x.neg)) | |
| main IntSymmetric |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment