src/HOL/ex/Transfer_Int_Nat.thy
changeset 61076 bdc1e2f0a86a
parent 58889 5b7a9633cfa8
child 61343 5b5656a63bd6
equal deleted inserted replaced
61075:f6b0d827240e 61076:bdc1e2f0a86a
   198 
   198 
   199 text {* Equality on a higher type can be transferred if the relations
   199 text {* Equality on a higher type can be transferred if the relations
   200   involved are bi-unique. *}
   200   involved are bi-unique. *}
   201 
   201 
   202 lemma
   202 lemma
   203   assumes "\<And>xs\<Colon>int list. \<lbrakk>list_all (\<lambda>x. x \<ge> 0) xs; xs \<noteq> []\<rbrakk> \<Longrightarrow>
   203   assumes "\<And>xs::int list. \<lbrakk>list_all (\<lambda>x. x \<ge> 0) xs; xs \<noteq> []\<rbrakk> \<Longrightarrow>
   204     listsum xs < listsum (map (\<lambda>x. x + 1) xs)"
   204     listsum xs < listsum (map (\<lambda>x. x + 1) xs)"
   205   shows "xs \<noteq> [] \<Longrightarrow> listsum xs < listsum (map Suc xs)"
   205   shows "xs \<noteq> [] \<Longrightarrow> listsum xs < listsum (map Suc xs)"
   206 apply transfer
   206 apply transfer
   207 apply fact
   207 apply fact
   208 done
   208 done