From: Ferruccio Guidi Date: Mon, 12 Feb 2007 08:03:58 +0000 (+0000) Subject: unified: some theorems on Lift started X-Git-Tag: 0.4.95@7852~598 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=e55c40ddebaa3664f294a8dd8df162e8c1fa5020;p=helm.git unified: some theorems on Lift started --- diff --git a/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/defs.ma b/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/defs.ma index af573d360..eac00ae35 100644 --- a/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/defs.ma +++ b/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/defs.ma @@ -38,9 +38,9 @@ inductive Lift: Bool \to Nat \to Nat \to Term \to Term \to Prop \def \forall q,t1,t2. Lift q l i t1 t2 \to \forall r. Lift q l i (head q (flat r) u1 t1) (head q (flat r) u2 t2) - | lift_head : \forall l,qt,q. (qt = q \to False) \to + | lift_head : \forall l,q,p. (p = q \to False) \to \forall i,u1,u2. Lift false l i u1 u2 \to - \forall t1,t2. Lift qt l i t1 t2 \to + \forall t1,t2. Lift q l i t1 t2 \to \forall z. - Lift qt l i (head q z u1 t1) (head q z u2 t2) + Lift q l i (head p z u1 t1) (head p z u2 t2) . diff --git a/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/fwd.ma b/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/fwd.ma new file mode 100644 index 000000000..9caab5d2f --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/fwd.ma @@ -0,0 +1,79 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Unified-Sub/Lift/fwd". + +include "Lift/defs.ma". + +theorem lift_sort_1: \forall q, h, d, k, x. + Lift q h d (leaf (sort k)) x \to + x = leaf (sort k). + intros. inversion H; clear H; intros; + [ auto + | destruct H3 + | destruct H4 + | destruct H5 + | destruct H7 + | destruct H7 + | destruct H8 + ]. +qed. + +theorem lift_lref_1: \forall q, h, d, k, x. + Lift q h d (leaf (lref k)) x \to + (q = false \land x = leaf (lref k)) \lor + (q = true \land k < d \land x = leaf (lref k)) \lor + (q = true \land d <= k \land + \exists e. (k + h == e) \land x = leaf (lref e) + ). + intros. inversion H; clear H; intros; + [ destruct H3 + | destruct H3. clear H3. subst. auto depth = 4 + | destruct H4. clear H4. subst. auto depth = 5 + | destruct H5. clear H5. subst. auto depth = 5 + | destruct H7 + | destruct H7 + | destruct H8 + ]. +qed. + +theorem lift_head_1: \forall q, l, i, p, z, u1, t1, x. + Lift q l i (head p z u1 t1) x \to + (p = q \land + \exists r, u2, t2. + z = bind r \land + Lift true l i u1 u2 \land Lift q l (succ i) t1 t2 \land + x = head p z u2 t2 + ) \lor + (p = q \land + \exists r,u2,t2. + z = flat r \land + Lift true l i u1 u2 \land Lift q l i t1 t2 \land + x = head p z u2 t2 + ) \lor + ((p = q \to False) \land + \exists u2,t2. + Lift true l i u1 u2 \land Lift q l i t1 t2 \land + x = head p z u2 t2 + ). + intros. inversion H; clear H; intros; + [ destruct H3 + | destruct H3 + | destruct H4 + | destruct H5 + | destruct H7. clear H7 H1 H3. subst. auto depth = 10 + | destruct H7. clear H7 H1 H3. subst. auto depth = 10 + | destruct H8. clear H8 H2 H4. subst. auto depth = 7 + ]. +qed. \ No newline at end of file diff --git a/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/props.ma b/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/props.ma new file mode 100644 index 000000000..599aaeebb --- /dev/null +++ b/matita/contribs/LAMBDA-TYPES/Unified-Sub/Lift/props.ma @@ -0,0 +1,58 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +set "baseuri" "cic:/matita/LAMBDA-TYPES/Unified-Sub/Lift/props". + +include "Lift/fwd.ma". + +alias id "nplus_conf" = "cic:/matita/RELATIONAL/NPlus/props/nplus_conf.con". + +axiom pippo: \forall x,y. x < y \to y <= x \to False. + +theorem lift_conf: \forall q,h,d,t,x. Lift q h d t x \to + \forall y. Lift q h d t y \to + x = y. + intros 6. elim H; clear H q h d t x; + [ lapply linear lift_sort_fwd to H1. + subst. auto + | lapply linear lift_lref_fwd to H1. + decompose; subst; + [ auto | destruct H1 | destruct H ] + | lapply linear lift_lref_fwd to H2. + decompose; subst; + [ destruct H | auto | lapply pippo to H1, H4. decompose ] + | lapply linear lift_lref_fwd to H3. + decompose; subst; + [ destruct H + | lapply linear pippo to H5, H1. decompose + | lapply linear nplus_conf to H2, H4. subst. auto + ] + +(* +theorem lift_ct_le: \forall q,h,d,t,y. (Lift q h d t y) \to + \forall k,e,x. (Lift q k e t x) \to + \forall z. (Lift q k e y z) \to + e <= d \to \forall d'. (k + d == d') \to + (Lift q h d' x z). + intros 6. elim H; clear H q h d t y; + [ lapply linear lift_sort_fwd to H1. + lapply linear lift_sort_fwd to H2. + subst. auto + | lapply linear lift_lref_fwd to H1. + lapply linear lift_lref_fwd to H2. + decompose; subst; + [ auto + | auto + | + *) \ No newline at end of file