diff options
Diffstat (limited to 'hott/List+.thy')
-rw-r--r-- | hott/List+.thy | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/hott/List+.thy b/hott/List+.thy new file mode 100644 index 0000000..b73cc24 --- /dev/null +++ b/hott/List+.thy @@ -0,0 +1,18 @@ +theory "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 comp) + Lemma "len [0, suc 0, suc (suc 0)] \<equiv> ?n" by (subst comp) +end + + +end |