From ec8e1d9d245950f185f6d4ff1b5e1b8755e7202c Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Tue, 7 Aug 2018 18:06:10 +0200 Subject: Tweaks --- Proj.thy | 7 +++---- scratch.thy | 6 ++++++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/Proj.thy b/Proj.thy index e6ed0bb..d070ed0 100644 --- a/Proj.thy +++ b/Proj.thy @@ -13,9 +13,8 @@ theory Proj begin -consts - fst :: "[Term, 'a] \ Term" ("(1fst[/_,/ _])") - snd :: "[Term, 'a] \ Term" ("(1snd[/_,/ _])") +abbreviation fst :: Term where "fst \ \<^bold>\p:\x:?A. ?B(x). ind\<^sub>\(\x y. x)(p)" +abbreviation snd :: "Term \ Term" where ""snd \ \<^bold>\p: \x:A. B(x). ind\<^sub>\(\x y. y) p" section \Overloaded syntax for dependent and nondependent pairs\ @@ -25,7 +24,7 @@ overloading fst_nondep \ fst begin definition fst_dep :: "[Term, Typefam] \ Term" where - "fst_dep A B \ \<^bold>\p: (\x:A. B x). ind\<^sub>\[A,B] (\_. A) (\x y. x) p" + "fst_dep A B \ \<^bold>\p:\x:A. B(x). ind\<^sub>\(\x y. x)(p)" definition fst_nondep :: "[Term, Term] \ Term" where "fst_nondep A B \ \<^bold>\p: A \ B. ind\<^sub>\[A, \_. B] (\_. A) (\x y. x) p" diff --git a/scratch.thy b/scratch.thy index 55e7023..e06fb7e 100644 --- a/scratch.thy +++ b/scratch.thy @@ -3,6 +3,12 @@ theory scratch begin +lemma + assumes "\x:A. B(x): U(i)" "(a,b): \x:A. B(x)" + shows "a : A" +proof (rule Sum_form_conds) + + abbreviation pred where "pred \ \<^bold>\n:\. ind\<^sub>\(\n c. n, 0, n)" schematic_goal "?a: (pred`0) =\<^sub>\ 0" -- cgit v1.2.3