From 38dd685f6929d402a32ddfe2d913c7b380b9e935 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Sun, 3 Mar 2019 22:47:03 +0100 Subject: Improve automated handling of universes. derive now can automatically handle more proofs requiring the use of "U i: U (Suc i)", and shouldn't loop as much. --- HoTT_Base.thy | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'HoTT_Base.thy') diff --git a/HoTT_Base.thy b/HoTT_Base.thy index ee36af4..e36b237 100644 --- a/HoTT_Base.thy +++ b/HoTT_Base.thy @@ -51,11 +51,18 @@ where U_cumulative: "\A: U i; i < j\ \ A: U j" and U_cumulative': "\A: U i; i \ j\ \ A: U j" +lemma U_hierarchy': "U i: U (Suc i)" by (fact U_hierarchy[OF lt_Suc]) + +declare U_hierarchy' [intro!] + text \ Using method @{method rule} with @{thm U_cumulative} and @{thm U_cumulative'} is unsafe: if applied blindly it will very easily lead to non-termination. Instead use @{method elim}, or instantiate the rules suitably. @{thm U_cumulative'} is an alternative rule used by the method @{theory_text cumulativity} in @{file HoTT_Methods.thy}. + +@{thm U_hierarchy'} is declared with safe @{attribute intro} to be used by the method @{theory_text derive} to handle the universe hierarchy. +Note that @{thm U_hierarchy} is unsafe. \ @@ -69,6 +76,9 @@ text \We use the notation @{prop "B: A \ U i"} to abbreviate type abbreviation (input) K_combinator :: "'a \ 'b \ 'a" ("&_" [0] 3) where "&A \ \_. A" +abbreviation (input) Id :: "t \ t" where "Id \ \x. x" +\ \NOTE: removing the input attribute causes term evaluations and even theorem attribute declarations to loop! Possible bug?\ + section \Named theorems\ -- cgit v1.2.3