src/FOLP/FOLP.thy
changeset 69593 3dda49e08b9d
parent 61337 4645502c3c64
child 69605 a96320074298
equal deleted inserted replaced
69592:a80d8ec6c998 69593:3dda49e08b9d
    54   assumes major: "p:P-->Q"
    54   assumes major: "p:P-->Q"
    55     and r1: "!!x. x:~P ==> f(x):R"
    55     and r1: "!!x. x:~P ==> f(x):R"
    56     and r2: "!!y. y:Q ==> g(y):R"
    56     and r2: "!!y. y:Q ==> g(y):R"
    57   shows "?p : R"
    57   shows "?p : R"
    58   apply (rule excluded_middle [THEN disjE])
    58   apply (rule excluded_middle [THEN disjE])
    59    apply (tactic \<open>DEPTH_SOLVE (assume_tac @{context} 1 ORELSE
    59    apply (tactic \<open>DEPTH_SOLVE (assume_tac \<^context> 1 ORELSE
    60        resolve_tac @{context} [@{thm r1}, @{thm r2}, @{thm major} RS @{thm mp}] 1)\<close>)
    60        resolve_tac \<^context> [@{thm r1}, @{thm r2}, @{thm major} RS @{thm mp}] 1)\<close>)
    61   done
    61   done
    62 
    62 
    63 (*Double negation law*)
    63 (*Double negation law*)
    64 schematic_goal notnotD: "p:~~P ==> ?p : P"
    64 schematic_goal notnotD: "p:~~P ==> ?p : P"
    65   apply (rule classical)
    65   apply (rule classical)
    78     and r2: "!!x y.[| x:~P; y:~Q |] ==> g(x,y):R"
    78     and r2: "!!x y.[| x:~P; y:~Q |] ==> g(x,y):R"
    79   shows "?p : R"
    79   shows "?p : R"
    80   apply (insert major)
    80   apply (insert major)
    81   apply (unfold iff_def)
    81   apply (unfold iff_def)
    82   apply (rule conjE)
    82   apply (rule conjE)
    83   apply (tactic \<open>DEPTH_SOLVE_1 (eresolve_tac @{context} @{thms impCE} 1 ORELSE
    83   apply (tactic \<open>DEPTH_SOLVE_1 (eresolve_tac \<^context> @{thms impCE} 1 ORELSE
    84       eresolve_tac @{context} [@{thm notE}, @{thm impE}] 1 THEN assume_tac @{context} 1 ORELSE
    84       eresolve_tac \<^context> [@{thm notE}, @{thm impE}] 1 THEN assume_tac \<^context> 1 ORELSE
    85       assume_tac @{context} 1 ORELSE
    85       assume_tac \<^context> 1 ORELSE
    86       resolve_tac @{context} [@{thm r1}, @{thm r2}] 1)\<close>)+
    86       resolve_tac \<^context> [@{thm r1}, @{thm r2}] 1)\<close>)+
    87   done
    87   done
    88 
    88 
    89 
    89 
    90 (*Should be used as swap since ~P becomes redundant*)
    90 (*Should be used as swap since ~P becomes redundant*)
    91 schematic_goal swap:
    91 schematic_goal swap:
   133 schematic_goal cla_rews:
   133 schematic_goal cla_rews:
   134   "?p1 : P | ~P"
   134   "?p1 : P | ~P"
   135   "?p2 : ~P | P"
   135   "?p2 : ~P | P"
   136   "?p3 : ~ ~ P <-> P"
   136   "?p3 : ~ ~ P <-> P"
   137   "?p4 : (~P --> P) <-> P"
   137   "?p4 : (~P --> P) <-> P"
   138   apply (tactic \<open>ALLGOALS (Cla.fast_tac @{context} FOLP_cs)\<close>)
   138   apply (tactic \<open>ALLGOALS (Cla.fast_tac \<^context> FOLP_cs)\<close>)
   139   done
   139   done
   140 
   140 
   141 ML_file "simpdata.ML"
   141 ML_file "simpdata.ML"
   142 
   142 
   143 end
   143 end