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/unfold/lifts_lifts.ma".
16 include "Basic_2/unfold/ldrops_ldrops.ma".
17 include "Basic_2/static/aaa_lifts.ma".
18 include "Basic_2/static/aaa_aaa.ma".
19 include "Basic_2/computation/lsubc_ldrops.ma".
21 (* ABSTRACT COMPUTATION PROPERTIES ******************************************)
23 (* Main propertis ***********************************************************)
25 theorem aacr_aaa_csubc_lifts: ∀RR,RS,RP.
26 acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
27 ∀L1,T,A. L1 ⊢ T ÷ A → ∀L0,des. ⇩*[des] L0 ≡ L1 →
28 ∀T0. ⇧*[des] T ≡ T0 → ∀L2. L2 [RP] ⊑ L0 →
30 #RR #RS #RP #H1RP #H2RP #L1 #T #A #H elim H -L1 -T -A
31 [ #L #k #L0 #des #HL0 #X #H #L2 #HL20
32 >(lifts_inv_sort1 … H) -H
33 lapply (aacr_acr … H1RP H2RP ⓪) #HAtom
34 @(s2 … HAtom … ◊) // /2 width=2/
35 | #I #L1 #K1 #V1 #B #i #HLK1 #HKV1B #IHB #L0 #des #HL01 #X #H #L2 #HL20
36 lapply (aacr_acr … H1RP H2RP B) #HB
37 elim (lifts_inv_lref1 … H) -H #i1 #Hi1 #H destruct
38 lapply (ldrop_fwd_ldrop2 … HLK1) #HK1b
39 elim (ldrops_ldrop_trans … HL01 … HLK1) #X #des1 #i0 #HL0 #H #Hi0 #Hdes1
40 >(at_mono … Hi1 … Hi0) -i1
41 elim (ldrops_inv_skip2 … Hdes1 … H) -des1 #K0 #V0 #des0 #Hdes0 #HK01 #HV10 #H destruct
42 elim (lsubc_ldrop_O1_trans … HL20 … HL0) -HL0 #X #HLK2 #H
43 elim (lsubc_inv_pair2 … H) -H *
44 [ #K2 #HK20 #H destruct
45 generalize in match HLK2; generalize in match I; -HLK2 -I * #HLK2
46 [ elim (lift_total V0 0 (i0 +1)) #V #HV0
47 elim (lifts_lift_trans … Hi0 … Hdes0 … HV10 … HV0) -HV10 #V2 #HV12 #HV2
48 @(s4 … HB … ◊ … HV0 HLK2) /3 width=7/ (* uses IHB HL20 V2 HV0 *)
49 | @(s2 … HB … ◊) // /2 width=3/
51 | -HLK1 -IHB -HL01 -HL20 -HK1b -Hi0 -Hdes0
52 #K2 #V2 #A2 #HKV2A #HKV0A #_ #H1 #H2 destruct
53 lapply (ldrop_fwd_ldrop2 … HLK2) #HLK2b
54 lapply (aaa_lifts … HK01 … HV10 HKV1B) -HKV1B -HK01 -HV10 #HKV0B
55 >(aaa_mono … HKV0A … HKV0B) in HKV2A; -HKV0A -HKV0B #HKV2B
56 elim (lift_total V2 0 (i0 +1)) #V #HV2
57 @(s4 … HB … ◊ … HV2 HLK2)
60 | #L #V #T #B #A #_ #_ #IHB #IHA #L0 #des #HL0 #X #H #L2 #HL20
61 elim (lifts_inv_bind1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct
62 lapply (aacr_acr … H1RP H2RP A) #HA
63 lapply (aacr_acr … H1RP H2RP B) #HB
64 lapply (s1 … HB) -HB #HB
65 @(s5 … HA … ◊ ◊) // /3 width=5/
66 | #L #W #T #B #A #HLWB #_ #IHB #IHA #L0 #des #HL0 #X #H #L2 #HL02
67 elim (lifts_inv_bind1 … H) -H #W0 #T0 #HW0 #HT0 #H destruct
68 @(aacr_abst … H1RP H2RP)
69 [ lapply (aacr_acr … H1RP H2RP B) #HB
70 @(s1 … HB) /2 width=5/
72 #L3 #V3 #T3 #des3 #HL32 #HT03 #HB
73 elim (lifts_total des3 W0) #W2 #HW02
74 elim (ldrops_lsubc_trans … H1RP H2RP … HL32 … HL02) -L2 #L2 #HL32 #HL20
75 lapply (aaa_lifts … L2 W2 … (des @ des3) … HLWB) -HLWB /2 width=3/ #HLW2B
76 @(IHA (L2. ⓛW2) … (des + 1 @ des3 + 1)) -IHA
77 /2 width=3/ /3 width=5/
79 | #L #V #T #B #A #_ #_ #IHB #IHA #L0 #des #HL0 #X #H #L2 #HL20
80 elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct
82 | #L #V #T #A #_ #_ #IH1A #IH2A #L0 #des #HL0 #X #H #L2 #HL20
83 elim (lifts_inv_flat1 … H) -H #V0 #T0 #HV0 #HT0 #H destruct
84 lapply (aacr_acr … H1RP H2RP A) #HA
86 @(s6 … HA … ◊) /2 width=5/ /3 width=5/
90 lemma aacr_aaa: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
91 ∀L,T,A. L ⊢ T ÷ A → ⦃L, T⦄ [RP] ϵ 〚A〛.
94 lemma acp_aaa: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
95 ∀L,T,A. L ⊢ T ÷ A → RP L T.
96 #RR #RS #RP #H1RP #H2RP #L #T #A #HT
97 lapply (aacr_acr … H1RP H2RP A) #HA
98 @(s1 … HA) /2 width=4/