src/CCL/CCL.ML
changeset 1459 d12da312eff4
parent 1087 c1ccf6679a96
child 1963 a4abf41134e2
equal deleted inserted replaced
1458:fd510875fb71 1459:d12da312eff4
     1 (*  Title: 	CCL/ccl
     1 (*  Title:      CCL/ccl
     2     ID:         $Id$
     2     ID:         $Id$
     3     Author: 	Martin Coen, Cambridge University Computer Laboratory
     3     Author:     Martin Coen, Cambridge University Computer Laboratory
     4     Copyright   1993  University of Cambridge
     4     Copyright   1993  University of Cambridge
     5 
     5 
     6 For ccl.thy.
     6 For ccl.thy.
     7 *)
     7 *)
     8 
     8 
    87        let fun arg_str 0 a s = s
    87        let fun arg_str 0 a s = s
    88          | arg_str 1 a s = "(" ^ a ^ "a" ^ s ^ ")"
    88          | arg_str 1 a s = "(" ^ a ^ "a" ^ s ^ ")"
    89          | arg_str n a s = arg_str (n-1) a ("," ^ a ^ (chr((ord "a")+n-1)) ^ s);
    89          | arg_str n a s = arg_str (n-1) a ("," ^ a ^ (chr((ord "a")+n-1)) ^ s);
    90            val sg = sign_of thy;
    90            val sg = sign_of thy;
    91            val T = case Sign.const_type sg sy of
    91            val T = case Sign.const_type sg sy of
    92   		            None => error(sy^" not declared") | Some(T) => T;
    92                             None => error(sy^" not declared") | Some(T) => T;
    93            val arity = length (fst (strip_type T));
    93            val arity = length (fst (strip_type T));
    94        in sy ^ (arg_str arity name "") end;
    94        in sy ^ (arg_str arity name "") end;
    95 
    95 
    96   fun mk_thm_str thy a b = "~ " ^ (saturate thy a "a") ^ " = " ^ (saturate thy b "b");
    96   fun mk_thm_str thy a b = "~ " ^ (saturate thy a "a") ^ " = " ^ (saturate thy b "b");
    97 
    97