src/HOL/Codatatype/BNF_Library.thy
changeset 49263 669a820ef213
parent 49255 2ecc533d6697
child 49274 ddd606ec45b9
equal deleted inserted replaced
49262:831d4c259f5f 49263:669a820ef213
   827 by auto
   827 by auto
   828 
   828 
   829 lemma one_pointE: "\<lbrakk>\<And>x. s = x \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P"
   829 lemma one_pointE: "\<lbrakk>\<And>x. s = x \<Longrightarrow> P\<rbrakk> \<Longrightarrow> P"
   830 by simp
   830 by simp
   831 
   831 
       
   832 lemma obj_one_pointE: "\<forall>x. s = x \<longrightarrow> P \<Longrightarrow> P"
       
   833 by blast
       
   834 
   832 lemma obj_sumE_f:
   835 lemma obj_sumE_f:
   833 "\<lbrakk>\<forall>x. s = f (Inl x) \<longrightarrow> P; \<forall>x. s = f (Inr x) \<longrightarrow> P\<rbrakk> \<Longrightarrow> \<forall>x. s = f x \<longrightarrow> P"
   836 "\<lbrakk>\<forall>x. s = f (Inl x) \<longrightarrow> P; \<forall>x. s = f (Inr x) \<longrightarrow> P\<rbrakk> \<Longrightarrow> \<forall>x. s = f x \<longrightarrow> P"
   834 by (metis sum.exhaust)
   837 by (metis sum.exhaust)
   835 
   838 
   836 lemma obj_sumE: "\<lbrakk>\<forall>x. s = Inl x \<longrightarrow> P; \<forall>x. s = Inr x \<longrightarrow> P\<rbrakk> \<Longrightarrow> P"
   839 lemma obj_sumE: "\<lbrakk>\<forall>x. s = Inl x \<longrightarrow> P; \<forall>x. s = Inr x \<longrightarrow> P\<rbrakk> \<Longrightarrow> P"