aboutsummaryrefslogtreecommitdiff
path: root/hott/More_List.thy
blob: 460dc7bc9a4f6db5e4f327484d04e4153548d190 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
theory More_List
imports
  Spartan.List
  Nat

begin

section \<open>Length\<close>

definition [implicit]: "len \<equiv> ListRec ? Nat 0 (fn _ _ rec. suc rec)"

experiment begin
  Lemma "len [] \<equiv> ?n" by (subst comps)+
  Lemma "len [0, suc 0, suc (suc 0)] \<equiv> ?n" by (subst comps)+
end


end