src/HOL/Codatatype/BNF_FP.thy
author blanchet
Mon, 17 Sep 2012 21:13:30 +0200
changeset 49429 64ac3471005a
parent 49428 93f158d59ead
child 49430 6df729c6a1a6
permissions -rw-r--r--
cleaner way of dealing with the set functions of sums and products
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
49308
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
     1
(*  Title:      HOL/Codatatype/BNF_FP.thy
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
     2
    Author:     Dmitriy Traytel, TU Muenchen
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
     3
    Author:     Jasmin Blanchette, TU Muenchen
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
     4
    Copyright   2012
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
     5
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
     6
Composition of bounded natural functors.
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
     7
*)
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
     8
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
     9
header {* Composition of Bounded Natural Functors *}
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
    10
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
    11
theory BNF_FP
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
    12
imports BNF_Comp BNF_Wrap
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
    13
keywords
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
    14
  "defaults"
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
    15
begin
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
    16
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    17
lemma case_unit: "(case u of () => f) = f"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    18
by (cases u) (hypsubst, rule unit.cases)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    19
49335
096967bf3940 added sumEN_tupled_balanced
blanchet
parents: 49325
diff changeset
    20
lemma unit_all_impI: "(P () \<Longrightarrow> Q ()) \<Longrightarrow> \<forall>x. P x \<longrightarrow> Q x"
096967bf3940 added sumEN_tupled_balanced
blanchet
parents: 49325
diff changeset
    21
by simp
096967bf3940 added sumEN_tupled_balanced
blanchet
parents: 49325
diff changeset
    22
096967bf3940 added sumEN_tupled_balanced
blanchet
parents: 49325
diff changeset
    23
lemma prod_all_impI: "(\<And>x y. P (x, y) \<Longrightarrow> Q (x, y)) \<Longrightarrow> \<forall>x. P x \<longrightarrow> Q x"
096967bf3940 added sumEN_tupled_balanced
blanchet
parents: 49325
diff changeset
    24
by clarify
096967bf3940 added sumEN_tupled_balanced
blanchet
parents: 49325
diff changeset
    25
096967bf3940 added sumEN_tupled_balanced
blanchet
parents: 49325
diff changeset
    26
lemma prod_all_impI_step: "(\<And>x. \<forall>y. P (x, y) \<longrightarrow> Q (x, y)) \<Longrightarrow> \<forall>x. P x \<longrightarrow> Q x"
096967bf3940 added sumEN_tupled_balanced
blanchet
parents: 49325
diff changeset
    27
by auto
096967bf3940 added sumEN_tupled_balanced
blanchet
parents: 49325
diff changeset
    28
49368
df359ce891ac added induct tactic
blanchet
parents: 49335
diff changeset
    29
lemma all_unit_eq: "(\<And>x. PROP P x) \<equiv> PROP P ()"
df359ce891ac added induct tactic
blanchet
parents: 49335
diff changeset
    30
by simp
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    31
49368
df359ce891ac added induct tactic
blanchet
parents: 49335
diff changeset
    32
lemma all_prod_eq: "(\<And>x. PROP P x) \<equiv> (\<And>a b. PROP P (a, b))"
df359ce891ac added induct tactic
blanchet
parents: 49335
diff changeset
    33
by clarsimp
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    34
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    35
lemma rev_bspec: "a \<in> A \<Longrightarrow> \<forall>z \<in> A. P z \<Longrightarrow> P a"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    36
by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    37
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    38
lemma Un_cong: "\<lbrakk>A = B; C = D\<rbrakk> \<Longrightarrow> A \<union> C = B \<union> D"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    39
by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    40
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    41
definition convol ("<_ , _>") where
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    42
"<f , g> \<equiv> %a. (f a, g a)"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    43
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    44
lemma fst_convol:
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    45
"fst o <f , g> = f"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    46
apply(rule ext)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    47
unfolding convol_def by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    48
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    49
lemma snd_convol:
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    50
"snd o <f , g> = g"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    51
apply(rule ext)
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    52
unfolding convol_def by simp
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 pointfree_idE: "f o g = id \<Longrightarrow> f (g x) = x"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    55
unfolding o_def fun_eq_iff by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    56
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    57
lemma o_bij:
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    58
  assumes gf: "g o f = id" and fg: "f o g = id"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    59
  shows "bij f"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    60
unfolding bij_def inj_on_def surj_def proof safe
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    61
  fix a1 a2 assume "f a1 = f a2"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    62
  hence "g ( f a1) = g (f a2)" by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    63
  thus "a1 = a2" using gf unfolding fun_eq_iff by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    64
next
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    65
  fix b
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    66
  have "b = f (g b)"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    67
  using fg unfolding fun_eq_iff by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    68
  thus "EX a. b = f a" by blast
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    69
qed
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 ssubst_mem: "\<lbrakk>t = s; s \<in> X\<rbrakk> \<Longrightarrow> t \<in> X" by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    72
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    73
lemma sum_case_step:
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    74
  "sum_case (sum_case f' g') g (Inl p) = sum_case f' g' p"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    75
  "sum_case f (sum_case f' g') (Inr p) = sum_case f' g' p"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    76
