src/HOL/Tools/BNF/bnf_gfp_grec_tactics.ML
changeset 64378 e9eb0b99a44c
parent 63170 eae6549dbea2
child 69593 3dda49e08b9d
equal deleted inserted replaced
64377:c1db9e3fe0e2 64378:e9eb0b99a44c
     6 Tactics for generalized corecursor construction.
     6 Tactics for generalized corecursor construction.
     7 *)
     7 *)
     8 
     8 
     9 signature BNF_GFP_GREC_TACTICS =
     9 signature BNF_GFP_GREC_TACTICS =
    10 sig
    10 sig
       
    11   val transfer_prover_eq_tac: Proof.context -> int -> tactic
    11   val transfer_prover_add_tac: Proof.context -> thm list -> thm list -> int -> tactic
    12   val transfer_prover_add_tac: Proof.context -> thm list -> thm list -> int -> tactic
    12 
    13 
    13   val mk_algLam_algLam_tac: Proof.context -> thm -> thm -> thm -> thm -> thm -> thm -> thm -> thm ->
    14   val mk_algLam_algLam_tac: Proof.context -> thm -> thm -> thm -> thm -> thm -> thm -> thm -> thm ->
    14     tactic
    15     tactic
    15   val mk_algLam_algrho_tac: Proof.context -> thm -> thm -> tactic
    16   val mk_algLam_algrho_tac: Proof.context -> thm -> thm -> tactic
    80 fun context_relator_eq_add rel_eqs ctxt =
    81 fun context_relator_eq_add rel_eqs ctxt =
    81   fold (snd oo Thm.proof_attributes (map (Attrib.attribute ctxt) @{attributes [relator_eq]}))
    82   fold (snd oo Thm.proof_attributes (map (Attrib.attribute ctxt) @{attributes [relator_eq]}))
    82     rel_eqs ctxt;
    83     rel_eqs ctxt;
    83 val context_transfer_rule_add = fold (snd oo Thm.proof_attributes [Transfer.transfer_add]);
    84 val context_transfer_rule_add = fold (snd oo Thm.proof_attributes [Transfer.transfer_add]);
    84 
    85 
       
    86 fun transfer_prover_eq_tac ctxt =
       
    87   SELECT_GOAL (Local_Defs.fold_tac ctxt (Transfer.get_relator_eq ctxt)) THEN'
       
    88   Transfer.transfer_prover_tac ctxt;
       
    89 
    85 fun transfer_prover_add_tac ctxt rel_eqs transfers =
    90 fun transfer_prover_add_tac ctxt rel_eqs transfers =
    86   Transfer.transfer_prover_tac (ctxt
    91   transfer_prover_eq_tac (ctxt
    87     |> context_relator_eq_add rel_eqs
    92     |> context_relator_eq_add rel_eqs
    88     |> context_transfer_rule_add transfers);
    93     |> context_transfer_rule_add transfers);
    89 
    94 
    90 fun instantiate_natural_rule_with_id ctxt live =
    95 fun instantiate_natural_rule_with_id ctxt live =
    91   Rule_Insts.of_rule ctxt ([], NONE :: replicate live (SOME @{const_name id})) [];
    96   Rule_Insts.of_rule ctxt ([], NONE :: replicate live (SOME @{const_name id})) [];