From 8ed9cf8682c07fc47b86c2d0aaeb8b4628aeaa31 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Thu, 16 Aug 2018 16:11:42 +0200 Subject: Prod.thy now has the correct definitional equality structure rule. Definition of function composition and properties. --- ex/Synthesis.thy | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'ex') diff --git a/ex/Synthesis.thy b/ex/Synthesis.thy index ef6673c..cd5c4e1 100644 --- a/ex/Synthesis.thy +++ b/ex/Synthesis.thy @@ -19,9 +19,7 @@ text " This is also done in \CTT.thy\; there the work is easier as the equality type is extensional, and also the methods are set up a little more nicely. " -text " - First we show that the property we want is well-defined. -" +text "First we show that the property we want is well-defined." lemma pred_welltyped: "\pred:\\\ . ((pred`0) =\<^sub>\ 0) \ (\n:\. (pred`(succ n)) =\<^sub>\ n): U(O)" by simple @@ -40,11 +38,11 @@ apply (rule Nat_rules | assumption)+ done text " - The above proof finds a candidate, namely \\<^bold>\n. ind\<^sub>\ (\a b. a) n n\. + The above proof finds a candidate, namely \\<^bold>\n. ind\<^sub>\ (\a b. a) 0 n\. We prove this has the required type and properties. " -definition pred :: Term where "pred \ \<^bold>\n. ind\<^sub>\ (\a b. a) n n" +definition pred :: Term where "pred \ \<^bold>\n. ind\<^sub>\ (\a b. a) 0 n" lemma pred_type: "pred: \ \ \" unfolding pred_def by simple @@ -52,7 +50,7 @@ lemma pred_props: "\n. refl(n)>: ((pred`0) =\<^sub>\ 0" unfolding pred_def proof compute - show "\n. n: \ \ ind\<^sub>\ (\a b. a) n n: \" by simple + show "\n. n: \ \ ind\<^sub>\ (\a b. a) 0 n: \" by simple show "ind\<^sub>\ (\a b. a) 0 0 \ 0" proof (rule Nat_comps) show "\: U(O)" .. @@ -62,10 +60,10 @@ proof (simple lems: pred_type) show "\<^bold>\n. refl(n): \n:\. (pred`(succ(n))) =\<^sub>\ n" unfolding pred_def proof - show "\n. n: \ \ refl(n): ((\<^bold>\n. ind\<^sub>\ (\a b. a) n n)`succ(n)) =\<^sub>\ n" + show "\n. n: \ \ refl(n): ((\<^bold>\n. ind\<^sub>\ (\a b. a) 0 n)`succ(n)) =\<^sub>\ n" proof compute - show "\n. n: \ \ ind\<^sub>\ (\a b. a) n n: \" by simple - show "\n. n: \ \ refl(n): ind\<^sub>\ (\a b. a) (succ n) (succ n) =\<^sub>\ n" + show "\n. n: \ \ ind\<^sub>\ (\a b. a) 0 n: \" by simple + show "\n. n: \ \ refl(n): ind\<^sub>\ (\a b. a) 0 (succ n) =\<^sub>\ n" proof compute show "\: U(O)" .. qed simple -- cgit v1.2.3