by auto
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    77
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    78
lemma one_pointE: "\<lbrakk>\<And>x. s = x \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    79
by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    80
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    81
lemma obj_one_pointE: "\<forall>x. s = x \<longrightarrow> P \<Longrightarrow> P"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    82
by blast
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    83
49325
blanchet
parents: 49312
diff changeset
    84
lemma obj_sumE_f':
blanchet
parents: 49312
diff changeset
    85
"\<lbrakk>\<forall>x. s = f (Inl x) \<longrightarrow> P; \<forall>x. s = f (Inr x) \<longrightarrow> P\<rbrakk> \<Longrightarrow> s = f x \<longrightarrow> P"
blanchet
parents: 49312
diff changeset
    86
by (cases x) blast+
blanchet
parents: 49312
diff changeset
    87
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    88
lemma obj_sumE_f:
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    89
"\<lbrakk>\<forall>x. s = f (Inl x) \<longrightarrow> P; \<forall>x. s = f (Inr x) \<longrightarrow> P\<rbrakk> \<Longrightarrow> \<forall>x. s = f x \<longrightarrow> P"
49325
blanchet
parents: 49312
diff changeset
    90
by (rule allI) (rule obj_sumE_f')
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    91
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    92
lemma obj_sumE: "\<lbrakk>\<forall>x. s = Inl x \<longrightarrow> P; \<forall>x. s = Inr x \<longrightarrow> P\<rbrakk> \<Longrightarrow> P"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    93
by (cases s) auto
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    94
49325
blanchet
parents: 49312
diff changeset
    95
lemma obj_sum_step':
blanchet
parents: 49312
diff changeset
    96
"\<lbrakk>\<forall>x. s = f (Inr (Inl x)) \<longrightarrow> P; \<forall>x. s = f (Inr (Inr x)) \<longrightarrow> P\<rbrakk> \<Longrightarrow> s = f (Inr x) \<longrightarrow> P"
blanchet
parents: 49312
diff changeset
    97
by (cases x) blast+
blanchet
parents: 49312
diff changeset
    98
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
    99
lemma obj_sum_step:
49325
blanchet
parents: 49312
diff changeset
   100
"\<lbrakk>\<forall>x. s = f (Inr (Inl x)) \<longrightarrow> P; \<forall>x. s = f (Inr (Inr x)) \<longrightarrow> P\<rbrakk> \<Longrightarrow> \<forall>x. s = f (Inr x) \<longrightarrow> P"
blanchet
parents: 49312
diff changeset
   101
by (rule allI) (rule obj_sum_step')
49312
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   102
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   103
lemma sum_case_if:
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   104
"sum_case f g (if p then Inl x else Inr y) = (if p then f x else g y)"
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   105
by simp
c874ff5658dc moved theorems closer to where they are used
blanchet
parents: 49309
diff changeset
   106
49426
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   107
lemma UN_compreh_bex_eq_empty:
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   108
"\<Union>{y. \<exists>x\<in>A. y = {}} = {}"
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   109
by blast
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   110
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   111
lemma UN_compreh_bex_eq_singleton:
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   112
"\<Union>{y. \<exists>x\<in>A. y = {f x}} = {y. \<exists>x\<in>A. y = f x}"
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   113
by blast
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   114
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   115
lemma mem_UN_comprehI:
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   116
"z \<in> {y. \<exists>x\<in>A. y = f x} \<Longrightarrow> z \<in> \<Union>{y. \<exists>x\<in>A. y = {f x}}"
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   117
"z \<in> {y. \<exists>x\<in>A. y = f x} \<union> B \<Longrightarrow> z \<in> \<Union>{y. \<exists>x\<in>A. y = {f x}} \<union> B"
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   118
"z \<in> \<Union>{y. \<exists>x\<in>A. y = F x} \<union> \<Union>{y. \<exists>x\<in>A. y = G x} \<Longrightarrow> z \<in> \<Union>{y. \<exists>x\<in>A. y = F x \<union> G x}"
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   119
"z \<in> \<Union>{y. \<exists>x\<in>A. y = F x} \<union> (\<Union>{y. \<exists>x\<in>A. y = G x} \<union> B) \<Longrightarrow> z \<in> \<Union>{y. \<exists>x\<in>A. y = F x \<union> G x} \<union> B"
49368
df359ce891ac added induct tactic
blanchet
parents: 49335
diff changeset
   120
by blast+
df359ce891ac added induct tactic
blanchet
parents: 49335
diff changeset
   121
49426
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   122
lemma mem_UN_comprehI':
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   123
"\<exists>y. (\<exists>x\<in>A. y = F x) \<and> z \<in> y \<Longrightarrow> z \<in> \<Union>{y. \<exists>x\<in>A. y = {y. \<exists>y'\<in>F x. y = y'}}"
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   124
by blast
6d05b8452cf3 got rid of one "auto" in induction tactic
blanchet
parents: 49389
diff changeset
   125
49428
93f158d59ead handle the general case with more than two levels of nesting when discharging induction prem prems
blanchet
parents: 49427
diff changeset
   126
lemma mem_UN_compreh_eq: "(z : \<Union>{y. \<exists>x\<in>A. y = F x}) = (\<exists>x\<in>A. z : F x)"
93f158d59ead handle the general case with more than two levels of nesting when discharging induction prem prems
blanchet
parents: 49427
diff changeset
   127
by blast
93f158d59ead handle the general case with more than two levels of nesting when discharging induction prem prems
blanchet
parents: 49427
diff changeset
   128
93f158d59ead handle the general case with more than two levels of nesting when discharging induction prem prems
blanchet
parents: 49427
diff changeset
   129
lemma eq_UN_compreh_Un: "(xa = \<Union>{y. \<exists>x\<in>A. y = c_set1 x \<union> c_set2 x}) =
93f158d59ead handle the general case with more than two levels of nesting when discharging induction prem prems
blanchet
parents: 49427
diff changeset
   130
  (xa = (\<Union>{y. \<exists>x\<in>A. y = c_set1 x} \<union> \<Union>{y. \<exists>x\<in>A. y = c_set2 x}))"
93f158d59ead handle the general case with more than two levels of nesting when discharging induction prem prems
blanchet
parents: 49427
diff changeset
   131
by blast
93f158d59ead handle the general case with more than two levels of nesting when discharging induction prem prems
blanchet
parents: 49427
diff changeset
   132
49427
b017e1dbc77c clean unfolding of prod and sum sets
blanchet
parents: 49426
diff changeset
   133
lemma mem_compreh_eq_iff:
49428
93f158d59ead handle the general case with more than two levels of nesting when discharging induction prem prems
blanchet
parents: 49427
diff changeset
   134
"z \<in> {y. \<exists>x\<in>A. y = f x} = (\<exists> x. x \<in> A & z \<in> {f x})"
49427
b017e1dbc77c clean unfolding of prod and sum sets
blanchet
parents: 49426
diff changeset
   135
by blast
b017e1dbc77c clean unfolding of prod and sum sets
blanchet
parents: 49426
diff changeset
   136
b017e1dbc77c clean unfolding of prod and sum sets
blanchet
parents: 49426
diff changeset
   137
lemma ex_mem_singleton: "(\<exists>y. y \<in> A \<and> y \<in> {x}) = (x \<in> A)"
b017e1dbc77c clean unfolding of prod and sum sets
blanchet
parents: 49426
diff changeset
   138
by simp
b017e1dbc77c clean unfolding of prod and sum sets
blanchet
parents: 49426
diff changeset
   139
49429
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   140
lemma prod_set_simps:
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   141
"fsts (x, y) = {x}"
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   142
"snds (x, y) = {y}"
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   143
unfolding fsts_def snds_def by simp+
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   144
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   145
lemma sum_set_simps:
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   146
"sum_setl (Inl x) = {x}"
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   147
"sum_setl (Inr x) = {}"
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   148
"sum_setr (Inl x) = {}"
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   149
"sum_setr (Inr x) = {x}"
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   150
unfolding sum_setl_def sum_setr_def by simp+
64ac3471005a cleaner way of dealing with the set functions of sums and products
blanchet
parents: 49428
diff changeset
   151
49427
b017e1dbc77c clean unfolding of prod and sum sets
blanchet
parents: 49426
diff changeset
   152
lemma induct_set_step:
b017e1dbc77c clean unfolding of prod and sum sets
blanchet
parents: 49426
diff changeset
   153
"\<lbrakk>b \<in> A; c \<in> F b\<rbrakk> \<Longrightarrow> \<exists>x. x \<in> A \<and> c \<in> F x"
b017e1dbc77c clean unfolding of prod and sum sets
blanchet
parents: 49426
diff changeset
   154
"\<lbrakk>B \<in> A; c \<in> f B\<rbrakk> \<Longrightarrow> \<exists>C. (\<exists>a \<in> A. C = f a) \<and>c \<in> C"
b017e1dbc77c clean unfolding of prod and sum sets
blanchet
parents: 49426
diff changeset
   155
by blast+
49368
df359ce891ac added induct tactic
blanchet
parents: 49335
diff changeset
   156
49309
f20b24214ac2 split basic BNFs into really basic ones and others, and added Andreas Lochbihler's "option" BNF
blanchet
parents: 49308
diff changeset
   157
ML_file "Tools/bnf_fp_util.ML"
f20b24214ac2 split basic BNFs into really basic ones and others, and added Andreas Lochbihler's "option" BNF
blanchet
parents: 49308
diff changeset
   158
ML_file "Tools/bnf_fp_sugar_tactics.ML"
f20b24214ac2 split basic BNFs into really basic ones and others, and added Andreas Lochbihler's "option" BNF
blanchet
parents: 49308
diff changeset
   159
ML_file "Tools/bnf_fp_sugar.ML"
f20b24214ac2 split basic BNFs into really basic ones and others, and added Andreas Lochbihler's "option" BNF
blanchet
parents: 49308
diff changeset
   160
49308
6190b701e4f4 reorganized dependencies so that the sugar does not depend on GFP -- this will be essential for bootstrapping
blanchet
parents:
diff changeset
   161
end