From e1be5f97bb2a42b3179bc24b118d69af137f8e5d Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Sat, 18 Aug 2018 21:28:21 +0200 Subject: Regrouping type rules --- Sum.thy | 36 +++++++++++++++++++----------------- 1 file changed, 19 insertions(+), 17 deletions(-) (limited to 'Sum.thy') diff --git a/Sum.thy b/Sum.thy index 8522af1..dce5834 100644 --- a/Sum.thy +++ b/Sum.thy @@ -1,8 +1,7 @@ (* Title: HoTT/Sum.thy Author: Josh Chen - Date: Jun 2018 -Dependent sum type. +Dependent sum type *) theory Sum @@ -36,32 +35,35 @@ section \Type rules\ axiomatization where Sum_form: "\A: U(i); B: A \ U(i)\ \ \x:A. B(x): U(i)" and - Sum_intro: "\B: A \ U(i); a: A; b: B(a)\ \ : \x:A. B(x)" + Sum_intro: "\B: A \ U(i); a: A; b: B(a)\ \ : \x:A. B(x)" and Sum_elim: "\ - C: \x:A. B(x) \ U(i); - \x y. \x: A; y: B(x)\ \ f(x)(y) : C(); - p : \x:A. B(x) - \ \ ind\<^sub>\(f)(p) : C(p)" (* What does writing \x y. f(x, y) change? *) + p: \x:A. B(x); + \x y. \x: A; y: B(x)\ \ f(x)(y): C(); + C: \x:A. B(x) \ U(i) + \ \ ind\<^sub>\(f)(p): C(p)" (* What does writing \x y. f(x, y) change? *) and Sum_comp: "\ - C: \x:A. B(x) \ U(i); - B: A \ U(i); - \x y. \x: A; y: B(x)\ \ f(x)(y) : C(); a: A; - b: B(a) + b: B(a); + \x y. \x: A; y: B(x)\ \ f(x)(y): C(); + B: A \ U(i); + C: \x:A. B(x) \ U(i) \ \ ind\<^sub>\(f)() \ f(a)(b)" text "Admissible inference rules for sum formation:" axiomatization where - Sum_form_cond1: "(\x:A. B(x): U(i)) \ A: U(i)" + Sum_wellform1: "(\x:A. B(x): U(i)) \ A: U(i)" and - Sum_form_cond2: "(\x:A. B(x): U(i)) \ B: A \ U(i)" + Sum_wellform2: "(\x:A. B(x): U(i)) \ B: A \ U(i)" + + +text "Rule attribute declarations:" -lemmas Sum_rules [intro] = Sum_form Sum_intro Sum_elim Sum_comp -lemmas Sum_wellform [wellform] = Sum_form_cond1 Sum_form_cond2 -lemmas Sum_comps [comp] = Sum_comp +lemmas Sum_comp [comp] +lemmas Sum_wellform [wellform] = Sum_wellform1 Sum_wellform2 +lemmas Sum_routine [intro] = Sum_form Sum_intro Sum_comp Sum_elim section \Empty type\ @@ -74,7 +76,7 @@ where and Empty_elim: "\C: \ \ U(i); z: \\ \ ind\<^sub>\(z): C(z)" -lemmas Empty_rules [intro] = Empty_form Empty_elim +lemmas Empty_routine [intro] = Empty_form Empty_elim end -- cgit v1.2.3