From b1c5b3370653db6e495bbf6b3799cba592746cdd Mon Sep 17 00:00:00 2001 From: Ferruccio Guidi Date: Mon, 22 Aug 2022 00:43:28 +0200 Subject: [PATCH] partial update in delayed_updating + syntax and substitution components updated + path_head parked and replaced by path_closed + balanced reductions introduced and main theorem proved + minor corrections to notation --- .../head/downarrowright_2.etc} | 2 +- .../head/lift_path_head.etc} | 0 .../head/lift_rmap_head.etc} | 0 .../head/path_depth_labels.etc} | 0 .../path_head.ma => etc/head/path_head.etc} | 32 +++- .../head/path_head_depth.etc} | 0 .../head/path_head_structure.etc} | 0 .../head/path_height_labels.etc} | 0 .../head/path_labels.etc} | 0 .../head/path_structure_labels.etc} | 0 .../power_2.ma => etc/head/power_2.etc} | 0 .../functions/black_downtriangle_2.ma | 2 +- .../functions/black_righttriangle_2.ma | 2 +- .../notation/functions/circled_times_1.ma | 2 +- .../notation/functions/class_c_1.ma | 2 +- .../notation/functions/flat_1.ma | 2 +- .../notation/functions/tau_2.ma | 2 +- .../notation/functions/uparrow_2.ma | 2 +- .../notation/functions/uptriangle_1.ma | 2 +- .../relations/black_rightarrow_dbf_3.ma | 19 ++ .../relations/black_rightarrow_df_3.ma | 4 +- .../relations/black_rightarrow_ibf_3.ma | 19 ++ .../relations/black_rightarrow_if_3.ma | 4 +- .../delayed_updating/reduction/dbfr.ma | 38 ++++ .../delayed_updating/reduction/dbfr_ibfr.ma | 78 +++++++++ .../delayed_updating/reduction/dbfr_lift.ma | 51 ++++++ .../delayed_updating/reduction/dfr.ma | 1 - .../delayed_updating/reduction/dfr_lift.ma | 2 - .../delayed_updating/reduction/ibfr.ma | 39 +++++ .../substitution/lift_path_closed.ma | 33 ++++ .../substitution/lift_rmap_closed.ma | 36 ++++ .../delayed_updating/syntax/path_closed.ma | 162 ++++++++++++++++++ .../syntax/path_closed_height.ma | 27 +++ .../syntax/path_closed_structure.ma | 33 ++++ .../unwind/unwind2_rmap_head.ma | 2 +- 35 files changed, 579 insertions(+), 19 deletions(-) rename matita/matita/contribs/lambdadelta/delayed_updating/{notation/functions/downarrowright_2.ma => etc/head/downarrowright_2.etc} (95%) rename matita/matita/contribs/lambdadelta/delayed_updating/{substitution/lift_path_head.ma => etc/head/lift_path_head.etc} (100%) rename matita/matita/contribs/lambdadelta/delayed_updating/{substitution/lift_rmap_head.ma => etc/head/lift_rmap_head.etc} (100%) rename matita/matita/contribs/lambdadelta/delayed_updating/{syntax/path_depth_labels.ma => etc/head/path_depth_labels.etc} (100%) rename matita/matita/contribs/lambdadelta/delayed_updating/{syntax/path_head.ma => etc/head/path_head.etc} (78%) rename matita/matita/contribs/lambdadelta/delayed_updating/{syntax/path_head_depth.ma => etc/head/path_head_depth.etc} (100%) rename matita/matita/contribs/lambdadelta/delayed_updating/{syntax/path_head_structure.ma => etc/head/path_head_structure.etc} (100%) rename matita/matita/contribs/lambdadelta/delayed_updating/{syntax/path_height_labels.ma => etc/head/path_height_labels.etc} (100%) rename matita/matita/contribs/lambdadelta/delayed_updating/{syntax/path_labels.ma => etc/head/path_labels.etc} (100%) rename matita/matita/contribs/lambdadelta/delayed_updating/{syntax/path_structure_labels.ma => etc/head/path_structure_labels.etc} (100%) rename matita/matita/contribs/lambdadelta/delayed_updating/{notation/functions/power_2.ma => etc/head/power_2.etc} (100%) create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_dbf_3.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_ibf_3.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_ibfr.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_lift.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed_height.ma create mode 100644 matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_closed_structure.ma diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/downarrowright_2.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/downarrowright_2.etc similarity index 95% rename from matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/downarrowright_2.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/downarrowright_2.etc index 7531c6bcc..f086d72e2 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/downarrowright_2.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/downarrowright_2.etc @@ -14,6 +14,6 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) -notation "hvbox( ↳[ term 46 n ] break term 70 p )" +notation "hvbox( ↳[ break term 46 n ] break term 70 p )" non associative with precedence 70 for @{ 'DownArrowRight $n $p }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_head.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_path_head.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_head.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_path_head.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_head.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_rmap_head.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_head.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/lift_rmap_head.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_depth_labels.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_depth_labels.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_depth_labels.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_depth_labels.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head.etc similarity index 78% rename from matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head.etc index 4610e4f69..08054d900 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head.etc @@ -96,7 +96,35 @@ qed-. (* Constructions with path_append *******************************************) -lemma path_head_refl_append (p) (q) (n): +lemma path_head_refl_append_bi (p) (q) (m) (n): + p = ↳[m]p → q = ↳[n]q → p●q = ↳[n+m](p●q). +#p #q elim q -q +[ #m #n #Hp #H0 + <(eq_inv_path_empty_head … H0) -n // +| #l #q #IH #m #n #Hp + @(nat_ind_succ … n) -n // #n #_ + cases l [ #k ] + (IH … Hp Hq) in ⊢ (??%?); -IH -Hp -Hq + (IH … Hp Hq) in ⊢ (??%?); -IH -Hp -Hq // + | (IH … Hp Hq) in ⊢ (??%?); -IH -Hp -Hq // + | (IH … Hp Hq) in ⊢ (??%?); -IH -Hp -Hq // + | (IH … Hp Hq) in ⊢ (??%?); -IH -Hp -Hq // + ] +qed. + +lemma path_head_refl_append_sn (p) (q) (n): q = ↳[n]q → q = ↳[n](p●q). #p #q elim q -q [ #n #Hn <(eq_inv_path_empty_head … Hn) -Hn // @@ -116,7 +144,7 @@ qed-. (* Inversions with path_append **********************************************) -lemma eq_inv_path_head_refl_append (p) (q) (n): +lemma eq_inv_path_head_refl_append_sn (p) (q) (n): q = ↳[n](p●q) → q = ↳[n]q. #p #q elim q -q [ #n #Hn <(eq_inv_path_empty_head … Hn) -p // diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_depth.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head_depth.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_depth.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head_depth.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_structure.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head_structure.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_head_structure.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_head_structure.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_height_labels.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_height_labels.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_height_labels.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_height_labels.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_labels.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_labels.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_labels.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_labels.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_structure_labels.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_structure_labels.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/syntax/path_structure_labels.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/path_structure_labels.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/power_2.ma b/matita/matita/contribs/lambdadelta/delayed_updating/etc/head/power_2.etc similarity index 100% rename from matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/power_2.ma rename to matita/matita/contribs/lambdadelta/delayed_updating/etc/head/power_2.etc diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_downtriangle_2.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_downtriangle_2.ma index ddb2bc56d..8299e9384 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_downtriangle_2.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_downtriangle_2.ma @@ -14,6 +14,6 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) -notation "hvbox( ▼[ term 46 f ] break term 70 p )" +notation "hvbox( ▼[ break term 46 f ] break term 70 p )" non associative with precedence 70 for @{ 'BlackDownTriangle $f $p }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_righttriangle_2.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_righttriangle_2.ma index 90b075806..020fc5538 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_righttriangle_2.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/black_righttriangle_2.ma @@ -14,6 +14,6 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) -notation "hvbox( ▶[ term 46 f ] break term 70 p )" +notation "hvbox( ▶[ break term 46 f ] break term 70 p )" non associative with precedence 70 for @{ 'BlackRightTriangle $f $p }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/circled_times_1.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/circled_times_1.ma index 8c39289b5..a489dc8da 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/circled_times_1.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/circled_times_1.ma @@ -14,6 +14,6 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) -notation "hvbox( ⊗ term 70 p )" +notation "hvbox( ⊗ break term 70 p )" non associative with precedence 70 for @{ 'CircledTimes $p }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_1.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_1.ma index 41a736d62..352144291 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_1.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/class_c_1.ma @@ -14,6 +14,6 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) -notation "hvbox( 𝐂❨ term 46 n ❩ )" +notation "hvbox( 𝐂❨ break term 46 n ❩ )" non associative with precedence 70 for @{ 'ClassC $n }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/flat_1.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/flat_1.ma index 5d873910b..077255a35 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/flat_1.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/flat_1.ma @@ -14,6 +14,6 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) -notation "hvbox( ♭ term 70 p )" +notation "hvbox( ♭ break term 70 p )" non associative with precedence 70 for @{ 'Flat $p }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/tau_2.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/tau_2.ma index 099360cce..6d4dd8839 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/tau_2.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/tau_2.ma @@ -14,6 +14,6 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) -notation "hvbox( 𝛕 break term 76 n. break term 70 t )" +notation "hvbox( 𝛕 break term 76 n . break term 70 t )" non associative with precedence 70 for @{ 'Tau $n $t }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/uparrow_2.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/uparrow_2.ma index 2cbac4b24..b3123df7b 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/uparrow_2.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/uparrow_2.ma @@ -14,6 +14,6 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) -notation "hvbox( ↑[ term 46 t1 ] break term 70 t2 )" +notation "hvbox( ↑[ break term 46 t1 ] break term 70 t2 )" non associative with precedence 70 for @{ 'UpArrow $t1 $t2 }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/uptriangle_1.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/uptriangle_1.ma index df2bee52c..9a3516c7b 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/uptriangle_1.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/functions/uptriangle_1.ma @@ -14,6 +14,6 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) -notation "hvbox( ▵ term 70 t )" +notation "hvbox( ▵ break term 70 t )" non associative with precedence 70 for @{ 'UpTriangle $t }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_dbf_3.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_dbf_3.ma new file mode 100644 index 000000000..390aabf5e --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_dbf_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR DELAYED UPDATING ********************************************) + +notation "hvbox( t1 ➡𝐝𝐛𝐟[ break term 46 r ] break term 46 t2 )" + non associative with precedence 45 + for @{ 'BlackRightArrowDBF $t1 $r $t2 }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_df_3.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_df_3.ma index f50962063..1750f335b 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_df_3.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_df_3.ma @@ -15,5 +15,5 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) notation "hvbox( t1 ➡𝐝𝐟[ break term 46 r ] break term 46 t2 )" - non associative with precedence 45 - for @{ 'BlackRightArrowDF $t1 $r $t2 }. + non associative with precedence 45 + for @{ 'BlackRightArrowDF $t1 $r $t2 }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_ibf_3.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_ibf_3.ma new file mode 100644 index 000000000..12a1b0ff2 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_ibf_3.ma @@ -0,0 +1,19 @@ +(**************************************************************************) +(* ___ *) +(* ||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 *) +(* *) +(**************************************************************************) + +(* NOTATION FOR DELAYED UPDATING ********************************************) + +notation "hvbox( t1 ➡𝐢𝐛𝐟[ break term 46 r ] break term 46 t2 )" + non associative with precedence 45 + for @{ 'BlackRightArrowIBF $t1 $r $t2 }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_if_3.ma b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_if_3.ma index d2568773a..90fe54b75 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_if_3.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/notation/relations/black_rightarrow_if_3.ma @@ -15,5 +15,5 @@ (* NOTATION FOR DELAYED UPDATING ********************************************) notation "hvbox( t1 ➡𝐢𝐟[ break term 46 r ] break term 46 t2 )" - non associative with precedence 45 - for @{ 'BlackRightArrowIF $t1 $r $t2 }. + non associative with precedence 45 + for @{ 'BlackRightArrowIF $t1 $r $t2 }. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma new file mode 100644 index 000000000..349195cb0 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr.ma @@ -0,0 +1,38 @@ +(**************************************************************************) +(* ___ *) +(* ||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/substitution/fsubst.ma". +include "delayed_updating/syntax/prototerm_constructors.ma". +include "delayed_updating/syntax/prototerm_eq.ma". +include "delayed_updating/syntax/path_head.ma". +include "delayed_updating/syntax/path_balanced.ma". +include "delayed_updating/syntax/path_structure.ma". +include "delayed_updating/notation/relations/black_rightarrow_dbf_3.ma". +include "ground/arith/nat_rplus.ma". +include "ground/xoa/ex_6_5.ma". + +(* DELAYED BALANCED FOCUSED REDUCTION ***************************************) + +(**) (* explicit ninj because we cannot declare the expectd type of k *) +definition dbfr (r): relation2 prototerm prototerm ≝ + λt1,t2. + ∃∃p,b,q,h,k. p●𝗔◗b●𝗟◗q = r & + ⊗b ϵ 𝐁 & b = ↳[h]b & + (𝗟◗q) = ↳[ninj k](𝗟◗q) & r◖𝗱k ϵ t1 & + t1[⋔r←𝛕(k+h).(t1⋔(p◖𝗦))] ⇔ t2 +. + +interpretation + "balanced focused reduction with delayed updating (prototerm)" + 'BlackRightArrowDBF t1 r t2 = (dbfr r t1 t2). diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_ibfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_ibfr.ma new file mode 100644 index 000000000..043f61085 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_ibfr.ma @@ -0,0 +1,78 @@ +(**************************************************************************) +(* ___ *) +(* ||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/reduction/ibfr.ma". + +include "delayed_updating/unwind/unwind2_constructors.ma". +include "delayed_updating/unwind/unwind2_preterm_fsubst.ma". +include "delayed_updating/unwind/unwind2_preterm_eq.ma". +include "delayed_updating/unwind/unwind2_prototerm_lift.ma". +include "delayed_updating/unwind/unwind2_rmap_head.ma". + +include "delayed_updating/substitution/fsubst_eq.ma". +include "delayed_updating/substitution/lift_prototerm_eq.ma". + +include "delayed_updating/syntax/prototerm_proper_constructors.ma". +include "delayed_updating/syntax/path_head_structure.ma". +include "delayed_updating/syntax/path_structure_depth.ma". + +(* DELAYED BALANCED FOCUSED REDUCTION ***************************************) + +(* Main destructions with ibfr **********************************************) + +theorem dbfr_des_ibfr (f) (t1) (t2) (r): t1 ϵ 𝐓 → + t1 ➡𝐝𝐛𝐟[r] t2 → ▼[f]t1 ➡𝐢𝐛𝐟[⊗r] ▼[f]t2. +#f #t1 #t2 #r #H0t1 +* #p #b #q #h #k #Hr #Hb #Hh #H1k #Ht1 #Ht2 destruct +@(ex6_5_intro … (⊗p) (⊗b) (⊗q) (♭b) (↑♭q)) +[ -H0t1 -Hb -Hh -H1k -Ht1 -Ht2 // +| -H0t1 -Hh -H1k -Ht1 -Ht2 // +| -H0t1 -Hb -Ht1 -H1k -Ht2 + >Hh in ⊢ (??%?); >path_head_structure_depth structure_L_sn + >H1k in ⊢ (??%?); >path_head_structure_depth list_append_rcons_dx >list_append_assoc + lapply (unwind2_rmap_append_pap_closed f … (p●𝗔◗b) … H1k) -H1k + unwind2_rmap_A_dx + /2 width=1 by tls_unwind2_rmap_closed/ + ] +(* Note: crux of the proof ends *) + | // + | /2 width=2 by ex_intro/ + | // + ] +] +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_lift.ma new file mode 100644 index 000000000..f23728916 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dbfr_lift.ma @@ -0,0 +1,51 @@ +(**************************************************************************) +(* ___ *) +(* ||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_lift.ma". +include "delayed_updating/substitution/fsubst_eq.ma". +include "delayed_updating/substitution/lift_constructors.ma". +include "delayed_updating/substitution/lift_path_head.ma". +include "delayed_updating/substitution/lift_rmap_head.ma". + +(* DELAYED BALANCED FOCUSED REDUCTION ***************************************) + +(* Constructions with lift **************************************************) + +theorem dfr_lift_bi (f) (t1) (t2) (r): + t1 ➡𝐝𝐛𝐟[r] t2 → ↑[f]t1 ➡𝐝𝐛𝐟[↑[f]r] ↑[f]t2. +#f #t1 #t2 #r +* #p #q #k #Hr #H1k #Ht1 #Ht2 destruct +@(ex4_3_intro … (↑[f]p) (↑[↑[p◖𝗔◖𝗟]f]q) ((↑[p●𝗔◗𝗟◗q]f)@⧣❨k❩)) +[ -H1k -Ht1 -Ht2 // +| -Ht1 -Ht2 + lift_path_L_sn + <(lift_path_head_closed … H1k) in ⊢ (??%?); -H1k // +| lapply (in_comp_lift_path_term f … Ht1) -Ht2 -Ht1 -H1k + list_append_rcons_sn in H1k; #H1k >lift_rmap_A_dx + /2 width=1 by tls_lift_rmap_closed/ +(* Note: crux of the proof ends *) +] +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma index a610cd323..d0dcf4eee 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr.ma @@ -16,7 +16,6 @@ include "delayed_updating/substitution/fsubst.ma". include "delayed_updating/syntax/prototerm_constructors.ma". include "delayed_updating/syntax/prototerm_eq.ma". include "delayed_updating/syntax/path_head.ma". -include "delayed_updating/syntax/path_depth.ma". include "delayed_updating/notation/relations/black_rightarrow_df_3.ma". include "ground/xoa/ex_4_3.ma". diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma index 71a599326..b60bd708c 100644 --- a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/dfr_lift.ma @@ -24,8 +24,6 @@ include "delayed_updating/substitution/lift_rmap_head.ma". (* Constructions with lift **************************************************) -(* ↑[↑[p◖𝗔◖𝗟]f]q *) - theorem dfr_lift_bi (f) (t1) (t2) (r): t1 ➡𝐝𝐟[r] t2 → ↑[f]t1 ➡𝐝𝐟[↑[f]r] ↑[f]t2. #f #t1 #t2 #r diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma new file mode 100644 index 000000000..b235cb481 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/reduction/ibfr.ma @@ -0,0 +1,39 @@ +(**************************************************************************) +(* ___ *) +(* ||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/substitution/fsubst.ma". +include "delayed_updating/substitution/lift_prototerm.ma". +include "delayed_updating/syntax/prototerm_eq.ma". +include "delayed_updating/syntax/path_head.ma". +include "delayed_updating/syntax/path_balanced.ma". +include "delayed_updating/syntax/path_structure.ma". +include "delayed_updating/notation/relations/black_rightarrow_ibf_3.ma". +include "ground/relocation/tr_uni.ma". +include "ground/arith/nat_rplus.ma". +include "ground/xoa/ex_6_5.ma". + +(* IMMEDIATE BALANCED FOCUSED REDUCTION *************************************) + +(**) (* explicit ninj because we cannot declare the expectd type of k *) +definition ibfr (r): relation2 prototerm prototerm ≝ + λt1,t2. + ∃∃p,b,q,h,k. p●𝗔◗b●𝗟◗q = r & + ⊗b ϵ 𝐁 & b = ↳[h]b & + (𝗟◗q) = ↳[ninj k](𝗟◗q) & r◖𝗱k ϵ t1 & + t1[⋔r←↑[𝐮❨k+h❩](t1⋔(p◖𝗦))] ⇔ t2 +. + +interpretation + "balanced focused reduction with immediate updating (prototerm)" + 'BlackRightArrowIBF t1 r t2 = (ibfr r t1 t2). diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma new file mode 100644 index 000000000..b332b841f --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_path_closed.ma @@ -0,0 +1,33 @@ +(**************************************************************************) +(* ___ *) +(* ||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/substitution/lift_path.ma". +include "delayed_updating/syntax/path_closed.ma". +include "ground/relocation/xap.ma". + +(* LIFT FOR PATH ************************************************************) + +(* Constructions with pcc ***************************************************) + +lemma lift_path_closed (f) (q) (n): + q ϵ 𝐂❨n❩ → ↑[f]q ϵ 𝐂❨↑[q]f@❨n❩❩. +#f #q #n #Hq elim Hq -Hq // +#q #n [ #k ] #_ #IH +/2 width=1 by pcc_d_dx, pcc_m_dx, pcc_L_dx, pcc_A_dx, pcc_S_dx/ +qed. + +lemma lift_path_rmap_closed (f) (p) (q) (n): + q ϵ 𝐂❨n❩ → ↑[↑[p]f]q ϵ 𝐂❨↑[p●q]f@❨n❩❩. +/2 width=1 by lift_path_closed/ +qed. diff --git a/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma new file mode 100644 index 000000000..58bef8153 --- /dev/null +++ b/matita/matita/contribs/lambdadelta/delayed_updating/substitution/lift_rmap_closed.ma @@ -0,0 +1,36 @@ +(**************************************************************************) +(* ___ *) +(* ||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/substitution/lift_rmap_eq.ma". +include "delayed_updating/syntax/path_closed.ma". +include "ground/lib/stream_eq_eq.ma". + +(* LIFT MAP FOR PATH ********************************************************) + +(* Destructions with cpp ****************************************************) + +lemma tls_plus_lift_rmap_closed (f) (q) (n): + q ϵ 𝐂❨n❩ → + ∀m. ⇂*[m]f ≗ ⇂*[m+n]↑[q]f. +#f #q #n #Hq elim Hq -q -n // +#q #n #_ #IH #m +(IH … Hn2) -q1 // +| lapply (pcc_inv_A_dx … Hn2) -Hn2 #Hn2 + <(IH … Hn2) -q1 -n2 // +| lapply (pcc_inv_S_dx … Hn2) -Hn2 #Hn2 + <(IH … Hn2) -q1 -n2 // +] +qed-. + +theorem pcc_inj_L_sn (p1) (p2) (q1) (n): + q1 ϵ 𝐂❨n❩ → ∀q2. q2 ϵ 𝐂❨n❩ → + p1●𝗟◗q1 = p2●𝗟◗q2 → q1 = q2. +#p1 #p2 #q1 #n #Hq1 elim Hq1 -q1 -n +[|*: #q1 #n1 [ #k1 ] #_ #IH ] * // +[1,3,5,7,9,11: #l2 #q2 ] #Hq2 +tr_xap_ninj >(path_head_refl_append p … Hh) in ⊢ (??%?); +>tr_xap_ninj >(path_head_refl_append_sn p … Hh) in ⊢ (??%?); >(unwind2_rmap_head_xap_closed … Hh) -Hh