X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fstatic_2%2Fsyntax%2Fsd.ma;fp=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fstatic_2%2Fsyntax%2Fsd.ma;h=533a79e05bc91ce73cce3c3391f94d6088c76f14;hb=db020b4218272e2e35641ce3bc3b0a9b3afda899;hp=0000000000000000000000000000000000000000;hpb=d8f6494f48aa08bb32d9d1ac82fc16e9e41b76ac;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/static_2/syntax/sd.ma b/matita/matita/contribs/lambdadelta/static_2/syntax/sd.ma new file mode 100644 index 000000000..533a79e05 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/static_2/syntax/sd.ma @@ -0,0 +1,68 @@ +(**************************************************************************) +(* ___ *) +(* ||M|| *) +(* ||A|| A project by Andrea Asperti *) +(* ||T|| *) +(* ||I|| Developers: *) +(* ||T|| The HELM team. *) +(* ||A|| http://helm.cs.unibo.it *) +(* \ / *) +(* \ / This file is distributed under the terms of the *) +(* v GNU General Public License Version 2 *) +(* *) +(**************************************************************************) + +include "static_2/syntax/sh.ma". + +(* SORT DEGREE **************************************************************) + +(* sort degree specification *) +record sd: Type[0] ≝ { +(* degree of the sort *) + deg: relation nat +}. + +(* sort degree postulates *) +record sd_props (h) (o): Prop ≝ { +(* functional relation axioms *) + deg_total: ∀s. ∃d. deg o s d; + deg_mono : ∀s,d1,d2. deg o s d1 → deg o s d2 → d1 = d2; +(* compatibility condition *) + deg_next : ∀s,d. deg o s d → deg o (⫯[h]s) (↓d) +}. + +(* Notable specifications ***************************************************) + +definition deg_O: relation nat ≝ λs,d. d = 0. + +definition sd_O: sd ≝ mk_sd deg_O. + +lemma sd_O_props (h): sd_props h sd_O ≝ mk_sd_props …. +/2 width=2 by le_n_O_to_eq, le_n, ex_intro/ qed. + +(* Basic inversion lemmas ***************************************************) + +lemma deg_inv_pred (h) (o): sd_props h o → + ∀s,d. deg o (⫯[h]s) (↑d) → deg o s (↑↑d). +#h #o #Ho #s #d #H1 +elim (deg_total … Ho s) #d0 #H0 +lapply (deg_next … Ho … H0) #H2 +lapply (deg_mono … Ho … H1 H2) -H1 -H2 #H >H >S_pred +/2 width=2 by ltn_to_ltO/ +qed-. + +lemma deg_inv_prec (h) (o): sd_props h o → + ∀s,n,d. deg o ((next h)^n s) (↑d) → deg o s (↑(d+n)). +#h #o #H0 #s #n elim n -n normalize /3 width=3 by deg_inv_pred/ +qed-. + +(* Basic properties *********************************************************) + +lemma deg_iter (h) (o): sd_props h o → + ∀s,d,n. deg o s d → deg o ((next h)^n s) (d-n). +#h #o #Ho #s #d #n elim n -n normalize /3 width=1 by deg_next/ +qed. + +lemma deg_next_SO (h) (o): sd_props h o → + ∀s,d. deg o s (↑d) → deg o (next h s) d. +/2 width=1 by deg_next/ qed-.