]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr_lift.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / reduction / ibfr_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/ibfr.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_structure.ma".
21 include "delayed_updating/substitution/lift_path_closed.ma".
22 include "delayed_updating/substitution/lift_path_guard.ma".
23 include "delayed_updating/substitution/lift_rmap_closed.ma".
24
25 include "ground/relocation/tr_uni_compose.ma".
26 include "ground/relocation/tr_compose_eq.ma".
27
28 (* IMMEDIATE BALANCED FOCUSED REDUCTION *************************************)
29
30 (* Constructions with lift **************************************************)
31
32 theorem ibfr_lift_bi (f) (t1) (t2) (r):
33         t1 โžก๐ข๐›๐Ÿ[r] t2 โ†’ ๐Ÿ ก[f]t1 โžก๐ข๐›๐Ÿ[๐Ÿ ก[f]r] ๐Ÿ ก[f]t2.
34 #f #t1 #t2 #r
35 * #p #b #q #m #n #Hr #Hp #Hb #Hm #Hn #Ht1 #Ht2 destruct
36 @(ex7_5_intro โ€ฆ (๐Ÿ ก[f]p) (๐Ÿ ก[๐Ÿ ข[f](pโ—–๐—”)]b) (๐Ÿ ก[๐Ÿ ข[f](pโ—–๐—”โ—bโ—–๐—Ÿ)]q) (๐Ÿ ข[f](pโ—๐—”โ——b)๏ผ โจmโฉ) (๐Ÿ ข[f](pโ—๐—”โ——bโ—๐—Ÿโ——q)๏ผ ยงโจnโฉ))
37 [ -Hp -Hb -Hm -Hn -Ht1 -Ht2 //
38 | -Hb -Hm -Hn -Ht1 -Ht2
39   /2 width=1 by lift_path_guard/
40 | -Hp -Hm -Hn -Ht1 -Ht2 //
41 | -Hp -Hb -Hn -Ht1 -Ht2
42   /2 width=1 by lift_path_closed/
43 | -Hp -Hb -Hm -Ht1 -Ht2
44   /2 width=1 by lift_path_rmap_closed_L/
45 | lapply (in_comp_lift_path_term f โ€ฆ Ht1) -Ht2 -Ht1 -Hp -Hn
46   <lift_path_d_dx #Ht1 //
47 | lapply (lift_term_eq_repl_dx f โ€ฆ Ht2) -Ht2 #Ht2 -Ht1 -Hp
48   @(subset_eq_trans โ€ฆ Ht2) -t2
49   @(subset_eq_trans โ€ฆ (lift_term_fsubst โ€ฆ))
50   @fsubst_eq_repl [ // | <lift_path_append // ]
51   @(subset_eq_canc_sn โ€ฆ (lift_term_eq_repl_dx โ€ฆ))
52   [ @lift_term_grafted_S | skip ]
53   @(subset_eq_trans โ€ฆ (lift_term_after โ€ฆ))
54   @(subset_eq_canc_dx โ€ฆ (lift_term_after โ€ฆ))
55   @lift_term_eq_repl_sn
56 (* Note: crux of the proof begins *)
57   @(stream_eq_trans โ€ฆ (tr_compose_uni_dx_pap โ€ฆ)) <tr_pap_succ_nap
58   @tr_compose_eq_repl
59   [ <list_append_rcons_sn <list_append_rcons_sn >list_append_assoc
60     >(nap_plus_lift_rmap_append_closed_Lq_dx โ€ฆ Hn) -Hn //
61   | >lift_rmap_A_dx >nsucc_unfold
62     /2 width=2 by tls_succ_plus_lift_rmap_append_closed_bLq_dx/
63   ]
64 (* Note: crux of the proof ends *)
65 ]
66 qed.