src/Doc/Tutorial/Rules/Tacticals.thy
changeset 67443 3abf6a722518
parent 67406 23307fd33906
equal deleted inserted replaced
67442:f075640b8868 67443:3abf6a722518
    20 by (drule mp, (intro conjI)?, assumption+)+
    20 by (drule mp, (intro conjI)?, assumption+)+
    21 
    21 
    22 text\<open>defer and prefer\<close>
    22 text\<open>defer and prefer\<close>
    23 
    23 
    24 lemma "hard \<and> (P \<or> ~P) \<and> (Q\<longrightarrow>Q)"
    24 lemma "hard \<and> (P \<or> ~P) \<and> (Q\<longrightarrow>Q)"
    25 apply (intro conjI)   \<comment>\<open>@{subgoals[display,indent=0,margin=65]}\<close>
    25 apply (intro conjI)   \<comment> \<open>@{subgoals[display,indent=0,margin=65]}\<close>
    26 defer 1   \<comment>\<open>@{subgoals[display,indent=0,margin=65]}\<close>
    26 defer 1   \<comment> \<open>@{subgoals[display,indent=0,margin=65]}\<close>
    27 apply blast+   \<comment>\<open>@{subgoals[display,indent=0,margin=65]}\<close>
    27 apply blast+   \<comment> \<open>@{subgoals[display,indent=0,margin=65]}\<close>
    28 oops
    28 oops
    29 
    29 
    30 lemma "ok1 \<and> ok2 \<and> doubtful"
    30 lemma "ok1 \<and> ok2 \<and> doubtful"
    31 apply (intro conjI)   \<comment>\<open>@{subgoals[display,indent=0,margin=65]}\<close>
    31 apply (intro conjI)   \<comment> \<open>@{subgoals[display,indent=0,margin=65]}\<close>
    32 prefer 3   \<comment>\<open>@{subgoals[display,indent=0,margin=65]}\<close>
    32 prefer 3   \<comment> \<open>@{subgoals[display,indent=0,margin=65]}\<close>
    33 oops
    33 oops
    34 
    34 
    35 lemma "bigsubgoal1 \<and> bigsubgoal2 \<and> bigsubgoal3 \<and> bigsubgoal4 \<and> bigsubgoal5 \<and> bigsubgoal6"
    35 lemma "bigsubgoal1 \<and> bigsubgoal2 \<and> bigsubgoal3 \<and> bigsubgoal4 \<and> bigsubgoal5 \<and> bigsubgoal6"
    36 apply (intro conjI)   \<comment>\<open>@{subgoals[display,indent=0,margin=65]}\<close>
    36 apply (intro conjI)   \<comment> \<open>@{subgoals[display,indent=0,margin=65]}\<close>
    37 txt\<open>@{subgoals[display,indent=0,margin=65]} 
    37 txt\<open>@{subgoals[display,indent=0,margin=65]} 
    38 A total of 6 subgoals...
    38 A total of 6 subgoals...
    39 \<close>
    39 \<close>
    40 oops
    40 oops
    41 
    41