From 602ad9fe0e2ed1ad4ab6f16e720de878aadc0fba Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Fri, 15 Jun 2018 17:17:27 +0200 Subject: projections --- HoTT_Base.thy | 40 +++++++++++++--------------------------- 1 file changed, 13 insertions(+), 27 deletions(-) (limited to 'HoTT_Base.thy') diff --git a/HoTT_Base.thy b/HoTT_Base.thy index 9b422c4..7794601 100644 --- a/HoTT_Base.thy +++ b/HoTT_Base.thy @@ -2,7 +2,7 @@ Author: Josh Chen Date: Jun 2018 -Basic setup and definitions of a homotopy type theory object logic. +Basic setup and definitions of a homotopy type theory object logic without universes. *) theory HoTT_Base @@ -18,16 +18,23 @@ text "Set up type checking routines, proof methods etc." section \Metalogical definitions\ text "A single meta-type \Term\ suffices to implement the object-logic types and terms. -Our implementation does not have universes, and we simply use \a : U\ as a convenient shorthand meaning ``\a\ is a type''." +We do not implement universes, and simply use \a : U\ as a convenient shorthand to mean ``\a\ is a type''." typedecl Term section \Judgments\ +text "We formalize the judgments \a : A\ and \A : U\ separately, in contrast to the HoTT book where the latter is considered an instance of the former. + +For judgmental equality we use the existing Pure equality \\\ and hence do not need to define a separate judgment for it." + consts -is_a_type :: "Term \ prop" ("(1_ :/ U)" [0] 1000) -is_of_type :: "[Term, Term] \ prop" ("(1_ :/ _)" [0, 0] 1000) + is_a_type :: "Term \ prop" ("(1_ :/ U)" [0] 1000) + is_of_type :: "[Term, Term] \ prop" ("(1_ :/ _)" [0, 0] 1000) + +axiomatization where + inhabited_implies_type [intro]: "\a A. a : A \ A : U" section \Type families\ @@ -36,31 +43,10 @@ text "A (one-variable) type family is a meta lambda term \P :: Term \ prop" ("(3_:/ _ \ U)") +abbreviation (input) is_type_family :: "[Typefam, Term] \ prop" ("(3_:/ _ \ U)") where "P: A \ U \ (\x. x : A \ P x : U)" -text "There is an obvious generalization to multivariate type families, but implementing such an abbreviation involves writing ML and is for the moment not really crucial." - - -section \Definitional equality\ - -text "The Pure equality \\\ is used for definitional aka judgmental equality of types and terms." - -\ \Do these ever need to be used? - -theorem equal_types: - assumes "A \ B" and "A : U" - shows "B : U" using assms by simp - -theorem equal_type_element: - assumes "A \ B" and "x : A" - shows "x : B" using assms by simp +text "There is an obvious generalization to multivariate type families, but implementing such an abbreviation involves writing ML code, and is for the moment not really crucial." -lemmas type_equality = - equal_types - equal_types[rotated] - equal_type_element - equal_type_element[rotated] -\ end \ No newline at end of file -- cgit v1.2.3