]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2/substitution/llor.ma
- advances on hereditarily free variables: now "frees" is primitive
[helm.git] / matita / matita / contribs / lambdadelta / basic_2 / substitution / llor.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/notation/relations/lazyor_4.ma".
16 include "basic_2/substitution/frees.ma".
17
18 (* POINTWISE UNION FOR LOCAL ENVIRONMENTS ***********************************)
19
20 definition llor: relation4 term lenv lenv lenv ≝ λT,L2,L1,L.
21                  ∧∧ |L1| ≤ |L2| & |L1| = |L|
22                   & (∀I1,I2,I,K1,K2,K,V1,V2,V,i.
23                        ⇩[i] L1 ≡ K1.ⓑ{I1}V1 → ⇩[i] L2 ≡ K2.ⓑ{I2}V2 → ⇩[i] L ≡ K.ⓑ{I}V →
24                        (∧∧ (L1 ⊢ i ϵ 𝐅*[yinj 0]⦃T⦄ → ⊥) & I1 = I & V1 = V) ∨
25                        (∧∧ L1 ⊢ i ϵ 𝐅*[yinj 0]⦃T⦄  & I1 = I & V2 = V)
26                     ).
27
28 interpretation
29    "lazy union (local environment)"
30    'LazyOr L1 T L2 L = (llor T L2 L1 L).
31
32 (* Basic properties *********************************************************)
33
34 lemma llor_atom: ∀T,L2. ⋆ ⩖[T] L2 ≡ ⋆.
35 #T #L2 @and3_intro //
36 #I1 #I2 #I #K1 #K2 #K #V1 #V2 #V #i #HLK1
37 elim (ldrop_inv_atom1 … HLK1) -HLK1 #H destruct
38 qed.