]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/basic_2A/etc/lpx_sn/cpr_llpx_sn.etc
milestone update in ground_2 and basic_2A
[helm.git] / matita / matita / contribs / lambdadelta / basic_2A / etc / lpx_sn / cpr_llpx_sn.etc
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/substitution/llpx_sn_ldrop.ma".
16 include "basic_2/reduction/cpr.ma".
17
18 (* CONTEXT-SENSITIVE PARALLEL REDUCTION FOR TERMS ***************************)
19
20 (* Properties on lazy sn pointwise extensions *******************************)
21
22 lemma cpr_llpx_sn_conf: ∀R. (∀I,L.reflexive … (R I L)) →
23                             (∀I.l_liftable (R I)) →
24                             (∀I.l_deliftable_sn (R I)) →
25                         ∀G. s_r_confluent1 … (cpr G) (llpx_sn R 0).
26 #R #H1R #H2R #H3R #G #Ls #T1 #T2 #H elim H -G -Ls -T1 -T2
27 [ //
28 | #G #Ls #Ks #V1s #V2s #W2s #i #HLKs #_ #HVW2s #IHV12s #Ld #H elim (llpx_sn_inv_lref_ge_sn … H … HLKs) // -H
29   #Kd #V1d #HLKd #HV1s #HV1sd
30   lapply (ldrop_fwd_drop2 … HLKs) -HLKs #HLKs
31   lapply (ldrop_fwd_drop2 … HLKd) -HLKd #HLKd
32   @(llpx_sn_lift_le … HLKs HLKd … HVW2s) -HLKs -HLKd -HVW2s /2 width=1 by/ (**) (* full auto too slow *)
33 | #a #I #G #Ls #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #Ld #H elim (llpx_sn_inv_bind_O … H) -H
34   /4 width=5 by llpx_sn_bind_repl_SO, llpx_sn_bind/
35 | #I #G #Ls #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #Ld #H elim (llpx_sn_inv_flat … H) -H
36   /3 width=1 by llpx_sn_flat/
37 | #G #Ls #V #T1 #T2 #T #_ #HT2 #IHT12 #Ld #H elim (llpx_sn_inv_bind_O … H) -H
38   /3 width=10 by llpx_sn_inv_lift_le, ldrop_drop/
39 | #G #Ls #V #T1 #T2 #_ #IHT12 #Ld #H elim (llpx_sn_inv_flat … H) -H /2 width=1 by/
40 | #a #G #Ls #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV12 #IHW12 #IHT12 #Ld #H elim (llpx_sn_inv_flat … H) -H
41   #HV1 #H elim (llpx_sn_inv_bind_O … H) -H
42   /4 width=5 by llpx_sn_bind_repl_SO, llpx_sn_flat, llpx_sn_bind/
43 | #a #G #Ls #V1 #V2 #V #W1 #W2 #T1 #T2 #_ #HV2 #_ #_ #IHV12 #IHW12 #IHT12 #Ld #H elim (llpx_sn_inv_flat … H) -H
44   #HV1 #H elim (llpx_sn_inv_bind_O … H) -H //
45   #HW1 #HT1 @llpx_sn_bind_O /2 width=1 by/ @llpx_sn_flat (**) (* full auto too slow *)
46   [ /3 width=10 by llpx_sn_lift_le, ldrop_drop/
47   | /3 width=4 by llpx_sn_bind_repl_O/
48 ]
49 qed-.