From fdecdc58f50bdc4527eb7c10e37651e5fd9690aa Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Tue, 7 Aug 2018 00:05:38 +0200 Subject: Experiment with polymorphic dependent eliminators, i.e. we leave type and type family decorations implicit. --- Prod.thy | 10 +++++----- Sum.thy | 18 +++++++++--------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Prod.thy b/Prod.thy index e4e7091..845de4b 100644 --- a/Prod.thy +++ b/Prod.thy @@ -78,15 +78,15 @@ section \Unit type\ axiomatization Unit :: Term ("\") and pt :: Term ("\") and - indUnit :: "[Typefam, Term, Term] \ Term" ("(1ind\<^sub>\)") + indUnit :: "[Term, Term] \ Term" ("(1ind\<^sub>\)") where - Unit_form: "\ : U(O)" + Unit_form: "\: U(O)" and - Unit_intro: "\ : \" + Unit_intro: "\: \" and - Unit_elim: "\i C c a. \C: \ \ U(i); c : C(\); a : \\ \ ind\<^sub>\(C, c, a) : C(a)" + Unit_elim: "\i C c a. \C: \ \ U(i); c: C(\); a: \\ \ ind\<^sub>\(c, a) : C(a)" and - Unit_comp: "\i C c. \C: \ \ U(i); c : C(\)\ \ ind\<^sub>\(C, c, \) \ c" + Unit_comp: "\i C c. \C: \ \ U(i); c: C(\)\ \ ind\<^sub>\(c, \) \ c" lemmas Unit_rules [intro] = Unit_form Unit_intro Unit_elim Unit_comp lemmas Unit_comps [comp] = Unit_comp diff --git a/Sum.thy b/Sum.thy index 18d4186..2d6e64b 100644 --- a/Sum.thy +++ b/Sum.thy @@ -15,15 +15,15 @@ section \Constants and syntax\ axiomatization Sum :: "[Term, Typefam] \ Term" and pair :: "[Term, Term] \ Term" ("(1'(_,/ _'))") and - indSum :: "[Term, Typefam, Typefam, [Term, Term] \ Term, Term] \ Term" ("(1ind\<^sub>\[_,/ _])") + indSum :: "[[Term, Term] \ Term, Term] \ Term" ("(1ind\<^sub>\)") syntax "_SUM" :: "[idt, Term, Term] \ Term" ("(3\_:_./ _)" 20) "_SUM_ASCII" :: "[idt, Term, Term] \ Term" ("(3SUM _:_./ _)" 20) translations - "\x:A. B" \ "CONST Sum A (\x. B)" - "SUM x:A. B" \ "CONST Sum A (\x. B)" + "\x:A. B" \ "CONST Sum(A, \x. B)" + "SUM x:A. B" \ "CONST Sum(A, \x. B)" text "Nondependent pair." @@ -34,15 +34,15 @@ abbreviation Pair :: "[Term, Term] \ Term" (infixr "\" 50) section \Type rules\ axiomatization where - Sum_form: "\i A B. \A : U(i); B: A \ U(i)\ \ \x:A. B x : U(i)" + Sum_form: "\i A B. \A: U(i); B: A \ U(i)\ \ \x:A. B(x): U(i)" and - Sum_intro: "\i A B a b. \A : U(i); B: A \ U(i); a : A; b : B a\ \ (a,b) : \x:A. B x" + Sum_intro: "\i A B a b. \A: U(i); B: A \ U(i); a: A; b: B(a)\ \ (a,b) : \x:A. B(x)" and Sum_elim: "\i A B C f p. \ - C: \x:A. B x \ U(i); - \x y. \x : A; y : B x\ \ f x y : C (x,y); - p : \x:A. B x - \ \ ind\<^sub>\[A,B] C f p : C p" + C: \x:A. B(x) \ U(i); + \x y. \x: A; y: B(x)\ \ f(x, y) : C((x,y)); + p : \x:A. B(x) + \ \ ind\<^sub>\(f, p) : C(p)" (* What does writing \x y. f(x, y) change? *) and Sum_comp: "\i A B C f a b. \ A : U(i); -- cgit v1.2.3