From ca5874b8b0b60decd501bd05d0aa1913e5586d98 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. --- Prod.thy | 28 +++++++++++----------------- 1 file changed, 11 insertions(+), 17 deletions(-) (limited to 'Prod.thy') diff --git a/Prod.thy b/Prod.thy index cb455ac..120fc59 100644 --- a/Prod.thy +++ b/Prod.thy @@ -43,11 +43,15 @@ and and Prod_elim: "\f: \x:A. B(x); a: A\ \ f`a: B(a)" and - Prod_comp: "\a: A; \x. x: A \ b(x): B(x)\ \ (\<^bold>\x. b(x))`a \ b(a)" + Prod_comp: "\\x. x: A \ b(x): B(x); a: A\ \ (\<^bold>\x. b(x))`a \ b(a)" and Prod_uniq: "f : \x:A. B(x) \ \<^bold>\x. (f`x) \ f" +and + Prod_eq: "\\x. x: A \ b(x) \ b'(x); A: U(i)\ \ \<^bold>\x. b(x) \ \<^bold>\x. b'(x)" text " + The Pure rules for \\\ only let us judge strict syntactic equality of object lambda expressions; Prod_eq is the actual definitional equality rule. + Note that the syntax \\<^bold>\\ (bold lambda) used for dependent functions clashes with the proof term syntax (cf. \
2.5.2 of the Isabelle/Isar Implementation). " @@ -64,9 +68,9 @@ and text "Set up the standard reasoner to use the type rules:" -lemmas Prod_rules [intro] = Prod_form Prod_intro Prod_elim Prod_comp Prod_uniq +lemmas Prod_rules [intro] = Prod_form Prod_intro Prod_elim Prod_comp Prod_uniq Prod_eq lemmas Prod_wellform [wellform] = Prod_form_cond1 Prod_form_cond2 -lemmas Prod_comps [comp] = Prod_comp Prod_uniq +lemmas Prod_comps [comp] = Prod_comp Prod_uniq Prod_eq section \Function composition\ @@ -77,23 +81,13 @@ syntax "_COMPOSE" :: "[Term, Term] \ Term" (infixr "\" 70) translations "g \ f" \ "g o f" axiomatization where - compose_type: "\ - g: \x:B. C(x); + compose_def: "\ f: A \ B; - (\x:B. C(x)): U(i); - A \ B: U(i) - \ \ g \ f: \x:A. C(f`x)" -and - compose_comp: "\ g: \x:B. C(x); - f: A \ B; - (\x:B. C(x)): U(i); - A \ B: U(i) + A \ B: U(i); + (\x:B. C(x)): U(i) \ \ g \ f \ \<^bold>\x. g`(f`x)" -lemmas compose_rules [intro] = compose_type -lemmas compose_comps [comp] = compose_comp - section \Unit type\ @@ -114,4 +108,4 @@ lemmas Unit_rules [intro] = Unit_form Unit_intro Unit_elim Unit_comp lemmas Unit_comps [comp] = Unit_comp -end \ No newline at end of file +end -- cgit v1.2.3