equal
deleted
inserted
replaced
13 keywords |
13 keywords |
14 "print_bnfs" :: diag and |
14 "print_bnfs" :: diag and |
15 "bnf" :: thy_goal |
15 "bnf" :: thy_goal |
16 begin |
16 begin |
17 |
17 |
18 lemma Collect_splitD: "x \<in> Collect (case_prod A) \<Longrightarrow> A (fst x) (snd x)" |
18 lemma Collect_case_prodD: "x \<in> Collect (case_prod A) \<Longrightarrow> A (fst x) (snd x)" |
19 by auto |
19 by auto |
20 |
20 |
21 inductive |
21 inductive |
22 rel_sum :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> 'a + 'b \<Rightarrow> 'c + 'd \<Rightarrow> bool" for R1 R2 |
22 rel_sum :: "('a \<Rightarrow> 'c \<Rightarrow> bool) \<Rightarrow> ('b \<Rightarrow> 'd \<Rightarrow> bool) \<Rightarrow> 'a + 'b \<Rightarrow> 'c + 'd \<Rightarrow> bool" for R1 R2 |
23 where |
23 where |
59 using assms unfolding rel_set_def by simp |
59 using assms unfolding rel_set_def by simp |
60 |
60 |
61 lemma predicate2_transferD: |
61 lemma predicate2_transferD: |
62 "\<lbrakk>rel_fun R1 (rel_fun R2 (op =)) P Q; a \<in> A; b \<in> B; A \<subseteq> {(x, y). R1 x y}; B \<subseteq> {(x, y). R2 x y}\<rbrakk> \<Longrightarrow> |
62 "\<lbrakk>rel_fun R1 (rel_fun R2 (op =)) P Q; a \<in> A; b \<in> B; A \<subseteq> {(x, y). R1 x y}; B \<subseteq> {(x, y). R2 x y}\<rbrakk> \<Longrightarrow> |
63 P (fst a) (fst b) \<longleftrightarrow> Q (snd a) (snd b)" |
63 P (fst a) (fst b) \<longleftrightarrow> Q (snd a) (snd b)" |
64 unfolding rel_fun_def by (blast dest!: Collect_splitD) |
64 unfolding rel_fun_def by (blast dest!: Collect_case_prodD) |
65 |
65 |
66 definition collect where |
66 definition collect where |
67 "collect F x = (\<Union>f \<in> F. f x)" |
67 "collect F x = (\<Union>f \<in> F. f x)" |
68 |
68 |
69 lemma fstI: "x = (y, z) \<Longrightarrow> fst x = y" |
69 lemma fstI: "x = (y, z) \<Longrightarrow> fst x = y" |
129 unfolding Grp_def by auto |
129 unfolding Grp_def by auto |
130 |
130 |
131 lemma GrpE: "Grp A f x y \<Longrightarrow> (\<lbrakk>f x = y; x \<in> A\<rbrakk> \<Longrightarrow> R) \<Longrightarrow> R" |
131 lemma GrpE: "Grp A f x y \<Longrightarrow> (\<lbrakk>f x = y; x \<in> A\<rbrakk> \<Longrightarrow> R) \<Longrightarrow> R" |
132 unfolding Grp_def by auto |
132 unfolding Grp_def by auto |
133 |
133 |
134 lemma Collect_split_Grp_eqD: "z \<in> Collect (case_prod (Grp A f)) \<Longrightarrow> (f \<circ> fst) z = snd z" |
134 lemma Collect_case_prod_Grp_eqD: "z \<in> Collect (case_prod (Grp A f)) \<Longrightarrow> (f \<circ> fst) z = snd z" |
135 unfolding Grp_def comp_def by auto |
135 unfolding Grp_def comp_def by auto |
136 |
136 |
137 lemma Collect_split_Grp_inD: "z \<in> Collect (case_prod (Grp A f)) \<Longrightarrow> fst z \<in> A" |
137 lemma Collect_case_prod_Grp_in: "z \<in> Collect (case_prod (Grp A f)) \<Longrightarrow> fst z \<in> A" |
138 unfolding Grp_def comp_def by auto |
138 unfolding Grp_def comp_def by auto |
139 |
139 |
140 definition "pick_middlep P Q a c = (SOME b. P a b \<and> Q b c)" |
140 definition "pick_middlep P Q a c = (SOME b. P a b \<and> Q b c)" |
141 |
141 |
142 lemma pick_middlep: |
142 lemma pick_middlep: |