aboutsummaryrefslogtreecommitdiff
path: root/hott/More_List.thy
diff options
context:
space:
mode:
authorJosh Chen2020-05-26 16:50:35 +0200
committerJosh Chen2020-05-26 16:50:35 +0200
commitb0ba102b783418560f9b7b15239681b11ea4c877 (patch)
tree0158979a77c146f254eab072b300b0fb2579f1a4 /hott/More_List.thy
parent028f43a0737128024742234f3ee95b24986d6403 (diff)
new material
Diffstat (limited to '')
-rw-r--r--hott/More_List.thy22
1 files changed, 21 insertions, 1 deletions
diff --git a/hott/More_List.thy b/hott/More_List.thy
index 2f868b8..aa57635 100644
--- a/hott/More_List.thy
+++ b/hott/More_List.thy
@@ -1,8 +1,28 @@
theory More_List
-imports Spartan.List
+imports
+ Spartan.List
+ Nat
begin
+experiment begin
+ Lemma "map (\<lambda>n: Nat. suc n) [0, suc (suc 0), suc 0] \<equiv> ?xs"
+ unfolding map_def by (subst comps)+
+end
+
+section \<open>Length\<close>
+
+definition [implicit]:
+ "len \<equiv> ListRec ? Nat 0 (\<lambda>_ _ n. suc n)"
+
+experiment begin
+ Lemma "len [] \<equiv> 0" by reduce
+ Lemma "len [0, suc 0, suc (suc 0)] \<equiv> ?n" by (subst comps)+
+end
+
+section \<open>Equality on lists\<close>
+
+(*Hmmm.*)
end