From 7823d59b2d9436f1bf0042fff62ee2bcc4c29ec0 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Tue, 3 Jul 2018 18:57:57 +0200 Subject: Refactor HoTT_Methods.thy, proved more stuff with new methods. --- EqualProps.thy | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'EqualProps.thy') diff --git a/EqualProps.thy b/EqualProps.thy index 10d3b17..8960a90 100644 --- a/EqualProps.thy +++ b/EqualProps.thy @@ -22,18 +22,7 @@ definition inv :: "[Term, Term, Term] \ Term" ("(1inv[_,/ _,/ _])") lemma inv_type: assumes "p : x =\<^sub>A y" shows "inv[A,x,y]`p : y =\<^sub>A x" - -proof - show "inv[A,x,y] : (x =\<^sub>A y) \ (y =\<^sub>A x)" - proof (unfold inv_def, standard) - fix p assume asm: "p : x =\<^sub>A y" - show "indEqual[A] (\x y _. y =[A] x) refl x y p : y =\<^sub>A x" - proof standard+ - show "x : A" by (wellformed jdgmt: asm) - show "y : A" by (wellformed jdgmt: asm) - qed (assumption | rule | rule asm)+ - qed (wellformed jdgmt: assms) -qed (rule assms) + by (derive lems: assms unfolds: inv_def) lemma inv_comp: @@ -42,19 +31,10 @@ lemma inv_comp: proof - have "inv[A,a,a]`refl(a) \ indEqual[A] (\x y _. y =\<^sub>A x) (\x. refl(x)) a a refl(a)" - proof (unfold inv_def, standard) - show "refl(a) : a =\<^sub>A a" using assms .. - - fix p assume asm: "p : a =\<^sub>A a" - show "indEqual[A] (\x y _. y =\<^sub>A x) refl a a p : a =\<^sub>A a" - proof standard+ - show "a : A" by (wellformed jdgmt: asm) - then show "a : A" . \ \The elimination rule requires that both arguments to \indEqual\ be shown to have the correct type.\ - qed (assumption | rule | rule asm)+ - qed + by (derive lems: assms unfolds: inv_def) also have "indEqual[A] (\x y _. y =\<^sub>A x) (\x. refl(x)) a a refl(a) \ refl(a)" - by (standard | assumption | rule assms)+ + by (simple lems: assms) finally show "inv[A,a,a]`refl(a) \ refl(a)" . qed @@ -79,14 +59,34 @@ abbreviation compose :: "[Term, Term, Term, Term] \ Term" ("(1compo lemma compose_type: assumes "p : x =\<^sub>A y" and "q : y =\<^sub>A z" shows "compose[A,x,y,z]`p`q : x =\<^sub>A z" - -sorry + by (derive lems: assms unfolds: rcompose_def) lemma compose_comp: assumes "a : A" shows "compose[A,a,a,a]`refl(a)`refl(a) \ refl(a)" +proof (unfold rcompose_def) + show "(\<^bold>\p:a =[A] a. + lambda (a =[A] a) + (op ` + ((\<^bold>\x:A. + \<^bold>\y:A. + lambda (x =[A] y) + (indEqual[A] + (\x y _. \z:A. y =[A] z \ x =[A] z) + (\x. \<^bold>\z:A. + lambda (x =[A] z) + (indEqual[A] (\x z _. x =[A] z) refl x z)) + x y)) ` + a ` + a ` + p ` + a))) ` + refl(a) ` + refl(a) \ + refl(a)" + sorry \ \Long and tedious proof if the Simplifier is not set up.\ -- cgit v1.2.3