src/HOL/Nat.thy
changeset 26335 961bbcc9d85b
parent 26315 cb3badaa192e
child 26748 4d51ddd6aa5c
equal deleted inserted replaced
26334:80ec6cf82d95 26335:961bbcc9d85b
   437   by (simp add: less_Suc_eq_le)
   437   by (simp add: less_Suc_eq_le)
   438 
   438 
   439 
   439 
   440 subsubsection {* Elimination properties *}
   440 subsubsection {* Elimination properties *}
   441 
   441 
   442 lemma less_not_sym: "n < m ==> ~ m < (n::nat)"
       
   443   by (rule order_less_not_sym)
       
   444 
       
   445 lemma less_asym:
       
   446   assumes h1: "(n::nat) < m" and h2: "~ P ==> m < n" shows P
       
   447   apply (rule contrapos_np)
       
   448   apply (rule less_not_sym)
       
   449   apply (rule h1)
       
   450   apply (erule h2)
       
   451   done
       
   452 
       
   453 lemma less_not_refl: "~ n < (n::nat)"
   442 lemma less_not_refl: "~ n < (n::nat)"
   454   by (rule order_less_irrefl)
   443   by (rule order_less_irrefl)
   455 
   444 
   456 lemma less_irrefl [elim!]: "(n::nat) < n ==> R"
   445 lemma less_not_refl2: "n < m ==> m \<noteq> (n::nat)"
   457   by (rule notE, rule less_not_refl)
   446   by (rule not_sym) (rule less_imp_neq) 
   458 
   447 
   459 lemma less_not_refl3: "(s::nat) < t ==> s \<noteq> t"
   448 lemma less_not_refl3: "(s::nat) < t ==> s \<noteq> t"
   460   by (rule less_imp_neq)
   449   by (rule less_imp_neq)
   461 
   450 
   462 lemma less_not_refl2: "n < m ==> m \<noteq> (n::nat)"
   451 lemma less_irrefl_nat: "(n::nat) < n ==> R"
   463   by (rule not_sym) (rule less_imp_neq) 
   452   by (rule notE, rule less_not_refl)
   464 
   453 
   465 lemma less_zeroE: "(n::nat) < 0 ==> R"
   454 lemma less_zeroE: "(n::nat) < 0 ==> R"
   466   by (rule notE) (rule not_less0)
   455   by (rule notE) (rule not_less0)
   467 
   456 
   468 lemma less_Suc_eq: "(m < Suc n) = (m < n | m = n)"
   457 lemma less_Suc_eq: "(m < Suc n) = (m < n | m = n)"
   813 apply (simp_all add: le_add1)
   802 apply (simp_all add: le_add1)
   814 done
   803 done
   815 
   804 
   816 lemma not_add_less1 [iff]: "~ (i + j < (i::nat))"
   805 lemma not_add_less1 [iff]: "~ (i + j < (i::nat))"
   817 apply (rule notI)
   806 apply (rule notI)
   818 apply (erule add_lessD1 [THEN less_irrefl])
   807 apply (drule add_lessD1)
       
   808 apply (erule less_irrefl [THEN notE])
   819 done
   809 done
   820 
   810 
   821 lemma not_add_less2 [iff]: "~ (j + i < (i::nat))"
   811 lemma not_add_less2 [iff]: "~ (j + i < (i::nat))"
   822 by (simp add: add_commute not_add_less1)
   812 by (simp add: add_commute not_add_less1)
   823 
   813