From 0f84aa06384d827bd5f5f137c218197ab7217762 Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Mon, 27 Jul 2020 14:29:48 +0200 Subject: Hook elaboration into assumptions mechanism --- hott/Equivalence.thy | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'hott/Equivalence.thy') diff --git a/hott/Equivalence.thy b/hott/Equivalence.thy index d976677..d844b59 100644 --- a/hott/Equivalence.thy +++ b/hott/Equivalence.thy @@ -33,13 +33,16 @@ Lemma (derive) hsym: "g: \x: A. B x" "A: U i" "\x. x: A \ B x: U i" - shows "H: f ~ g \ g ~ f" - unfolding homotopy_def - apply intro - apply (rule pathinv) - \ by (elim H) - \ by typechk - done + "H: f ~ g" + shows "g ~ f" +unfolding homotopy_def +proof intro + fix x assume "x: A" then have "H x: f x = g x" + using \H:_\[unfolded homotopy_def] + \ \this should become unnecessary when definitional unfolding is implemented\ + by typechk + thus "g x = f x" by (rule pathinv) fact +qed typechk Lemma (derive) htrans: assumes @@ -71,9 +74,9 @@ Lemma (derive) commute_homotopy: assumes "A: U i" "B: U i" "x: A" "y: A" - "p: x =\<^bsub>A\<^esub> y" + "p: x = y" "f: A \ B" "g: A \ B" - "H: homotopy A (fn _. B) f g" + "H: f ~ g" shows "(H x) \ g[p] = f[p] \ (H y)" \ \Need this assumption unfolded for typechecking\ supply assms(8)[unfolded homotopy_def] @@ -94,7 +97,7 @@ Corollary (derive) commute_homotopy': "A: U i" "x: A" "f: A \ A" - "H: homotopy A (fn _. A) f (id A)" + "H: f ~ (id A)" shows "H (f x) = f [H x]" oops -- cgit v1.2.3