src/HOL/Word/Bool_List_Representation.thy
changeset 62701 715bf5beedc0
parent 62390 842917225d56
child 62957 a9c40cf517d1
equal deleted inserted replaced
62700:e3ca8dc01c4f 62701:715bf5beedc0
   327    apply clarsimp
   327    apply clarsimp
   328   apply clarsimp
   328   apply clarsimp
   329   apply (drule meta_spec, erule xtrans(8) [rotated], simp add: Bit_def)+
   329   apply (drule meta_spec, erule xtrans(8) [rotated], simp add: Bit_def)+
   330   done
   330   done
   331 
   331 
   332 lemma bl_to_bin_lt2p: "bl_to_bin bs < (2 ^ length bs)"
   332 lemma bl_to_bin_lt2p_drop:
   333   apply (unfold bl_to_bin_def)
   333   "bl_to_bin bs < 2 ^ length (dropWhile Not bs)"
   334   apply (rule xtrans(1))
   334 proof (induct bs)
   335    prefer 2
   335   case (Cons b bs) with bl_to_bin_lt2p_aux[where w=1]
   336    apply (rule bl_to_bin_lt2p_aux)
   336   show ?case unfolding bl_to_bin_def by simp
   337   apply simp
   337 qed simp
   338   done
   338 
       
   339 lemma bl_to_bin_lt2p: "bl_to_bin bs < 2 ^ length bs"
       
   340   by (metis bin_bl_bin bintr_lt2p bl_bin_bl)
   339 
   341 
   340 lemma bl_to_bin_ge2p_aux:
   342 lemma bl_to_bin_ge2p_aux:
   341   "bl_to_bin_aux bs w >= w * (2 ^ length bs)"
   343   "bl_to_bin_aux bs w >= w * (2 ^ length bs)"
   342   apply (induct bs arbitrary: w)
   344   apply (induct bs arbitrary: w)
   343    apply clarsimp
   345    apply clarsimp