From decb363a30a30c1875bf4b93bc544c28edf3149e Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Sat, 7 Jul 2018 23:03:33 +0200 Subject: Library snapshot. Methods written, everything nicely organized. --- EqualProps.thy | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'EqualProps.thy') diff --git a/EqualProps.thy b/EqualProps.thy index 2807587..cb267c6 100644 --- a/EqualProps.thy +++ b/EqualProps.thy @@ -22,22 +22,14 @@ 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" - by (derive lems: assms unfolds: inv_def) + unfolding inv_def + by (derive lems: assms) lemma inv_comp: assumes "a : A" shows "inv[A,a,a]`refl(a) \ refl(a)" - -proof - - have "inv[A,a,a]`refl(a) \ indEqual[A] (\x y _. y =\<^sub>A x) (\x. refl(x)) a a refl(a)" - 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 (simple lems: assms) - - finally show "inv[A,a,a]`refl(a) \ refl(a)" . -qed + unfolding inv_def by (simplify lems: assms) section \Transitivity / Path composition\ @@ -50,6 +42,7 @@ definition rcompose :: "Term \ Term" ("(1rcompose[_])") (\x. \<^bold>\z:A. \<^bold>\p:(x =\<^sub>A z). indEqual[A](\x z _. x =\<^sub>A z) (\x. refl(x)) x z p) x y p" + text "``Natural'' composition function abbreviation, effectively equivalent to a function of type \\x,y,z:A. x =\<^sub>A y \ y =\<^sub>A z \ x =\<^sub>A z\." abbreviation compose :: "[Term, Term, Term, Term] \ Term" ("(1compose[_,/ _,/ _,/ _])") @@ -59,14 +52,15 @@ 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" - by (derive lems: assms unfolds: rcompose_def) + unfolding rcompose_def + by (derive lems: assms) lemma compose_comp: assumes "a : A" shows "compose[A,a,a,a]`refl(a)`refl(a) \ refl(a)" - -sorry \ \Long and tedious proof if the Simplifier is not set up.\ + unfolding rcompose_def + by (simplify lems: assms) lemmas Equal_simps [intro] = inv_comp compose_comp -- cgit v1.2.3