From 21077433667f6c2281aa522f170b93bb0c8c23ea Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Mon, 18 Jun 2018 17:16:30 +0200 Subject: Fixed wrong definition of snd_dep. Proved projection property of snd_dep. Added type formation rules expressing necessity of the conditions. --- Prod.thy | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'Prod.thy') diff --git a/Prod.thy b/Prod.thy index bfb4f42..7facc27 100644 --- a/Prod.thy +++ b/Prod.thy @@ -7,7 +7,6 @@ Dependent product (function) type for the HoTT logic. theory Prod imports HoTT_Base - begin axiomatization @@ -37,7 +36,11 @@ translations section \Type rules\ axiomatization where - Prod_form: "\A B. \A : U; B : A \ U\ \ \x:A. B x : U" + Prod_form: "\A B. \A : U; B: A \ U\ \ \x:A. B x : U" +and + Prod_form_cond1: "\A B. (\x:A. B x : U) \ A : U" +and + Prod_form_cond2: "\A B. (\x:A. B x : U) \ B: A \ U" and Prod_intro: "\A B b. \A : U; \x. x : A \ b x : B x\ \ \<^bold>\x:A. b x : \x:A. B x" and @@ -47,11 +50,16 @@ and and Prod_uniq: "\A B f. f : \x:A. B x \ \<^bold>\x:A. (f`x) \ f" -text "The type rules should be able to be used as introduction rules by the standard reasoner:" +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 textbook presentations it is usual to present type formation as a forward implication, stating conditions sufficient for the formation of the type. +It is however implicit that the premises of the rule are also necessary, so that for example the only way for one to have that \\x:A. B x : U\ is for \A : U\ and \B: A \ U\ in the first place. +This is what the additional formation rules \Prod_form_cond1\ and \Prod_form_cond2\ express." -lemmas Prod_rules [intro] = Prod_form Prod_intro Prod_elim Prod_comp Prod_uniq +text "The type rules should be able to be used as introduction and elimination rules by the standard reasoner:" -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)." +lemmas Prod_rules [intro] = Prod_form Prod_intro Prod_elim Prod_comp Prod_uniq +lemmas Prod_form_conds [elim] = Prod_form_cond1 Prod_form_cond2 text "Nondependent functions are a special case." -- cgit v1.2.3