src/HOL/Statespace/state_space.ML
changeset 28820 95dd21624c6c
parent 28394 b9c8e3a12a98
child 28965 1de908189869
equal deleted inserted replaced
28819:daca685d7bb7 28820:95dd21624c6c
   309                       DistinctTreeProver.mk_tree (fn n => Free (n,nameT)) nameT
   309                       DistinctTreeProver.mk_tree (fn n => Free (n,nameT)) nameT
   310                                 (sort fast_string_ord all_comps)),
   310                                 (sort fast_string_ord all_comps)),
   311                       ([]))])];
   311                       ([]))])];
   312 
   312 
   313   in thy
   313   in thy
   314      |> Locale.add_locale_i "" name vars [assumes]
   314      |> Locale.add_locale "" name vars [assumes]
   315      ||> ProofContext.theory_of
   315      ||> ProofContext.theory_of
   316      ||> interprete_parent name dist_thm_full_name parent_expr
   316      ||> interprete_parent name dist_thm_full_name parent_expr
   317      |> #2
   317      |> #2
   318   end;
   318   end;
   319 
   319 
   455   in thy
   455   in thy
   456      |> namespace_definition
   456      |> namespace_definition
   457            (suffix namespaceN name) nameT parents_expr
   457            (suffix namespaceN name) nameT parents_expr
   458            (map fst parent_comps) (map fst components)
   458            (map fst parent_comps) (map fst components)
   459      |> Context.theory_map (add_statespace full_name args parents components [])
   459      |> Context.theory_map (add_statespace full_name args parents components [])
   460      |> Locale.add_locale_i "" (suffix valuetypesN name) (Locale.Merge locs)
   460      |> Locale.add_locale "" (suffix valuetypesN name) (Locale.Merge locs)
   461             [Element.Constrains constrains]
   461             [Element.Constrains constrains]
   462      |> ProofContext.theory_of o #2
   462      |> ProofContext.theory_of o #2
   463      |> fold interprete_parent_valuetypes parents
   463      |> fold interprete_parent_valuetypes parents
   464      |> Locale.add_locale "" name
   464      |> Locale.add_locale_cmd name
   465               (Locale.Merge [Locale.Locale (suffix namespaceN full_name)
   465               (Locale.Merge [Locale.Locale (suffix namespaceN full_name)
   466                             ,Locale.Locale (suffix valuetypesN full_name)]) fixestate
   466                             ,Locale.Locale (suffix valuetypesN full_name)]) fixestate
   467      |> ProofContext.theory_of o #2
   467      |> ProofContext.theory_of o #2
   468      |> fold interprete_parent parents
   468      |> fold interprete_parent parents
   469      |> add_declaration (SOME full_name) (declare_declinfo components')
   469      |> add_declaration (SOME full_name) (declare_declinfo components')