From 91efce41a2319a9fb861ff26d7dc8c49ec726d4c Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Tue, 12 Jun 2018 12:30:54 +0200 Subject: Type rules now have \"all\" premises explicitly stated, matching the formulation in the HoTT book. --- Prod.thy | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'Prod.thy') diff --git a/Prod.thy b/Prod.thy index 9ecab4d..113998e 100644 --- a/Prod.thy +++ b/Prod.thy @@ -1,5 +1,6 @@ (* Title: HoTT/Prod.thy Author: Josh Chen + Date: Jun 2018 Dependent product (function) type for the HoTT logic. *) @@ -10,8 +11,9 @@ theory Prod begin axiomatization - Prod :: "[Term, Term \ Term] \ Term" and + Prod :: "[Term, Typefam] \ Term" and lambda :: "[Term, Term \ Term] \ Term" and + \ \Application binds tighter than abstraction.\ appl :: "[Term, Term] \ Term" (infixl "`" 60) syntax @@ -29,15 +31,20 @@ translations \ \Type rules\ axiomatization where - Prod_form [intro]: "\A B. \A : U; B : A \ U\ \ \x:A. B(x) : U" + Prod_form [intro]: "\A B. \A : U; B : A \ U\ \ \x:A. B x : U" and - Prod_intro [intro]: "\A B b. (\x. x : A \ b(x) : B(x)) \ \<^bold>\x:A. b(x) : \x:A. B(x)" + Prod_intro [intro]: "\A B b. (\x. x : A \ b x : B x) \ \<^bold>\x:A. b x : \x:A. B x" and - Prod_elim [elim]: "\A B f a. \f : \x:A. B(x); a : A\ \ f`a : B(a)" + Prod_elim [elim]: "\A B f a. \f : \x:A. B x; a : A\ \ f`a : B a" and - Prod_comp [simp]: "\A b a. a : A \ (\<^bold>\x:A. b(x))`a \ b(a)" + Prod_comp [simp]: "\A B b a. \\x. x : A \ b x : B x; a : A\ \ (\<^bold>\x:A. b x)`a \ b a" and - Prod_uniq [simp]: "\A f. \<^bold>\x:A. (f`x) \ f" + Prod_uniq [simp]: "\A B f. f : \x:A. B x \ \<^bold>\x:A. (f`x) \ f" + +\ \The funny thing about the first premises of the computation and uniqueness rules is that they introduce a variable B that doesn't actually explicitly appear in the statement of the conclusion. +In a sense, they say something like "if this condition holds for some type family B... (then we can apply the rule)". +This forces the theorem prover to search for a suitable B. Is this additional overhead necessary? +It *is* a safety check for well-formedness...\ 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)." -- cgit v1.2.3