]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/apps_2/models/deq_cpr.ma
update in ground_2, static_2, basic_2, apps_2, alpha_1
[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_vpush/ | skip ] -W2
33   >vpush_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_vpush/ | skip ] -U
40   >vpush_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 ]
43     @mc [3:|*: /2 width=1 by/ ] -p
44     @(seq_trans … H1M) [2: @IHT /2 width=1 by li_abbr/ | skip ] -T1
45     /4 width=1 by ti_comp, vpush_comp, (* 2x *) veq_refl/
46   | /4 width=1 by li_abst, mx/
47   ]
48 | * #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #gv #lv #Hlv
49   [ @(mq … H1M) [4,5: /3 width=2 by seq_sym, ma/ |1,2: skip ]
50     /3 width=1 by mp/
51   | @(mq … H1M) [4,5: /3 width=2 by seq_sym, me/ |1,2: skip ]
52     /2 width=1 by/
53   ]
54 | #G #L #V #U1 #T1 #T2 #HTU1 #_ #IH #gv #lv #Hlv
55   @(mq … H1M)
56   [4: /3 width=2 by seq_sym, md/ | skip
57   |3: @(seq_trans … H1M) [2: @mz // | skip ]
58   ] /3 width=3 by lifts_SO_fwd_vpush, seq_sym/
59 | #G #L #V #T1 #T2 #_ #IH #gv #lv #Hlv
60   @(seq_trans … H1M) [2: @(me … H1M) | skip ]
61   /2 width=1 by/
62 | #p #G #L #V1 #V2 #W1 #W2 #T1 #T2 #_ #_ #_ #IHV #_ #IHT #gv #lv #Hlv
63   @(mq … H1M) [4,5: /3 width=2 by seq_sym, ma, md/ |1,2: skip ]
64   @(seq_trans … H1M) [3:|*: /2 width=2 by mb/ ]
65   @mc // -p [ /4 width=5 by seq_trans, seq_sym, me/ ]
66   @(seq_trans … H1M) [2: @IHT /2 width=1 by li_abst/ | skip ] -T1
67   @ti_comp /2 width=1 by veq_refl/
68   @vpush_comp /2 width=1 by veq_refl/
69   /4 width=5 by seq_trans, seq_sym, me/
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   @(mq … H1M)
73   [4: /4 width=2 by seq_sym, md, mp/ |1: skip
74   |5: /4 width=2 by seq_sym, ma, mc/ |2: skip
75   ]
76   @(seq_trans … H1M) [2: @mh // | skip ]
77   @mc [3:|*: /2 width=1 by mr/ ]
78   @mp [3:|*: /2 width=1 by lifts_SO_fwd_vpush/ ]
79   @(seq_trans … H1M) [2: @IHT /2 width=1 by li_abbr/ | skip ] -T1
80   /4 width=1 by ti_comp, vpush_comp, (* 2x *) veq_refl/
81 ]
82 qed-.