(**************************************************************************) (* ___ *) (* ||M|| *) (* ||A|| A project by Andrea Asperti *) (* ||T|| *) (* ||I|| Developers: *) (* ||T|| The HELM team. *) (* ||A|| http://helm.cs.unibo.it *) (* \ / *) (* \ / This file is distributed under the terms of the *) (* v GNU General Public License Version 2 *) (* *) (**************************************************************************) include "delayed_updating/reduction/dbfr.ma". include "delayed_updating/substitution/fsubst_constructors.ma". include "delayed_updating/substitution/fsubst_eq.ma". include "delayed_updating/syntax/prototerm_constructors_eq.ma". (* DELAYED BALANCED FOCUSED REDUCTION ***************************************) (* Constructions with constructors for prototerm ****************************) lemma dbfr_abst_hd (t1) (t2) (r): t1 āž”šš›šŸ[r] t2 → š›Œ.t1 āž”šš›šŸ[š—Ÿā——r] š›Œ.t2. #t1 #t2 #r * #p #b #q #m #n #Hr #Hb #Hm #Hn #Ht1 #Ht2 destruct @(ex6_5_intro … (š—Ÿā——p) … Hb Hm Hn) -Hb -Hm -Hn [ -Ht2 // | -Ht2 /2 width=1 by in_comp_abst_hd/ | @(subset_eq_trans … (abst_eq_repl … Ht2)) -Ht1 -Ht2 @(subset_eq_canc_sn … (fsubst_abst_hd …)) @abst_eq_repl @fsubst_eq_repl // @iref_eq_repl >list_cons_shift @(subset_eq_canc_sn … (grafted_abst_hd … )) // ] qed. lemma dbfr_appl_hd (v) (t1) (t2) (r): t1 āž”šš›šŸ[r] t2 → ļ¼ v.t1 āž”šš›šŸ[š—”ā——r] ļ¼ v.t2. #v #t1 #t2 #r * #p #b #q #m #n #Hr #Hb #Hm #Hn #Ht1 #Ht2 destruct @(ex6_5_intro … (š—”ā——p) … Hb Hm Hn) -Hb -Hm -Hn [ -Ht2 // | -Ht2 /2 width=1 by in_comp_appl_hd/ | @(subset_eq_trans … (appl_eq_repl … Ht2)) -Ht1 -Ht2 [|*: // ] @(subset_eq_canc_sn … (fsubst_appl_hd …)) @appl_eq_repl [ // ] @fsubst_eq_repl // @iref_eq_repl >list_cons_shift @(subset_eq_canc_sn … (grafted_appl_hd … )) // ] qed. lemma dbfr_appl_sd (v1) (v2) (t) (r): v1 āž”šš›šŸ[r] v2 → ļ¼ v1.t āž”šš›šŸ[š—¦ā——r] ļ¼ v2.t. #v1 #v2 #t #r * #p #b #q #m #n #Hr #Hb #Hm #Hn #Hv1 #Hv2 destruct @(ex6_5_intro … (š—¦ā——p) … Hb Hm Hn) -Hb -Hm -Hn [ -Hv2 // | -Hv2 /2 width=1 by in_comp_appl_sd/ | @(subset_eq_trans ????? (appl_eq_repl …)) [3: @Hv2 |2,4: // |5: skip ] @(subset_eq_canc_sn … (fsubst_appl_sd …)) @appl_eq_repl [| // ] @fsubst_eq_repl // @iref_eq_repl >list_cons_shift @(subset_eq_canc_sn … (grafted_appl_sd … )) // ] qed. lemma dbfr_beta_0 (v) (t) (q) (n): q ϵ š‚āØā’»,nā© → qā—–š—±ā†‘n ϵ t → ļ¼ v.š›Œ.t āž”šš›šŸ[š—”ā——š—Ÿā——q] ļ¼ v.š›Œ.(t[ā‹”qā†š›•ā†‘n.v]). #v #t #q #n #Hn #Ht @(ex6_5_intro … (šž) (šž) q (šŸŽ) … Hn) -Hn [ // | // | // | /3 width=1 by in_comp_appl_hd, in_comp_abst_hd/ | @(subset_eq_canc_sn … (fsubst_appl_hd …)) @appl_eq_repl [ // ] @(subset_eq_canc_sn … (fsubst_abst_hd …)) @abst_eq_repl @fsubst_eq_repl // list_cons_comm @(subset_eq_canc_sn … (grafted_appl_sd … )) @(subset_eq_canc_sn … (grafted_empty_dx … )) // ] qed. (* lemma dbfr_beta_1 (v) (v1) (t) (q) (n): q ϵ š‚āØā’»,nā© → qā—–š—±ā†‘n ϵ t → ļ¼ v.ļ¼ v1.š›Œ.š›Œ.t āž”šš›šŸ[š—”ā——š—”ā——š—Ÿā——š—Ÿā——q] ļ¼ v.ļ¼ v1.š›Œ.š›Œ.(t[ā‹”qā†šŸ ”[š®āØā†‘ā†‘nā©]v]). #v #v1 #t #q #n #Hn #Ht @(ex6_5_intro … (šž) (š—”ā——š—Ÿā——šž) q (šŸ) … Hn) -Hn [ // | /2 width=1 by pbc_empty, pbc_redex/ | /3 width=1 by pcc_A_sn, pcc_L_sn, pcc_empty/ | /5 width=1 by in_comp_appl_hd, in_comp_abst_hd/ | @(subset_eq_canc_sn … (fsubst_appl_hd …)) @appl_eq_repl [ // ] @(subset_eq_canc_sn … (fsubst_appl_hd …)) @appl_eq_repl [ // ] @(subset_eq_canc_sn … (fsubst_abst_hd …)) @abst_eq_repl @(subset_eq_canc_sn … (fsubst_abst_hd …)) @abst_eq_repl @fsubst_eq_repl // list_cons_comm @(subset_eq_canc_sn … (grafted_appl_sd … )) @(subset_eq_canc_sn … (grafted_empty_dx … )) // ] qed. *)