From 49c008ef405ab8d8229ae1d5b0737339ee46e576 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Mon, 17 Sep 2018 16:00:56 +0200 Subject: Clean up Equal.thy + some other tweaks --- Equal.thy | 59 ++++++++++++++++++++++------------------------------------- 1 file changed, 22 insertions(+), 37 deletions(-) (limited to 'Equal.thy') diff --git a/Equal.thy b/Equal.thy index 7b6acb5..f9bc223 100644 --- a/Equal.thy +++ b/Equal.thy @@ -1,66 +1,51 @@ -(* Title: HoTT/Equal.thy - Author: Josh Chen +(* +Title: Equal.thy +Author: Joshua Chen +Date: 2018 Equality type *) theory Equal - imports HoTT_Base +imports HoTT_Base HoTT_Methods + begin -section \Constants and syntax\ +section \Basic definitions\ axiomatization - Equal :: "[t, t, t] \ t" and - refl :: "t \ t" and + Equal :: "[t, t, t] \ t" and + refl :: "t \ t" and indEqual :: "[t \ t, t] \ t" ("(1ind\<^sub>=)") syntax - "_EQUAL" :: "[t, t, t] \ t" ("(3_ =\<^sub>_/ _)" [101, 0, 101] 100) - "_EQUAL_ASCII" :: "[t, t, t] \ t" ("(3_ =[_]/ _)" [101, 0, 101] 100) + "_equal" :: "[t, t, t] \ t" ("(3_ =\<^sub>_/ _)" [101, 0, 101] 100) + "_equal_ascii" :: "[t, t, t] \ t" ("(3_ =[_]/ _)" [101, 0, 101] 100) + translations "a =[A] b" \ "CONST Equal A a b" "a =\<^sub>A b" \ "CONST Equal A a b" +axiomatization where + Equal_form: "\A: U i; a: A; b: A\ \ a =\<^sub>A b : U i" and -section \Type rules\ + Equal_intro: "a : A \ (refl a): a =\<^sub>A a" and -axiomatization where - Equal_form: "\A: U i; a: A; b: A\ \ a =\<^sub>A b : U i" -and - Equal_intro: "a : A \ (refl a): a =\<^sub>A a" -and Equal_elim: "\ + p: x =\<^sub>A y; x: A; y: A; - p: x =\<^sub>A y; - \x. x: A \ f x: C x x (refl x); - \x y. \x: A; y: A\ \ C x y: x =\<^sub>A y \ U i - \ \ ind\<^sub>= f p : C x y p" -and + \x y. \x: A; y: A\ \ C x y: x =\<^sub>A y \ U i; + \x. x: A \ f x: C x x (refl x) \ \ ind\<^sub>= (\x. f x) p : C x y p" and + Equal_comp: "\ a: A; - \x. x: A \ f x: C x x (refl x); - \x y. \x: A; y: A\ \ C x y: x =\<^sub>A y \ U i - \ \ ind\<^sub>= f (refl a) \ f a" - + \x y. \x: A; y: A\ \ C x y: x =\<^sub>A y \ U i; + \x. x: A \ f x: C x x (refl x) \ \ ind\<^sub>= (\x. f x) (refl a) \ f a" -text "Admissible inference rules for equality type formation:" - -axiomatization where - Equal_wellform1: "a =\<^sub>A b: U i \ A: U i" -and - Equal_wellform2: "a =\<^sub>A b: U i \ a: A" -and - Equal_wellform3: "a =\<^sub>A b: U i \ b: A" - - -text "Rule attribute declarations:" - -lemmas Equal_comp [comp] -lemmas Equal_wellform [wellform] = Equal_wellform1 Equal_wellform2 Equal_wellform3 lemmas Equal_routine [intro] = Equal_form Equal_intro Equal_elim +lemmas Equal_comp [comp] end -- cgit v1.2.3