author | paulson <lp15@cam.ac.uk> |
Mon, 30 May 2022 12:46:11 +0100 | |
changeset 75494 | eded3fe9e600 |
parent 72125 | cf8399df4d76 |
child 78801 | 42ae6e0ecfd4 |
permissions | -rw-r--r-- |
58128 | 1 |
(* Title: HOL/BNF_Least_Fixpoint.thy |
48975
7f79f94a432c
added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff
changeset
|
2 |
Author: Dmitriy Traytel, TU Muenchen |
53305 | 3 |
Author: Lorenz Panny, TU Muenchen |
4 |
Author: Jasmin Blanchette, TU Muenchen |
|
57698 | 5 |
Copyright 2012, 2013, 2014 |
48975
7f79f94a432c
added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff
changeset
|
6 |
|
58352
37745650a3f4
register 'prod' and 'sum' as datatypes, to allow N2M through them
blanchet
parents:
58314
diff
changeset
|
7 |
Least fixpoint (datatype) operation on bounded natural functors. |
48975
7f79f94a432c
added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff
changeset
|
8 |
*) |
7f79f94a432c
added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff
changeset
|
9 |
|
60758 | 10 |
section \<open>Least Fixpoint (Datatype) Operation on Bounded Natural Functors\<close> |
48975
7f79f94a432c
added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff
changeset
|
11 |
|
58128 | 12 |
theory BNF_Least_Fixpoint |
13 |
imports BNF_Fixpoint_Base |
|
48975
7f79f94a432c
added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff
changeset
|
14 |
keywords |
69913 | 15 |
"datatype" :: thy_defn and |
16 |
"datatype_compat" :: thy_defn |
|
48975
7f79f94a432c
added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff
changeset
|
17 |
begin |
7f79f94a432c
added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff
changeset
|
18 |
|
49312 | 19 |
lemma subset_emptyI: "(\<And>x. x \<in> A \<Longrightarrow> False) \<Longrightarrow> A \<subseteq> {}" |
57987 | 20 |
by blast |
49312 | 21 |
|
56346 | 22 |
lemma image_Collect_subsetI: "(\<And>x. P x \<Longrightarrow> f x \<in> B) \<Longrightarrow> f ` {x. P x} \<subseteq> B" |
57987 | 23 |
by blast |
49312 | 24 |
|
25 |
lemma Collect_restrict: "{x. x \<in> X \<and> P x} \<subseteq> X" |
|
57987 | 26 |
by auto |
49312 | 27 |
|
28 |
lemma prop_restrict: "\<lbrakk>x \<in> Z; Z \<subseteq> {x. x \<in> X \<and> P x}\<rbrakk> \<Longrightarrow> P x" |
|
57987 | 29 |
by auto |
49312 | 30 |
|
55023
38db7814481d
get rid of 'rel' locale, to facilitate inclusion of 'Order_Relation_More_FP' into 'Order_Relation'
blanchet
parents:
54841
diff
changeset
|
31 |
lemma underS_I: "\<lbrakk>i \<noteq> j; (i, j) \<in> R\<rbrakk> \<Longrightarrow> i \<in> underS R j" |
57987 | 32 |
unfolding underS_def by simp |
49312 | 33 |
|
55023
38db7814481d
get rid of 'rel' locale, to facilitate inclusion of 'Order_Relation_More_FP' into 'Order_Relation'
blanchet
parents:
54841
diff
changeset
|
34 |
lemma underS_E: "i \<in> underS R j \<Longrightarrow> i \<noteq> j \<and> (i, j) \<in> R" |
57987 | 35 |
unfolding underS_def by simp |
49312 | 36 |
|
55023
38db7814481d
get rid of 'rel' locale, to facilitate inclusion of 'Order_Relation_More_FP' into 'Order_Relation'
blanchet
parents:
54841
diff
changeset
|
37 |
lemma underS_Field: "i \<in> underS R j \<Longrightarrow> i \<in> Field R" |
57987 | 38 |
unfolding underS_def Field_def by auto |
49312 | 39 |
|
56237 | 40 |
lemma ex_bij_betw: "|A| \<le>o (r :: 'b rel) \<Longrightarrow> \<exists>f B :: 'b set. bij_betw f B A" |
58159 | 41 |
by (subst (asm) internalize_card_of_ordLeq) (auto dest!: iffD2[OF card_of_ordIso ordIso_symmetric]) |
49312 | 42 |
|
43 |
lemma bij_betwI': |
|
44 |
"\<lbrakk>\<And>x y. \<lbrakk>x \<in> X; y \<in> X\<rbrakk> \<Longrightarrow> (f x = f y) = (x = y); |
|
45 |
\<And>x. x \<in> X \<Longrightarrow> f x \<in> Y; |
|
46 |
\<And>y. y \<in> Y \<Longrightarrow> \<exists>x \<in> X. y = f x\<rbrakk> \<Longrightarrow> bij_betw f X Y" |
|
57987 | 47 |
unfolding bij_betw_def inj_on_def by blast |
49312 | 48 |
|
49 |
lemma surj_fun_eq: |
|
67091 | 50 |
assumes surj_on: "f ` X = UNIV" and eq_on: "\<forall>x \<in> X. (g1 \<circ> f) x = (g2 \<circ> f) x" |
49312 | 51 |
shows "g1 = g2" |
52 |
proof (rule ext) |
|
53 |
fix y |
|
54 |
from surj_on obtain x where "x \<in> X" and "y = f x" by blast |
|
55 |
thus "g1 y = g2 y" using eq_on by simp |
|
56 |
qed |
|
57 |
||
58 |
lemma Card_order_wo_rel: "Card_order r \<Longrightarrow> wo_rel r" |
|
58147 | 59 |
unfolding wo_rel_def card_order_on_def by blast |
49312 | 60 |
|
58147 | 61 |
lemma Cinfinite_limit: "\<lbrakk>x \<in> Field r; Cinfinite r\<rbrakk> \<Longrightarrow> \<exists>y \<in> Field r. x \<noteq> y \<and> (x, y) \<in> r" |
62 |
unfolding cinfinite_def by (auto simp add: infinite_Card_order_limit) |
|
49312 | 63 |
|
64 |
lemma Card_order_trans: |
|
65 |
"\<lbrakk>Card_order r; x \<noteq> y; (x, y) \<in> r; y \<noteq> z; (y, z) \<in> r\<rbrakk> \<Longrightarrow> x \<noteq> z \<and> (x, z) \<in> r" |
|
58147 | 66 |
unfolding card_order_on_def well_order_on_def linear_order_on_def |
67 |
partial_order_on_def preorder_on_def trans_def antisym_def by blast |
|
49312 | 68 |
|
69 |
lemma Cinfinite_limit2: |
|
58147 | 70 |
assumes x1: "x1 \<in> Field r" and x2: "x2 \<in> Field r" and r: "Cinfinite r" |
71 |
shows "\<exists>y \<in> Field r. (x1 \<noteq> y \<and> (x1, y) \<in> r) \<and> (x2 \<noteq> y \<and> (x2, y) \<in> r)" |
|
49312 | 72 |
proof - |
73 |
from r have trans: "trans r" and total: "Total r" and antisym: "antisym r" |
|
74 |
unfolding card_order_on_def well_order_on_def linear_order_on_def |
|
75 |
partial_order_on_def preorder_on_def by auto |
|
76 |
obtain y1 where y1: "y1 \<in> Field r" "x1 \<noteq> y1" "(x1, y1) \<in> r" |
|
77 |
using Cinfinite_limit[OF x1 r] by blast |
|
78 |
obtain y2 where y2: "y2 \<in> Field r" "x2 \<noteq> y2" "(x2, y2) \<in> r" |
|
79 |
using Cinfinite_limit[OF x2 r] by blast |
|
80 |
show ?thesis |
|
81 |
proof (cases "y1 = y2") |
|
82 |
case True with y1 y2 show ?thesis by blast |
|
83 |
next |
|
84 |
case False |
|
85 |
with y1(1) y2(1) total have "(y1, y2) \<in> r \<or> (y2, y1) \<in> r" |
|
86 |
unfolding total_on_def by auto |
|
87 |
thus ?thesis |
|
88 |
proof |
|
89 |
assume *: "(y1, y2) \<in> r" |
|
90 |
with trans y1(3) have "(x1, y2) \<in> r" unfolding trans_def by blast |
|
91 |
with False y1 y2 * antisym show ?thesis by (cases "x1 = y2") (auto simp: antisym_def) |
|
92 |
next |
|
93 |
assume *: "(y2, y1) \<in> r" |
|
94 |
with trans y2(3) have "(x2, y1) \<in> r" unfolding trans_def by blast |
|
95 |
with False y1 y2 * antisym show ?thesis by (cases "x2 = y1") (auto simp: antisym_def) |
|
96 |
qed |
|
97 |
qed |
|
98 |
qed |
|
99 |
||
58147 | 100 |
lemma Cinfinite_limit_finite: |
101 |
"\<lbrakk>finite X; X \<subseteq> Field r; Cinfinite r\<rbrakk> \<Longrightarrow> \<exists>y \<in> Field r. \<forall>x \<in> X. (x \<noteq> y \<and> (x, y) \<in> r)" |
|
49312 | 102 |
proof (induct X rule: finite_induct) |
103 |
case empty thus ?case unfolding cinfinite_def using ex_in_conv[of "Field r"] finite.emptyI by auto |
|
104 |
next |
|
105 |
case (insert x X) |
|
106 |
then obtain y where y: "y \<in> Field r" "\<forall>x \<in> X. (x \<noteq> y \<and> (x, y) \<in> r)" by blast |
|
107 |
then obtain z where z: "z \<in> Field r" "x \<noteq> z \<and> (x, z) \<in> r" "y \<noteq> z \<and> (y, z) \<in> r" |
|
108 |
using Cinfinite_limit2[OF _ y(1) insert(5), of x] insert(4) by blast |
|
49326 | 109 |
show ?case |
110 |
apply (intro bexI ballI) |
|
111 |
apply (erule insertE) |
|
112 |
apply hypsubst |
|
113 |
apply (rule z(2)) |
|
114 |
using Card_order_trans[OF insert(5)[THEN conjunct2]] y(2) z(3) |
|
115 |
apply blast |
|
116 |
apply (rule z(1)) |
|
117 |
done |
|
49312 | 118 |
qed |
119 |
||
120 |
lemma insert_subsetI: "\<lbrakk>x \<in> A; X \<subseteq> A\<rbrakk> \<Longrightarrow> insert x X \<subseteq> A" |
|
58147 | 121 |
by auto |
49312 | 122 |
|
58136 | 123 |
lemmas well_order_induct_imp = wo_rel.well_order_induct[of r "\<lambda>x. x \<in> Field r \<longrightarrow> P x" for r P] |
49312 | 124 |
|
125 |
lemma meta_spec2: |
|
126 |
assumes "(\<And>x y. PROP P x y)" |
|
127 |
shows "PROP P x y" |
|
58136 | 128 |
by (rule assms) |
49312 | 129 |
|
54841
af71b753c459
express weak pullback property of bnfs only in terms of the relator
traytel
parents:
54246
diff
changeset
|
130 |
lemma nchotomy_relcomppE: |
55811 | 131 |
assumes "\<And>y. \<exists>x. y = f x" "(r OO s) a c" "\<And>b. r a (f b) \<Longrightarrow> s (f b) c \<Longrightarrow> P" |
132 |
shows P |
|
133 |
proof (rule relcompp.cases[OF assms(2)], hypsubst) |
|
134 |
fix b assume "r a b" "s b c" |
|
135 |
moreover from assms(1) obtain b' where "b = f b'" by blast |
|
136 |
ultimately show P by (blast intro: assms(3)) |
|
137 |
qed |
|
54841
af71b753c459
express weak pullback property of bnfs only in terms of the relator
traytel
parents:
54246
diff
changeset
|
138 |
|
52731 | 139 |
lemma predicate2D_vimage2p: "\<lbrakk>R \<le> vimage2p f g S; R x y\<rbrakk> \<Longrightarrow> S (f x) (g y)" |
140 |
unfolding vimage2p_def by auto |
|
141 |
||
55770
f2cf7f92c9ac
intermediate typedef for the type of the bound (local to lfp)
traytel
parents:
55575
diff
changeset
|
142 |
lemma ssubst_Pair_rhs: "\<lbrakk>(r, s) \<in> R; s' = s\<rbrakk> \<Longrightarrow> (r, s') \<in> R" |
55851
3d40cf74726c
optimize cardinal bounds involving natLeq (omega)
blanchet
parents:
55811
diff
changeset
|
143 |
by (rule ssubst) |
55770
f2cf7f92c9ac
intermediate typedef for the type of the bound (local to lfp)
traytel
parents:
55575
diff
changeset
|
144 |
|
58211
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
145 |
lemma all_mem_range1: |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
146 |
"(\<And>y. y \<in> range f \<Longrightarrow> P y) \<equiv> (\<And>x. P (f x)) " |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
147 |
by (rule equal_intr_rule) fast+ |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
148 |
|
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
149 |
lemma all_mem_range2: |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
150 |
"(\<And>fa y. fa \<in> range f \<Longrightarrow> y \<in> range fa \<Longrightarrow> P y) \<equiv> (\<And>x xa. P (f x xa))" |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
151 |
by (rule equal_intr_rule) fast+ |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
152 |
|
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
153 |
lemma all_mem_range3: |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
154 |
"(\<And>fa fb y. fa \<in> range f \<Longrightarrow> fb \<in> range fa \<Longrightarrow> y \<in> range fb \<Longrightarrow> P y) \<equiv> (\<And>x xa xb. P (f x xa xb))" |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
155 |
by (rule equal_intr_rule) fast+ |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
156 |
|
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
157 |
lemma all_mem_range4: |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
158 |
"(\<And>fa fb fc y. fa \<in> range f \<Longrightarrow> fb \<in> range fa \<Longrightarrow> fc \<in> range fb \<Longrightarrow> y \<in> range fc \<Longrightarrow> P y) \<equiv> |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
159 |
(\<And>x xa xb xc. P (f x xa xb xc))" |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
160 |
by (rule equal_intr_rule) fast+ |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
161 |
|
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
162 |
lemma all_mem_range5: |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
163 |
"(\<And>fa fb fc fd y. fa \<in> range f \<Longrightarrow> fb \<in> range fa \<Longrightarrow> fc \<in> range fb \<Longrightarrow> fd \<in> range fc \<Longrightarrow> |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
164 |
y \<in> range fd \<Longrightarrow> P y) \<equiv> |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
165 |
(\<And>x xa xb xc xd. P (f x xa xb xc xd))" |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
166 |
by (rule equal_intr_rule) fast+ |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
167 |
|
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
168 |
lemma all_mem_range6: |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
169 |
"(\<And>fa fb fc fd fe ff y. fa \<in> range f \<Longrightarrow> fb \<in> range fa \<Longrightarrow> fc \<in> range fb \<Longrightarrow> fd \<in> range fc \<Longrightarrow> |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
170 |
fe \<in> range fd \<Longrightarrow> ff \<in> range fe \<Longrightarrow> y \<in> range ff \<Longrightarrow> P y) \<equiv> |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
171 |
(\<And>x xa xb xc xd xe xf. P (f x xa xb xc xd xe xf))" |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
172 |
by (rule equal_intr_rule) (fastforce, fast) |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
173 |
|
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
174 |
lemma all_mem_range7: |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
175 |
"(\<And>fa fb fc fd fe ff fg y. fa \<in> range f \<Longrightarrow> fb \<in> range fa \<Longrightarrow> fc \<in> range fb \<Longrightarrow> fd \<in> range fc \<Longrightarrow> |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
176 |
fe \<in> range fd \<Longrightarrow> ff \<in> range fe \<Longrightarrow> fg \<in> range ff \<Longrightarrow> y \<in> range fg \<Longrightarrow> P y) \<equiv> |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
177 |
(\<And>x xa xb xc xd xe xf xg. P (f x xa xb xc xd xe xf xg))" |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
178 |
by (rule equal_intr_rule) (fastforce, fast) |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
179 |
|
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
180 |
lemma all_mem_range8: |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
181 |
"(\<And>fa fb fc fd fe ff fg fh y. fa \<in> range f \<Longrightarrow> fb \<in> range fa \<Longrightarrow> fc \<in> range fb \<Longrightarrow> fd \<in> range fc \<Longrightarrow> |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
182 |
fe \<in> range fd \<Longrightarrow> ff \<in> range fe \<Longrightarrow> fg \<in> range ff \<Longrightarrow> fh \<in> range fg \<Longrightarrow> y \<in> range fh \<Longrightarrow> P y) \<equiv> |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
183 |
(\<And>x xa xb xc xd xe xf xg xh. P (f x xa xb xc xd xe xf xg xh))" |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
184 |
by (rule equal_intr_rule) (fastforce, fast) |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
185 |
|
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
186 |
lemmas all_mem_range = all_mem_range1 all_mem_range2 all_mem_range3 all_mem_range4 all_mem_range5 |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
187 |
all_mem_range6 all_mem_range7 all_mem_range8 |
c1f3fa32d322
extended 'datatype_compat' to generate the expected, old-style recursor in the presence of recursion through functions
blanchet
parents:
58182
diff
changeset
|
188 |
|
66290 | 189 |
lemma pred_fun_True_id: "NO_MATCH id p \<Longrightarrow> pred_fun (\<lambda>x. True) p f = pred_fun (\<lambda>x. True) id (p \<circ> f)" |
190 |
unfolding fun.pred_map unfolding comp_def id_def .. |
|
191 |
||
69605 | 192 |
ML_file \<open>Tools/BNF/bnf_lfp_util.ML\<close> |
193 |
ML_file \<open>Tools/BNF/bnf_lfp_tactics.ML\<close> |
|
194 |
ML_file \<open>Tools/BNF/bnf_lfp.ML\<close> |
|
195 |
ML_file \<open>Tools/BNF/bnf_lfp_compat.ML\<close> |
|
196 |
ML_file \<open>Tools/BNF/bnf_lfp_rec_sugar_more.ML\<close> |
|
197 |
ML_file \<open>Tools/BNF/bnf_lfp_size.ML\<close> |
|
58179 | 198 |
|
71836
c095d3143047
New HOL simproc 'datatype_no_proper_subterm'
Manuel Eberl <eberlm@in.tum.de>
parents:
69913
diff
changeset
|
199 |
ML_file \<open>Tools/datatype_simprocs.ML\<close> |
c095d3143047
New HOL simproc 'datatype_no_proper_subterm'
Manuel Eberl <eberlm@in.tum.de>
parents:
69913
diff
changeset
|
200 |
|
c095d3143047
New HOL simproc 'datatype_no_proper_subterm'
Manuel Eberl <eberlm@in.tum.de>
parents:
69913
diff
changeset
|
201 |
simproc_setup datatype_no_proper_subterm |
c095d3143047
New HOL simproc 'datatype_no_proper_subterm'
Manuel Eberl <eberlm@in.tum.de>
parents:
69913
diff
changeset
|
202 |
("(x :: 'a :: size) = y") = \<open>K Datatype_Simprocs.no_proper_subterm_simproc\<close> |
c095d3143047
New HOL simproc 'datatype_no_proper_subterm'
Manuel Eberl <eberlm@in.tum.de>
parents:
69913
diff
changeset
|
203 |
|
48975
7f79f94a432c
added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff
changeset
|
204 |
end |