From 6857e783fa5cb91f058be322a18fb9ea583f2aad Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Tue, 18 Sep 2018 11:38:54 +0200 Subject: Overhaul of the theory presentations. New methods in HoTT_Methods.thy for handling universes. Commit for release 0.1.0! --- HoTT_Base.thy | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) (limited to 'HoTT_Base.thy') diff --git a/HoTT_Base.thy b/HoTT_Base.thy index 7453883..2ad0ac5 100644 --- a/HoTT_Base.thy +++ b/HoTT_Base.thy @@ -7,7 +7,7 @@ Basic setup of a homotopy type theory object logic with a cumulative Russell-sty *) theory HoTT_Base -imports Pure "HOL-Eisbach.Eisbach" +imports Pure begin @@ -18,17 +18,14 @@ typedecl t \ \Type of object types and terms\ typedecl ord \ \Type of meta-level numerals\ axiomatization - O :: ord and + O :: ord and Suc :: "ord \ ord" and - lt :: "[ord, ord] \ prop" (infix "<" 999) + lt :: "[ord, ord] \ prop" (infix "<" 999) and + leq :: "[ord, ord] \ prop" (infix "\" 999) where lt_Suc [intro]: "n < (Suc n)" and lt_trans [intro]: "\m1 < m2; m2 < m3\ \ m1 < m3" and - Suc_monotone [simp]: "m < n \ (Suc m) < (Suc n)" - -method proveSuc = (rule lt_Suc | (rule lt_trans, (rule lt_Suc)+)+) - -text \Method @{method proveSuc} proves statements of the form \n < (Suc (... (Suc n) ...))\.\ + leq_min [intro]: "O \ n" section \Judgment\ @@ -42,15 +39,15 @@ axiomatization U :: "ord \ t" where U_hierarchy: "i < j \ U i: U j" and - U_cumulative: "\A: U i; i < j\ \ A: U j" + U_cumulative: "\A: U i; i < j\ \ A: U j" and + U_cumulative': "\A: U i; i \ j\ \ A: U j" text \ Using method @{method rule} with @{thm U_cumulative} is unsafe, if applied blindly it will typically lead to non-termination. One should instead use @{method elim}, or instantiate @{thm U_cumulative} suitably. -\ -method cumulativity = (elim U_cumulative, proveSuc) \ \Proves \A: U i \ A: U (Suc (... (Suc i) ...))\\ -method hierarchy = (rule U_hierarchy, proveSuc) \ \Proves \U i: U (Suc (... (Suc i) ...))\\ +@{thm U_cumulative'} is an alternative rule used by the method \lift\ in @{file HoTT_Methods.thy}. +\ section \Type families\ @@ -68,11 +65,15 @@ type_synonym tf = "t \ t" \ \Type of type families\< section \Named theorems\ named_theorems comp +named_theorems form text \ Declare named theorems to be used by proof methods defined in @{file HoTT_Methods.thy}. -@{attribute comp} declares computation rules. -These are used by the \compute\ method, and may also be passed to invocations of the method \subst\ to perform equational rewriting. + +@{attribute comp} declares computation rules, which are used by the \compute\ method, and may also be passed to invocations of the method \subst\ to perform equational rewriting. + +@{attribute form} declares type formation rules. +These are mainly used by the \cumulativity\ method, which lifts types into higher universes. \ (* Todo: Set up the Simplifier! *) -- cgit v1.2.3