src/HOL/Nat.thy
changeset 66816 212a3334e7da
parent 66810 cc2b490f9dc4
child 66936 cf8d8fc23891
     1.1 --- a/src/HOL/Nat.thy	Sun Oct 08 22:28:22 2017 +0200
     1.2 +++ b/src/HOL/Nat.thy	Sun Oct 08 22:28:22 2017 +0200
     1.3 @@ -1676,6 +1676,10 @@
     1.4      by (simp add: add.commute)
     1.5  qed
     1.6  
     1.7 +lemma of_nat_of_bool [simp]:
     1.8 +  "of_nat (of_bool P) = of_bool P"
     1.9 +  by auto
    1.10 +
    1.11  end
    1.12  
    1.13  declare of_nat_code [code]
    1.14 @@ -1764,6 +1768,10 @@
    1.15  lemma abs_of_nat [simp]: "\<bar>of_nat n\<bar> = of_nat n"
    1.16    unfolding abs_if by auto
    1.17  
    1.18 +lemma sgn_of_nat [simp]:
    1.19 +  "sgn (of_nat n) = of_bool (n > 0)"
    1.20 +  by simp
    1.21 +
    1.22  end
    1.23  
    1.24  lemma of_nat_id [simp]: "of_nat n = n"