X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=matita%2Fmatita%2Flib%2Farithmetics%2Fnat.ma;h=67b7de50b7dfb5711e9679b502720862e49c6d03;hb=dbd9f7d4de8286fdd54f4b5609576f33db1050a6;hp=06266a4b0aff80ba4c30e13beb3350fb88bfc8fa;hpb=53f874fba5b9c39a788085515a4fefe5d29281da;p=helm.git diff --git a/matita/matita/lib/arithmetics/nat.ma b/matita/matita/lib/arithmetics/nat.ma index 06266a4b0..67b7de50b 100644 --- a/matita/matita/lib/arithmetics/nat.ma +++ b/matita/matita/lib/arithmetics/nat.ma @@ -305,6 +305,10 @@ lemma lt_to_le: ∀x,y. x < y → x ≤ y. lemma inv_eq_minus_O: ∀x,y. x - y = 0 → x ≤ y. // qed-. +lemma le_x_times_x: ∀x. x ≤ x * x. +#x elim x -x // +qed. + (* lt *) theorem transitive_lt: transitive nat lt. @@ -491,6 +495,13 @@ cut (∀q:nat. q ≤ n → P q) /2/ ] qed. +lemma f_ind: ∀A. ∀f:A→ℕ. ∀P:predicate A. + (∀n. (∀a. f a < n → P a) → ∀a. f a = n → P a) → ∀a. P a. +#A #f #P #H #a +cut (∀n,a. f a = n → P a) /2 width=3/ -a +#n @(nat_elim1 … n) -n #n /3 width=3/ (**) (* auto very slow (274s) without #n *) +qed-. + (* More negated equalities **************************************************) theorem lt_to_not_eq : ∀n,m:nat. n < m → n ≠ m. @@ -645,6 +656,14 @@ theorem monotonic_lt_minus_l: ∀p,q,n. n ≤ q → q < p → q - n < p - n. @lt_plus_to_minus_r