nf the types, block comments, more eq example now that we have implicits
This commit is contained in:
17
newt/eq.newt
17
newt/eq.newt
@@ -6,10 +6,17 @@ Eq : {A : U} -> A -> A -> U
|
||||
Eq = \ {A} => \ x => \ y => (P : A -> U) -> P x -> P y
|
||||
|
||||
refl : {A : U} {x : A} -> Eq x x
|
||||
refl = \ {A} => \ {x} => x
|
||||
refl = \ P Px => Px
|
||||
|
||||
id : {A} -> A -> A
|
||||
id = \ x => x
|
||||
|
||||
coerce : {A B : U} -> Eq A B -> A -> B
|
||||
-- coerce refl a = a
|
||||
coerce = \ EqAB a => EqAB id a
|
||||
|
||||
-- can I write J without pattern matching?
|
||||
J : {A : U} {x y : A} (eq : Eq x y) ->
|
||||
(mot : (x : A) (P : Eq x y) -> U)
|
||||
(b : mot y refl) ->
|
||||
mot x eq
|
||||
-- J : {A : U} {x y : A} (eq : Eq x y) ->
|
||||
-- (mot : (x : A) (P : Eq x y) -> U)
|
||||
-- (b : mot y refl) ->
|
||||
-- mot x eq
|
||||
|
||||
Reference in New Issue
Block a user