]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/substitution/fsups.ma
- we are committing just the components before "reducibility"
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / substitution / fsups.ma
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/fsupp.ma".
16
17 (* STAR-ITERATED SUPCLOSURE *************************************************)
18
19 definition fsups: bi_relation lenv term ≝ bi_star … fsup.
20
21 interpretation "star-iterated structural successor (closure)"
22    'SupTermStar L1 T1 L2 T2 = (fsups L1 T1 L2 T2).
23
24 (* Basic eliminators ********************************************************)
25
26 lemma fsups_ind: ∀L1,T1. ∀R:relation2 lenv term. R L1 T1 →
27                  (∀L,L2,T,T2. ⦃L1, T1⦄ ⊃* ⦃L, T⦄ → ⦃L, T⦄ ⊃ ⦃L2, T2⦄ → R L T → R L2 T2) →
28                  ∀L2,T2. ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄ → R L2 T2.
29 #L1 #T1 #R #IH1 #IH2 #L2 #T2 #H
30 @(bi_star_ind … IH1 IH2 ? ? H)
31 qed-.
32
33 lemma fsups_ind_dx: ∀L2,T2. ∀R:relation2 lenv term. R L2 T2 →
34                     (∀L1,L,T1,T. ⦃L1, T1⦄ ⊃ ⦃L, T⦄ → ⦃L, T⦄ ⊃* ⦃L2, T2⦄ → R L T → R L1 T1) →
35                     ∀L1,T1. ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄ → R L1 T1.
36 #L2 #T2 #R #IH1 #IH2 #L1 #T1 #H
37 @(bi_star_ind_dx … IH1 IH2 ? ? H)
38 qed-.
39
40 (* Basic properties *********************************************************)
41
42 lemma fsups_refl: bi_reflexive … fsups.
43 /2 width=1/ qed.
44
45 lemma fsupp_fsups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃+ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄.
46 /2 width=1/ qed.
47
48 lemma fsup_fsups: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄.
49 /2 width=1/ qed.
50
51 lemma fsups_strap1: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⊃* ⦃L, T⦄ → ⦃L, T⦄ ⊃ ⦃L2, T2⦄ →
52                     ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄.
53 /2 width=4/ qed.
54
55 lemma fsups_strap2: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⊃ ⦃L, T⦄ → ⦃L, T⦄ ⊃* ⦃L2, T2⦄ →
56                     ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄.
57 /2 width=4/ qed.
58
59 lemma fsups_fsupp_fsupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⊃* ⦃L, T⦄ →
60                          ⦃L, T⦄ ⊃+ ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃+ ⦃L2, T2⦄.
61 /2 width=4/ qed.
62
63 lemma fsupp_fsups_fsupp: ∀L1,L,L2,T1,T,T2. ⦃L1, T1⦄ ⊃+ ⦃L, T⦄ →
64                          ⦃L, T⦄ ⊃* ⦃L2, T2⦄ → ⦃L1, T1⦄ ⊃+ ⦃L2, T2⦄.
65 /2 width=4/ qed.
66
67 (* Basic forward lemmas *****************************************************)
68
69 lemma fsups_fwd_cw: ∀L1,L2,T1,T2. ⦃L1, T1⦄ ⊃* ⦃L2, T2⦄ → ♯{L2, T2} ≤ ♯{L1, T1}.
70 #L1 #L2 #T1 #T2 #H @(fsups_ind … H) -L2 -T2 //
71 /4 width=3 by fsup_fwd_cw, lt_to_le_to_lt, lt_to_le/ (**) (* slow even with trace *)
72 qed-.
73 (*
74 (* Advanced inversion lemmas on plus-iterated supclosure ********************)
75
76 lemma fsupp_inv_bind1_fsups: ∀b,J,L1,L2,W,U,T2. ⦃L1, ⓑ{b,J}W.U⦄ ⊃+ ⦃L2, T2⦄ →
77                              ⦃L1, W⦄ ⊃* ⦃L2, T2⦄ ∨ ⦃L1.ⓑ{J}W, U⦄ ⊃* ⦃L2, T2⦄.
78 #b #J #L1 #L2 #W #U #T2 #H @(fsupp_ind … H) -L2 -T2
79 [ #L2 #T2 #H
80   elim (fsup_inv_bind1 … H) -H * #H1 #H2 destruct /2 width=1/
81 | #L #T #L2 #T2 #_ #HT2 * /3 width=4/
82 ]
83 qed-.
84
85 lemma fsupp_inv_flat1_fsups: ∀J,L1,L2,W,U,T2. ⦃L1, ⓕ{J}W.U⦄ ⊃+ ⦃L2, T2⦄ →
86                              ⦃L1, W⦄ ⊃* ⦃L2, T2⦄ ∨ ⦃L1, U⦄ ⊃* ⦃L2, T2⦄.
87 #J #L1 #L2 #W #U #T2 #H @(fsupp_ind … H) -L2 -T2
88 [ #L2 #T2 #H
89   elim (fsup_inv_flat1 … H) -H #H1 * #H2 destruct /2 width=1/
90 | #L #T #L2 #T2 #_ #HT2 * /3 width=4/
91 ]
92 qed-.
93 *)