add lengthPrf0 for contexts
This commit is contained in:
parent
7bc58625a1
commit
1924250fcd
1 changed files with 6 additions and 0 deletions
|
@ -183,6 +183,12 @@ lengthPrf [<] = (0 ** Refl)
|
||||||
lengthPrf (tel :< _) =
|
lengthPrf (tel :< _) =
|
||||||
let len = lengthPrf tel in (S len.fst ** cong S len.snd)
|
let len = lengthPrf tel in (S len.fst ** cong S len.snd)
|
||||||
|
|
||||||
|
export
|
||||||
|
lengthPrf0 : Context _ to -> (len : Nat ** len = to)
|
||||||
|
lengthPrf0 ctx =
|
||||||
|
let (len ** prf) = lengthPrf ctx in
|
||||||
|
(len ** rewrite sym $ plusZeroRightNeutral len in prf)
|
||||||
|
|
||||||
public export %inline
|
public export %inline
|
||||||
length : Telescope {} -> Nat
|
length : Telescope {} -> Nat
|
||||||
length = fst . lengthPrf
|
length = fst . lengthPrf
|
||||||
|
|
Loading…
Reference in a new issue