From eaeb9d8c89620b688d8735eafa9bc28121e5f552 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Thu, 28 Jun 2018 11:20:22 +0200 Subject: wellformed method works!!! --- HoTT_Methods.thy | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'HoTT_Methods.thy') diff --git a/HoTT_Methods.thy b/HoTT_Methods.thy index 8931c2b..aa6fca2 100644 --- a/HoTT_Methods.thy +++ b/HoTT_Methods.thy @@ -25,7 +25,6 @@ method wellformed uses jdgmt = ( wellformed jdgmt: HoTT_Base.inhabited_implies_type[OF jdgmt] \ \ "A : U" for A \ \ - print_term A, match (A) in "\x:?A. ?B x" \ \ rule Prod.Prod_form_cond1[OF jdgmt] | @@ -40,15 +39,16 @@ method wellformed uses jdgmt = ( catch \wellformed jdgmt: Sum.Sum_form_cond2[OF jdgmt]\ \fail\ \ \ \ - "PROP ?P \ PROP ?Q" \ \ - (* Could probably direct the search here a bit more too. *) + "PROP ?P \ PROP Q" for Q \ \ catch \rule Prod.Prod_form_cond1[OF jdgmt]\ \fail\ | catch \rule Prod.Prod_form_cond2[OF jdgmt]\ \fail\ | catch \rule Sum.Sum_form_cond1[OF jdgmt]\ \fail\ | catch \rule Sum.Sum_form_cond2[OF jdgmt]\ \fail\ | catch \wellformed jdgmt: Prod.Prod_form_cond1[OF jdgmt]\ \fail\ | - catch \wellformed jdgmt: Prod.Prod_form_cond2[OF jdgmt]\ \fail\ - \ + catch \wellformed jdgmt: Prod.Prod_form_cond2[OF jdgmt]\ \fail\ | + catch \wellformed jdgmt: Sum.Sum_form_cond1[OF jdgmt]\ \fail\ | + catch \wellformed jdgmt: Sum.Sum_form_cond2[OF jdgmt]\ \fail\ + \ ) notepad \ \Examples using \wellformed\\ @@ -64,7 +64,7 @@ assume 1: "f : \x:A. \y: B x. C x y" have "B: A \ U" by (wellformed jdgmt: 1) have "\x. x : A \ C x: B x \ U" by (wellformed jdgmt: 1) -assume 2: "\x:A. \y: B x. \z: C x y. D x y z : U" +assume 2: "g : \x:A. \y: B x. \z: C x y. D x y z" have a: "A : U" by (wellformed jdgmt: 2) have b: "B: A \ U" by (wellformed jdgmt: 2) have c: "\x. x : A \ C x : B x \ U" by (wellformed jdgmt: 2) -- cgit v1.2.3