1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 include "static_2/relocation/lex.ma".
16 include "basic_2/notation/relations/pconveta_4.ma".
17 include "basic_2/rt_conversion/cpce_ext.ma".
19 (* PARALLEL ETA-CONVERSION FOR FULL LOCAL ENVIRONMENTS **********************)
21 definition lpce (h) (G): relation lenv ≝ lex (cpce h G).
24 "parallel eta-conversion on all entries (local environment)"
25 'PConvEta h G L1 L2 = (lpce h G L1 L2).
27 (* Basic properties *********************************************************)
29 lemma lpce_bind (h) (G):
30 ∀K1,K2. ⦃G,K1⦄ ⊢ ⬌η[h] K2 →
31 ∀I1,I2. ⦃G,K1⦄ ⊢ I1 ⬌η[h] I2 → ⦃G,K1.ⓘ{I1}⦄ ⊢ ⬌η[h] K2.ⓘ{I2}.
32 /2 width=1 by lex_bind/ qed.
34 (* Advanced properties ******************************************************)
36 lemma lpce_pair (h) (G):
37 ∀K1,K2,V1,V2. ⦃G,K1⦄ ⊢ ⬌η[h] K2 → ⦃G,K1⦄ ⊢ V1 ⬌η[h] V2 →
38 ∀I. ⦃G,K1.ⓑ{I}V1⦄ ⊢ ⬌η[h] K2.ⓑ{I}V2.
39 /2 width=1 by lex_pair/ qed.
41 (* Basic inversion lemmas ***************************************************)
43 lemma lpce_inv_atom_sn (h) (G):
44 ∀L2. ⦃G,⋆⦄ ⊢ ⬌η[h] L2 → L2 = ⋆.
45 /2 width=2 by lex_inv_atom_sn/ qed-.
47 lemma lpce_inv_bind_sn (h) (G):
48 ∀I1,L2,K1. ⦃G,K1.ⓘ{I1}⦄ ⊢ ⬌η[h] L2 →
49 ∃∃I2,K2. ⦃G,K1⦄ ⊢ ⬌η[h] K2 & ⦃G,K1⦄ ⊢ I1 ⬌η[h] I2 & L2 = K2.ⓘ{I2}.
50 /2 width=1 by lex_inv_bind_sn/ qed-.
52 lemma lpce_inv_atom_dx (h) (G):
53 ∀L1. ⦃G,L1⦄ ⊢ ⬌η[h] ⋆ → L1 = ⋆.
54 /2 width=2 by lex_inv_atom_dx/ qed-.
56 lemma lpce_inv_bind_dx (h) (G):
57 ∀I2,L1,K2. ⦃G,L1⦄ ⊢ ⬌η[h] K2.ⓘ{I2} →
58 ∃∃I1,K1. ⦃G,K1⦄ ⊢ ⬌η[h] K2 & ⦃G,K1⦄ ⊢ I1 ⬌η[h] I2 & L1 = K1.ⓘ{I1}.
59 /2 width=1 by lex_inv_bind_dx/ qed-.
61 (* Advanced inversion lemmas ************************************************)
63 lemma lpce_inv_unit_sn (h) (G):
64 ∀I,L2,K1. ⦃G,K1.ⓤ{I}⦄ ⊢ ⬌η[h] L2 →
65 ∃∃K2. ⦃G, K1⦄ ⊢ ⬌η[h] K2 & L2 = K2.ⓤ{I}.
66 /2 width=1 by lex_inv_unit_sn/ qed-.
68 lemma lpce_inv_pair_sn (h) (G):
69 ∀I,L2,K1,V1. ⦃G,K1.ⓑ{I}V1⦄ ⊢ ⬌η[h] L2 →
70 ∃∃K2,V2. ⦃G,K1⦄ ⊢ ⬌η[h] K2 & ⦃G,K1⦄ ⊢ V1 ⬌η[h] V2 & L2 = K2.ⓑ{I}V2.
71 /2 width=1 by lex_inv_pair_sn/ qed-.
73 lemma lpce_inv_unit_dx (h) (G):
74 ∀I,L1,K2. ⦃G,L1⦄ ⊢ ⬌η[h] K2.ⓤ{I} →
75 ∃∃K1. ⦃G,K1⦄ ⊢ ⬌η[h] K2 & L1 = K1.ⓤ{I}.
76 /2 width=1 by lex_inv_unit_dx/ qed-.
78 lemma lpce_inv_pair_dx (h) (G):
79 ∀I,L1,K2,V2. ⦃G,L1⦄ ⊢ ⬌η[h] K2.ⓑ{I}V2 →
80 ∃∃K1,V1. ⦃G,K1⦄ ⊢ ⬌η[h] K2 & ⦃G,K1⦄ ⊢ V1 ⬌η[h] V2 & L1 = K1.ⓑ{I}V1.
81 /2 width=1 by lex_inv_pair_dx/ qed-.
83 lemma lpce_inv_pair (h) (G):
84 ∀I1,I2,L1,L2,V1,V2. ⦃G,L1.ⓑ{I1}V1⦄ ⊢ ⬌η[h] L2.ⓑ{I2}V2 →
85 ∧∧ ⦃G,L1⦄ ⊢ ⬌η[h] L2 & ⦃G,L1⦄ ⊢ V1 ⬌η[h] V2 & I1 = I2.
86 /2 width=1 by lex_inv_pair/ qed-.