From 962fc96123039b53b9c6946796e909fb50ec9004 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Mon, 13 Aug 2018 10:37:20 +0200 Subject: rcompose done --- Prod.thy | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'Prod.thy') diff --git a/Prod.thy b/Prod.thy index 5391943..76b66dd 100644 --- a/Prod.thy +++ b/Prod.thy @@ -14,23 +14,19 @@ section \Constants and syntax\ axiomatization Prod :: "[Term, Typefam] \ Term" and - lambda :: "[Term, Term \ Term] \ Term" and - appl :: "[Term, Term] \ Term" ("(1_`_)" [61, 60] 60) + lambda :: "(Term \ Term) \ Term" (binder "\<^bold>\" 30) and + appl :: "[Term, Term] \ Term" (infixl "`" 60) \ \Application binds tighter than abstraction.\ syntax "_PROD" :: "[idt, Term, Term] \ Term" ("(3\_:_./ _)" 30) - "_LAMBDA" :: "[idt, Term, Term] \ Term" ("(1\<^bold>\_:_./ _)" 30) "_PROD_ASCII" :: "[idt, Term, Term] \ Term" ("(3PROD _:_./ _)" 30) - "_LAMBDA_ASCII" :: "[idt, Term, Term] \ Term" ("(3%%_:_./ _)" 30) text "The translations below bind the variable \x\ in the expressions \B\ and \b\." translations "\x:A. B" \ "CONST Prod A (\x. B)" - "\<^bold>\x:A. b" \ "CONST lambda A (\x. b)" "PROD x:A. B" \ "CONST Prod A (\x. B)" - "%%x:A. b" \ "CONST lambda A (\x. b)" text "Nondependent functions are a special case." @@ -43,21 +39,20 @@ section \Type rules\ axiomatization where Prod_form: "\A: U(i); B: A \ U(i)\ \ \x:A. B(x): U(i)" and - Prod_intro: "\A: U(i); \x. x: A \ b(x): B(x)\ \ \<^bold>\x:A. b(x): \x:A. B(x)" + Prod_intro: "\A: U(i); \x. x: A \ b(x): B(x)\ \ \<^bold>\x. b(x): \x:A. B(x)" 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:A. b(x))`a \ b(a)" + Prod_comp: "\a: A; \x. x: A \ b(x): B(x)\ \ (\<^bold>\x. b(x))`a \ b(a)" and - Prod_uniq: "f : \x:A. B(x) \ \<^bold>\x:A. (f`x) \ f" + Prod_uniq: "f : \x:A. B(x) \ \<^bold>\x. (f`x) \ f" text " 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). " -(* text " - In addition to the usual type rules, it is a meta-theorem (*PROVE THIS!*) that whenever \\x:A. B x: U(i)\ is derivable from some set of premises \, then so are \A: U(i)\ and \B: A \ U(i)\. + In addition to the usual type rules, it is a meta-theorem that whenever \\x:A. B x: U(i)\ is derivable from some set of premises \, then so are \A: U(i)\ and \B: A \ U(i)\. That is to say, the following inference rules are admissible, and it simplifies proofs greatly to axiomatize them directly. " @@ -66,12 +61,11 @@ axiomatization where Prod_form_cond1: "(\x:A. B(x): U(i)) \ A: U(i)" and Prod_form_cond2: "(\x:A. B(x): U(i)) \ B: A \ U(i)" -*) text "Set up the standard reasoner to use the type rules:" -lemmas Prod_rules = Prod_form Prod_intro Prod_elim Prod_comp Prod_uniq -(*lemmas Prod_form_conds [intro (*elim, wellform*)] = Prod_form_cond1 Prod_form_cond2*) +lemmas Prod_rules [intro] = Prod_form Prod_intro Prod_elim Prod_comp Prod_uniq +lemmas Prod_wellform [wellform] = Prod_form_cond1 Prod_form_cond2 lemmas Prod_comps [comp] = Prod_comp Prod_uniq -- cgit v1.2.3