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 "delayed_updating/reduction/ibfr.ma".
16 include "delayed_updating/substitution/fsubst_constructors.ma".
17 include "delayed_updating/substitution/fsubst_eq.ma".
18 include "delayed_updating/substitution/lift_prototerm_eq.ma".
19 include "delayed_updating/syntax/prototerm_constructors_eq.ma".
21 (* IMMEDIATE BALANCED FOCUSED REDUCTION *************************************)
23 (* Constructions with constructors for prototerm ****************************)
25 lemma ibfr_abst_hd (t1) (t2) (r):
26 t1 ā”š¢šš[r] t2 ā š.t1 ā”š¢šš[šār] š.t2.
28 #p #b #q #m #n #Hr #Hb #Hm #Hn #Ht1 #Ht2 destruct
29 @(ex6_5_intro ā¦ (šāp) ā¦ Hb Hm Hn) -Hb -Hm -Hn
31 | -Ht2 /2 width=1 by in_comp_abst_hd/
32 | @(subset_eq_trans ā¦ (abst_eq_repl ā¦ Ht2)) -Ht1 -Ht2
33 @(subset_eq_canc_sn ā¦ (fsubst_abst_hd ā¦)) @abst_eq_repl
34 @fsubst_eq_repl // @lift_term_eq_repl_dx
35 >list_cons_shift @(subset_eq_canc_sn ā¦ (grafted_abst_hd ā¦ )) //
39 lemma ibfr_appl_hd (v) (t1) (t2) (r):
40 t1 ā”š¢šš[r] t2 ā ļ¼ v.t1 ā”š¢šš[šār] ļ¼ v.t2.
42 #p #b #q #m #n #Hr #Hb #Hm #Hn #Ht1 #Ht2 destruct
43 @(ex6_5_intro ā¦ (šāp) ā¦ Hb Hm Hn) -Hb -Hm -Hn
45 | -Ht2 /2 width=1 by in_comp_appl_hd/
46 | @(subset_eq_trans ā¦ (appl_eq_repl ā¦ Ht2)) -Ht1 -Ht2 [|*: // ]
47 @(subset_eq_canc_sn ā¦ (fsubst_appl_hd ā¦)) @appl_eq_repl [ // ]
48 @fsubst_eq_repl // @lift_term_eq_repl_dx
49 >list_cons_shift @(subset_eq_canc_sn ā¦ (grafted_appl_hd ā¦ )) //
53 lemma ibfr_appl_sd (v1) (v2) (t) (r):
54 v1 ā”š¢šš[r] v2 ā ļ¼ v1.t ā”š¢šš[š¦ār] ļ¼ v2.t.
56 #p #b #q #m #n #Hr #Hb #Hm #Hn #Hv1 #Hv2 destruct
57 @(ex6_5_intro ā¦ (š¦āp) ā¦ Hb Hm Hn) -Hb -Hm -Hn
59 | -Hv2 /2 width=1 by in_comp_appl_sd/
60 | @(subset_eq_trans ????? (appl_eq_repl ā¦)) [3: @Hv2 |2,4: // |5: skip ]
61 @(subset_eq_canc_sn ā¦ (fsubst_appl_sd ā¦)) @appl_eq_repl [| // ]
62 @fsubst_eq_repl // @lift_term_eq_repl_dx
63 >list_cons_shift @(subset_eq_canc_sn ā¦ (grafted_appl_sd ā¦ )) //
67 lemma ibfr_beta_0 (v) (t) (q) (n):
68 q Ļµ šāØā»,nā© ā qāš±ān Ļµ t ā
69 ļ¼ v.š.t ā”š¢šš[šāšāq] ļ¼ v.š.(t[āqāš ”[š®āØānā©]v]).
71 @(ex6_5_intro ā¦ (š) (š) q (š) ā¦ Hn) -Hn
75 | /3 width=1 by in_comp_appl_hd, in_comp_abst_hd/
76 | @(subset_eq_canc_sn ā¦ (fsubst_appl_hd ā¦)) @appl_eq_repl [ // ]
77 @(subset_eq_canc_sn ā¦ (fsubst_abst_hd ā¦)) @abst_eq_repl
78 @fsubst_eq_repl // <nplus_zero_sn @lift_term_eq_repl_dx
79 >list_cons_comm @(subset_eq_canc_sn ā¦ (grafted_appl_sd ā¦ ))
80 @(subset_eq_canc_sn ā¦ (grafted_empty_dx ā¦ )) //
84 lemma ibfr_beta_1 (v) (v1) (t) (q) (n):
85 q Ļµ šāØā»,nā© ā qāš±ān Ļµ t ā
86 ļ¼ v.ļ¼ v1.š.š.t ā”š¢šš[šāšāšāšāq] ļ¼ v.ļ¼ v1.š.š.(t[āqāš ”[š®āØāānā©]v]).
87 #v #v1 #t #q #n #Hn #Ht
88 @(ex6_5_intro ā¦ (š) (šāšāš) q (š) ā¦ Hn) -Hn
90 | /2 width=1 by pbc_empty, pbc_redex/
91 | /3 width=1 by pcc_A_sn, pcc_L_sn, pcc_empty/
92 | /5 width=1 by in_comp_appl_hd, in_comp_abst_hd/
93 | @(subset_eq_canc_sn ā¦ (fsubst_appl_hd ā¦)) @appl_eq_repl [ // ]
94 @(subset_eq_canc_sn ā¦ (fsubst_appl_hd ā¦)) @appl_eq_repl [ // ]
95 @(subset_eq_canc_sn ā¦ (fsubst_abst_hd ā¦)) @abst_eq_repl
96 @(subset_eq_canc_sn ā¦ (fsubst_abst_hd ā¦)) @abst_eq_repl
97 @fsubst_eq_repl // <nplus_unit_sn @lift_term_eq_repl_dx
98 >list_cons_comm @(subset_eq_canc_sn ā¦ (grafted_appl_sd ā¦ ))
99 @(subset_eq_canc_sn ā¦ (grafted_empty_dx ā¦ )) //