theory List_HoTT imports MLTT.List Nat begin section \Length\ definition [implicit]: "len \ ListRec {} Nat 0 (fn _ _ rec. suc rec)" experiment begin Lemma "len [] \ ?n" by (subst comp; typechk?) Lemma "len [0, suc 0, suc (suc 0)] \ ?n" by (subst comp; typechk?)+ end end