include "basic_2/notation/relations/supterm_6.ma".
include "basic_2/grammar/cl_weight.ma".
-include "basic_2/grammar/bteq.ma".
include "basic_2/relocation/ldrop.ma".
(* SUPCLOSURE ***************************************************************)
| fqu_bind_dx: ∀a,I,G,L,V,T. fqu G L (ⓑ{a,I}V.T) G (L.ⓑ{I}V) T
| fqu_flat_dx: ∀I,G,L,V,T. fqu G L (ⓕ{I}V.T) G L T
| fqu_drop : ∀G,L,K,T,U,e.
- ⇩[0, e+1] L ≡ K → ⇧[0, e+1] T ≡ U → fqu G L U G K T
+ ⇩[e+1] L ≡ K → ⇧[0, e+1] T ≡ U → fqu G L U G K T
.
interpretation
(* Basic properties *********************************************************)
lemma fqu_drop_lt: ∀G,L,K,T,U,e. 0 < e →
- ⇩[0, e] L ≡ K → ⇧[0, e] T ≡ U → fqu G L U G K T.
+ ⇩[e] L ≡ K → ⇧[0, e] T ≡ U → ⦃G, L, U⦄ ⊐ ⦃G, K, T⦄.
#G #L #K #T #U #e #He >(plus_minus_m_m e 1) /2 width=3 by fqu_drop/
qed.
-lemma fqu_lref_S_lt: â\88\80I,G,L,V,i. 0 < i â\86\92 â¦\83G, L.â\93\91{I}V, #iâ¦\84 â\8a\83 ⦃G, L, #(i-1)⦄.
-/3 width=3 by fqu_drop, ldrop_ldrop, lift_lref_ge_minus/
+lemma fqu_lref_S_lt: â\88\80I,G,L,V,i. 0 < i â\86\92 â¦\83G, L.â\93\91{I}V, #iâ¦\84 â\8a\90 ⦃G, L, #(i-1)⦄.
+/3 width=3 by fqu_drop, ldrop_drop, lift_lref_ge_minus/
qed.
(* Basic forward lemmas *****************************************************)
-lemma fqu_fwd_fw: â\88\80G1,G2,L1,L2,T1,T2. â¦\83G1, L1, T1â¦\84 â\8a\83 ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} < ♯{G1, L1, T1}.
+lemma fqu_fwd_fw: â\88\80G1,G2,L1,L2,T1,T2. â¦\83G1, L1, T1â¦\84 â\8a\90 ⦃G2, L2, T2⦄ → ♯{G2, L2, T2} < ♯{G1, L1, T1}.
#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2 //
#G #L #K #T #U #e #HLK #HTU
lapply (ldrop_fwd_lw_lt … HLK ?) -HLK // #HKL
normalize in ⊢ (?%%); /2 width=1 by lt_minus_to_plus/
qed-.
-fact fqu_fwd_length_lref1_aux: â\88\80G1,G2,L1,L2,T1,T2. â¦\83G1, L1, T1â¦\84 â\8a\83 ⦃G2, L2, T2⦄ →
+fact fqu_fwd_length_lref1_aux: â\88\80G1,G2,L1,L2,T1,T2. â¦\83G1, L1, T1â¦\84 â\8a\90 ⦃G2, L2, T2⦄ →
∀i. T1 = #i → |L2| < |L1|.
#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
[1: normalize //
] #I #G #L #V #T #j #H destruct
qed-.
-lemma fqu_fwd_length_lref1: â\88\80G1,G2,L1,L2,T2,i. â¦\83G1, L1, #iâ¦\84 â\8a\83 ⦃G2, L2, T2⦄ → |L2| < |L1|.
+lemma fqu_fwd_length_lref1: â\88\80G1,G2,L1,L2,T2,i. â¦\83G1, L1, #iâ¦\84 â\8a\90 ⦃G2, L2, T2⦄ → |L2| < |L1|.
/2 width=7 by fqu_fwd_length_lref1_aux/
qed-.
-lemma fqu_fwd_bteq: ∀G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊃ ⦃G2, L2, T2⦄ →
- ⦃G1, L1, T1⦄ ⋕ ⦃G2, L2, T2⦄ → ⊥.
-#G1 #G2 #L1 #L2 #T1 #T2 #H elim H -G1 -G2 -L1 -L2 -T1 -T2
-[ #I #G #L #V * #_ #H elim (plus_xSy_x_false … H)
-| #I #G #L #V #T * #_ #_ #H elim (discr_tpair_xy_x … H)
-| #a #I #G #L #V #T * #_ #_ #H elim (discr_tpair_xy_y … H)
-| #I #G #L #V #T * #_ #_ #H elim (discr_tpair_xy_y … H)
-| #G #L #K #T #U #e #HLK #_ * #_ #H
- lapply (ldrop_fwd_length_lt4 … HLK ?) // >H -L #H
- elim (lt_refl_false … H)
-]
-qed-.
-
(* Advanced eliminators *****************************************************)
lemma fqu_wf_ind: ∀R:relation3 …. (
- â\88\80G1,L1,T1. (â\88\80G2,L2,T2. â¦\83G1, L1, T1â¦\84 â\8a\83 ⦃G2, L2, T2⦄ → R G2 L2 T2) →
+ â\88\80G1,L1,T1. (â\88\80G2,L2,T2. â¦\83G1, L1, T1â¦\84 â\8a\90 ⦃G2, L2, T2⦄ → R G2 L2 T2) →
R G1 L1 T1
) → ∀G1,L1,T1. R G1 L1 T1.
#R #HR @(f3_ind … fw) #n #IHn #G1 #L1 #T1 #H destruct /4 width=1 by fqu_fwd_fw/