-
Notifications
You must be signed in to change notification settings - Fork 16
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
Showing
5 changed files
with
60 additions
and
13 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,30 @@ | ||
prim I | ||
prim left | ||
prim right | ||
prim arcoe | ||
struct Path (A : I -> Type) (a : A left) (b : A right) : Type | ||
| at (i : I) : A i { | ||
| left => a | ||
| right => b | ||
} | ||
def path {A : I -> Type} (p : Pi (i : I) -> A i) | ||
=> new Path A (p left) (p right) { | at i => p i } | ||
def `=` Eq {A : Type} (a b : A) : Type => Path (\ i => A) a b | ||
bind = looser application | ||
def idp {A : Type} {a : A} : a = a => path (\ i => a) | ||
|
||
def hfill2d {A : Type} | ||
{a b c d : A} | ||
(p : Eq a b) | ||
(q : Eq b d) | ||
(r : Eq a c) | ||
(i j : I) : A | ||
=> (arcoe (\ k => Eq (r.at k) (q.at k)) p i).at j | ||
def hcomp2d {A : Type} | ||
{a b c d : A} | ||
(p : Eq a b) | ||
(q : Eq b d) | ||
(r : Eq a c) : Eq c d | ||
=> path (hfill2d p q r right) | ||
|
||
def sym {A : Type} {a b : A} (p : Eq a b) : Eq b a => hcomp2d (idp a) idp p |
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,12 @@ | ||
In file $FILE:30:63 -> | ||
|
||
28 | => path (hfill2d p q r right) | ||
29 | | ||
30 | def sym {A : Type} {a b : A} (p : Eq a b) : Eq b a => hcomp2d (idp a) idp p | ||
^---^ | ||
|
||
Error: Want: function type | ||
Got: Path (λ _ ⇒ A$) a$ a$ | ||
Normalized: Path (λ _ ⇒ A$) a$ a$ | ||
Because we want to type a term such as: idp a | ||
What are you doing? |
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