From 4bab3b7f757f7cfbf86ad289b9d92b19a987043a Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Mon, 6 Aug 2018 23:56:10 +0200 Subject: Partway through changing function application syntax style. --- HoTT_Base.thy | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'HoTT_Base.thy') diff --git a/HoTT_Base.thy b/HoTT_Base.thy index cf71813..c2bb092 100644 --- a/HoTT_Base.thy +++ b/HoTT_Base.thy @@ -9,6 +9,10 @@ theory HoTT_Base imports Pure begin +text "Use the syntax \f(x)\ instead of \f x\ for function application." + +setup Pure_Thy.old_appl_syntax_setup + section \Foundational definitions\ @@ -20,12 +24,12 @@ typedecl Term section \Judgments\ text " - Formalize the typing judgment \a : A\. + Formalize the typing judgment \a: A\. For judgmental/definitional equality we use the existing Pure equality \\\ and hence do not need to define a separate judgment for it. " consts - has_type :: "[Term, Term] \ prop" ("(1_ : _)" [0, 0] 1000) + has_type :: "[Term, Term] \ prop" ("(1_: _)" [0, 0] 1000) section \Universe hierarchy\ @@ -39,11 +43,11 @@ axiomatization S :: "Ord \ Ord" ("S_" [0] 1000) and lt :: "[Ord, Ord] \ prop" (infix "<-" 999) where - Ord_lt_min: "\n. O <- S n" + Ord_min: "\n. O <- S(n)" and - Ord_lt_trans: "\m n. m <- n \ S m <- S n" + Ord_monotone: "\m n. m <- n \ S(m) <- S(n)" -lemmas Ord_rules [intro] = Ord_lt_min Ord_lt_trans +lemmas Ord_rules [intro] = Ord_min Ord_monotone \ \Enables \standard\ to automatically solve inequalities.\ text "Define the universe types." @@ -51,12 +55,11 @@ text "Define the universe types." axiomatization U :: "Ord \ Term" where - U_hierarchy: "\i j. i <- j \ U(i) : U(j)" + U_hierarchy: "\i j. i <- j \ U(i): U(j)" and - U_cumulative: "\A i j. \A : U(i); i <- j\ \ A : U(j)" + U_cumulative: "\A i j. \A: U(i); i <- j\ \ A: U(j)" \ \WARNING: \rule Universe_cumulative\ can result in an infinite rewrite loop!\ - section \Type families\ text " @@ -64,7 +67,7 @@ text " " abbreviation (input) constrained :: "[Term \ Term, Term, Term] \ prop" ("(1_: _ \ _)") - where "f: A \ B \ (\x. x : A \ f x : B)" + where "f: A \ B \ (\x. x : A \ f(x): B)" text " The above is used to define type families, which are constrained meta-lambdas \P: A \ B\ where \A\ and \B\ are small types. -- cgit v1.2.3