]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/etc/fsup/fsup.etc
- ynat: some additions
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / etc / fsup / fsup.etc
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 include "basic_2/substitution/ldrop.ma".
16
17 (* SUPCLOSURE ***************************************************************)
18
19 (* Basic inversion lemmas ***************************************************)
20
21 fact fsup_inv_atom1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ∀J. T1 = ⓪{J} →
22                          (∃∃I,K,V. L1 = K.ⓑ{I}V & J = LRef 0 & L2 = K & T2 = V) ∨
23                          ∃∃I,K,V,i. ⦃K, #i⦄ ⊃ ⦃L2, T2⦄ & L1 = K.ⓑ{I}V & J = LRef (i+1).
24 #L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
25 [ #I #L #V #J #H destruct /3 width=6/
26 | #I #L #K #V #T #i #HLK #J #H destruct /3 width=7/
27 | #a #I #L #V #T #J #H destruct
28 | #a #I #L #V #T #J #H destruct
29 | #I #L #V #T #J #H destruct
30 | #I #L #V #T #J #H destruct
31 ]
32 qed-.
33
34 lemma fsup_inv_atom1: ∀J,L1,L2,T2. ⦃L1, ⓪{J}⦄ ⊃ ⦃L2, T2⦄ →
35                       (∃∃I,K,V. L1 = K.ⓑ{I}V & J = LRef 0 & L2 = K & T2 = V) ∨
36                       ∃∃I,K,V,i. ⦃K, #i⦄ ⊃ ⦃L2, T2⦄ & L1 = K.ⓑ{I}V & J = LRef (i+1).
37 /2 width=3 by fsup_inv_atom1_aux/ qed-.
38
39 fact fsup_inv_bind1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ →
40                          ∀b,J,W,U. T1 = ⓑ{b,J}W.U →
41                          (L2 = L1 ∧ T2 = W) ∨
42                          (L2 = L1.ⓑ{J}W ∧ T2 = U).
43 #L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
44 [ #I #L #V #b #J #W #U #H destruct
45 | #I #L #K #V #T #i #_ #b #J #W #U #H destruct
46 | #a #I #L #V #T #b #J #W #U #H destruct /3 width=1/
47 | #a #I #L #V #T #b #J #W #U #H destruct /3 width=1/
48 | #I #L #V #T #b #J #W #U #H destruct
49 | #I #L #V #T #b #J #W #U #H destruct
50 ]
51 qed-.
52
53 lemma fsup_inv_bind1: ∀b,J,L1,L2,W,U,T2. ⦃L1, ⓑ{b,J}W.U⦄ ⊃ ⦃L2, T2⦄ →
54                       (L2 = L1 ∧ T2 = W) ∨
55                       (L2 = L1.ⓑ{J}W ∧ T2 = U).
56 /2 width=4 by fsup_inv_bind1_aux/ qed-.
57
58 fact fsup_inv_flat1_aux: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ →
59                          ∀J,W,U. T1 = ⓕ{J}W.U →
60                          L2 = L1 ∧ (T2 = W ∨ T2 = U).
61 #L1 #L2 #T1 #T2 * -L1 -L2 -T1 -T2
62 [ #I #L #K #J #W #U #H destruct
63 | #I #L #K #V #T #i #_ #J #W #U #H destruct
64 | #a #I #L #V #T #J #W #U #H destruct
65 | #a #I #L #V #T #J #W #U #H destruct
66 | #I #L #V #T #J #W #U #H destruct /3 width=1/
67 | #I #L #V #T #J #W #U #H destruct /3 width=1/
68 ]
69 qed-.
70
71 lemma fsup_inv_flat1: ∀J,L1,L2,W,U,T2. ⦃L1, ⓕ{J}W.U⦄ ⊃ ⦃L2, T2⦄ →
72                       L2 = L1 ∧ (T2 = W ∨ T2 = U).
73 /2 width=4 by fsup_inv_flat1_aux/ qed-.