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 "Basic_2/computation/acp_cr.ma".
17 (* LOCAL ENVIRONMENT REFINEMENT FOR ABSTRACT CANDIDATES OF REDUCIBILITY *****)
19 inductive lsubc (RP:lenv→predicate term): relation lenv ≝
20 | lsubc_atom: lsubc RP (⋆) (⋆)
21 | lsubc_pair: ∀I,L1,L2,V. lsubc RP L1 L2 → lsubc RP (L1. 𝕓{I} V) (L2. 𝕓{I} V)
22 | lsubc_abbr: ∀L1,L2,V,W,A. ⦃L1, V⦄ [RP] ϵ 〚A〛 → ⦃L2, W⦄ [RP] ϵ 〚A〛 →
23 lsubc RP L1 L2 → lsubc RP (L1. 𝕓{Abbr} V) (L2. 𝕓{Abst} W)
27 "local environment refinement (abstract candidates of reducibility)"
28 'CrSubEq L1 RP L2 = (lsubc RP L1 L2).
30 (* Basic inversion lemmas ***************************************************)
32 fact lsubc_inv_pair2_aux: ∀RP,L1,L2. L1 [RP] ⊑ L2 → ∀I,K2,W. L2 = K2. 𝕓{I} W →
33 (∃∃K1. K1 [RP] ⊑ K2 & L1 = K1. 𝕓{I} W) ∨
34 ∃∃K1,V,A. ⦃K1, V⦄ [RP] ϵ 〚A〛 & ⦃K2, W⦄ [RP] ϵ 〚A〛 &
35 K1 [RP] ⊑ K2 & L1 = K1. 𝕓{Abbr} V &
38 [ #I #K2 #W #H destruct
39 | #J #L1 #L2 #V #HL12 #I #K2 #W #H destruct /3 width=3/
40 | #L1 #L2 #V1 #W2 #A #H #HV1 #HW2 #I #K2 #W #H destruct /3 width=7/
44 lemma lsubc_inv_pair2: ∀RP,I,L1,K2,W. L1 [RP] ⊑ K2. 𝕓{I} W →
45 (∃∃K1. K1 [RP] ⊑ K2 & L1 = K1. 𝕓{I} W) ∨
46 ∃∃K1,V,A. ⦃K1, V⦄ [RP] ϵ 〚A〛 & ⦃K2, W⦄ [RP] ϵ 〚A〛 &
47 K1 [RP] ⊑ K2 & L1 = K1. 𝕓{Abbr} V &
51 (* Basic properties *********************************************************)
53 lemma lsubc_refl: ∀RP,L. L [RP] ⊑ L.
54 #RP #L elim L -L // /2 width=1/