From 29e9582b167c74b8e367e3226f63e12a25255b72 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Sat, 18 Aug 2018 00:06:20 +0200 Subject: Fixed mistake in Equal_elim and proof of rpathcomp_comp --- EqualProps.thy | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'EqualProps.thy') diff --git a/EqualProps.thy b/EqualProps.thy index 81f038f..3c9b971 100644 --- a/EqualProps.thy +++ b/EqualProps.thy @@ -47,7 +47,7 @@ text " Raw composition function, of type \\x:A. \y:A. x =\<^sub>A y \ (\z:A. y =\<^sub>A z \ x =\<^sub>A z)\ polymorphic over the type \A\. " -definition rpathcomp :: Term where "rpathcomp \ \<^bold>\x y p. ind\<^sub>= (\_. \<^bold>\z q. ind\<^sub>= (\x. refl(x)) q) p" +definition rpathcomp :: Term where "rpathcomp \ \<^bold>\_ _ p. ind\<^sub>= (\_. \<^bold>\_ q. ind\<^sub>= (\x. refl(x)) q) p" text " More complicated proofs---the nested path inductions require more explicit step-by-step rule applications: @@ -121,51 +121,51 @@ proof compute proof compute { fix y assume 1: "y: A" show "\<^bold>\p. ind\<^sub>= (\_. \<^bold>\z q. ind\<^sub>= refl q) p: a =\<^sub>A y \ (\z:A. y =\<^sub>A z \ a =\<^sub>A z)" - proof - fix p assume 2: "p: a =\<^sub>A y" - show "ind\<^sub>= (\_. \<^bold>\z q. ind\<^sub>= refl q) p: \z:A. y =\<^sub>A z \ a =\<^sub>A z" - proof (rule Equal_elim[where ?x=a and ?y=y]) - fix u assume 3: "u: A" - show "\<^bold>\z q. ind\<^sub>= refl q: \z:A. u =[A] z \ u =[A] z" + proof + fix p assume 2: "p: a =\<^sub>A y" + show "ind\<^sub>= (\_. \<^bold>\z q. ind\<^sub>= refl q) p: \z:A. y =\<^sub>A z \ a =\<^sub>A z" + proof (rule Equal_elim[where ?x=a and ?y=y]) + fix u assume 3: "u: A" + show "\<^bold>\z q. ind\<^sub>= refl q: \z:A. u =\<^sub>A z \ u =\<^sub>A z" + proof + fix z assume 4: "z: A" + show "\<^bold>\q. ind\<^sub>= refl q: u =\<^sub>A z \ u =\<^sub>A z" proof - fix z assume 4: "z: A" - show "\<^bold>\q. ind\<^sub>= refl q: u =\<^sub>A z \ u =\<^sub>A z" - proof - show "\q. q: u =\<^sub>A z \ ind\<^sub>= refl q: u =\<^sub>A z" - by (rule Equal_elim[where ?x=u and ?y=z]) (simple lems: assms 3 4) - qed (simple lems: assms 3 4) - qed fact - qed (simple lems: assms 1 2) - qed (simple lems: assms 1) } + show "\q. q: u =\<^sub>A z \ ind\<^sub>= refl q: u =\<^sub>A z" + by (rule Equal_elim[where ?x=u and ?y=z]) (simple lems: assms 3 4) + qed (simple lems: assms 3 4) + qed fact + qed (simple lems: assms 1 2) + qed (simple lems: assms 1) } show "(\<^bold>\p. ind\<^sub>= (\_. \<^bold>\z. \<^bold>\q. ind\<^sub>= refl q) p)`refl(a)`a`refl(a) \ refl(a)" proof compute { fix p assume 1: "p: a =\<^sub>A a" - show "ind\<^sub>= (\_. \<^bold>\z. \<^bold>\q. ind\<^sub>= refl q) p: \z:A. a =\<^sub>A a \ a =\<^sub>A z" + show "ind\<^sub>= (\_. \<^bold>\z q. ind\<^sub>= refl q) p: \z:A. a =\<^sub>A z \ a =\<^sub>A z" proof (rule Equal_elim[where ?x=a and ?y=a]) fix u assume 2: "u: A" - show "\<^bold>\z q. ind\<^sub>= refl q: \z:A. u =\<^sub>A u\ u =\<^sub>A z" + show "\<^bold>\z q. ind\<^sub>= refl q: \z:A. u =\<^sub>A z \ u =\<^sub>A z" proof fix z assume 3: "z: A" - show "\<^bold>\q. ind\<^sub>= refl q: u =\<^sub>A u \ u =\<^sub>A z" + show "\<^bold>\q. ind\<^sub>= refl q: u =\<^sub>A z \ u =\<^sub>A z" proof - show "\q. q: u =\<^sub>A u \ ind\<^sub>= refl q: u =\<^sub>A z" + show "\q. q: u =\<^sub>A z \ ind\<^sub>= refl q: u =\<^sub>A z" by (rule Equal_elim[where ?x=u and ?y=z]) (simple lems: assms 2 3) - qed (simple lems: assms 2) + qed (simple lems: assms 2 3) qed fact qed (simple lems: assms 1) } show "(ind\<^sub>=(\_. \<^bold>\z q. ind\<^sub>= refl q)(refl(a)))`a`refl(a) \ refl(a)" proof compute { fix u assume 1: "u: A" - show "\<^bold>\z q. ind\<^sub>= refl q: \z:A. u =\<^sub>A u\ u =\<^sub>A z" + show "\<^bold>\z q. ind\<^sub>= refl q: \z:A. u =\<^sub>A z \ u =\<^sub>A z" proof fix z assume 2: "z: A" - show "\<^bold>\q. ind\<^sub>= refl q: u =\<^sub>A u \ u =\<^sub>A z" + show "\<^bold>\q. ind\<^sub>= refl q: u =\<^sub>A z \ u =\<^sub>A z" proof - show "\q. q: u =\<^sub>A u \ ind\<^sub>= refl q: u =\<^sub>A z" + show "\q. q: u =\<^sub>A z \ ind\<^sub>= refl q: u =\<^sub>A z" by (rule Equal_elim[where ?x=u and ?y=z]) (simple lems: assms 1 2) - qed (simple lems: assms 1) + qed (simple lems: assms 1 2) qed fact } show "(\<^bold>\z q. ind\<^sub>= refl q)`a`refl(a) \ refl(a)" -- cgit v1.2.3