aboutsummaryrefslogtreecommitdiff
path: root/Prod.thy
diff options
context:
space:
mode:
authorJosh Chen2019-02-28 18:42:59 +0100
committerJosh Chen2019-02-28 18:42:59 +0100
commit73e7023a301753e91dfdc9ba49c4bcff91dbddc3 (patch)
tree85ff3a1ccf832358d51b27b7f5ccf1d6986fd84f /Prod.thy
parent2116cee735ca505e2eae260f48341a4d8ab24117 (diff)
tweak mixfix priorities
Diffstat (limited to '')
-rw-r--r--Prod.thy19
1 files changed, 14 insertions, 5 deletions
diff --git a/Prod.thy b/Prod.thy
index 48f0151..0bd037d 100644
--- a/Prod.thy
+++ b/Prod.thy
@@ -96,17 +96,26 @@ in
end
\<close>
-lemma compose_assoc:
- assumes "A: U i" and "f: A \<rightarrow> B" and "g: B \<rightarrow> C" and "h: \<Prod>x: C. D x"
- shows "(h o[B] g) o[A] f \<equiv> h o[A] g o[A] f"
-unfolding compose_def by (derive lems: assms cong)
+lemma compose_type:
+ assumes
+ "A: U i" and "B: U i" and "C: B \<leadsto> U i" and
+ "f: A \<rightarrow> B" and "g: \<Prod>x: B. C x"
+ shows "g o[A] f: \<Prod>x: A. C (f`x)"
+unfolding compose_def by (derive lems: assms)
lemma compose_comp:
assumes "A: U i" and "\<And>x. x: A \<Longrightarrow> b x: B" and "\<And>x. x: B \<Longrightarrow> c x: C x"
shows "(\<lambda>x: B. c x) o[A] (\<lambda>x: A. b x) \<equiv> \<lambda>x: A. c (b x)"
unfolding compose_def by (derive lems: assms cong)
-declare compose_comp [comp]
+declare
+ compose_type [intro]
+ compose_comp [comp]
+
+lemma compose_assoc:
+ assumes "A: U i" and "f: A \<rightarrow> B" and "g: B \<rightarrow> C" and "h: \<Prod>x: C. D x"
+ shows "(h o[B] g) o[A] f \<equiv> h o[A] g o[A] f"
+unfolding compose_def by (derive lems: assms cong)
abbreviation id :: "t \<Rightarrow> t" where "id A \<equiv> \<lambda>x: A. x"