axiom aacr_aaa_csubc: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
∀L1,T,A. L1 ⊢ T ÷ A →
- ∀L2. L2 [RP] ⊑ L1 → {L2, T} [RP] ϵ 〚A〛.
+ ∀L2. L2 [RP] ⊑ L1 → ⦃L2, T⦄ [RP] ϵ 〚A〛.
(*
#RR #RS #RP #H1RP #H2RP #L1 #T #A #H elim H -L1 -T -A
[ #L #k #L2 #HL2
@(s7 … IHA … HL21) [2: @HA [2:
]
qed.
-*)
+*)
lemma aacr_abst: ∀RR,RS,RP. acp RR RS RP → acr RR RS RP (λL,T. RP L T) →
- ∀L,W,T,A,B. RP L W →
- (∀V. {L, V} [RP] ϵ 〚B〛 → {L. 𝕓{Abbr}V, T} [RP] ϵ 〚A〛) →
- {L, 𝕓{Abst}W. T} [RP] ϵ 〚𝕔B. A〛.
+ ∀L,W,T,A,B. RP L W →
+ (∀V. ⦃L, V⦄ [RP] ϵ 〚B〛 → ⦃L. 𝕓{Abbr}V, T⦄ [RP] ϵ 〚A〛) →
+ ⦃L, 𝕓{Abst}W. T⦄ [RP] ϵ 〚𝕔B. A〛.
#RR #RS #RP #H1RP #H2RP #L #W #T #A #B #HW #HA #V #HB
lapply (aacr_acr … H1RP H2RP A) #HCA
lapply (aacr_acr … H1RP H2RP B) #HCB
inductive lsubc (RP:lenv→predicate term): relation lenv ≝
| lsubc_atom: lsubc RP (⋆) (⋆)
| lsubc_pair: ∀I,L1,L2,V. lsubc RP L1 L2 → lsubc RP (L1. 𝕓{I} V) (L2. 𝕓{I} V)
-| lsubc_abbr: ∀L1,L2,V,W,A. {L1, V} [RP] ϵ 〚A〛 → {L2, W} [RP] ϵ 〚A〛 →
+| lsubc_abbr: ∀L1,L2,V,W,A. ⦃L1, V⦄ [RP] ϵ 〚A〛 → ⦃L2, W⦄ [RP] ϵ 〚A〛 →
lsubc RP L1 L2 → lsubc RP (L1. 𝕓{Abbr} V) (L2. 𝕓{Abst} W)
.
(* Main properties **********************************************************)
theorem fsubst_delift: ∀K,V,T,L,d.
- ⇓[0, d] L ≡ K. 𝕓{Abbr} V → L ⊢ T [d, 1] ≡ ↓[d ← V] T.
+ ⇓[0, d] L ≡ K. 𝕓{Abbr} V → L ⊢ T [d, 1] ≡ [d ← V] T.
#K #V #T elim T -T
[ * #i #L #d #HLK normalize in ⊢ (? ? ? ? ? %); /2 width=3/
elim (lt_or_eq_or_gt i d) #Hid
(* Main inversion properties ************************************************)
theorem fsubst_inv_delift: ∀K,V,T1,L,T2,d. ⇓[0, d] L ≡ K. 𝕓{Abbr} V →
- L ⊢ T1 [d, 1] ≡ T2 → ↓[d ← V] T1 = T2.
+ L ⊢ T1 [d, 1] ≡ T2 → [d ← V] T1 = T2.
#K #V #T1 elim T1 -T1
[ * #i #L #T2 #d #HLK #H
[ -HLK >(delift_fwd_sort1 … H) -H //
(* *)
(**************************************************************************)
-include "Ground_2/list.ma".
+include "Ground_2/star.ma".
include "Basic_2/notation.ma".
(* ATOMIC ARITY *************************************************************)
* [ suggested invocation to start formal specifications with ]
*)
-include "Ground_2/list.ma".
+include "Ground_2/arith.ma".
include "Basic_2/notation.ma".
(* ITEMS ********************************************************************)
(* *)
(**************************************************************************)
+include "Ground_2/list.ma".
include "Basic_2/grammar/term.ma".
(* TERMS ********************************************************************)
non associative with precedence 45
for @{ 'SN $L $T }.
-notation "hvbox( { L, break T } ϵ break 〚 A 〛 )"
- non associative with precedence 45
- for @{ 'InEInt $L $T $A }.
-
-notation "hvbox( { L, break T } break [ R ] ϵ break 〚 A 〛 )"
+notation "hvbox( ⦃ L, break T ⦄ break [ R ] ϵ break 〚 A 〛 )"
non associative with precedence 45
for @{ 'InEInt $R $L $T $A }.
-notation "hvbox( T1 ⊑ break T2 )"
- non associative with precedence 45
- for @{ 'CrSubEq $T1 $T2 }.
-
notation "hvbox( T1 break [ R ] ⊑ break T2 )"
non associative with precedence 45
for @{ 'CrSubEq $T1 $R $T2 }.
(* Functional ***************************************************************)
notation "hvbox( ↑ [ d , break e ] break T )"
- non associative with precedence 80
+ non associative with precedence 55
for @{ 'Lift $d $e $T }.
-notation "hvbox( ↓ [ d ← break V ] break T )"
- non associative with precedence 80
+notation "hvbox( [ d ← break V ] break T )"
+ non associative with precedence 55
for @{ 'Subst $V $d $T }.
(* *)
(**************************************************************************)
-include "Ground_2/list.ma".
+include "Ground_2/arith.ma".
(* SORT HIERARCHY ***********************************************************)
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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 "Basic_2/substitution/ldrop.ma".
+include "Basic_2/unfold/lifts.ma".
+
+(* GENERIC LOCAL ENVIRONMENT SLICING ****************************************)
+
+inductive ldrops: list2 nat nat → relation lenv ≝
+| ldrops_nil : ∀L. ldrops ⟠ L L
+| ldrops_cons: ∀L1,L,L2,des,d,e.
+ ⇓[d,e] L1 ≡ L → ldrops des L L2 → ldrops ({d, e} :: des) L1 L2
+.
+
+interpretation "generic local environment slicing"
+ 'RDrop des T1 T2 = (ldrops des T1 T2).
--- /dev/null
+(**************************************************************************)
+(* ___ *)
+(* ||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 "Basic_2/substitution/lift_vector.ma".
+
+(* GENERIC RELOCATION *******************************************************)
+
+inductive lifts: list2 nat nat → relation term ≝
+| lifts_nil : ∀T. lifts ⟠ T T
+| lifts_cons: ∀T1,T,T2,des,d,e.
+ ⇑[d,e] T1 ≡ T → lifts des T T2 → lifts ({d, e} :: des) T1 T2
+.
+
+interpretation "generic relocation" 'RLift des T1 T2 = (lifts des T1 T2).
(**************************************************************************)
include "Ground_2/arith.ma".
-include "Ground_2/notation.ma".
(* LISTS ********************************************************************)
inductive list (A:Type[0]) : Type[0] :=
| nil : list A
- | cons: A -> list A -> list A.
+ | cons: A → list A → list A.
interpretation "nil (list)" 'Nil = (nil ?).
[ nil ⇒ True
| cons hd tl ⇒ R hd ∧ all A R tl
].
+
+inductive list2 (A1,A2:Type[0]) : Type[0] :=
+ | nil2 : list2 A1 A2
+ | cons2: A1 → A2 → list2 A1 A2 → list2 A1 A2.
+
+interpretation "nil (list of pairs)" 'Nil2 = (nil2 ? ?). (**) (* 'Nil causes unification error in aacr_abst *)
+
+interpretation "cons (list of pairs)" 'Cons hd1 hd2 tl = (cons2 ? ? hd1 hd2 tl).
non associative with precedence 90
for @{'Nil}.
-notation "hvbox( hd break :: tl )"
+notation "hvbox( hd :: break tl )"
right associative with precedence 47
for @{'Cons $hd $tl}.
-notation "hvbox( l1 break @ l2 )"
+notation "hvbox( l1 @ break l2 )"
right associative with precedence 47
for @{'Append $l1 $l2 }.
+
+notation "hvbox( ⟠ )"
+ non associative with precedence 90
+ for @{'Nil2}.
+
+notation "hvbox( { hd1 , break hd2 } :: break tl )"
+ non associative with precedence 45
+ for @{'Cons $hd1 $hd2 $tl}.
include "basics/star.ma".
include "Ground_2/xoa_props.ma".
+include "Ground_2/notation.ma".
(* PROPERTIES OF RELATIONS **************************************************)