doc-src/TutorialI/Protocol/Message.thy
changeset 42793 88bee9f6eec7
parent 42765 aec61b60ff7b
child 43564 9864182c6bad
equal deleted inserted replaced
42792:85fb70b0c5e8 42793:88bee9f6eec7
   838     dresolve_tac [impOfSubs Fake_analz_insert,
   838     dresolve_tac [impOfSubs Fake_analz_insert,
   839                   impOfSubs Fake_parts_insert] THEN'
   839                   impOfSubs Fake_parts_insert] THEN'
   840     eresolve_tac [asm_rl, @{thm synth.Inj}];
   840     eresolve_tac [asm_rl, @{thm synth.Inj}];
   841 
   841 
   842 fun Fake_insert_simp_tac ss i = 
   842 fun Fake_insert_simp_tac ss i = 
   843     REPEAT (Fake_insert_tac i) THEN asm_full_simp_tac ss i;
   843   REPEAT (Fake_insert_tac i) THEN asm_full_simp_tac ss i;
   844 
   844 
   845 fun atomic_spy_analz_tac ctxt =
   845 fun atomic_spy_analz_tac ctxt =
   846   let val ss = simpset_of ctxt and cs = claset_of ctxt in
   846   SELECT_GOAL
   847     SELECT_GOAL
   847    (Fake_insert_simp_tac (simpset_of ctxt) 1 THEN
   848       (Fake_insert_simp_tac ss 1
   848     IF_UNSOLVED (Blast.depth_tac (ctxt addIs [analz_insertI, impOfSubs analz_subset_parts]) 4 1));
   849        THEN
       
   850        IF_UNSOLVED (Blast.depth_tac
       
   851                     (cs addIs [analz_insertI,
       
   852                                      impOfSubs analz_subset_parts]) 4 1))
       
   853   end;
       
   854 
   849 
   855 fun spy_analz_tac ctxt i =
   850 fun spy_analz_tac ctxt i =
   856   let val ss = simpset_of ctxt and cs = claset_of ctxt in
   851   DETERM
   857     DETERM
   852    (SELECT_GOAL
   858      (SELECT_GOAL
   853      (EVERY 
   859        (EVERY 
   854       [  (*push in occurrences of X...*)
   860         [  (*push in occurrences of X...*)
   855        (REPEAT o CHANGED)
   861          (REPEAT o CHANGED)
   856            (res_inst_tac ctxt [(("x", 1), "X")] (insert_commute RS ssubst) 1),
   862              (res_inst_tac ctxt [(("x", 1), "X")] (insert_commute RS ssubst) 1),
   857        (*...allowing further simplifications*)
   863          (*...allowing further simplifications*)
   858        simp_tac (simpset_of ctxt) 1,
   864          simp_tac ss 1,
   859        REPEAT (FIRSTGOAL (resolve_tac [allI,impI,notI,conjI,iffI])),
   865          REPEAT (FIRSTGOAL (resolve_tac [allI,impI,notI,conjI,iffI])),
   860        DEPTH_SOLVE (atomic_spy_analz_tac ctxt 1)]) i);
   866          DEPTH_SOLVE (atomic_spy_analz_tac ctxt 1)]) i)
       
   867   end;
       
   868 *}
   861 *}
   869 
   862 
   870 text{*By default only @{text o_apply} is built-in.  But in the presence of
   863 text{*By default only @{text o_apply} is built-in.  But in the presence of
   871 eta-expansion this means that some terms displayed as @{term "f o g"} will be
   864 eta-expansion this means that some terms displayed as @{term "f o g"} will be
   872 rewritten, and others will not!*}
   865 rewritten, and others will not!*}