diff options
author | Josh Chen | 2018-08-14 17:43:03 +0200 |
---|---|---|
committer | Josh Chen | 2018-08-14 17:43:03 +0200 |
commit | e6473c383b479610cee4c0119e5811a12a938cf9 (patch) | |
tree | 477ecc678909b6e29e064ede72b9dee0933c58ad /Proj.thy | |
parent | f83534561085c224ab30343b945ee74d1ce547f4 (diff) |
Well-formation rules are back in the methods; new theory synthesizing the natural number predecessor function.
Diffstat (limited to 'Proj.thy')
-rw-r--r-- | Proj.thy | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -18,12 +18,10 @@ axiomatization snd :: "Term \<Rightarrow> Term" where snd_def: "snd \<equiv> \<l text "Typing judgments and computation rules for the dependent and non-dependent projection functions." - lemma fst_type: assumes "\<Sum>x:A. B(x): U(i)" and "p: \<Sum>x:A. B(x)" shows "fst(p): A" unfolding fst_def by (derive lem: assms) - lemma fst_comp: assumes "A: U(i)" and "B: A \<longrightarrow> U(i)" and "a: A" and "b: B(a)" shows "fst(<a,b>) \<equiv> a" unfolding fst_def @@ -31,7 +29,6 @@ proof show "a: A" and "b: B(a)" by fact+ qed (rule assms)+ - lemma snd_type: assumes "\<Sum>x:A. B(x): U(i)" and "p: \<Sum>x:A. B(x)" shows "snd(p): B(fst p)" unfolding snd_def @@ -47,7 +44,6 @@ proof qed fact+ qed fact - lemma snd_comp: assumes "A: U(i)" and "B: A \<longrightarrow> U(i)" and "a: A" and "b: B(a)" shows "snd(<a,b>) \<equiv> b" unfolding snd_def @@ -58,6 +54,8 @@ proof qed (simple lem: assms) +text "Rule declarations:" + lemmas Proj_types [intro] = fst_type snd_type lemmas Proj_comps [intro] = fst_comp snd_comp |