src/HOL/Tools/Function/scnp_reconstruct.ML
changeset 63170 eae6549dbea2
parent 60801 7664e0916eec
child 69593 3dda49e08b9d
equal deleted inserted replaced
63169:d36c7dc40000 63170:eae6549dbea2
   117 (* General reduction pair application *)
   117 (* General reduction pair application *)
   118 fun rem_inv_img ctxt =
   118 fun rem_inv_img ctxt =
   119   resolve_tac ctxt @{thms subsetI} 1
   119   resolve_tac ctxt @{thms subsetI} 1
   120   THEN eresolve_tac ctxt @{thms CollectE} 1
   120   THEN eresolve_tac ctxt @{thms CollectE} 1
   121   THEN REPEAT (eresolve_tac ctxt @{thms exE} 1)
   121   THEN REPEAT (eresolve_tac ctxt @{thms exE} 1)
   122   THEN Local_Defs.unfold_tac ctxt @{thms inv_image_def}
   122   THEN Local_Defs.unfold0_tac ctxt @{thms inv_image_def}
   123   THEN resolve_tac ctxt @{thms CollectI} 1
   123   THEN resolve_tac ctxt @{thms CollectI} 1
   124   THEN eresolve_tac ctxt @{thms conjE} 1
   124   THEN eresolve_tac ctxt @{thms conjE} 1
   125   THEN eresolve_tac ctxt @{thms ssubst} 1
   125   THEN eresolve_tac ctxt @{thms ssubst} 1
   126   THEN Local_Defs.unfold_tac ctxt @{thms split_conv triv_forall_equality sum.case}
   126   THEN Local_Defs.unfold0_tac ctxt @{thms split_conv triv_forall_equality sum.case}
   127 
   127 
   128 
   128 
   129 (* Sets *)
   129 (* Sets *)
   130 
   130 
   131 val setT = HOLogic.mk_setT
   131 val setT = HOLogic.mk_setT
   247                       else if qs = lq then resolve_tac ctxt [wmsI2''] 1
   247                       else if qs = lq then resolve_tac ctxt [wmsI2''] 1
   248                       else resolve_tac ctxt [wmsI1] 1)
   248                       else resolve_tac ctxt [wmsI1] 1)
   249                 THEN mset_pwleq_tac ctxt 1
   249                 THEN mset_pwleq_tac ctxt 1
   250                 THEN EVERY (map2 (less_proof false) qs ps)
   250                 THEN EVERY (map2 (less_proof false) qs ps)
   251                 THEN (if strict orelse qs <> lq
   251                 THEN (if strict orelse qs <> lq
   252                       then Local_Defs.unfold_tac ctxt set_of_simps
   252                       then Local_Defs.unfold0_tac ctxt set_of_simps
   253                            THEN steps_tac MAX true
   253                            THEN steps_tac MAX true
   254                            (subtract (op =) qs lq) (subtract (op =) ps lp)
   254                            (subtract (op =) qs lq) (subtract (op =) ps lp)
   255                       else all_tac)
   255                       else all_tac)
   256               end
   256               end
   257       in
   257       in
   278          THEN (resolve_tac ctxt @{thms reduction_pair_lemma} 1)
   278          THEN (resolve_tac ctxt @{thms reduction_pair_lemma} 1)
   279          THEN (resolve_tac ctxt @{thms rp_inv_image_rp} 1)
   279          THEN (resolve_tac ctxt @{thms rp_inv_image_rp} 1)
   280          THEN (resolve_tac ctxt [order_rpair ms_rp label] 1)
   280          THEN (resolve_tac ctxt [order_rpair ms_rp label] 1)
   281          THEN PRIMITIVE (Thm.instantiate' [] [SOME level_mapping])
   281          THEN PRIMITIVE (Thm.instantiate' [] [SOME level_mapping])
   282          THEN unfold_tac ctxt @{thms rp_inv_image_def}
   282          THEN unfold_tac ctxt @{thms rp_inv_image_def}
   283          THEN Local_Defs.unfold_tac ctxt @{thms split_conv fst_conv snd_conv}
   283          THEN Local_Defs.unfold0_tac ctxt @{thms split_conv fst_conv snd_conv}
   284          THEN REPEAT (SOMEGOAL (resolve_tac ctxt [@{thm Un_least}, @{thm empty_subsetI}]))
   284          THEN REPEAT (SOMEGOAL (resolve_tac ctxt [@{thm Un_least}, @{thm empty_subsetI}]))
   285          THEN EVERY (map (prove_lev true) sl)
   285          THEN EVERY (map (prove_lev true) sl)
   286          THEN EVERY (map (prove_lev false) (subtract (op =) sl (0 upto length cs - 1))))
   286          THEN EVERY (map (prove_lev false) (subtract (op =) sl (0 upto length cs - 1))))
   287     end
   287     end
   288 
   288