doc-src/TutorialI/Rules/Tacticals.thy
changeset 11711 ecdfd237ffee
parent 11407 138919f1a135
child 12390 2fa13b499975
equal deleted inserted replaced
11710:f5401162c9f0 11711:ecdfd237ffee
    10 
    10 
    11 lemma "\<lbrakk>P\<longrightarrow>Q; Q\<longrightarrow>R; R\<longrightarrow>S; P\<rbrakk> \<Longrightarrow> S"
    11 lemma "\<lbrakk>P\<longrightarrow>Q; Q\<longrightarrow>R; R\<longrightarrow>S; P\<rbrakk> \<Longrightarrow> S"
    12 by (drule mp, assumption)+
    12 by (drule mp, assumption)+
    13 
    13 
    14 text{*ORELSE with REPEAT*}
    14 text{*ORELSE with REPEAT*}
    15 lemma "\<lbrakk>Q\<longrightarrow>R; P\<longrightarrow>Q; x<#5\<longrightarrow>P;  Suc x < #5\<rbrakk> \<Longrightarrow> R" 
    15 lemma "\<lbrakk>Q\<longrightarrow>R; P\<longrightarrow>Q; x<5\<longrightarrow>P;  Suc x < 5\<rbrakk> \<Longrightarrow> R" 
    16 by (drule mp, (assumption|arith))+
    16 by (drule mp, (assumption|arith))+
    17 
    17 
    18 text{*exercise: what's going on here?*}
    18 text{*exercise: what's going on here?*}
    19 lemma "\<lbrakk>P\<and>Q\<longrightarrow>R; P\<longrightarrow>Q; P\<rbrakk> \<Longrightarrow> R"
    19 lemma "\<lbrakk>P\<and>Q\<longrightarrow>R; P\<longrightarrow>Q; P\<rbrakk> \<Longrightarrow> R"
    20 by (drule mp, intro?, assumption+)+
    20 by (drule mp, intro?, assumption+)+