src/HOL/BNF_Comp.thy
author wenzelm
Thu, 06 Mar 2014 19:55:08 +0100
changeset 55960 beef468837b1
parent 55906 abf91ebd0820
child 55930 25a90cebbbe5
permissions -rw-r--r--
proper position for decode_pos, which is relevant for completion;
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
55059
ef2e0fb783c6 tuned comments
blanchet
parents: 55058
diff changeset
     1
(*  Title:      HOL/BNF_Comp.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
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     3
    Copyright   2012
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     4
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     5
Composition of bounded natural functors.
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     6
*)
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     7
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     8
header {* Composition of Bounded Natural Functors *}
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
     9
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
    10
theory BNF_Comp
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
    11
imports Basic_BNFs
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
    12
begin
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
    13
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    14
lemma empty_natural: "(\<lambda>_. {}) o f = image g o (\<lambda>_. {})"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    15
by (rule ext) simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    16
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    17
lemma Union_natural: "Union o image (image f) = image f o Union"
55066
blanchet
parents: 55062
diff changeset
    18
by (rule ext) (auto simp only: comp_apply)
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    19
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    20
lemma in_Union_o_assoc: "x \<in> (Union o gset o gmap) A \<Longrightarrow> x \<in> (Union o (gset o gmap)) A"
55066
blanchet
parents: 55062
diff changeset
    21
by (unfold comp_assoc)
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    22
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    23
lemma comp_single_set_bd:
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    24
  assumes fbd_Card_order: "Card_order fbd" and
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    25
    fset_bd: "\<And>x. |fset x| \<le>o fbd" and
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    26
    gset_bd: "\<And>x. |gset x| \<le>o gbd"
