src/HOL/Induct/Term.thy
author wenzelm
Fri, 15 Dec 2000 17:59:30 +0100
changeset 10680 26e4aecf3207
parent 5738 0d8698c15439
child 11046 b5f5942781a0
permissions -rw-r--r--
tuned comment;

(*  Title:      HOL/Induct/Term.thy
    ID:         $Id$
    Author:     Stefan Berghofer,  TU Muenchen
    Copyright   1998  TU Muenchen

Terms over a given alphabet -- function applications
*)

Term = Main +

datatype
  ('a, 'b) term = Var 'a
                | App 'b ((('a, 'b) term) list)


(** substitution function on terms **)

consts
  subst_term :: "['a => ('a, 'b) term, ('a, 'b) term] => ('a, 'b) term"
  subst_term_list ::
    "['a => ('a, 'b) term, ('a, 'b) term list] => ('a, 'b) term list"

primrec
  "subst_term f (Var a) = f a"
  "subst_term f (App b ts) = App b (subst_term_list f ts)"

  "subst_term_list f [] = []"
  "subst_term_list f (t # ts) =
     subst_term f t # subst_term_list f ts"

end