src/HOL/Statespace/state_space.ML
changeset 28083 103d9282a946
parent 27681 8cedebf55539
child 28308 d4396a28fb29
equal deleted inserted replaced
28082:37350f301128 28083:103d9282a946
    59        bool -> Proof.context -> string -> term -> term -> term
    59        bool -> Proof.context -> string -> term -> term -> term
    60     val update_tr : Proof.context -> term list -> term
    60     val update_tr : Proof.context -> term list -> term
    61     val update_tr' : Proof.context -> term list -> term
    61     val update_tr' : Proof.context -> term list -> term
    62   end;
    62   end;
    63 
    63 
    64 
       
    65 structure StateSpace: STATE_SPACE =
    64 structure StateSpace: STATE_SPACE =
    66 struct
    65 struct
    67 
    66 
    68 (* Theorems *)
    67 (* Theorems *)
    69 
    68 
   301         in (ctxt',thm)
   300         in (ctxt',thm)
   302         end)
   301         end)
   303 
   302 
   304     val attr = Attrib.internal type_attr;
   303     val attr = Attrib.internal type_attr;
   305 
   304 
   306     val assumes = Element.Assumes [((dist_thm_name,[attr]),
   305     val assumes = Element.Assumes [((Name.binding dist_thm_name,[attr]),
   307                     [(HOLogic.Trueprop $
   306                     [(HOLogic.Trueprop $
   308                       (Const ("DistinctTreeProver.all_distinct",
   307                       (Const ("DistinctTreeProver.all_distinct",
   309                                  Type ("DistinctTreeProver.tree",[nameT]) --> HOLogic.boolT) $
   308                                  Type ("DistinctTreeProver.tree",[nameT]) --> HOLogic.boolT) $
   310                       DistinctTreeProver.mk_tree (fn n => Free (n,nameT)) nameT
   309                       DistinctTreeProver.mk_tree (fn n => Free (n,nameT)) nameT
   311                                 (sort fast_string_ord all_comps)),
   310                                 (sort fast_string_ord all_comps)),
   443        (PrintMode.setmp [] (Syntax.string_of_typ (ProofContext.init thy))) T;
   442        (PrintMode.setmp [] (Syntax.string_of_typ (ProofContext.init thy))) T;
   444    val fixestate = (case state_type of
   443    val fixestate = (case state_type of
   445          NONE => []
   444          NONE => []
   446        | SOME s =>
   445        | SOME s =>
   447           let
   446           let
   448 	    val fx = Element.Fixes [(s,SOME (string_of_typ stateT),NoSyn)];
   447 	    val fx = Element.Fixes [(Name.binding s,SOME (string_of_typ stateT),NoSyn)];
   449             val cs = Element.Constrains
   448             val cs = Element.Constrains
   450                        (map (fn (n,T) =>  (n,string_of_typ T))
   449                        (map (fn (n,T) =>  (n,string_of_typ T))
   451                          ((map (fn (n,_) => (n,nameT)) all_comps) @
   450                          ((map (fn (n,_) => (n,nameT)) all_comps) @
   452                           constrains))
   451                           constrains))
   453           in [fx,cs] end
   452           in [fx,cs] end