use Subset instead of relevant product
This commit is contained in:
parent
d912614d7d
commit
7faca8ac27
1 changed files with 6 additions and 6 deletions
|
@ -196,16 +196,16 @@ zipWith3Lazy f = zipWith3 $ \x, y, z => delay $ f x y z
|
||||||
|
|
||||||
|
|
||||||
export
|
export
|
||||||
lengthPrf : Telescope _ from to -> (len : Nat ** len + from = to)
|
lengthPrf : Telescope _ from to -> Subset Nat (\len => len + from = to)
|
||||||
lengthPrf [<] = (0 ** Refl)
|
lengthPrf [<] = Element 0 Refl
|
||||||
lengthPrf (tel :< _) =
|
lengthPrf (tel :< _) =
|
||||||
let len = lengthPrf tel in (S len.fst ** cong S len.snd)
|
let len = lengthPrf tel in Element (S len.fst) (cong S len.snd)
|
||||||
|
|
||||||
export
|
export
|
||||||
lengthPrf0 : Context _ to -> (len : Nat ** len = to)
|
lengthPrf0 : Context _ to -> Subset Nat (\len => len = to)
|
||||||
lengthPrf0 ctx =
|
lengthPrf0 ctx =
|
||||||
let (len ** prf) = lengthPrf ctx in
|
let len = lengthPrf ctx in
|
||||||
(len ** rewrite sym $ plusZeroRightNeutral len in prf)
|
Element len.fst (rewrite sym $ plusZeroRightNeutral len.fst in len.snd)
|
||||||
|
|
||||||
public export %inline
|
public export %inline
|
||||||
length : Telescope {} -> Nat
|
length : Telescope {} -> Nat
|
||||||
|
|
Loading…
Reference in a new issue