52141
eff000cab70f weaker precendence of syntax for big intersection and union on sets
haftmann
parents: 51893
diff changeset
    27
  shows "|\<Union>(fset ` gset x)| \<le>o gbd *c fbd"
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    28
apply (subst sym[OF SUP_def])
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    29
apply (rule ordLeq_transitive)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    30
apply (rule card_of_UNION_Sigma)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    31
apply (subst SIGMA_CSUM)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    32
apply (rule ordLeq_transitive)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    33
apply (rule card_of_Csum_Times')
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    34
apply (rule fbd_Card_order)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    35
apply (rule ballI)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    36
apply (rule fset_bd)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    37
apply (rule ordLeq_transitive)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    38
apply (rule cprod_mono1)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    39
apply (rule gset_bd)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    40
apply (rule ordIso_imp_ordLeq)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    41
apply (rule ordIso_refl)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    42
apply (rule Card_order_cprod)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    43
done
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    44
52141
eff000cab70f weaker precendence of syntax for big intersection and union on sets
haftmann
parents: 51893
diff changeset
    45
lemma Union_image_insert: "\<Union>(f ` insert a B) = f a \<union> \<Union>(f ` B)"
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    46
by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    47
52141
eff000cab70f weaker precendence of syntax for big intersection and union on sets
haftmann
parents: 51893
diff changeset
    48
lemma Union_image_empty: "A \<union> \<Union>(f ` {}) = A"
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    49
by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    50
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    51
lemma image_o_collect: "collect ((\<lambda>f. image g o f) ` F) = image g o collect F"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    52
by (rule ext) (auto simp add: collect_def)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    53
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    54
lemma conj_subset_def: "A \<subseteq> {x. P x \<and> Q x} = (A \<subseteq> {x. P x} \<and> A \<subseteq> {x. Q x})"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    55
by blast
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    56
52141
eff000cab70f weaker precendence of syntax for big intersection and union on sets
haftmann
parents: 51893
diff changeset
    57
lemma UN_image_subset: "\<Union>(f ` g x) \<subseteq> X = (g x \<subseteq> {x. f x \<subseteq> X})"
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    58
by blast
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    59
55906
abf91ebd0820 simplify sets in BNF composition
blanchet
parents: 55873
diff changeset
    60
lemma mem_UN_compreh_ex_eq: "(z : \<Union>{y. \<exists>x\<in>A. y = F x}) = (\<exists>x\<in>A. z : F x)"
abf91ebd0820 simplify sets in BNF composition
blanchet
parents: 55873
diff changeset
    61
by blast
abf91ebd0820 simplify sets in BNF composition
blanchet
parents: 55873
diff changeset
    62
abf91ebd0820 simplify sets in BNF composition
blanchet
parents: 55873
diff changeset
    63
lemma UN_compreh_ex_eq_eq:
abf91ebd0820 simplify sets in BNF composition
blanchet
parents: 55873
diff changeset
    64
"\<Union>{y. \<exists>x\<in>A. y = {}} = {}"
abf91ebd0820 simplify sets in BNF composition
blanchet
parents: 55873
diff changeset
    65
"\<Union>{y. \<exists>x\<in>A. y = {x}} = A"
abf91ebd0820 simplify sets in BNF composition
blanchet
parents: 55873
diff changeset
    66
by blast+
abf91ebd0820 simplify sets in BNF composition
blanchet
parents: 55873
diff changeset
    67
52141
eff000cab70f weaker precendence of syntax for big intersection and union on sets
haftmann
parents: 51893
diff changeset
    68
lemma comp_set_bd_Union_o_collect: "|\<Union>\<Union>((\<lambda>f. f x) ` X)| \<le>o hbd \<Longrightarrow> |(Union \<circ> collect X) x| \<le>o hbd"
55066
blanchet
parents: 55062
diff changeset
    69
by (unfold comp_apply collect_def SUP_def)
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    70
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    71
lemma wpull_cong:
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    72
"\<lbrakk>A' = A; B1' = B1; B2' = B2; wpull A B1 B2 f1 f2 p1 p2\<rbrakk> \<Longrightarrow> wpull A' B1' B2' f1 f2 p1 p2"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    73
by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    74
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 49512
diff changeset
    75
lemma Grp_fst_snd: "(Grp (Collect (split R)) fst)^--1 OO Grp (Collect (split R)) snd = R"
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 49512
diff changeset
    76
unfolding Grp_def fun_eq_iff relcompp.simps by auto
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 49512
diff changeset
    77
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 49512
diff changeset
    78
lemma OO_Grp_cong: "A = B \<Longrightarrow> (Grp A f)^--1 OO Grp A g = (Grp B f)^--1 OO Grp B g"
55705
a98a045a6169 updated docs
blanchet
parents: 55066
diff changeset
    79
by (rule arg_cong)
51893
596baae88a88 got rid of the set based relator---use (binary) predicate based relator instead
traytel
parents: 49512
diff changeset
    80
55803
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    81
lemma vimage2p_relcompp_mono: "R OO S \<le> T \<Longrightarrow>
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    82
  vimage2p f g R OO vimage2p g h S \<le> vimage2p f h T"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    83
  unfolding vimage2p_def by auto
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    84
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    85
lemma type_copy_map_cong0: "M (g x) = N (h x) \<Longrightarrow> (f o M o g) x = (f o N o h) x"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    86
  by auto
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    87
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    88
lemma type_copy_set_bd: "(\<And>y. |S y| \<le>o bd) \<Longrightarrow> |(S o Rep) x| \<le>o bd"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    89
  by auto
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    90
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    91
lemma vimage2p_cong: "R = S \<Longrightarrow> vimage2p f g R = vimage2p f g S"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    92
  by simp
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    93
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    94
context
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    95
fixes Rep Abs
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    96
assumes type_copy: "type_definition Rep Abs UNIV"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    97
begin
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    98
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
    99
lemma type_copy_map_id0: "M = id \<Longrightarrow> Abs o M o Rep = id"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   100
  using type_definition.Rep_inverse[OF type_copy] by auto
55811
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   101
55803
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   102
lemma type_copy_map_comp0: "M = M1 o M2 \<Longrightarrow> f o M o g = (f o M1 o Rep) o (Abs o M2 o g)"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   103
  using type_definition.Abs_inverse[OF type_copy UNIV_I] by auto
55811
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   104
55803
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   105
lemma type_copy_set_map0: "S o M = image f o S' \<Longrightarrow> (S o Rep) o (Abs o M o g) = image f o (S' o g)"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   106
  using type_definition.Abs_inverse[OF type_copy UNIV_I] by (auto simp: o_def fun_eq_iff)
55811
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   107
55803
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   108
lemma type_copy_wit: "x \<in> (S o Rep) (Abs y) \<Longrightarrow> x \<in> S y"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   109
  using type_definition.Abs_inverse[OF type_copy UNIV_I] by auto
55811
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   110
55803
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   111
lemma type_copy_vimage2p_Grp_Rep: "vimage2p f Rep (Grp (Collect P) h) =
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   112
    Grp (Collect (\<lambda>x. P (f x))) (Abs o h o f)"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   113
  unfolding vimage2p_def Grp_def fun_eq_iff
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   114
  by (auto simp: type_definition.Abs_inverse[OF type_copy UNIV_I]
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   115
   type_definition.Rep_inverse[OF type_copy] dest: sym)
55811
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   116
55803
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   117
lemma type_copy_vimage2p_Grp_Abs:
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   118
  "\<And>h. vimage2p g Abs (Grp (Collect P) h) = Grp (Collect (\<lambda>x. P (g x))) (Rep o h o g)"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   119
  unfolding vimage2p_def Grp_def fun_eq_iff
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   120
  by (auto simp: type_definition.Abs_inverse[OF type_copy UNIV_I]
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   121
   type_definition.Rep_inverse[OF type_copy] dest: sym)
55811
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   122
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   123
lemma type_copy_ex_RepI: "(\<exists>b. F b) = (\<exists>b. F (Rep b))"
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   124
proof safe
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   125
  fix b assume "F b"
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   126
  show "\<exists>b'. F (Rep b')"
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   127
  proof (rule exI)
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   128
    from `F b` show "F (Rep (Abs b))" using type_definition.Abs_inverse[OF type_copy] by auto
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   129
  qed
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   130
qed blast
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   131
55803
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   132
lemma vimage2p_relcompp_converse:
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   133
  "vimage2p f g (R^--1 OO S) = (vimage2p Rep f R)^--1 OO vimage2p Rep g S"
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   134
  unfolding vimage2p_def relcompp.simps conversep.simps fun_eq_iff image_def
55811
aa1acc25126b load Metis a little later
traytel
parents: 55803
diff changeset
   135
  by (auto simp: type_copy_ex_RepI)
55803
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   136
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   137
end
74d3fe9031d8 joint work with blanchet: intermediate typedef for the input to fp-operations
traytel
parents: 55705
diff changeset
   138
55855
98ad5680173a use same identity function for abs and rep (doesn't seem to confuse any proofs)
blanchet
parents: 55854
diff changeset
   139
definition id_bnf_comp :: "'a \<Rightarrow> 'a" where "id_bnf_comp = (\<lambda>x. x)"
55854
ee270328a781 make 'typedef' optional, depending on size of original type
blanchet
parents: 55851
diff changeset
   140
55855
98ad5680173a use same identity function for abs and rep (doesn't seem to confuse any proofs)
blanchet
parents: 55854
diff changeset
   141
lemma type_definition_id_bnf_comp_UNIV: "type_definition id_bnf_comp id_bnf_comp UNIV"
98ad5680173a use same identity function for abs and rep (doesn't seem to confuse any proofs)
blanchet
parents: 55854
diff changeset
   142
  unfolding id_bnf_comp_def by unfold_locales auto
55854
ee270328a781 make 'typedef' optional, depending on size of original type
blanchet
parents: 55851
diff changeset
   143
55851
3d40cf74726c optimize cardinal bounds involving natLeq (omega)
blanchet
parents: 55811
diff changeset
   144
lemma csum_dup: "cinfinite r \<Longrightarrow> Card_order r \<Longrightarrow> p +c p' =o r +c r \<Longrightarrow> p +c p' =o r"
55866
a6fa341a6d66 life without 'metis'
blanchet
parents: 55855
diff changeset
   145
apply (erule ordIso_transitive)
a6fa341a6d66 life without 'metis'
blanchet
parents: 55855
diff changeset
   146
apply (frule csum_absorb2')
a6fa341a6d66 life without 'metis'
blanchet
parents: 55855
diff changeset
   147
apply (erule ordLeq_refl)
a6fa341a6d66 life without 'metis'
blanchet
parents: 55855
diff changeset
   148
by simp
55851
3d40cf74726c optimize cardinal bounds involving natLeq (omega)
blanchet
parents: 55811
diff changeset
   149
3d40cf74726c optimize cardinal bounds involving natLeq (omega)
blanchet
parents: 55811
diff changeset
   150
lemma cprod_dup: "cinfinite r \<Longrightarrow> Card_order r \<Longrightarrow> p *c p' =o r *c r \<Longrightarrow> p *c p' =o r"
55866
a6fa341a6d66 life without 'metis'
blanchet
parents: 55855
diff changeset
   151
apply (erule ordIso_transitive)
a6fa341a6d66 life without 'metis'
blanchet
parents: 55855
diff changeset
   152
apply (rule cprod_infinite)
a6fa341a6d66 life without 'metis'
blanchet
parents: 55855
diff changeset
   153
by simp
55851
3d40cf74726c optimize cardinal bounds involving natLeq (omega)
blanchet
parents: 55811
diff changeset
   154
55062
6d3fad6f01c9 made BNF compile after move to HOL
blanchet
parents: 55059
diff changeset
   155
ML_file "Tools/BNF/bnf_comp_tactics.ML"
6d3fad6f01c9 made BNF compile after move to HOL
blanchet
parents: 55059
diff changeset
   156
ML_file "Tools/BNF/bnf_comp.ML"
49309
f20b24214ac2 split basic BNFs into really basic ones and others, and added Andreas Lochbihler's "option" BNF
blanchet
parents: 49308
diff changeset
   157
55873
aa50d903e0a7 adapted example
blanchet
parents: 55866
diff changeset
   158
hide_const (open) id_bnf_comp
aa50d903e0a7 adapted example
blanchet
parents: 55866
diff changeset
   159
hide_fact (open) id_bnf_comp_def type_definition_id_bnf_comp_UNIV
55854
ee270328a781 make 'typedef' optional, depending on size of original type
blanchet
parents: 55851
diff changeset
   160
48975
7f79f94a432c added new (co)datatype package + theories of ordinals and cardinals (with Dmitriy and Andrei)
blanchet
parents:
diff changeset
   161
end