]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/apps_2/models/deq_cpr.ma
update in static_2 and app_2
[helm.git] / matita / matita / contribs / lambdadelta / apps_2 / models / deq_cpr.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/rt_transition/cpr.ma".
16 include "apps_2/models/veq_lifts.ma".
17 include "apps_2/models/deq.ma".
18
19 (* DENOTATIONAL EQUIVALENCE  ************************************************)
20
21 (* Forward lemmas with context-sensitive parallel reduction for terms *******)
22
23 lemma cpr_fwd_deq (h) (M): is_model M → is_extensional M →
24                            ∀G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡[h] T2 → ⦃G, L⦄ ⊢ T1 ≗{M} T2.
25 #h #M #H1M #H2M #G #L #T1 #T2 #H @(cpr_ind … H) -G -L -T1 -T2
26 [ /2 width=2 by deq_refl/
27 | #G #K #V1 #V2 #W2 #_ #IH #HVW2 #gv #v #H
28   elim (li_inv_abbr … H) -H // #lv #HK #H
29   @(mq … H1M) [4,5: @(ti_comp … H) /2 width=2 by veq_refl/ |1,2: skip ] -v
30   @(mq … H1M)
31   [4: /3 width=1 by seq_sym, ml/ | skip
32   |5: /2 width=2 by lifts_SO_fwd_vlift/ | skip ] -W2
33   >vlift_eq /2 width=1 by/
34 | #I #G #K #T #U #i #_ #IH #HTU #gv #v #H
35   elim (li_fwd_bind … H) // -H #lv #d #HK #H
36   @(mq … H1M) [4,5: @(ti_comp … H) /2 width=2 by veq_refl/ |1,2: skip ] -v
37   @(mq … H1M)
38   [4: /3 width=1 by seq_sym, ml/ | skip
39   |5: /2 width=2 by lifts_SO_fwd_vlift/ | skip ] -U
40   >vlift_gt /3 width=5 by ml, mq, mr/
41 | #p * #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #gv #lv #Hlv
42   [ @(mq … H1M) [4,5: /3 width=2 by seq_sym, md/ |1,2: skip ] -p
43     @(seq_trans … H1M) [2: @IHT /2 width=1 by li_abbr/ | skip ] -T1
44     /4 width=1 by ti_comp, vlift_comp, (* 2x *) veq_refl/
45   | /4 width=1 by li_abst, mx/
46   ]
47 | * #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #gv #lv #Hlv
48   [ @(mq … H1M) [4,5: /3 width=2 by seq_sym, ma/ |1,2: skip ]
49     /3 width=1 by mp/
50   | @(mq … H1M) [4,5: /3 width=2 by seq_sym, me/ |1,2: skip ]
51     /2 width=1 by/
52   ]
53 | #G #L #V #U1 #U2 #T2 #_ #IH #HTU2 #gv #lv #Hlv
54   @(mq … H1M)
55   [4: /3 width=2 by seq_sym, md/ | skip
56   |3: /3 width=1 by li_abbr/ | skip ] -L -U1
57   /3 width=1 by lifts_SO_fwd_vlift, seq_sym/
58 | #G #L #V #T1 #T2 #_ #IH #gv #lv #Hlv
59   @(seq_trans … H1M) [2: @(me … H1M) | skip ]
60   /2 width=1 by/
61 | #p #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV #_ #IHT #gv #lv #Hlv
62   @(mq … H1M) [4,5: /3 width=2 by seq_sym, ma, md/ |1,2: skip ]
63   @(mq … H1M)
64   [4: /3 width=2 by seq_sym, mb/ | skip
65   |5: @IHT /2 width=1 by li_abst/ | skip ] -T2
66   @ti_comp /2 width=1 by veq_refl/
67   @vlift_comp /2 width=1 by veq_refl/
68   @(mq … H1M) [4,5: /3 width=2 by seq_sym, me/ |1,2: skip ] -L -V1
69   /2 width=1 by mr/
70 | #p #G #L #V1 #V #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV #IHW #IHT #HV2 #gv #lv #Hlv
71   @(mq … H1M) [4,5: /3 width=2 by seq_sym, ma, md/ |1,2: skip ]
72   @(seq_trans … H1M) [3: /3 width=1 by seq_sym, ma/ | skip ]
73   @mp // [ @(seq_trans … H1M) /3 width=3 by lifts_SO_fwd_vlift/ ] -V1 -V -V2
74   @(mq … H1M)
75   [4: /3 width=2 by seq_sym, md/ | skip
76   |3: @IHT /2 width=1 by li_abbr/ | skip ] -T1
77   /4 width=1 by ti_comp, vlift_comp, (* 2x *) veq_refl/
78 ]
79 qed-.