aboutsummaryrefslogtreecommitdiff
path: root/hott/List_HoTT.thy
blob: d866f597a834f7113a04c2bda5ec8c9ba5ff1b51 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
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