#n; #m; #lenm; nelim lenm; napplyS refl_eq. *)
napply nat_elim2;
##[//
- ##|#n; #abs; napply False_ind; (* XXX *) napply not_le_Sn_O; /2/.
+ ##|#n; #abs; napply False_ind; /2/.
##|#n; #m; #Hind; #c; napplyS Hind; /2/;
##]
nqed.
∀m,n,p:nat. m ≤ n → (n-m)+p = (n+p)-m.
napply nat_elim2;
##[//
- ##|#n; #p; #abs; napply False_ind; (* XXX *) napply not_le_Sn_O; /2/;
+ ##|#n; #p; #abs; napply False_ind; /2/;
##|nnormalize;/3/;
##]
nqed.
(n=m → (P true)) → (n ≠ m → (P false)) → (P (eqb n m)).
napply nat_elim2;
##[#n; ncases n; nnormalize; /3/;
- ##|nnormalize; (* XXX *) nletin hint ≝ not_eq_O_S; /3/;
+ ##|nnormalize; /3/;
##|nnormalize; /4/;
- ##] (* XXX rimane aperto *) #m; #P; #_; #H; napply H; napply not_eq_O_S.
+ ##]
nqed.
ntheorem eqb_n_n: ∀n. eqb n n = true.
ntheorem eqb_true_to_eq: ∀n,m:nat. eqb n m = true → n = m.
#n; #m; napply (eqb_elim n m);//;
-#_; #abs; napply False_ind; (* XXX *) nletin hint ≝ not_eq_true_false; /2/;
+#_; #abs; napply False_ind; /2/;
nqed.
ntheorem eqb_false_to_not_eq: ∀n,m:nat. eqb n m = false → n ≠ m.
(n ≤ m → P true) → (n ≰ m → P false) → P (leb n m).
napply nat_elim2; nnormalize;
##[/2/
- ##| (* XXX *) nletin hint ≝ not_le_Sn_O; /3/;
+ ##| /3/;
##|#n; #m; #Hind; #P; #Pt; #Pf; napply Hind;
##[#lenm; napply Pt; napply le_S_S;//;
##|#nlenm; napply Pf; #leSS; /3/;
ntheorem leb_true_to_le:∀n,m.leb n m = true → n ≤ m.
#n; #m; napply leb_elim;
##[//;
- ##|#_; #abs; napply False_ind; (* XXX *) nletin hint ≝ not_eq_true_false; /2/;
+ ##|#_; #abs; napply False_ind; /2/;
##]
nqed.
ntheorem leb_false_to_not_le:∀n,m.
leb n m = false → n ≰ m.
#n; #m; napply leb_elim;
- ##[#_; #abs; napply False_ind; (* XXX *) nletin hint ≝ not_eq_true_false; /2/;
+ ##[#_; #abs; napply False_ind; /2/;
##|/2/;
##]
nqed.