(* *)
(**************************************************************************)
-include "basic_2/notation/relations/lrsubeq_2.ma".
-include "basic_2/relocation/ldrop.ma".
+include "basic_2/notation/relations/lrsubeqc_2.ma".
+include "basic_2/substitution/drop.ma".
(* RESTRICTED LOCAL ENVIRONMENT REFINEMENT **********************************)
inductive lsubr: relation lenv ≝
-| lsubr_sort: ∀L. lsubr L (⋆)
-| lsubr_bind: ∀I,L1,L2,V. lsubr L1 L2 → lsubr (L1.ⓑ{I}V) (L2.ⓑ{I}V)
-| lsubr_abst: ∀L1,L2,V,W. lsubr L1 L2 → lsubr (L1.ⓓⓝW.V) (L2.ⓛW)
+| lsubr_atom: ∀L. lsubr L (⋆)
+| lsubr_pair: ∀I,L1,L2,V. lsubr L1 L2 → lsubr (L1.ⓑ{I}V) (L2.ⓑ{I}V)
+| lsubr_beta: ∀L1,L2,V,W. lsubr L1 L2 → lsubr (L1.ⓓⓝW.V) (L2.ⓛW)
.
interpretation
"local environment refinement (restricted)"
- 'LRSubEq L1 L2 = (lsubr L1 L2).
+ 'LRSubEqC L1 L2 = (lsubr L1 L2).
(* Basic properties *********************************************************)
-lemma lsubr_refl: â\88\80L. L â\8a\91 L.
-#L elim L -L /2 width=1 by lsubr_sort, lsubr_bind/
+lemma lsubr_refl: â\88\80L. L â«\83 L.
+#L elim L -L /2 width=1 by lsubr_atom, lsubr_pair/
qed.
(* Basic inversion lemmas ***************************************************)
-fact lsubr_inv_atom1_aux: â\88\80L1,L2. L1 â\8a\91 L2 → L1 = ⋆ → L2 = ⋆.
+fact lsubr_inv_atom1_aux: â\88\80L1,L2. L1 â«\83 L2 → L1 = ⋆ → L2 = ⋆.
#L1 #L2 * -L1 -L2 //
[ #I #L1 #L2 #V #_ #H destruct
| #L1 #L2 #V #W #_ #H destruct
]
qed-.
-lemma lsubr_inv_atom1: â\88\80L2. â\8b\86 â\8a\91 L2 → L2 = ⋆.
+lemma lsubr_inv_atom1: â\88\80L2. â\8b\86 â«\83 L2 → L2 = ⋆.
/2 width=3 by lsubr_inv_atom1_aux/ qed-.
-fact lsubr_inv_abst1_aux: â\88\80L1,L2. L1 â\8a\91 L2 → ∀K1,W. L1 = K1.ⓛW →
- L2 = â\8b\86 â\88¨ â\88\83â\88\83K2. K1 â\8a\91 K2 & L2 = K2.ⓛW.
+fact lsubr_inv_abst1_aux: â\88\80L1,L2. L1 â«\83 L2 → ∀K1,W. L1 = K1.ⓛW →
+ L2 = â\8b\86 â\88¨ â\88\83â\88\83K2. K1 â«\83 K2 & L2 = K2.ⓛW.
#L1 #L2 * -L1 -L2
[ #L #K1 #W #H destruct /2 width=1 by or_introl/
| #I #L1 #L2 #V #HL12 #K1 #W #H destruct /3 width=3 by ex2_intro, or_intror/
]
qed-.
-lemma lsubr_inv_abst1: â\88\80K1,L2,W. K1.â\93\9bW â\8a\91 L2 →
- L2 = â\8b\86 â\88¨ â\88\83â\88\83K2. K1 â\8a\91 K2 & L2 = K2.ⓛW.
+lemma lsubr_inv_abst1: â\88\80K1,L2,W. K1.â\93\9bW â«\83 L2 →
+ L2 = â\8b\86 â\88¨ â\88\83â\88\83K2. K1 â«\83 K2 & L2 = K2.ⓛW.
/2 width=3 by lsubr_inv_abst1_aux/ qed-.
-fact lsubr_inv_abbr2_aux: â\88\80L1,L2. L1 â\8a\91 L2 → ∀K2,W. L2 = K2.ⓓW →
- â\88\83â\88\83K1. K1 â\8a\91 K2 & L1 = K1.ⓓW.
+fact lsubr_inv_abbr2_aux: â\88\80L1,L2. L1 â«\83 L2 → ∀K2,W. L2 = K2.ⓓW →
+ â\88\83â\88\83K1. K1 â«\83 K2 & L1 = K1.ⓓW.
#L1 #L2 * -L1 -L2
[ #L #K2 #W #H destruct
| #I #L1 #L2 #V #HL12 #K2 #W #H destruct /2 width=3 by ex2_intro/
]
qed-.
-lemma lsubr_inv_abbr2: â\88\80L1,K2,W. L1 â\8a\91 K2.ⓓW →
- â\88\83â\88\83K1. K1 â\8a\91 K2 & L1 = K1.ⓓW.
+lemma lsubr_inv_abbr2: â\88\80L1,K2,W. L1 â«\83 K2.ⓓW →
+ â\88\83â\88\83K1. K1 â«\83 K2 & L1 = K1.ⓓW.
/2 width=3 by lsubr_inv_abbr2_aux/ qed-.
(* Basic forward lemmas *****************************************************)
-lemma lsubr_fwd_length: â\88\80L1,L2. L1 â\8a\91 L2 → |L2| ≤ |L1|.
+lemma lsubr_fwd_length: â\88\80L1,L2. L1 â«\83 L2 → |L2| ≤ |L1|.
#L1 #L2 #H elim H -L1 -L2 /2 width=1 by monotonic_le_plus_l/
qed-.
-lemma lsubr_fwd_ldrop2_bind: ∀L1,L2. L1 ⊑ L2 →
- ∀I,K2,W,s,i. ⇩[s, 0, i] L2 ≡ K2.ⓑ{I}W →
- (∃∃K1. K1 ⊑ K2 & ⇩[s, 0, i] L1 ≡ K1.ⓑ{I}W) ∨
- ∃∃K1,V. K1 ⊑ K2 & ⇩[s, 0, i] L1 ≡ K1.ⓓⓝW.V & I = Abst.
+lemma lsubr_fwd_drop2_pair: ∀L1,L2. L1 ⫃ L2 →
+ ∀I,K2,W,s,i. ⇩[s, 0, i] L2 ≡ K2.ⓑ{I}W →
+ (∃∃K1. K1 ⫃ K2 & ⇩[s, 0, i] L1 ≡ K1.ⓑ{I}W) ∨
+ ∃∃K1,V. K1 ⫃ K2 & ⇩[s, 0, i] L1 ≡ K1.ⓓⓝW.V & I = Abst.
#L1 #L2 #H elim H -L1 -L2
[ #L #I #K2 #W #s #i #H
- elim (ldrop_inv_atom1 … H) -H #H destruct
+ elim (drop_inv_atom1 … H) -H #H destruct
| #J #L1 #L2 #V #HL12 #IHL12 #I #K2 #W #s #i #H
- elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ]
- [ /3 width=3 by ldrop_pair, ex2_intro, or_introl/
+ elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ]
+ [ /3 width=3 by drop_pair, ex2_intro, or_introl/
| elim (IHL12 … HLK2) -IHL12 -HLK2 *
- /4 width=4 by ldrop_drop_lt, ex3_2_intro, ex2_intro, or_introl, or_intror/
+ /4 width=4 by drop_drop_lt, ex3_2_intro, ex2_intro, or_introl, or_intror/
]
| #L1 #L2 #V1 #V2 #HL12 #IHL12 #I #K2 #W #s #i #H
- elim (ldrop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ]
- [ /3 width=4 by ldrop_pair, ex3_2_intro, or_intror/
+ elim (drop_inv_O1_pair1 … H) -H * #Hi #HLK2 destruct [ -IHL12 | -HL12 ]
+ [ /3 width=4 by drop_pair, ex3_2_intro, or_intror/
| elim (IHL12 … HLK2) -IHL12 -HLK2 *
- /4 width=4 by ldrop_drop_lt, ex3_2_intro, ex2_intro, or_introl, or_intror/
+ /4 width=4 by drop_drop_lt, ex3_2_intro, ex2_intro, or_introl, or_intror/
]
]
qed-.
-lemma lsubr_fwd_ldrop2_abbr: ∀L1,L2. L1 ⊑ L2 →
- ∀K2,V,s,i. ⇩[s, 0, i] L2 ≡ K2.ⓓV →
- ∃∃K1. K1 ⊑ K2 & ⇩[s, 0, i] L1 ≡ K1.ⓓV.
-#L1 #L2 #HL12 #K2 #V #s #i #HLK2 elim (lsubr_fwd_ldrop2_bind … HL12 … HLK2) -L2 // *
+lemma lsubr_fwd_drop2_abbr: ∀L1,L2. L1 ⫃ L2 →
+ ∀K2,V,s,i. ⇩[s, 0, i] L2 ≡ K2.ⓓV →
+ ∃∃K1. K1 ⫃ K2 & ⇩[s, 0, i] L1 ≡ K1.ⓓV.
+#L1 #L2 #HL12 #K2 #V #s #i #HLK2 elim (lsubr_fwd_drop2_pair … HL12 … HLK2) -L2 // *
#K1 #W #_ #_ #H destruct
qed-.