src/Pure/Tools/rule_insts.ML
changeset 59801 ca948c89828e
parent 59800 af3e0919603f
child 59805 a162f779925a
equal deleted inserted replaced
59800:af3e0919603f 59801:ca948c89828e
    11     (binding * string option * mixfix) list -> thm -> thm
    11     (binding * string option * mixfix) list -> thm -> thm
    12   val of_rule: Proof.context -> string option list * string option list ->
    12   val of_rule: Proof.context -> string option list * string option list ->
    13     (binding * string option * mixfix) list -> thm -> thm
    13     (binding * string option * mixfix) list -> thm -> thm
    14   val read_instantiate: Proof.context ->
    14   val read_instantiate: Proof.context ->
    15     ((indexname * Position.T) * string) list -> string list -> thm -> thm
    15     ((indexname * Position.T) * string) list -> string list -> thm -> thm
    16   val insts_schematic: bool Config.T
    16   val schematic: bool Config.T
    17   val res_inst_tac: Proof.context ->
    17   val res_inst_tac: Proof.context ->
    18     ((indexname * Position.T) * string) list -> (binding * string option * mixfix) list -> thm ->
    18     ((indexname * Position.T) * string) list -> (binding * string option * mixfix) list -> thm ->
    19     int -> tactic
    19     int -> tactic
    20   val eres_inst_tac: Proof.context ->
    20   val eres_inst_tac: Proof.context ->
    21     ((indexname * Position.T) * string) list -> (binding * string option * mixfix) list -> thm ->
    21     ((indexname * Position.T) * string) list -> (binding * string option * mixfix) list -> thm ->
   197 
   197 
   198 
   198 
   199 
   199 
   200 (** tactics **)
   200 (** tactics **)
   201 
   201 
   202 val insts_schematic = Attrib.setup_config_bool @{binding insts_schematic} (K true);
   202 val schematic = Attrib.setup_config_bool @{binding rule_insts_schematic} (K true);
   203 
   203 
   204 (* resolution after lifting and instantiation; may refer to parameters of the subgoal *)
   204 (* resolution after lifting and instantiation; may refer to parameters of the subgoal *)
   205 
   205 
   206 fun bires_inst_tac bires_flag ctxt mixed_insts fixes thm i st = CSUBGOAL (fn (cgoal, _) =>
   206 fun bires_inst_tac bires_flag ctxt mixed_insts fixes thm i st = CSUBGOAL (fn (cgoal, _) =>
   207   let
   207   let
   217       |> Variable.declare_thm thm
   217       |> Variable.declare_thm thm
   218       |> Thm.fold_terms Variable.declare_constraints st
   218       |> Thm.fold_terms Variable.declare_constraints st
   219       |> Variable.improper_fixes
   219       |> Variable.improper_fixes
   220       |> Proof_Context.add_fixes (map (fn (x, T) => (Binding.name x, SOME T, NoSyn)) params)
   220       |> Proof_Context.add_fixes (map (fn (x, T) => (Binding.name x, SOME T, NoSyn)) params)
   221       ||> Variable.restore_proper_fixes ctxt
   221       ||> Variable.restore_proper_fixes ctxt
   222       ||> Config.get ctxt insts_schematic ? Proof_Context.set_mode Proof_Context.mode_schematic;
   222       ||> Config.get ctxt schematic ? Proof_Context.set_mode Proof_Context.mode_schematic;
   223     val paramTs = map #2 params;
   223     val paramTs = map #2 params;
   224 
   224 
   225 
   225 
   226     (* local fixes *)
   226     (* local fixes *)
   227 
   227