<commit_before>(*  Title: 	ZF/Coind/Language.thy
    ID:         $Id$
    Author: 	<NAME>, Cambridge University Computer Laboratory
    Copyright   1995  University of Cambridge
*)

Language ="Datatype" + QUniv +

(* Abstract type of constants *)

consts
  Const :: "i"
rules
  constU "c:Const ==> c:univ(A)"
  constNEE "c:Const ==> c ~= 0"
 
(* A function that captures how constant functions are applied to
   constants *)
  
consts
  c_app :: "[i,i] => i"
rules
  c_appI "[| c1:Const; c2:Const |] ==> c_app(c1,c2):Const"


(* Abstract type of variables *)

consts
  ExVar :: "i"
rules
  exvarU "x:ExVar ==> x:univ(A)"


(* Datatype of expressions *)

consts
  Exp :: "i"
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")
  type_intrs "[constU,exvarU]"

end



<commit_msg>Got rid of exvarU and constU by including ExVar and Const in various datatype universes.<commit_after>(*  Title: 	ZF/Coind/Language.thy
    ID:         $Id$
    Author: 	<NAME>, Cambridge University Computer Laboratory
    Copyright   1995  University of Cambridge
*)

Language ="Datatype" + QUniv +

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

rules
  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 <= "univ(Const Un ExVar)"
  "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
{'fraction_non_alphanumeric': 0.1686746987951807, 'fraction_numerical': 0.01491681009753299, 'mean_word_length': 3.349127182044888, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2068614', 'n_tokens_mistral': 694, 'n_tokens_neox': 678, 'n_words': 161}