# Theory Language

Up to index of Isabelle/ZF/Coind

theory Language
imports Main
begin

    (*  Title:      ZF/Coind/Language.thy
        ID:         $Id: Language.thy,v 1.10 2005/06/17 14:15:10 haftmann Exp $
        Author:     Jacob Frost, Cambridge University Computer Laboratory
        Copyright   1995  University of Cambridge
    *)

    theory Language imports Main begin

    consts
      Const :: i                    (* Abstract type of constants *)
      c_app :: "[i,i] => i"         (* Abstract constructor for fun application*)

    text{*these really can't be definitions without losing the abstraction*}
    axioms
      constNEE:  "c ∈ Const ==> c ≠ 0"
      c_appI:    "[| c1 ∈ Const; c2 ∈ Const |] ==> c_app(c1,c2) ∈ Const"

    consts
      Exp   :: i                    (* Datatype of expressions *)
      ExVar :: i                    (* Abstract type of variables *)

    datatype
      "Exp" = e_const ("c ∈ Const")
            | e_var ("x ∈ ExVar")
            | e_fn ("x ∈ ExVar","e ∈ Exp")
            | e_fix ("x1 ∈ ExVar","x2 ∈ ExVar","e ∈ Exp")
            | e_app ("e1 ∈ Exp","e2 ∈ Exp")

    end