src/HOL/Tools/inductive_realizer.ML
changeset 28965 1de908189869
parent 28814 463c9e9111ae
child 29265 5b4247055bd7
equal deleted inserted replaced
28963:f6d9e0e0b153 28965:1de908189869
   336         let
   336         let
   337           val Const (s, T) = head_of (HOLogic.dest_Trueprop
   337           val Const (s, T) = head_of (HOLogic.dest_Trueprop
   338             (Logic.strip_assums_concl rintr));
   338             (Logic.strip_assums_concl rintr));
   339           val s' = Sign.base_name s;
   339           val s' = Sign.base_name s;
   340           val T' = Logic.unvarifyT T
   340           val T' = Logic.unvarifyT T
   341         in (((Name.binding s', T'), NoSyn), (Const (s, T'), Free (s', T'))) end) rintrs));
   341         in (((Binding.name s', T'), NoSyn), (Const (s, T'), Free (s', T'))) end) rintrs));
   342     val rlzparams = map (fn Var ((s, _), T) => (s, Logic.unvarifyT T))
   342     val rlzparams = map (fn Var ((s, _), T) => (s, Logic.unvarifyT T))
   343       (List.take (snd (strip_comb
   343       (List.take (snd (strip_comb
   344         (HOLogic.dest_Trueprop (Logic.strip_assums_concl (hd rintrs)))), nparms));
   344         (HOLogic.dest_Trueprop (Logic.strip_assums_concl (hd rintrs)))), nparms));
   345 
   345 
   346     (** realizability predicate **)
   346     (** realizability predicate **)
   347 
   347 
   348     val (ind_info, thy3') = thy2 |>
   348     val (ind_info, thy3') = thy2 |>
   349       InductivePackage.add_inductive_global (serial_string ())
   349       InductivePackage.add_inductive_global (serial_string ())
   350         {quiet_mode = false, verbose = false, kind = Thm.theoremK, alt_name = Name.no_binding,
   350         {quiet_mode = false, verbose = false, kind = Thm.theoremK, alt_name = Binding.empty,
   351           coind = false, no_elim = false, no_ind = false, skip_mono = false}
   351           coind = false, no_elim = false, no_ind = false, skip_mono = false}
   352         rlzpreds rlzparams (map (fn (rintr, intr) =>
   352         rlzpreds rlzparams (map (fn (rintr, intr) =>
   353           ((Name.binding (Sign.base_name (name_of_thm intr)), []),
   353           ((Binding.name (Sign.base_name (name_of_thm intr)), []),
   354            subst_atomic rlzpreds' (Logic.unvarify rintr)))
   354            subst_atomic rlzpreds' (Logic.unvarify rintr)))
   355              (rintrs ~~ maps snd rss)) [] ||>
   355              (rintrs ~~ maps snd rss)) [] ||>
   356       Sign.absolute_path;
   356       Sign.absolute_path;
   357     val thy3 = fold (PureThy.hide_fact false o name_of_thm) (#intrs ind_info) thy3';
   357     val thy3 = fold (PureThy.hide_fact false o name_of_thm) (#intrs ind_info) thy3';
   358 
   358