]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma
update in ground
[helm.git] / matita / matita / contribs / lambdadelta / delayed_updating / reduction / dfr_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/dfr.ma".
16 include "delayed_updating/reduction/ifr.ma".
17
18 include "delayed_updating/substitution/fsubst_lift.ma".
19 include "delayed_updating/substitution/fsubst_eq.ma".
20 include "delayed_updating/substitution/lift_constructors.ma".
21 include "delayed_updating/substitution/lift_prototerm_eq.ma".
22 include "delayed_updating/substitution/lift_path_head.ma".
23 include "delayed_updating/substitution/lift_rmap_head.ma".
24
25 (* DELAYED FOCUSED REDUCTION ************************************************)
26
27 (* Constructions with lift **************************************************)
28
29 theorem dfr_lift_bi (f) (p) (q) (t1) (t2):
30         t1 āž”ššŸ[p,q] t2 ā†’ ā†‘[f]t1 āž”ššŸ[ā†‘[f]p,ā†‘[ā†‘[pā—–š—”ā—–š—Ÿ]f]q] ā†‘[f]t2.
31 #f #p #q #t1 #t2
32 * #n * #H1n #Ht1 #Ht2
33 @(ex_intro ā€¦ ((ā†‘[pā—š—”ā——š—Ÿā——q]f)ļ¼ ā§£āØnā©)) @and3_intro
34 [ -Ht1 -Ht2
35   <lift_rmap_L_dx >lift_path_L_sn
36   >list_append_rcons_sn in H1n; <reverse_append #H1n
37   <(lift_path_head ā€¦ H1n) -H1n //
38 | lapply (in_comp_lift_path_term f ā€¦ Ht1) -Ht2 -Ht1 -H1n
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 [ // | // ]
44   @(subset_eq_trans ā€¦ (lift_term_iref ā€¦))
45   @iref_eq_repl
46   @(subset_eq_canc_sn ā€¦ (lift_term_grafted_S ā€¦))
47   @lift_term_eq_repl_sn
48 (* Note: crux of the proof begins *)
49   >list_append_rcons_sn in H1n; #H1n >lift_rmap_A_dx
50   /2 width=1 by tls_lift_rmap_append_closed/
51 (* Note: crux of the proof ends *)
52 ]
53 qed.