aboutsummaryrefslogtreecommitdiff
path: root/spartan/lib/List.thy
diff options
context:
space:
mode:
authorJosh Chen2020-07-21 02:16:14 +0200
committerGitHub2020-07-21 02:16:14 +0200
commitdfd241b2d85fc5a4ad4d7ddd64adf0138b05f083 (patch)
treeb4c4280b1bc4426059ddd184a2258d15d20a0bab /spartan/lib/List.thy
parent6aaf4d5b28a5284b3b02fa5c410d2d83a711840b (diff)
parent12eed8685674b7d5ff7bc45a44a061e01f99ce5f (diff)
Merge pull request #8 from jaycech3n/dev
Merge big diff on dev
Diffstat (limited to '')
-rw-r--r--spartan/lib/List.thy13
1 files changed, 7 insertions, 6 deletions
diff --git a/spartan/lib/List.thy b/spartan/lib/List.thy
index a755859..be86b63 100644
--- a/spartan/lib/List.thy
+++ b/spartan/lib/List.thy
@@ -44,9 +44,10 @@ where
f x xs (ListInd A (fn xs. C xs) c\<^sub>0 (fn x xs rec. f x xs rec) xs)"
lemmas
- [intros] = ListF List_nil List_cons and
- [elims "?xs"] = ListE and
- [comps] = List_comp_nil List_comp_cons
+ [form] = ListF and
+ [intro, intros] = List_nil List_cons and
+ [elim "?xs"] = ListE and
+ [comp] = List_comp_nil List_comp_cons
abbreviation "ListRec A C \<equiv> ListInd A (fn _. C)"
@@ -110,7 +111,7 @@ Lemma head_type [typechk]:
shows "head xs: Maybe A"
unfolding head_def by typechk
-Lemma head_of_cons [comps]:
+Lemma head_of_cons [comp]:
assumes "A: U i" "x: A" "xs: List A"
shows "head (x # xs) \<equiv> some x"
unfolding head_def by reduce
@@ -120,7 +121,7 @@ Lemma tail_type [typechk]:
shows "tail xs: List A"
unfolding tail_def by typechk
-Lemma tail_of_cons [comps]:
+Lemma tail_of_cons [comp]:
assumes "A: U i" "x: A" "xs: List A"
shows "tail (x # xs) \<equiv> xs"
unfolding tail_def by reduce
@@ -181,7 +182,7 @@ Lemma rev_type [typechk]:
shows "rev xs: List A"
unfolding rev_def by typechk
-Lemma rev_nil [comps]:
+Lemma rev_nil [comp]:
assumes "A: U i"
shows "rev (nil A) \<equiv> nil A"
unfolding rev_def by reduce