src/HOL/Induct/Tree.thy
changeset 7018 ae18bb3075c3
child 11046 b5f5942781a0
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/src/HOL/Induct/Tree.thy	Fri Jul 16 14:03:03 1999 +0200
     1.3 @@ -0,0 +1,27 @@
     1.4 +(*  Title:      HOL/Induct/Tree.thy
     1.5 +    ID:         $Id$
     1.6 +    Author:     Stefan Berghofer,  TU Muenchen
     1.7 +    Copyright   1999  TU Muenchen
     1.8 +
     1.9 +Infinitely branching trees
    1.10 +*)
    1.11 +
    1.12 +Tree = Main +
    1.13 +
    1.14 +datatype 'a tree = Atom 'a | Branch "nat => 'a tree"
    1.15 +
    1.16 +consts
    1.17 +  map_tree :: "('a => 'b) => 'a tree => 'b tree"
    1.18 +
    1.19 +primrec
    1.20 +  "map_tree f (Atom a) = Atom (f a)"
    1.21 +  "map_tree f (Branch ts) = Branch (%x. map_tree f (ts x))"
    1.22 +
    1.23 +consts
    1.24 +  exists_tree :: "('a => bool) => 'a tree => bool"
    1.25 +
    1.26 +primrec
    1.27 +  "exists_tree P (Atom a) = P a"
    1.28 +  "exists_tree P (Branch ts) = (? x. exists_tree P (ts x))"
    1.29 +
    1.30 +end