]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/reduction/ifr_lift.ma
update in delayd_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / reduction / ifr_lift.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 "delayed_updating/reduction/ifr.ma".
16
17 include "delayed_updating/substitution/fsubst_lift.ma".
18 include "delayed_updating/substitution/fsubst_eq.ma".
19 include "delayed_updating/substitution/lift_prototerm_after.ma".
20 include "delayed_updating/substitution/lift_path_closed.ma".
21 include "delayed_updating/substitution/lift_rmap_closed.ma".
22
23 include "ground/relocation/tr_uni_compose.ma".
24 include "ground/relocation/tr_compose_eq.ma".
25
26 (* IMMEDIATE FOCUSED REDUCTION **********************************************)
27
28 (* Constructions with lift **************************************************)
29
30 theorem ifr_lift_bi (f) (t1) (t2) (r):
31         t1 โžก๐ข๐Ÿ[r] t2 โ†’ โ†‘[f]t1 โžก๐ข๐Ÿ[โ†‘[f]r] โ†‘[f]t2.
32 #f #t1 #t2 #r
33 * #p #q #n #Hr #Hn #Ht1 #Ht2 destruct
34 @(ex4_3_intro โ€ฆ (โ†‘[f]p) (โ†‘[โ†‘[pโ—–๐—”โ—–๐—Ÿ]f]q) ((โ†‘[pโ—๐—”โ——๐—Ÿโ——q]f)๏ผ ยงโจnโฉ))
35 [ -Hn -Ht1 -Ht2 //
36 | -Ht1 -Ht2
37   /2 width=1 by lift_path_rmap_closed_L/
38 | lapply (in_comp_lift_path_term f โ€ฆ Ht1) -Ht2 -Ht1 -Hn
39   <lift_path_d_dx #Ht1 //
40 | lapply (lift_term_eq_repl_dx f โ€ฆ Ht2) -Ht2 #Ht2 -Ht1
41   @(subset_eq_trans โ€ฆ Ht2) -t2
42   @(subset_eq_trans โ€ฆ (lift_term_fsubst โ€ฆ))
43   @fsubst_eq_repl [ // | <lift_path_append // ]
44   @(subset_eq_canc_sn โ€ฆ (lift_term_eq_repl_dx โ€ฆ))
45   [ @lift_term_grafted_S | skip ]
46   @(subset_eq_trans โ€ฆ (lift_term_after โ€ฆ))
47   @(subset_eq_canc_dx โ€ฆ (lift_term_after โ€ฆ))
48   @lift_term_eq_repl_sn
49 (* Note: crux of the proof begins *)
50   @(stream_eq_trans โ€ฆ (tr_compose_uni_dx_pap โ€ฆ)) <tr_pap_succ_nap
51   @tr_compose_eq_repl // >nsucc_unfold
52   /2 width=1 by tls_succ_lift_rmap_append_L_closed_dx/
53 (* Note: crux of the proof ends *)
54 ]
55 qed.