From ea0c0c5427888982adce10ab25cebe445997f08b Mon Sep 17 00:00:00 2001 From: Josh Chen Date: Mon, 17 Sep 2018 13:13:08 +0200 Subject: Moved function composition lemmas into Prod.thy --- ProdProps.thy | 57 --------------------------------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 ProdProps.thy (limited to 'ProdProps.thy') diff --git a/ProdProps.thy b/ProdProps.thy deleted file mode 100644 index a68f79b..0000000 --- a/ProdProps.thy +++ /dev/null @@ -1,57 +0,0 @@ -(* Title: HoTT/ProdProps.thy - Author: Josh Chen - -Properties of the dependent product -*) - -theory ProdProps - imports - HoTT_Methods - Prod -begin - - -section \Composition\ - -text " - The proof of associativity needs some guidance; it involves telling Isabelle to use the correct rule for \-type definitional equality, and the correct substitutions in the subgoals thereafter. -" - -lemma compose_assoc: - assumes "A: U i" and "f: A \ B" "g: B \ C" "h: \x:C. D x" - shows "(h \ g) \ f \ h \ (g \ f)" -proof (subst (0 1 2 3) compose_def) - show "\<^bold>\x. (\<^bold>\y. h`(g`y))`(f`x) \ \<^bold>\x. h`((\<^bold>\y. g`(f`y))`x)" - proof (subst Prod_eq) - \ \Todo: set the Simplifier (or other simplification methods) up to use \Prod_eq\!\ - - show "\x. x: A \ (\<^bold>\y. h`(g`y))`(f`x) \ h`((\<^bold>\y. g`(f`y))`x)" - proof compute - show "\x. x: A \ h`(g`(f`x)) \ h`((\<^bold>\y. g`(f`y))`x)" - proof compute - show "\x. x: A \ g`(f`x): C" by (routine lems: assms) - qed - show "\x. x: B \ h`(g`x): D (g`x)" by (routine lems: assms) - qed (routine lems: assms) - qed fact -qed - - -lemma compose_comp: - assumes "A: U i" and "\x. x: A \ b x: B" and "\x. x: B \ c x: C x" - shows "(\<^bold>\x. c x) \ (\<^bold>\x. b x) \ \<^bold>\x. c (b x)" -proof (subst compose_def, subst Prod_eq) - show "\a. a: A \ (\<^bold>\x. c x)`((\<^bold>\x. b x)`a) \ (\<^bold>\x. c (b x))`a" - proof compute - show "\a. a: A \ c ((\<^bold>\x. b x)`a) \ (\<^bold>\x. c (b x))`a" - by (derive lems: assms) - qed (routine lems: assms) -qed (derive lems: assms) - - -text "Set up the \compute\ method to automatically simplify function compositions." - -lemmas compose_comp [comp] - - -end -- cgit v1.2.3