X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2FRELATIONAL%2FNLE%2Fprops.ma;h=34e5d0a242c42b541ef257f1f6a450721f712887;hb=d51cbf8e8a8855d458eb7f53c017160892e42d47;hp=bd76c2754b61db4aa5b540735245ae49eea16331;hpb=890f733dd3d1144de1c697a689ea165dc2adcc20;p=helm.git diff --git a/helm/software/matita/contribs/RELATIONAL/NLE/props.ma b/helm/software/matita/contribs/RELATIONAL/NLE/props.ma index bd76c2754..34e5d0a24 100644 --- a/helm/software/matita/contribs/RELATIONAL/NLE/props.ma +++ b/helm/software/matita/contribs/RELATIONAL/NLE/props.ma @@ -16,21 +16,51 @@ set "baseuri" "cic:/matita/RELATIONAL/NLE/props". include "NLE/fwd.ma". +theorem nle_zero_1: \forall q. zero <= q. + intros. auto. +qed. + +theorem nle_succ_succ: \forall p,q. p <= q \to succ p <= succ q. + intros. elim H. clear H. auto. +qed. + +theorem nle_ind: \forall P:(Nat \to Nat \to Prop). + (\forall n:Nat.P zero n) \to + (\forall n,n1:Nat. + n <= n1 \to P n n1 \to P (succ n) (succ n1) + ) \to + \forall n,n1:Nat. n <= n1 \to P n n1. + intros 4. elim n; clear n; + [ auto + | lapply linear nle_inv_succ_1 to H3. decompose; subst. + auto + ]. +qed. + theorem nle_refl: \forall x. x <= x. - intros 1; elim x; clear x; intros; auto new timeout=100. + intros 1; elim x; clear x; intros; auto. qed. theorem nle_trans_succ: \forall x,y. x <= y \to x <= succ y. - intros. elim H; clear H x y; intros; auto new timeout=100. + intros. elim H using nle_ind; clear H x y; auto. +qed. + +theorem nle_false: \forall x,y. x <= y \to y < x \to False. + intros 3; elim H using nle_ind; clear H x y; auto. +qed. + +theorem nle_trans: \forall x,y. x <= y \to + \forall z. y <= z \to x <= z. + intros 3. elim H using nle_ind; clear H x y; + [ auto + | lapply linear nle_inv_succ_1 to H3. decompose. subst. + auto + ]. qed. theorem nle_lt_or_eq: \forall y,x. x <= y \to x < y \lor x = y. - intros 1. elim y; clear y; intros; - [ lapply linear nle_gen_zero_2 to H. auto new timeout=100 - | lapply linear nle_gen_succ_2 to H1. decompose; - [ subst. auto new timeout=100 - | lapply linear H to H3 as H0. decompose; - subst; auto new timeout=100 - ] + intros. elim H using nle_ind; clear H x y; + [ elim n; clear n; auto + | decompose; subst; auto ]. qed.