src/HOL/SET_Protocol/Public_SET.thy
changeset 59498 50b60f501b05
parent 58889 5b7a9633cfa8
child 61984 cdea44c775fa
equal deleted inserted replaced
59497:0c5cd369a643 59498:50b60f501b05
   345 fun possibility_tac ctxt =
   345 fun possibility_tac ctxt =
   346     REPEAT (*omit used_Says so that Nonces start from different traces!*)
   346     REPEAT (*omit used_Says so that Nonces start from different traces!*)
   347     (ALLGOALS (simp_tac (ctxt delsimps [@{thm used_Says}, @{thm used_Notes}]))
   347     (ALLGOALS (simp_tac (ctxt delsimps [@{thm used_Says}, @{thm used_Notes}]))
   348      THEN
   348      THEN
   349      REPEAT_FIRST (eq_assume_tac ORELSE' 
   349      REPEAT_FIRST (eq_assume_tac ORELSE' 
   350                    resolve_tac [refl, conjI, @{thm Nonce_supply}]))
   350                    resolve_tac ctxt [refl, conjI, @{thm Nonce_supply}]))
   351 
   351 
   352 (*For harder protocols (such as SET_CR!), where we have to set up some
   352 (*For harder protocols (such as SET_CR!), where we have to set up some
   353   nonces and keys initially*)
   353   nonces and keys initially*)
   354 fun basic_possibility_tac ctxt =
   354 fun basic_possibility_tac ctxt =
   355     REPEAT 
   355     REPEAT 
   356     (ALLGOALS (asm_simp_tac (ctxt setSolver safe_solver))
   356     (ALLGOALS (asm_simp_tac (ctxt setSolver safe_solver))
   357      THEN
   357      THEN
   358      REPEAT_FIRST (resolve_tac [refl, conjI]))
   358      REPEAT_FIRST (resolve_tac ctxt [refl, conjI]))
   359 *}
   359 *}
   360 
   360 
   361 method_setup possibility = {*
   361 method_setup possibility = {*
   362     Scan.succeed (SIMPLE_METHOD o possibility_tac) *}
   362     Scan.succeed (SIMPLE_METHOD o possibility_tac) *}
   363     "for proving possibility theorems"
   363     "for proving possibility theorems"