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/reduction/cpr.ma".
16 include "apps_2/models/model_drop.ma".
18 (* MODEL ********************************************************************)
20 (* Forward lemmas on context-sensitive parallel reduction for terms *********)
22 lemma sound_fwd_cpr: ∀M. sound M → extensional M →
23 ∀sv,gv,G,L,T1,T2. ⦃G, L⦄ ⊢ T1 ➡ T2 →
24 ∀lv. lv ∈ 〚L〛⦋M⦌{sv, gv} → 〚T1〛{sv, gv, lv} = 〚T2〛{sv, gv, lv}.
25 #M #H1M #H2M #sv #gv #G #L #T1 #T2 #H elim H -G -L -T1 -T2 //
26 [ #G #L #K #V1 #V2 #W2 #i #HLK #_ #HVW2 #IHV12 #lv #Hlv >(m2 … H1M)
27 <(sound_fwd_lift … H1M H2M … HVW2) -HVW2
28 lapply (sound_drop … HLK … Hlv) // -L -H2M #H
29 elim (li_inv_ldef … H) -H #v #HK #H
30 elim (lower_inv_raise_be … H) -H #H >H -H #Hlv
31 <IHV12 -IHV12 /3 width=3 by sound_ti_eq_l, li_veq, veq_sym/
32 | #a * #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #lv #Hlv
33 [ >(m4 … H1M) >(m4 … H1M) -H1M <IHV12 -IHV12 /3 width=1 by li_ldef/
34 | @(mx … H2M) -H2M /3 width=1 by li_ldec/
36 | * #G #L #V1 #V2 #T1 #T2 #_ #_ #IHV12 #IHT12 #lv #Hlv
37 [ >(m6 … H1M) >(m6 … H1M) -H1M /3 width=1 by eq_f2/
38 | -IHV12 >(m7 … H1M) >(m7 … H1M) -H1M /2 width=1 by/
40 | #G #L #V #U1 #U2 #T2 #_ #HTU2 #IHU12 #lv #Hlv >(m4 … H1M)
41 >IHU12 -IHU12 /2 width=1 by li_ldef/
42 <(sound_fwd_lift … H1M H2M … HTU2) -H2M -HTU2
43 /2 width=1 by sound_ti_eq_l/
44 | #G #L #V #T1 #T2 #_ #IHT12 #lv #Hlv >(m7 … H1M) -H1M /2 width=1 by/
45 | #a #G #L #V1 #V2 #W1 #w2 #T1 #T2 #_ #_ #_ #IHV12 #_ #IHT12 #lv #Hlv
46 >(m6 … H1M) >(m8 … H1M) >(m4 … H1M) >(m7 … H1M) -H1M
47 >IHV12 -IHV12 /3 width=1 by li_ldec/
48 | #a #G #L #V1 #V2 #W2 #U1 #U2 #T1 #T2 #_ #HVW2 #_ #_ #IHV12 #IHU12 #IHT12 #lv #Hlv
49 >(m6 … H1M) >(m4 … H1M) >(m4 … H1M) >(m6 … H1M)
50 >IHV12 -IHV12 // <IHU12 -IHU12 // @eq_f2 /3 width=1 by li_ldef/
51 <(sound_fwd_lift … H1M H2M … HVW2) -H2M -HVW2
52 /2 width=1 by sound_ti_eq_l/