src/HOL/MetisExamples/TransClosure.thy
changeset 32864 a226f29d4bdc
parent 28592 824f8390aaa2
equal deleted inserted replaced
32852:7c8bc41ce810 32864:a226f29d4bdc
    20 
    20 
    21 consts R::"(addr \<times> addr) set"
    21 consts R::"(addr \<times> addr) set"
    22 
    22 
    23 consts f:: "addr \<Rightarrow> val"
    23 consts f:: "addr \<Rightarrow> val"
    24 
    24 
    25 ML {*AtpWrapper.problem_name := "TransClosure__test"*}
    25 declare [[ atp_problem_prefix = "TransClosure__test" ]]
    26 lemma "\<lbrakk> f c = Intg x; \<forall> y. f b = Intg y \<longrightarrow> y \<noteq> x; (a,b) \<in> R\<^sup>*; (b,c) \<in> R\<^sup>* \<rbrakk> 
    26 lemma "\<lbrakk> f c = Intg x; \<forall> y. f b = Intg y \<longrightarrow> y \<noteq> x; (a,b) \<in> R\<^sup>*; (b,c) \<in> R\<^sup>* \<rbrakk> 
    27    \<Longrightarrow> \<exists> c. (b,c) \<in> R \<and> (a,c) \<in> R\<^sup>*"  
    27    \<Longrightarrow> \<exists> c. (b,c) \<in> R \<and> (a,c) \<in> R\<^sup>*"  
    28 by (metis Transitive_Closure.rtrancl_into_rtrancl converse_rtranclE trancl_reflcl)
    28 by (metis Transitive_Closure.rtrancl_into_rtrancl converse_rtranclE trancl_reflcl)
    29 
    29 
    30 lemma "\<lbrakk> f c = Intg x; \<forall> y. f b = Intg y \<longrightarrow> y \<noteq> x; (a,b) \<in> R\<^sup>*; (b,c) \<in> R\<^sup>* \<rbrakk> 
    30 lemma "\<lbrakk> f c = Intg x; \<forall> y. f b = Intg y \<longrightarrow> y \<noteq> x; (a,b) \<in> R\<^sup>*; (b,c) \<in> R\<^sup>* \<rbrakk> 
    49   by (metis 0 9)
    49   by (metis 0 9)
    50 show "False"
    50 show "False"
    51   by (metis 10 3)
    51   by (metis 10 3)
    52 qed
    52 qed
    53 
    53 
    54 ML {*AtpWrapper.problem_name := "TransClosure__test_simpler"*}
    54 declare [[ atp_problem_prefix = "TransClosure__test_simpler" ]]
    55 lemma "\<lbrakk> f c = Intg x; \<forall> y. f b = Intg y \<longrightarrow> y \<noteq> x; (a,b) \<in> R\<^sup>*; (b,c) \<in> R\<^sup>* \<rbrakk> 
    55 lemma "\<lbrakk> f c = Intg x; \<forall> y. f b = Intg y \<longrightarrow> y \<noteq> x; (a,b) \<in> R\<^sup>*; (b,c) \<in> R\<^sup>* \<rbrakk> 
    56    \<Longrightarrow> \<exists> c. (b,c) \<in> R \<and> (a,c) \<in> R\<^sup>*"
    56    \<Longrightarrow> \<exists> c. (b,c) \<in> R \<and> (a,c) \<in> R\<^sup>*"
    57 apply (erule_tac x="b" in converse_rtranclE)
    57 apply (erule_tac x="b" in converse_rtranclE)
    58 apply (metis rel_pow_0_E rel_pow_0_I)
    58 apply (metis rel_pow_0_E rel_pow_0_I)
    59 apply (metis DomainE Domain_iff Transitive_Closure.rtrancl_into_rtrancl)
    59 apply (metis DomainE Domain_iff Transitive_Closure.rtrancl_into_rtrancl)