src/ZF/Induct/Tree_Forest.thy
changeset 12937 0c4fd7529467
parent 12610 8b9845807f77
child 13535 007559e981c7
equal deleted inserted replaced
12936:84eb6c75cfe3 12937:0c4fd7529467
    51 lemma TF_equals_Un: "tree(A) \<union> forest(A) = tree_forest(A)"
    51 lemma TF_equals_Un: "tree(A) \<union> forest(A) = tree_forest(A)"
    52   apply (insert tree_subset_TF forest_subset_TF)
    52   apply (insert tree_subset_TF forest_subset_TF)
    53   apply (auto intro!: equalityI tree_forest.intros elim: tree_forest.cases)
    53   apply (auto intro!: equalityI tree_forest.intros elim: tree_forest.cases)
    54   done
    54   done
    55 
    55 
    56 lemma (notes rews = tree_forest.con_defs tree_def forest_def)
    56 lemma
    57   tree_forest_unfold: "tree_forest(A) =
    57   notes rews = tree_forest.con_defs tree_def forest_def
    58     (A \<times> forest(A)) + ({0} + tree(A) \<times> forest(A))"
    58   shows
       
    59     tree_forest_unfold: "tree_forest(A) =
       
    60       (A \<times> forest(A)) + ({0} + tree(A) \<times> forest(A))"
    59     -- {* NOT useful, but interesting \dots *}
    61     -- {* NOT useful, but interesting \dots *}
    60   apply (unfold tree_def forest_def)
    62   apply (unfold tree_def forest_def)
    61   apply (fast intro!: tree_forest.intros [unfolded rews, THEN PartD1]
    63   apply (fast intro!: tree_forest.intros [unfolded rews, THEN PartD1]
    62     elim: tree_forest.cases [unfolded rews])
    64     elim: tree_forest.cases [unfolded rews])
    63   done
    65   done
   167 
   169 
   168 text {*
   170 text {*
   169   \medskip @{text map}.
   171   \medskip @{text map}.
   170 *}
   172 *}
   171 
   173 
   172 lemma (assumes h_type: "!!x. x \<in> A ==> h(x): B")
   174 lemma
   173     map_tree_type: "t \<in> tree(A) ==> map(h,t) \<in> tree(B)"
   175   assumes h_type: "!!x. x \<in> A ==> h(x): B"
   174   and map_forest_type: "f \<in> forest(A) ==> map(h,f) \<in> forest(B)"
   176   shows map_tree_type: "t \<in> tree(A) ==> map(h,t) \<in> tree(B)"
       
   177     and map_forest_type: "f \<in> forest(A) ==> map(h,f) \<in> forest(B)"
   175   apply (induct rule: tree_forest.mutual_induct)
   178   apply (induct rule: tree_forest.mutual_induct)
   176     apply (insert h_type)
   179     apply (insert h_type)
   177     apply simp_all
   180     apply simp_all
   178   done
   181   done
   179 
   182