src/HOL/Set_Interval.thy
changeset 59000 6eb0725503fc
parent 58970 2f65dcd32a59
child 59416 fde2659085e1
equal deleted inserted replaced
58997:fc571ebb04e1 59000:6eb0725503fc
   664 
   664 
   665 text {* The following proof is convenient in induction proofs where
   665 text {* The following proof is convenient in induction proofs where
   666 new elements get indices at the beginning. So it is used to transform
   666 new elements get indices at the beginning. So it is used to transform
   667 @{term "{..<Suc n}"} to @{term "0::nat"} and @{term "{..< n}"}. *}
   667 @{term "{..<Suc n}"} to @{term "0::nat"} and @{term "{..< n}"}. *}
   668 
   668 
       
   669 lemma zero_notin_Suc_image: "0 \<notin> Suc ` A"
       
   670   by auto
       
   671 
   669 lemma lessThan_Suc_eq_insert_0: "{..<Suc n} = insert 0 (Suc ` {..<n})"
   672 lemma lessThan_Suc_eq_insert_0: "{..<Suc n} = insert 0 (Suc ` {..<n})"
   670 proof safe
   673   by (auto simp: image_iff less_Suc_eq_0_disj)
   671   fix x assume "x < Suc n" "x \<notin> Suc ` {..<n}"
       
   672   then have "x \<noteq> Suc (x - 1)" by auto
       
   673   with `x < Suc n` show "x = 0" by auto
       
   674 qed
       
   675 
   674 
   676 lemma lessThan_Suc_atMost: "lessThan (Suc k) = atMost k"
   675 lemma lessThan_Suc_atMost: "lessThan (Suc k) = atMost k"
   677 by (simp add: lessThan_def atMost_def less_Suc_eq_le)
   676 by (simp add: lessThan_def atMost_def less_Suc_eq_le)
       
   677 
       
   678 lemma Iic_Suc_eq_insert_0: "{.. Suc n} = insert 0 (Suc ` {.. n})"
       
   679   unfolding lessThan_Suc_atMost[symmetric] lessThan_Suc_eq_insert_0[of "Suc n"] ..
   678 
   680 
   679 lemma UN_lessThan_UNIV: "(UN m::nat. lessThan m) = UNIV"
   681 lemma UN_lessThan_UNIV: "(UN m::nat. lessThan m) = UNIV"
   680 by blast
   682 by blast
   681 
   683 
   682 subsubsection {* The Constant @{term greaterThan} *}
   684 subsubsection {* The Constant @{term greaterThan} *}