]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/substitution/fquq_alt.ma
update in lambdadelta
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / substitution / fquq_alt.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_2A/notation/relations/suptermoptalt_6.ma".
16 include "basic_2A/substitution/fquq.ma".
17
18 (* OPTIONAL SUPCLOSURE ******************************************************)
19
20 (* alternative definition of fquq *)
21 definition fquqa: tri_relation genv lenv term ≝ tri_RC … fqu.
22
23 interpretation
24    "optional structural successor (closure) alternative"
25    'SupTermOptAlt G1 L1 T1 G2 L2 T2 = (fquqa G1 L1 T1 G2 L2 T2).
26
27 (* Basic properties *********************************************************)
28
29 lemma fquqa_refl: tri_reflexive … fquqa.
30 // qed.
31
32 lemma fquqa_drop: ∀G,L,K,T,U,m.
33                   ⬇[m] L ≡ K → ⬆[0, m] T ≡ U → ⦃G, L, U⦄ ⊐⊐⸮ ⦃G, K, T⦄.
34 #G #L #K #T #U #m #HLK #HTU elim (eq_or_gt m)
35 /3 width=5 by fqu_drop_lt, or_introl/ #H destruct
36 >(drop_inv_O2 … HLK) -L >(lift_inv_O2 … HTU) -T //
37 qed.
38
39 (* Main properties **********************************************************)
40
41 theorem fquq_fquqa: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⊐⸮ ⦃G2, L2, T2⦄.
42 #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
43 /2 width=3 by fquqa_drop, fqu_lref_O, fqu_pair_sn, fqu_bind_dx, fqu_flat_dx, or_introl/
44 qed.
45
46 (* Main inversion properties ************************************************)
47
48 theorem fquqa_inv_fquq: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⊐⸮ ⦃G2, L2, T2⦄ → ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄.
49 #G1 #G2 #L1 #L2 #T1 #T2 #H elim H -H /2 width=1 by fqu_fquq/
50 * #H1 #H2 #H3 destruct //
51 qed-.
52
53 (* Advanced inversion lemmas ************************************************)
54
55 lemma fquq_inv_gen: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐⸮ ⦃G2, L2, T2⦄ →
56                     ⦃G1, L1, T1⦄ ⊐ ⦃G2, L2, T2⦄ ∨ (∧∧ G1 = G2 & L1 = L2 & T1 = T2).
57 #G1 #G2 #L1 #L2 #T1 #T2 #H elim (fquq_fquqa … H) -H [| * ]
58 /2 width=1 by or_introl/
59 qed-.