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/dbfr_constructors.ma".
16 include "delayed_updating/reduction/ibfr_constructors.ma".
17 include "delayed_updating/unwind/unwind2_prototerm_constructors.ma".
18 include "delayed_updating/substitution/lift_prototerm_constructors.ma".
19 include "ground/arith/pnat_two.ma".
21 (* DELAYED BALANCED FOCUSED REDUCTION ***************************************)
23 (* Example of unprotected balanced β-reduction ******************************)
25 definition l3_t: prototerm ≝
26 (𝛌.@(𝛌.⧣𝟏).𝛌.@(⧣𝟐).⧣𝟏).
28 definition l3_i1: prototerm ≝
29 (𝛌.@(𝛌.⧣𝟏).𝛌.@(⧣𝟐).𝛌.⧣𝟏).
31 definition l3_i2: prototerm ≝
32 (𝛌.@(𝛌.⧣𝟏).𝛌.@(⧣𝟐).𝛌.⧣↑𝟐).
34 definition l3_i2': prototerm ≝
35 (𝛌.@(𝛌.⧣𝟏).𝛌.@(⧣𝟐).𝛌.⧣↑↑𝟐).
37 definition l3_d1: prototerm ≝
38 (𝛌.@(𝛌.⧣𝟏).𝛌.@(⧣𝟐).𝛕𝟏.(𝛌.⧣𝟏)).
40 definition l3_d2: prototerm ≝
41 (𝛌.@(𝛌.⧣𝟏).𝛌.@(⧣𝟐).𝛕𝟏.𝛌.(⧣𝟐)).
43 definition l3_d2': prototerm ≝
44 (𝛌.@(𝛌.⧣𝟏).𝛌.@(⧣𝟐).𝛕𝟏.𝛌.𝛕𝟏.(⧣𝟐)).
47 l3_t ➡𝐢𝐛𝐟[𝗟◗𝗔◗𝗟◗𝗔◗𝐞] l3_i1.
50 [ | @(ibfr_beta_0 … (𝟎))
51 [ /2 width=1 by pcc_A_sn, pcc_empty/
52 | >list_append_lcons_sn /2 width=1 by in_comp_appl_hd/
57 @(subset_eq_canc_sn … (fsubst_appl_hd …))
59 @(subset_eq_canc_sn … (fsubst_empty_rc …))
60 @(subset_eq_canc_sn … (lift_term_abst …))
62 @(subset_eq_canc_sn … (lift_term_oref_pap … )) //
66 l3_i1 ➡𝐢𝐛𝐟[𝗟◗𝗔◗𝗟◗𝗔◗𝗟◗𝐞] l3_i2.
70 @ibfr_eq_trans [| @ibfr_beta_0 // ]
73 @(subset_eq_canc_sn … (fsubst_empty_rc …))
74 @(subset_eq_canc_sn … (lift_term_oref_pap … )) //
78 l3_t ➡𝐝𝐛𝐟[𝗟◗𝗔◗𝗟◗𝗔◗𝐞] l3_d1.
81 [ | @(dbfr_beta_0 … (𝟎))
82 [ /2 width=1 by pcc_A_sn, pcc_empty/
83 | >list_append_lcons_sn /2 width=1 by in_comp_appl_hd/
88 @(subset_eq_canc_sn … (fsubst_appl_hd …))
90 @(subset_eq_canc_sn … (fsubst_empty_rc …))
96 @(subset_eq_canc_sn … (unwind2_term_abst …)) @abst_eq_repl
97 @(subset_eq_canc_sn … (unwind2_term_appl …)) @appl_eq_repl
98 [ @(subset_eq_canc_sn … (unwind2_term_abst …)) @abst_eq_repl
99 @(subset_eq_canc_sn … (unwind2_term_oref_pap …)) //
101 @(subset_eq_canc_sn … (unwind2_term_abst …)) @abst_eq_repl
102 @(subset_eq_canc_sn … (unwind2_term_appl …)) @appl_eq_repl
103 [ @(subset_eq_canc_sn … (unwind2_term_oref_pap …)) //
105 @(subset_eq_canc_sn … (unwind2_term_iref …))
106 @(subset_eq_canc_sn … (unwind2_term_abst …)) @abst_eq_repl
107 @(subset_eq_canc_sn … (unwind2_term_oref_pap …)) //
112 @(subset_eq_canc_sn … (unwind2_term_abst …)) @abst_eq_repl
113 @(subset_eq_canc_sn … (unwind2_term_appl …)) @appl_eq_repl
114 [ @(subset_eq_canc_sn … (unwind2_term_abst …)) @abst_eq_repl
115 @(subset_eq_canc_sn … (unwind2_term_oref_pap …)) //
117 @(subset_eq_canc_sn … (unwind2_term_abst …)) @abst_eq_repl
118 @(subset_eq_canc_sn … (unwind2_term_appl …)) @appl_eq_repl
119 [ @(subset_eq_canc_sn … (unwind2_term_oref_pap …)) //
121 @(subset_eq_canc_sn … (unwind2_term_iref …))
122 @(subset_eq_canc_sn … (unwind2_term_abst …)) @abst_eq_repl
123 @(subset_eq_canc_sn … (unwind2_term_iref …))
124 @(subset_eq_canc_sn … (unwind2_term_oref_pap …)) //