<topitem name="C9">
Matthias Weber:
<notice class="alpha">An extended type system with lambda-typed lambda-expressions (extended version)</notice>
- (2017). Technical report. Faculty of Computer Science, Technical University of Berlin.
+ (2018). Technical report. Faculty of Computer Science, Technical University of Berlin.
</topitem>
<topitem name="C8">
/3 width=3 by lfxs_unit, inj/ qed.
lemma tc_lfxs_lref: ∀R,I,L1,L2,V1,V2,i.
- L1 ⪤**[R, #i] L2 â\86\92 L1.â\93\91{I}V1 ⪤**[R, #⫯i] L2.ⓑ{I}V2.
+ L1 ⪤**[R, #i] L2 â\86\92 L1.â\93\91{I}V1 ⪤**[R, #â\86\91i] L2.ⓑ{I}V2.
#R #I #L1 #L2 #V1 #V2 #i #H elim H -L2
/3 width=4 by lfxs_lref, tc_lfxs_step_dx, inj/
qed.
*)
inductive drops (b:bool): rtmap → relation lenv ≝
| drops_atom: ∀f. (b = Ⓣ → 𝐈⦃f⦄) → drops b (f) (⋆) (⋆)
-| drops_drop: â\88\80f,I,L1,L2. drops b f L1 L2 â\86\92 drops b (⫯f) (L1.ⓘ{I}) L2
+| drops_drop: â\88\80f,I,L1,L2. drops b f L1 L2 â\86\92 drops b (â\86\91f) (L1.ⓘ{I}) L2
| drops_skip: ∀f,I1,I2,L1,L2.
drops b f L1 L2 → ⬆*[f] I2 ≘ I1 →
- drops b (â\86\91f) (L1.ⓘ{I1}) (L2.ⓘ{I2})
+ drops b (⫯f) (L1.ⓘ{I1}) (L2.ⓘ{I2})
.
interpretation "uniform slicing (local environment)"
lemma drops_inv_atom1: ∀b,f,Y. ⬇*[b, f] ⋆ ≘ Y → Y = ⋆ ∧ (b = Ⓣ → 𝐈⦃f⦄).
/2 width=3 by drops_inv_atom1_aux/ qed-.
-fact drops_inv_drop1_aux: â\88\80b,f,X,Y. â¬\87*[b, f] X â\89\98 Y â\86\92 â\88\80g,I,K. X = K.â\93\98{I} â\86\92 f = ⫯g →
+fact drops_inv_drop1_aux: â\88\80b,f,X,Y. â¬\87*[b, f] X â\89\98 Y â\86\92 â\88\80g,I,K. X = K.â\93\98{I} â\86\92 f = â\86\91g →
⬇*[b, g] K ≘ Y.
#b #f #X #Y * -f -X -Y
[ #f #Hf #g #J #K #H destruct
(* Basic_1: includes: drop_gen_drop *)
(* Basic_2A1: includes: drop_inv_drop1_lt drop_inv_drop1 *)
-lemma drops_inv_drop1: â\88\80b,f,I,K,Y. â¬\87*[b, ⫯f] K.ⓘ{I} ≘ Y → ⬇*[b, f] K ≘ Y.
+lemma drops_inv_drop1: â\88\80b,f,I,K,Y. â¬\87*[b, â\86\91f] K.ⓘ{I} ≘ Y → ⬇*[b, f] K ≘ Y.
/2 width=6 by drops_inv_drop1_aux/ qed-.
-fact drops_inv_skip1_aux: â\88\80b,f,X,Y. â¬\87*[b, f] X â\89\98 Y â\86\92 â\88\80g,I1,K1. X = K1.â\93\98{I1} â\86\92 f = â\86\91g →
+fact drops_inv_skip1_aux: â\88\80b,f,X,Y. â¬\87*[b, f] X â\89\98 Y â\86\92 â\88\80g,I1,K1. X = K1.â\93\98{I1} â\86\92 f = ⫯g →
∃∃I2,K2. ⬇*[b, g] K1 ≘ K2 & ⬆*[g] I2 ≘ I1 & Y = K2.ⓘ{I2}.
#b #f #X #Y * -f -X -Y
[ #f #Hf #g #J1 #K1 #H destruct
(* Basic_1: includes: drop_gen_skip_l *)
(* Basic_2A1: includes: drop_inv_skip1 *)
-lemma drops_inv_skip1: â\88\80b,f,I1,K1,Y. â¬\87*[b, â\86\91f] K1.ⓘ{I1} ≘ Y →
+lemma drops_inv_skip1: â\88\80b,f,I1,K1,Y. â¬\87*[b, ⫯f] K1.ⓘ{I1} ≘ Y →
∃∃I2,K2. ⬇*[b, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1 & Y = K2.ⓘ{I2}.
/2 width=5 by drops_inv_skip1_aux/ qed-.
-fact drops_inv_skip2_aux: â\88\80b,f,X,Y. â¬\87*[b, f] X â\89\98 Y â\86\92 â\88\80g,I2,K2. Y = K2.â\93\98{I2} â\86\92 f = â\86\91g →
+fact drops_inv_skip2_aux: â\88\80b,f,X,Y. â¬\87*[b, f] X â\89\98 Y â\86\92 â\88\80g,I2,K2. Y = K2.â\93\98{I2} â\86\92 f = ⫯g →
∃∃I1,K1. ⬇*[b, g] K1 ≘ K2 & ⬆*[g] I2 ≘ I1 & X = K1.ⓘ{I1}.
#b #f #X #Y * -f -X -Y
[ #f #Hf #g #J2 #K2 #H destruct
(* Basic_1: includes: drop_gen_skip_r *)
(* Basic_2A1: includes: drop_inv_skip2 *)
-lemma drops_inv_skip2: â\88\80b,f,I2,X,K2. â¬\87*[b, â\86\91f] X ≘ K2.ⓘ{I2} →
+lemma drops_inv_skip2: â\88\80b,f,I2,X,K2. â¬\87*[b, ⫯f] X ≘ K2.ⓘ{I2} →
∃∃I1,K1. ⬇*[b, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1 & X = K1.ⓘ{I1}.
/2 width=5 by drops_inv_skip2_aux/ qed-.
(* Basic forward lemmas *****************************************************)
fact drops_fwd_drop2_aux: ∀b,f2,X,Y. ⬇*[b, f2] X ≘ Y → ∀I,K. Y = K.ⓘ{I} →
- â\88\83â\88\83f1,f. ð\9d\90\88â¦\83f1â¦\84 & f2 â\8a\9a ⫯f1 ≘ f & ⬇*[b, f] X ≘ K.
+ â\88\83â\88\83f1,f. ð\9d\90\88â¦\83f1â¦\84 & f2 â\8a\9a â\86\91f1 ≘ f & ⬇*[b, f] X ≘ K.
#b #f2 #X #Y #H elim H -f2 -X -Y
[ #f2 #Hf2 #J #K #H destruct
| #f2 #I #L1 #L2 #_ #IHL #J #K #H elim (IHL … H) -IHL
qed-.
lemma drops_fwd_drop2: ∀b,f2,I,X,K. ⬇*[b, f2] X ≘ K.ⓘ{I} →
- â\88\83â\88\83f1,f. ð\9d\90\88â¦\83f1â¦\84 & f2 â\8a\9a ⫯f1 ≘ f & ⬇*[b, f] X ≘ K.
+ â\88\83â\88\83f1,f. ð\9d\90\88â¦\83f1â¦\84 & f2 â\8a\9a â\86\91f1 ≘ f & ⬇*[b, f] X ≘ K.
/2 width=4 by drops_fwd_drop2_aux/ qed-.
(* Properties with test for identity ****************************************)
qed-.
lemma drops_after_fwd_drop2: ∀b,f2,I,X,K. ⬇*[b, f2] X ≘ K.ⓘ{I} →
- â\88\80f1,f. ð\9d\90\88â¦\83f1â¦\84 â\86\92 f2 â\8a\9a ⫯f1 ≘ f → ⬇*[b, f] X ≘ K.
+ â\88\80f1,f. ð\9d\90\88â¦\83f1â¦\84 â\86\92 f2 â\8a\9a â\86\91f1 ≘ f → ⬇*[b, f] X ≘ K.
#b #f2 #I #X #K #H #f1 #f #Hf1 #Hf elim (drops_fwd_drop2 … H) -H
#g1 #g #Hg1 #Hg #HK lapply (after_mono_eq … Hg … Hf ??) -Hg -Hf
/3 width=5 by drops_eq_repl_back, isid_inv_eq_repl, eq_next/
lemma drops_inv_isuni: ∀f,L1,L2. ⬇*[Ⓣ, f] L1 ≘ L2 → 𝐔⦃f⦄ →
(𝐈⦃f⦄ ∧ L1 = L2) ∨
- â\88\83â\88\83g,I,K. â¬\87*[â\93\89, g] K â\89\98 L2 & ð\9d\90\94â¦\83gâ¦\84 & L1 = K.â\93\98{I} & f = ⫯g.
+ â\88\83â\88\83g,I,K. â¬\87*[â\93\89, g] K â\89\98 L2 & ð\9d\90\94â¦\83gâ¦\84 & L1 = K.â\93\98{I} & f = â\86\91g.
#f #L1 #L2 * -f -L1 -L2
[ /4 width=1 by or_introl, conj/
| /4 width=7 by isuni_inv_next, ex4_3_intro, or_intror/
(* Basic_2A1: was: drop_inv_O1_pair1 *)
lemma drops_inv_bind1_isuni: ∀b,f,I,K,L2. 𝐔⦃f⦄ → ⬇*[b, f] K.ⓘ{I} ≘ L2 →
(𝐈⦃f⦄ ∧ L2 = K.ⓘ{I}) ∨
- â\88\83â\88\83g. ð\9d\90\94â¦\83gâ¦\84 & â¬\87*[b, g] K â\89\98 L2 & f = ⫯g.
+ â\88\83â\88\83g. ð\9d\90\94â¦\83gâ¦\84 & â¬\87*[b, g] K â\89\98 L2 & f = â\86\91g.
#b #f #I #K #L2 #Hf #H elim (isuni_split … Hf) -Hf * #g #Hg #H0 destruct
[ lapply (drops_inv_skip1 … H) -H * #Z #Y #HY #HZ #H destruct
<(drops_fwd_isid … HY Hg) -Y >(liftsb_fwd_isid … HZ Hg) -Z
(* Basic_2A1: was: drop_inv_O1_pair2 *)
lemma drops_inv_bind2_isuni: ∀b,f,I,K,L1. 𝐔⦃f⦄ → ⬇*[b, f] L1 ≘ K.ⓘ{I} →
(𝐈⦃f⦄ ∧ L1 = K.ⓘ{I}) ∨
- â\88\83â\88\83g,I1,K1. ð\9d\90\94â¦\83gâ¦\84 & â¬\87*[b, g] K1 â\89\98 K.â\93\98{I} & L1 = K1.â\93\98{I1} & f = ⫯g.
+ â\88\83â\88\83g,I1,K1. ð\9d\90\94â¦\83gâ¦\84 & â¬\87*[b, g] K1 â\89\98 K.â\93\98{I} & L1 = K1.â\93\98{I1} & f = â\86\91g.
#b #f #I #K *
[ #Hf #H elim (drops_inv_atom1 … H) -H #H destruct
| #L1 #I1 #Hf #H elim (drops_inv_bind1_isuni … Hf H) -Hf -H *
]
qed-.
-lemma drops_inv_bind2_isuni_next: â\88\80b,f,I,K,L1. ð\9d\90\94â¦\83fâ¦\84 â\86\92 â¬\87*[b, ⫯f] L1 ≘ K.ⓘ{I} →
+lemma drops_inv_bind2_isuni_next: â\88\80b,f,I,K,L1. ð\9d\90\94â¦\83fâ¦\84 â\86\92 â¬\87*[b, â\86\91f] L1 ≘ K.ⓘ{I} →
∃∃I1,K1. ⬇*[b, f] K1 ≘ K.ⓘ{I} & L1 = K1.ⓘ{I1}.
#b #f #I #K #L1 #Hf #H elim (drops_inv_bind2_isuni … H) -H /2 width=3 by isuni_next/ -Hf *
[ #H elim (isid_inv_next … H) -H //
(* Basic_1: was: drop_S *)
(* Basic_2A1: was: drop_fwd_drop2 *)
-lemma drops_isuni_fwd_drop2: â\88\80b,f,I,X,K. ð\9d\90\94â¦\83fâ¦\84 â\86\92 â¬\87*[b, f] X â\89\98 K.â\93\98{I} â\86\92 â¬\87*[b, ⫯f] X ≘ K.
+lemma drops_isuni_fwd_drop2: â\88\80b,f,I,X,K. ð\9d\90\94â¦\83fâ¦\84 â\86\92 â¬\87*[b, f] X â\89\98 K.â\93\98{I} â\86\92 â¬\87*[b, â\86\91f] X ≘ K.
/3 width=7 by drops_after_fwd_drop2, after_isid_isuni/ qed-.
(* Inversion lemmas with uniform relocations ********************************)
]
qed-.
-lemma drops_inv_succ: â\88\80L1,L2,i. â¬\87*[⫯i] L1 ≘ L2 →
+lemma drops_inv_succ: â\88\80L1,L2,i. â¬\87*[â\86\91i] L1 ≘ L2 →
∃∃I,K. ⬇*[i] K ≘ L2 & L1 = K.ⓘ{I}.
#L1 #L2 #i #H elim (drops_inv_isuni … H) -H // *
[ #H elim (isid_inv_next … H) -H //
lemma drops_tls_at: ∀f,i1,i2. @⦃i1,f⦄ ≘ i2 →
∀b,L1,L2. ⬇*[b,⫱*[i2]f] L1 ≘ L2 →
- â¬\87*[b,â\86\91⫱*[⫯i2]f] L1 ≘ L2.
+ â¬\87*[b,⫯⫱*[â\86\91i2]f] L1 ≘ L2.
/3 width=3 by drops_eq_repl_fwd, at_inv_tls/ qed-.
lemma drops_split_trans_bind2: ∀b,f,I,L,K0. ⬇*[b, f] L ≘ K0.ⓘ{I} → ∀i. @⦃O, f⦄ ≘ i →
- â\88\83â\88\83J,K. â¬\87*[i]L â\89\98 K.â\93\98{J} & â¬\87*[b, ⫱*[⫯i]f] K â\89\98 K0 & â¬\86*[⫱*[⫯i]f] I ≘ J.
+ â\88\83â\88\83J,K. â¬\87*[i]L â\89\98 K.â\93\98{J} & â¬\87*[b, ⫱*[â\86\91i]f] K â\89\98 K0 & â¬\86*[⫱*[â\86\91i]f] I ≘ J.
#b #f #I #L #K0 #H #i #Hf
elim (drops_split_trans … H) -H [ |5: @(after_uni_dx … Hf) |2,3: skip ] /2 width=1 by after_isid_dx/ #Y #HLY #H
lapply (drops_tls_at … Hf … H) -H #H
qed-.
theorem drops_conf_div: ∀f1,L,K. ⬇*[Ⓣ,f1] L ≘ K → ∀f2. ⬇*[Ⓣ,f2] L ≘ K →
- ð\9d\90\94â¦\83f1â¦\84 â\86\92 ð\9d\90\94â¦\83f2â¦\84 â\86\92 f1 â\89\97 f2.
+ ð\9d\90\94â¦\83f1â¦\84 â\86\92 ð\9d\90\94â¦\83f2â¦\84 â\86\92 f1 â\89¡ f2.
#f1 #L #K #H elim H -f1 -L -K
[ #f1 #Hf1 #f2 #Hf2 elim (drops_inv_atom1 … Hf2) -Hf2
/3 width=1 by isid_inv_eq_repl/
(* Basic_2A1: includes: drop_conf_lt *)
lemma drops_conf_skip1: ∀b2,f,L,L2. ⬇*[b2, f] L ≘ L2 →
∀b1,f1,I1,K1. ⬇*[b1, f1] L ≘ K1.ⓘ{I1} →
- â\88\80f2. f1 â\8a\9a â\86\91f2 ≘ f →
+ â\88\80f2. f1 â\8a\9a ⫯f2 ≘ f →
∃∃I2,K2. L2 = K2.ⓘ{I2} &
⬇*[b2, f2] K1 ≘ K2 & ⬆*[f2] I2 ≘ I1.
#b2 #f #L #L2 #H2 #b1 #f1 #I1 #K1 #H1 #f2 #Hf lapply (drops_conf … H1 … H2 … Hf) -L -Hf
(* Basic_2A1: includes: drop_trans_lt *)
lemma drops_trans_skip2: ∀b1,f1,L1,L. ⬇*[b1, f1] L1 ≘ L →
∀b2,f2,I2,K2. ⬇*[b2, f2] L ≘ K2.ⓘ{I2} →
- â\88\80f. f1 â\8a\9a f2 â\89\98 â\86\91f →
+ â\88\80f. f1 â\8a\9a f2 â\89\98 ⫯f →
∃∃I1,K1. L1 = K1.ⓘ{I1} &
⬇*[b1∧b2, f] K1 ≘ K2 & ⬆*[f] I2 ≘ I1.
#b1 #f1 #L1 #L #H1 #b2 #f2 #I2 #K2 #H2 #f #Hf
(* Basic_2A1: includes: drops_conf_div *)
lemma drops_conf_div_bind: ∀f1,f2,I1,I2,L,K.
⬇*[Ⓣ, f1] L ≘ K.ⓘ{I1} → ⬇*[Ⓣ, f2] L ≘ K.ⓘ{I2} →
- ð\9d\90\94â¦\83f1â¦\84 â\86\92 ð\9d\90\94â¦\83f2â¦\84 â\86\92 f1 â\89\97 f2 ∧ I1 = I2.
+ ð\9d\90\94â¦\83f1â¦\84 â\86\92 ð\9d\90\94â¦\83f2â¦\84 â\86\92 f1 â\89¡ f2 ∧ I1 = I2.
#f1 #f2 #I1 #I2 #L #K #Hf1 #Hf2 #HU1 #HU2
lapply (drops_isuni_fwd_drop2 … Hf1) // #H1
lapply (drops_isuni_fwd_drop2 … Hf2) // #H2
lemma lexs_drops_conf_next: ∀RN,RP.
∀f2,L1,L2. L1 ⪤*[RN, RP, f2] L2 →
∀b,f,I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} → 𝐔⦃f⦄ →
- â\88\80f1. f ~â\8a\9a ⫯f1 ≘ f2 →
+ â\88\80f1. f ~â\8a\9a â\86\91f1 ≘ f2 →
∃∃I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} & K1 ⪤*[RN, RP, f1] K2 & RN K1 I1 I2.
#RN #RP #f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2
elim (lexs_co_dropable_sn … HLK1 … Hf … HL12 … Hf2) -L1 -f2 -Hf
lemma lexs_drops_conf_push: ∀RN,RP.
∀f2,L1,L2. L1 ⪤*[RN, RP, f2] L2 →
∀b,f,I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} → 𝐔⦃f⦄ →
- â\88\80f1. f ~â\8a\9a â\86\91f1 ≘ f2 →
+ â\88\80f1. f ~â\8a\9a ⫯f1 ≘ f2 →
∃∃I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} & K1 ⪤*[RN, RP, f1] K2 & RP K1 I1 I2.
#RN #RP #f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2
elim (lexs_co_dropable_sn … HLK1 … Hf … HL12 … Hf2) -L1 -f2 -Hf
(* Basic_2A1: includes: lpx_sn_drop_trans *)
lemma lexs_drops_trans_next: ∀RN,RP,f2,L1,L2. L1 ⪤*[RN, RP, f2] L2 →
∀b,f,I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} → 𝐔⦃f⦄ →
- â\88\80f1. f ~â\8a\9a ⫯f1 ≘ f2 →
+ â\88\80f1. f ~â\8a\9a â\86\91f1 ≘ f2 →
∃∃I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} & K1 ⪤*[RN, RP, f1] K2 & RN K1 I1 I2.
#RN #RP #f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2
elim (lexs_co_dropable_dx … HL12 … HLK2 … Hf … Hf2) -L2 -f2 -Hf
lemma lexs_drops_trans_push: ∀RN,RP,f2,L1,L2. L1 ⪤*[RN, RP, f2] L2 →
∀b,f,I2,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I2} → 𝐔⦃f⦄ →
- â\88\80f1. f ~â\8a\9a â\86\91f1 ≘ f2 →
+ â\88\80f1. f ~â\8a\9a ⫯f1 ≘ f2 →
∃∃I1,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I1} & K1 ⪤*[RN, RP, f1] K2 & RP K1 I1 I2.
#RN #RP #f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2
elim (lexs_co_dropable_dx … HL12 … HLK2 … Hf … Hf2) -L2 -f2 -Hf
d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP →
∀f1,K1,K2. K1 ⪤*[RN, RP, f1] K2 →
∀b,f,I1,L1. ⬇*[b, f] L1.ⓘ{I1} ≘ K1 →
- â\88\80f2. f ~â\8a\9a f1 â\89\98 ⫯f2 →
+ â\88\80f2. f ~â\8a\9a f1 â\89\98 â\86\91f2 →
∃∃I2,L2. ⬇*[b, f] L2.ⓘ{I2} ≘ K2 & L1 ⪤*[RN, RP, f2] L2 & RN L1 I1 I2 & L1.ⓘ{I1} ≡[f] L2.ⓘ{I2}.
#RN #RP #H1RN #H1RP #H2RN #H2RP #f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2
elim (lexs_liftable_co_dedropable_sn … H1RN H1RP H2RN H2RP … HLK1 … HK12 … Hf2) -K1 -f1 -H1RN -H1RP -H2RN -H2RP
d_liftable2_sn … liftsb RN → d_liftable2_sn … liftsb RP →
∀f1,K1,K2. K1 ⪤*[RN, RP, f1] K2 →
∀b,f,I1,L1. ⬇*[b, f] L1.ⓘ{I1} ≘ K1 →
- â\88\80f2. f ~â\8a\9a f1 â\89\98 â\86\91f2 →
+ â\88\80f2. f ~â\8a\9a f1 â\89\98 ⫯f2 →
∃∃I2,L2. ⬇*[b, f] L2.ⓘ{I2} ≘ K2 & L1 ⪤*[RN, RP, f2] L2 & RP L1 I1 I2 & L1.ⓘ{I1} ≡[f] L2.ⓘ{I2}.
#RN #RP #H1RN #H1RP #H2RN #H2RP #f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2
elim (lexs_liftable_co_dedropable_sn … H1RN H1RP H2RN H2RP … HLK1 … HK12 … Hf2) -K1 -f1 -H1RN -H1RP -H2RN -H2RP
(* Basic_2A1: includes: lreq_drop_trans_be *)
lemma lreq_drops_trans_next: ∀f2,L1,L2. L1 ≡[f2] L2 →
∀b,f,I,K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I} → 𝐔⦃f⦄ →
- â\88\80f1. f ~â\8a\9a ⫯f1 ≘ f2 →
+ â\88\80f1. f ~â\8a\9a â\86\91f1 ≘ f2 →
∃∃K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I} & K1 ≡[f1] K2.
#f2 #L1 #L2 #HL12 #b #f #I2 #K2 #HLK2 #Hf #f1 #Hf2
elim (lexs_drops_trans_next … HL12 … HLK2 Hf … Hf2) -f2 -L2 -Hf
(* Basic_2A1: includes: lreq_drop_conf_be *)
lemma lreq_drops_conf_next: ∀f2,L1,L2. L1 ≡[f2] L2 →
∀b,f,I,K1. ⬇*[b, f] L1 ≘ K1.ⓘ{I} → 𝐔⦃f⦄ →
- â\88\80f1. f ~â\8a\9a ⫯f1 ≘ f2 →
+ â\88\80f1. f ~â\8a\9a â\86\91f1 ≘ f2 →
∃∃K2. ⬇*[b, f] L2 ≘ K2.ⓘ{I} & K1 ≡[f1] K2.
#f2 #L1 #L2 #HL12 #b #f #I1 #K1 #HLK1 #Hf #f1 #Hf2
elim (lreq_drops_trans_next … (lreq_sym … HL12) … HLK1 … Hf2) // -f2 -L1 -Hf
lemma drops_lreq_trans_next: ∀f1,K1,K2. K1 ≡[f1] K2 →
∀b,f,I,L1. ⬇*[b, f] L1.ⓘ{I} ≘ K1 →
- â\88\80f2. f ~â\8a\9a f1 â\89\98 ⫯f2 →
+ â\88\80f2. f ~â\8a\9a f1 â\89\98 â\86\91f2 →
∃∃L2. ⬇*[b, f] L2.ⓘ{I} ≘ K2 & L1 ≡[f2] L2 & L1.ⓘ{I} ≡[f] L2.ⓘ{I}.
#f1 #K1 #K2 #HK12 #b #f #I1 #L1 #HLK1 #f2 #Hf2
elim (drops_lexs_trans_next … HK12 … HLK1 … Hf2) -f1 -K1
lemma lex_inv_bind_sn: ∀R,I1,L2,K1. K1.ⓘ{I1} ⪤[R] L2 →
∃∃I2,K2. K1 ⪤[R] K2 & cext2 R K1 I1 I2 & L2 = K2.ⓘ{I2}.
#R #I1 #L2 #K1 * #f #Hf #H
-lapply (lexs_eq_repl_fwd â\80¦ H (â\86\91f) ?) -H /2 width=1 by eq_push_inv_isid/ #H
+lapply (lexs_eq_repl_fwd â\80¦ H (⫯f) ?) -H /2 width=1 by eq_push_inv_isid/ #H
elim (lexs_inv_push1 … H) -H #I2 #K2 #HK12 #HI12 #H destruct
/3 width=5 by ex2_intro, ex3_2_intro/
qed-.
lemma lex_inv_bind_dx: ∀R,I2,L1,K2. L1 ⪤[R] K2.ⓘ{I2} →
∃∃I1,K1. K1 ⪤[R] K2 & cext2 R K1 I1 I2 & L1 = K1.ⓘ{I1}.
#R #I2 #L1 #K2 * #f #Hf #H
-lapply (lexs_eq_repl_fwd â\80¦ H (â\86\91f) ?) -H /2 width=1 by eq_push_inv_isid/ #H
+lapply (lexs_eq_repl_fwd â\80¦ H (⫯f) ?) -H /2 width=1 by eq_push_inv_isid/ #H
elim (lexs_inv_push2 … H) -H #I1 #K1 #HK12 #HI12 #H destruct
/3 width=5 by ex3_2_intro, ex2_intro/
qed-.
| lexs_atom: ∀f. lexs RN RP f (⋆) (⋆)
| lexs_next: ∀f,I1,I2,L1,L2.
lexs RN RP f L1 L2 → RN L1 I1 I2 →
- lexs RN RP (⫯f) (L1.ⓘ{I1}) (L2.ⓘ{I2})
+ lexs RN RP (â\86\91f) (L1.ⓘ{I1}) (L2.ⓘ{I2})
| lexs_push: ∀f,I1,I2,L1,L2.
lexs RN RP f L1 L2 → RP L1 I1 I2 →
- lexs RN RP (â\86\91f) (L1.ⓘ{I1}) (L2.ⓘ{I2})
+ lexs RN RP (⫯f) (L1.ⓘ{I1}) (L2.ⓘ{I2})
.
interpretation "generic entrywise extension (local environment)"
lemma lexs_inv_atom1: ∀RN,RP,f,Y. ⋆ ⪤*[RN, RP, f] Y → Y = ⋆.
/2 width=6 by lexs_inv_atom1_aux/ qed-.
-fact lexs_inv_next1_aux: â\88\80RN,RP,f,X,Y. X ⪤*[RN, RP, f] Y â\86\92 â\88\80g,J1,K1. X = K1.â\93\98{J1} â\86\92 f = ⫯g →
+fact lexs_inv_next1_aux: â\88\80RN,RP,f,X,Y. X ⪤*[RN, RP, f] Y â\86\92 â\88\80g,J1,K1. X = K1.â\93\98{J1} â\86\92 f = â\86\91g →
∃∃J2,K2. K1 ⪤*[RN, RP, g] K2 & RN K1 J1 J2 & Y = K2.ⓘ{J2}.
#RN #RP #f #X #Y * -f -X -Y
[ #f #g #J1 #K1 #H destruct
qed-.
(* Basic_2A1: includes lpx_sn_inv_pair1 *)
-lemma lexs_inv_next1: â\88\80RN,RP,g,J1,K1,Y. K1.â\93\98{J1} ⪤*[RN, RP, ⫯g] Y →
+lemma lexs_inv_next1: â\88\80RN,RP,g,J1,K1,Y. K1.â\93\98{J1} ⪤*[RN, RP, â\86\91g] Y →
∃∃J2,K2. K1 ⪤*[RN, RP, g] K2 & RN K1 J1 J2 & Y = K2.ⓘ{J2}.
/2 width=7 by lexs_inv_next1_aux/ qed-.
-fact lexs_inv_push1_aux: â\88\80RN,RP,f,X,Y. X ⪤*[RN, RP, f] Y â\86\92 â\88\80g,J1,K1. X = K1.â\93\98{J1} â\86\92 f = â\86\91g →
+fact lexs_inv_push1_aux: â\88\80RN,RP,f,X,Y. X ⪤*[RN, RP, f] Y â\86\92 â\88\80g,J1,K1. X = K1.â\93\98{J1} â\86\92 f = ⫯g →
∃∃J2,K2. K1 ⪤*[RN, RP, g] K2 & RP K1 J1 J2 & Y = K2.ⓘ{J2}.
#RN #RP #f #X #Y * -f -X -Y
[ #f #g #J1 #K1 #H destruct
]
qed-.
-lemma lexs_inv_push1: â\88\80RN,RP,g,J1,K1,Y. K1.â\93\98{J1} ⪤*[RN, RP, â\86\91g] Y →
+lemma lexs_inv_push1: â\88\80RN,RP,g,J1,K1,Y. K1.â\93\98{J1} ⪤*[RN, RP, ⫯g] Y →
∃∃J2,K2. K1 ⪤*[RN, RP, g] K2 & RP K1 J1 J2 & Y = K2.ⓘ{J2}.
/2 width=7 by lexs_inv_push1_aux/ qed-.
lemma lexs_inv_atom2: ∀RN,RP,f,X. X ⪤*[RN, RP, f] ⋆ → X = ⋆.
/2 width=6 by lexs_inv_atom2_aux/ qed-.
-fact lexs_inv_next2_aux: â\88\80RN,RP,f,X,Y. X ⪤*[RN, RP, f] Y â\86\92 â\88\80g,J2,K2. Y = K2.â\93\98{J2} â\86\92 f = ⫯g →
+fact lexs_inv_next2_aux: â\88\80RN,RP,f,X,Y. X ⪤*[RN, RP, f] Y â\86\92 â\88\80g,J2,K2. Y = K2.â\93\98{J2} â\86\92 f = â\86\91g →
∃∃J1,K1. K1 ⪤*[RN, RP, g] K2 & RN K1 J1 J2 & X = K1.ⓘ{J1}.
#RN #RP #f #X #Y * -f -X -Y
[ #f #g #J2 #K2 #H destruct
qed-.
(* Basic_2A1: includes lpx_sn_inv_pair2 *)
-lemma lexs_inv_next2: â\88\80RN,RP,g,J2,X,K2. X ⪤*[RN, RP, ⫯g] K2.ⓘ{J2} →
+lemma lexs_inv_next2: â\88\80RN,RP,g,J2,X,K2. X ⪤*[RN, RP, â\86\91g] K2.ⓘ{J2} →
∃∃J1,K1. K1 ⪤*[RN, RP, g] K2 & RN K1 J1 J2 & X = K1.ⓘ{J1}.
/2 width=7 by lexs_inv_next2_aux/ qed-.
-fact lexs_inv_push2_aux: â\88\80RN,RP,f,X,Y. X ⪤*[RN, RP, f] Y â\86\92 â\88\80g,J2,K2. Y = K2.â\93\98{J2} â\86\92 f = â\86\91g →
+fact lexs_inv_push2_aux: â\88\80RN,RP,f,X,Y. X ⪤*[RN, RP, f] Y â\86\92 â\88\80g,J2,K2. Y = K2.â\93\98{J2} â\86\92 f = ⫯g →
∃∃J1,K1. K1 ⪤*[RN, RP, g] K2 & RP K1 J1 J2 & X = K1.ⓘ{J1}.
#RN #RP #f #X #Y * -f -X -Y
[ #f #J2 #K2 #g #H destruct
]
qed-.
-lemma lexs_inv_push2: â\88\80RN,RP,g,J2,X,K2. X ⪤*[RN, RP, â\86\91g] K2.ⓘ{J2} →
+lemma lexs_inv_push2: â\88\80RN,RP,g,J2,X,K2. X ⪤*[RN, RP, ⫯g] K2.ⓘ{J2} →
∃∃J1,K1. K1 ⪤*[RN, RP, g] K2 & RP K1 J1 J2 & X = K1.ⓘ{J1}.
/2 width=7 by lexs_inv_push2_aux/ qed-.
(* Basic_2A1: includes lpx_sn_inv_pair *)
lemma lexs_inv_next: ∀RN,RP,f,I1,I2,L1,L2.
- L1.â\93\98{I1} ⪤*[RN, RP, ⫯f] L2.ⓘ{I2} →
+ L1.â\93\98{I1} ⪤*[RN, RP, â\86\91f] L2.ⓘ{I2} →
L1 ⪤*[RN, RP, f] L2 ∧ RN L1 I1 I2.
#RN #RP #f #I1 #I2 #L1 #L2 #H elim (lexs_inv_next1 … H) -H
#I0 #L0 #HL10 #HI10 #H destruct /2 width=1 by conj/
qed-.
lemma lexs_inv_push: ∀RN,RP,f,I1,I2,L1,L2.
- L1.â\93\98{I1} ⪤*[RN, RP, â\86\91f] L2.ⓘ{I2} →
+ L1.â\93\98{I1} ⪤*[RN, RP, ⫯f] L2.ⓘ{I2} →
L1 ⪤*[RN, RP, f] L2 ∧ RP L1 I1 I2.
#RN #RP #f #I1 #I2 #L1 #L2 #H elim (lexs_inv_push1 … H) -H
#I0 #L0 #HL10 #HI10 #H destruct /2 width=1 by conj/
theorem lexs_trans_gen (RN1) (RP1) (RN2) (RP2) (RN) (RP):
∀L1,f.
- (â\88\80g,I,K,n. â¬\87*[n] L1 â\89\98 K.â\93\98{I} â\86\92 ⫯g = ⫱*[n] f → lexs_transitive RN1 RN2 RN RN1 RP1 g K I) →
- (â\88\80g,I,K,n. â¬\87*[n] L1 â\89\98 K.â\93\98{I} â\86\92 â\86\91g = ⫱*[n] f → lexs_transitive RP1 RP2 RP RN1 RP1 g K I) →
+ (â\88\80g,I,K,n. â¬\87*[n] L1 â\89\98 K.â\93\98{I} â\86\92 â\86\91g = ⫱*[n] f → lexs_transitive RN1 RN2 RN RN1 RP1 g K I) →
+ (â\88\80g,I,K,n. â¬\87*[n] L1 â\89\98 K.â\93\98{I} â\86\92 ⫯g = ⫱*[n] f → lexs_transitive RP1 RP2 RP RN1 RP1 g K I) →
∀L0. L1 ⪤*[RN1, RP1, f] L0 →
∀L2. L0 ⪤*[RN2, RP2, f] L2 →
L1 ⪤*[RN, RP, f] L2.
(* Basic_2A1: includes: lpx_sn_conf *)
theorem lexs_conf (RN1) (RP1) (RN2) (RP2):
∀L,f.
- (â\88\80g,I,K,n. â¬\87*[n] L â\89\98 K.â\93\98{I} â\86\92 ⫯g = ⫱*[n] f → R_pw_confluent2_lexs RN1 RN2 RN1 RP1 RN2 RP2 g K I) →
- (â\88\80g,I,K,n. â¬\87*[n] L â\89\98 K.â\93\98{I} â\86\92 â\86\91g = ⫱*[n] f → R_pw_confluent2_lexs RP1 RP2 RN1 RP1 RN2 RP2 g K I) →
+ (â\88\80g,I,K,n. â¬\87*[n] L â\89\98 K.â\93\98{I} â\86\92 â\86\91g = ⫱*[n] f → R_pw_confluent2_lexs RN1 RN2 RN1 RP1 RN2 RP2 g K I) →
+ (â\88\80g,I,K,n. â¬\87*[n] L â\89\98 K.â\93\98{I} â\86\92 ⫯g = ⫱*[n] f → R_pw_confluent2_lexs RP1 RP2 RN1 RP1 RN2 RP2 g K I) →
pw_confluent2 … (lexs RN1 RP1 f) (lexs RN2 RP2 f) L.
#RN1 #RP1 #RN2 #RP2 #L elim L -L
[ #f #_ #_ #L1 #H1 #L2 #H2 >(lexs_inv_atom1 … H1) >(lexs_inv_atom1 … H2) -H2 -H1
lemma lexs_tc_next_sn: ∀RN,RP. c_reflexive … RN →
∀f,I2,L1,L2. TC … (lexs RN RP f) L1 L2 → ∀I1. RN L1 I1 I2 →
- TC â\80¦ (lexs RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
+ TC â\80¦ (lexs RN RP (â\86\91f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
#RN #RP #HRN #f #I2 #L1 #L2 #H @(TC_ind_dx ??????? H) -L1
/3 width=3 by lexs_next, TC_strap, inj/
qed.
lemma lexs_tc_next_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP →
∀f,I1,I2,L1. (CTC … RN) L1 I1 I2 → ∀L2. L1 ⪤*[RN, RP, f] L2 →
- TC â\80¦ (lexs RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
+ TC â\80¦ (lexs RN RP (â\86\91f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2
/4 width=5 by lexs_refl, lexs_next, step, inj/
qed.
lemma lexs_tc_push_sn: ∀RN,RP. c_reflexive … RP →
∀f,I2,L1,L2. TC … (lexs RN RP f) L1 L2 → ∀I1. RP L1 I1 I2 →
- TC â\80¦ (lexs RN RP (â\86\91f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
+ TC â\80¦ (lexs RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
#RN #RP #HRP #f #I2 #L1 #L2 #H @(TC_ind_dx ??????? H) -L1
/3 width=3 by lexs_push, TC_strap, inj/
qed.
lemma lexs_tc_push_dx: ∀RN,RP. c_reflexive … RN → c_reflexive … RP →
∀f,I1,I2,L1. (CTC … RP) L1 I1 I2 → ∀L2. L1 ⪤*[RN, RP, f] L2 →
- TC â\80¦ (lexs RN RP (â\86\91f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
+ TC â\80¦ (lexs RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2
/4 width=5 by lexs_refl, lexs_push, step, inj/
qed.
theorem lexs_tc_next: ∀RN,RP. c_reflexive … RN → c_reflexive … RP →
∀f,I1,I2,L1. (CTC … RN) L1 I1 I2 → ∀L2. TC … (lexs RN RP f) L1 L2 →
- TC â\80¦ (lexs RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
+ TC â\80¦ (lexs RN RP (â\86\91f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2
/4 width=5 by lexs_tc_next_sn, lexs_tc_refl, trans_TC/
qed.
theorem lexs_tc_push: ∀RN,RP. c_reflexive … RN → c_reflexive … RP →
∀f,I1,I2,L1. (CTC … RP) L1 I1 I2 → ∀L2. TC … (lexs RN RP f) L1 L2 →
- TC â\80¦ (lexs RN RP (â\86\91f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
+ TC â\80¦ (lexs RN RP (⫯f)) (L1.ⓘ{I1}) (L2.ⓘ{I2}).
#RN #RP #HRN #HRP #f #I1 #I2 #L1 #H elim H -I2
/4 width=5 by lexs_tc_push_sn, lexs_tc_refl, trans_TC/
qed.
| lifts_lref: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → lifts f (#i1) (#i2)
| lifts_gref: ∀f,l. lifts f (§l) (§l)
| lifts_bind: ∀f,p,I,V1,V2,T1,T2.
- lifts f V1 V2 â\86\92 lifts (â\86\91f) T1 T2 →
+ lifts f V1 V2 â\86\92 lifts (⫯f) T1 T2 →
lifts f (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2)
| lifts_flat: ∀f,I,V1,V2,T1,T2.
lifts f V1 V2 → lifts f T1 T2 →
fact lifts_inv_bind1_aux: ∀f,X,Y. ⬆*[f] X ≘ Y →
∀p,I,V1,T1. X = ⓑ{p,I}V1.T1 →
- â\88\83â\88\83V2,T2. â¬\86*[f] V1 â\89\98 V2 & â¬\86*[â\86\91f] T1 ≘ T2 &
+ â\88\83â\88\83V2,T2. â¬\86*[f] V1 â\89\98 V2 & â¬\86*[⫯f] T1 ≘ T2 &
Y = ⓑ{p,I}V2.T2.
#f #X #Y * -f -X -Y
[ #f #s #q #J #W1 #U1 #H destruct
(* Basic_1: was: lift1_bind *)
(* Basic_2A1: includes: lift_inv_bind1 *)
lemma lifts_inv_bind1: ∀f,p,I,V1,T1,Y. ⬆*[f] ⓑ{p,I}V1.T1 ≘ Y →
- â\88\83â\88\83V2,T2. â¬\86*[f] V1 â\89\98 V2 & â¬\86*[â\86\91f] T1 ≘ T2 &
+ â\88\83â\88\83V2,T2. â¬\86*[f] V1 â\89\98 V2 & â¬\86*[⫯f] T1 ≘ T2 &
Y = ⓑ{p,I}V2.T2.
/2 width=3 by lifts_inv_bind1_aux/ qed-.
fact lifts_inv_bind2_aux: ∀f,X,Y. ⬆*[f] X ≘ Y →
∀p,I,V2,T2. Y = ⓑ{p,I}V2.T2 →
- â\88\83â\88\83V1,T1. â¬\86*[f] V1 â\89\98 V2 & â¬\86*[â\86\91f] T1 ≘ T2 &
+ â\88\83â\88\83V1,T1. â¬\86*[f] V1 â\89\98 V2 & â¬\86*[⫯f] T1 ≘ T2 &
X = ⓑ{p,I}V1.T1.
#f #X #Y * -f -X -Y
[ #f #s #q #J #W2 #U2 #H destruct
(* Basic_1: includes: lift_gen_bind *)
(* Basic_2A1: includes: lift_inv_bind2 *)
lemma lifts_inv_bind2: ∀f,p,I,V2,T2,X. ⬆*[f] X ≘ ⓑ{p,I}V2.T2 →
- â\88\83â\88\83V1,T1. â¬\86*[f] V1 â\89\98 V2 & â¬\86*[â\86\91f] T1 ≘ T2 &
+ â\88\83â\88\83V1,T1. â¬\86*[f] V1 â\89\98 V2 & â¬\86*[⫯f] T1 ≘ T2 &
X = ⓑ{p,I}V1.T1.
/2 width=3 by lifts_inv_bind2_aux/ qed-.
/3 width=2 by lifts_lref, lifts_sort, lifts_gref, ex_intro/
[ #p ] #I #V1 #T1 #IHV1 #IHT1 #f
elim (IHV1 f) -IHV1 #V2 #HV12
-[ elim (IHT1 (â\86\91f)) -IHT1 /3 width=2 by lifts_bind, ex_intro/
+[ elim (IHT1 (⫯f)) -IHT1 /3 width=2 by lifts_bind, ex_intro/
| elim (IHT1 f) -IHT1 /3 width=2 by lifts_flat, ex_intro/
]
qed-.
/3 width=3 by lifts_lref, ex2_intro/
| /3 width=3 by lifts_gref, ex2_intro/
| #f #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f1 #f2 #Ht
- elim (IHV â\80¦ Ht) elim (IHT (â\86\91f1) (â\86\91f2)) -IHV -IHT
+ elim (IHV â\80¦ Ht) elim (IHT (⫯f1) (⫯f2)) -IHV -IHT
/3 width=5 by lifts_bind, after_O2, ex2_intro/
| #f #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f1 #f2 #Ht
elim (IHV … Ht) elim (IHT … Ht) -IHV -IHT -Ht
/3 width=3 by lifts_lref, ex2_intro/
| /3 width=3 by lifts_gref, ex2_intro/
| #f1 #p #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f2 #f #Ht
- elim (IHV â\80¦ Ht) elim (IHT (â\86\91f2) (â\86\91f)) -IHV -IHT
+ elim (IHV â\80¦ Ht) elim (IHT (⫯f2) (⫯f)) -IHV -IHT
/3 width=5 by lifts_bind, after_O2, ex2_intro/
| #f1 #I #V1 #V2 #T1 #T2 #_ #_ #IHV #IHT #f2 #f #Ht
elim (IHV … Ht) elim (IHT … Ht) -IHV -IHT -Ht
]
| * [ #p ] #I #V2 #T2 #IHV2 #IHT2 #f
[ elim (IHV2 f) -IHV2
- [ * #V1 #HV12 elim (IHT2 (â\86\91f)) -IHT2
+ [ * #V1 #HV12 elim (IHT2 (⫯f)) -IHT2
[ * #T1 #HT12 @or_introl /3 width=2 by lifts_bind, ex_intro/
| -V1 #HT2 @or_intror * #X #H
elim (lifts_inv_bind2 … H) -H /3 width=2 by ex_intro/
]
qed-.
-lemma lifts_div4_one: â\88\80f,Tf,T. â¬\86*[â\86\91f] Tf ≘ T →
+lemma lifts_div4_one: â\88\80f,Tf,T. â¬\86*[⫯f] Tf ≘ T →
∀T1. ⬆*[1] T1 ≘ T →
∃∃T0. ⬆*[1] T0 ≘ Tf & ⬆*[f] T0 ≘ T1.
/4 width=6 by lifts_div4, at_div_id_dx, at_div_pn/ qed-.
/2 width=4 by lexs_inv_atom1/ qed-.
(* Basic_2A1: includes: lreq_inv_pair1 *)
-lemma lreq_inv_next1: â\88\80g,J,K1,Y. K1.â\93\98{J} â\89¡[⫯g] Y →
+lemma lreq_inv_next1: â\88\80g,J,K1,Y. K1.â\93\98{J} â\89¡[â\86\91g] Y →
∃∃K2. K1 ≡[g] K2 & Y = K2.ⓘ{J}.
#g #J #K1 #Y #H
elim (lexs_inv_next1 … H) -H #Z #K2 #HK12 #H1 #H2 destruct
qed-.
(* Basic_2A1: includes: lreq_inv_zero1 lreq_inv_succ1 *)
-lemma lreq_inv_push1: â\88\80g,J1,K1,Y. K1.â\93\98{J1} â\89¡[â\86\91g] Y →
+lemma lreq_inv_push1: â\88\80g,J1,K1,Y. K1.â\93\98{J1} â\89¡[⫯g] Y →
∃∃J2,K2. K1 ≡[g] K2 & Y = K2.ⓘ{J2}.
#g #J1 #K1 #Y #H elim (lexs_inv_push1 … H) -H /2 width=4 by ex2_2_intro/
qed-.
/2 width=4 by lexs_inv_atom2/ qed-.
(* Basic_2A1: includes: lreq_inv_pair2 *)
-lemma lreq_inv_next2: â\88\80g,J,X,K2. X â\89¡[⫯g] K2.ⓘ{J} →
+lemma lreq_inv_next2: â\88\80g,J,X,K2. X â\89¡[â\86\91g] K2.ⓘ{J} →
∃∃K1. K1 ≡[g] K2 & X = K1.ⓘ{J}.
#g #J #X #K2 #H
elim (lexs_inv_next2 … H) -H #Z #K1 #HK12 #H1 #H2 destruct
qed-.
(* Basic_2A1: includes: lreq_inv_zero2 lreq_inv_succ2 *)
-lemma lreq_inv_push2: â\88\80g,J2,X,K2. X â\89¡[â\86\91g] K2.ⓘ{J2} →
+lemma lreq_inv_push2: â\88\80g,J2,X,K2. X â\89¡[⫯g] K2.ⓘ{J2} →
∃∃J1,K1. K1 ≡[g] K2 & X = K1.ⓘ{J1}.
#g #J2 #X #K2 #H elim (lexs_inv_push2 … H) -H /2 width=4 by ex2_2_intro/
qed-.
(* Basic_2A1: includes: lreq_inv_pair *)
-lemma lreq_inv_next: â\88\80f,I1,I2,L1,L2. L1.â\93\98{I1} â\89¡[⫯f] L2.ⓘ{I2} →
+lemma lreq_inv_next: â\88\80f,I1,I2,L1,L2. L1.â\93\98{I1} â\89¡[â\86\91f] L2.ⓘ{I2} →
L1 ≡[f] L2 ∧ I1 = I2.
#f #I1 #I2 #L1 #L2 #H elim (lexs_inv_next … H) -H
/3 width=3 by ceq_ext_inv_eq, conj/
qed-.
(* Basic_2A1: includes: lreq_inv_succ *)
-lemma lreq_inv_push: â\88\80f,I1,I2,L1,L2. L1.â\93\98{I1} â\89¡[â\86\91f] L2.ⓘ{I2} → L1 ≡[f] L2.
+lemma lreq_inv_push: â\88\80f,I1,I2,L1,L2. L1.â\93\98{I1} â\89¡[⫯f] L2.ⓘ{I2} → L1 ≡[f] L2.
#f #I1 #I2 #L1 #L2 #H elim (lexs_inv_push … H) -H /2 width=1 by conj/
qed-.
#h #G #L #X2 #s #H @(cpxs_ind … H) -X2 /2 width=2 by ex_intro/
#X #X2 #_ #HX2 * #n #H destruct
elim (cpx_inv_sort1 … HX2) -HX2 #H destruct /2 width=2 by ex_intro/
-@(ex_intro â\80¦ (⫯n)) >iter_S //
+@(ex_intro â\80¦ (â\86\91n)) >iter_S //
qed-.
lemma cpxs_inv_cast1: ∀h,G,L,W1,T1,U2. ⦃G, L⦄ ⊢ ⓝW1.T1 ⬈*[h] U2 →
qed.
lemma cpxs_lref: ∀h,I,G,K,T,i. ⦃G, K⦄ ⊢ #i ⬈*[h] T →
- â\88\80U. â¬\86*[1] T â\89\98 U â\86\92 â¦\83G, K.â\93\98{I}â¦\84 â\8a¢ #⫯i ⬈*[h] U.
+ â\88\80U. â¬\86*[1] T â\89\98 U â\86\92 â¦\83G, K.â\93\98{I}â¦\84 â\8a¢ #â\86\91i ⬈*[h] U.
#h #I #G #K #T #i #H @(cpxs_ind … H) -T
[ /3 width=3 by cpx_cpxs, cpx_lref/
| #T0 #T #_ #HT2 #IH #U #HTU
(* Basic_2A1: was: cpxs_delta *)
lemma cpxs_delta_drops: ∀h,I,G,L,K,V1,V2,i.
⬇*[i] L ≘ K.ⓑ{I}V1 → ⦃G, K⦄ ⊢ V1 ⬈*[h] V2 →
- â\88\80W2. â¬\86*[⫯i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ⬈*[h] W2.
+ â\88\80W2. â¬\86*[â\86\91i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ⬈*[h] W2.
#h #I #G #L #K #V1 #V2 #i #HLK #H @(cpxs_ind … H) -V2
[ /3 width=7 by cpx_cpxs, cpx_delta_drops/
| #V #V2 #_ #HV2 #IH #W2 #HVW2
- elim (lifts_total V (ð\9d\90\94â\9d´â«¯i❵))
+ elim (lifts_total V (ð\9d\90\94â\9d´â\86\91i❵))
/4 width=11 by cpxs_strap1, cpx_lifts_bi, drops_isuni_fwd_drop2/
]
qed.
]
qed-.
-lemma cpxs_inv_lref1: â\88\80h,G,L,T2,i. â¦\83G, Lâ¦\84 â\8a¢ #⫯i ⬈*[h] T2 →
- T2 = #(⫯i) ∨
+lemma cpxs_inv_lref1: â\88\80h,G,L,T2,i. â¦\83G, Lâ¦\84 â\8a¢ #â\86\91i ⬈*[h] T2 →
+ T2 = #(â\86\91i) ∨
∃∃I,K,T. ⦃G, K⦄ ⊢ #i ⬈*[h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
#h #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/
#T #T2 #_ #HT2 *
lemma cpxs_inv_lref1_drops: ∀h,G,L,T2,i. ⦃G, L⦄ ⊢ #i ⬈*[h] T2 →
T2 = #i ∨
∃∃I,K,V1,T1. ⬇*[i] L ≘ K.ⓑ{I}V1 & ⦃G, K⦄ ⊢ V1 ⬈*[h] T1 &
- â¬\86*[⫯i] T1 ≘ T2.
+ â¬\86*[â\86\91i] T1 ≘ T2.
#h #G #L #T2 #i #H @(cpxs_ind … H) -T2 /2 width=1 by or_introl/
#T #T2 #_ #HT2 *
[ #H destruct
(* Note: probably this is an inversion lemma *)
(* Basic_2A1: was: cpxs_fwd_delta *)
lemma cpxs_fwd_delta_drops: ∀h,o,I,G,L,K,V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
- â\88\80V2. â¬\86*[⫯i] V1 ≘ V2 →
+ â\88\80V2. â¬\86*[â\86\91i] V1 ≘ V2 →
∀U. ⦃G, L⦄ ⊢ #i ⬈*[h] U →
#i ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ V2 ⬈*[h] U.
#h #o #I #G #L #K #V1 #i #HLK #V2 #HV12 #U #H
(* Basic_2A1: was: cpxs_fwd_delta_vector *)
lemma cpxs_fwd_delta_drops_vector: ∀h,o,I,G,L,K,V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
- â\88\80V2. â¬\86*[⫯i] V1 ≘ V2 →
+ â\88\80V2. â¬\86*[â\86\91i] V1 ≘ V2 →
∀Vs,U. ⦃G, L⦄ ⊢ ⒶVs.#i ⬈*[h] U →
ⒶVs.#i ⩳[h, o] U ∨ ⦃G, L⦄ ⊢ ⒶVs.V2 ⬈*[h] U.
#h #o #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs /2 width=5 by cpxs_fwd_delta_drops/
lemma csx_inv_lref_pair: ∀h,o,I,G,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V →
⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃#i⦄ → ⦃G, K⦄ ⊢ ⬈*[h, o] 𝐒⦃V⦄.
#h #o #I #G #L #K #V #i #HLK #Hi
-elim (lifts_total V (ð\9d\90\94â\9d´â«¯i❵))
+elim (lifts_total V (ð\9d\90\94â\9d´â\86\91i❵))
/4 width=9 by csx_inv_lifts, csx_cpx_trans, cpx_delta_drops, drops_isuni_fwd_drop2/
qed-.
qed.
lemma csx_applv_delta: ∀h,o,I,G,L,K,V1,i. ⬇*[i] L ≘ K.ⓑ{I}V1 →
- â\88\80V2. â¬\86*[⫯i] V1 ≘ V2 →
+ â\88\80V2. â¬\86*[â\86\91i] V1 ≘ V2 →
∀Vs. ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.V2⦄ → ⦃G, L⦄ ⊢ ⬈*[h, o] 𝐒⦃ⒶVs.#i⦄.
#h #o #I #G #L #K #V1 #i #HLK #V2 #HV12 #Vs elim Vs -Vs
[ /4 width=11 by csx_inv_lifts, csx_lref_pair, drops_isuni_fwd_drop2/
inductive lsubsx (h) (o) (G): rtmap → relation lenv ≝
| lsubsx_atom: ∀f. lsubsx h o G f (⋆) (⋆)
| lsubsx_push: ∀f,I,K1,K2. lsubsx h o G f K1 K2 →
- lsubsx h o G (â\86\91f) (K1.ⓘ{I}) (K2.ⓘ{I})
+ lsubsx h o G (⫯f) (K1.ⓘ{I}) (K2.ⓘ{I})
| lsubsx_unit: ∀f,I,K1,K2. lsubsx h o G f K1 K2 →
- lsubsx h o G (⫯f) (K1.ⓤ{I}) (K2.ⓧ)
+ lsubsx h o G (â\86\91f) (K1.ⓤ{I}) (K2.ⓧ)
| lsubsx_pair: ∀f,I,K1,K2,V. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ →
- lsubsx h o G f K1 K2 â\86\92 lsubsx h o G (⫯f) (K1.ⓑ{I}V) (K2.ⓧ)
+ lsubsx h o G f K1 K2 â\86\92 lsubsx h o G (â\86\91f) (K1.ⓑ{I}V) (K2.ⓧ)
.
interpretation
/2 width=7 by lsubsx_inv_atom_sn_aux/ qed-.
fact lsubsx_inv_push_sn_aux: ∀h,o,g,G,L1,L2. G ⊢ L1 ⊆ⓧ[h, o, g] L2 →
- â\88\80f,I,K1. g = â\86\91f → L1 = K1.ⓘ{I} →
+ â\88\80f,I,K1. g = ⫯f → L1 = K1.ⓘ{I} →
∃∃K2. G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓘ{I}.
#h #o #g #G #L1 #L2 * -g -L1 -L2
[ #f #g #J #L1 #_ #H destruct
]
qed-.
-lemma lsubsx_inv_push_sn: â\88\80h,o,f,I,G,K1,L2. G â\8a¢ K1.â\93\98{I} â\8a\86â\93§[h, o, â\86\91f] L2 →
+lemma lsubsx_inv_push_sn: â\88\80h,o,f,I,G,K1,L2. G â\8a¢ K1.â\93\98{I} â\8a\86â\93§[h, o, ⫯f] L2 →
∃∃K2. G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓘ{I}.
/2 width=5 by lsubsx_inv_push_sn_aux/ qed-.
fact lsubsx_inv_unit_sn_aux: ∀h,o,g,G,L1,L2. G ⊢ L1 ⊆ⓧ[h, o, g] L2 →
- â\88\80f,I,K1. g = ⫯f → L1 = K1.ⓤ{I} →
+ â\88\80f,I,K1. g = â\86\91f → L1 = K1.ⓤ{I} →
∃∃K2. G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓧ.
#h #o #g #G #L1 #L2 * -g -L1 -L2
[ #f #g #J #L1 #_ #H destruct
]
qed-.
-lemma lsubsx_inv_unit_sn: â\88\80h,o,f,I,G,K1,L2. G â\8a¢ K1.â\93¤{I} â\8a\86â\93§[h, o, ⫯f] L2 →
+lemma lsubsx_inv_unit_sn: â\88\80h,o,f,I,G,K1,L2. G â\8a¢ K1.â\93¤{I} â\8a\86â\93§[h, o, â\86\91f] L2 →
∃∃K2. G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓧ.
/2 width=6 by lsubsx_inv_unit_sn_aux/ qed-.
fact lsubsx_inv_pair_sn_aux: ∀h,o,g,G,L1,L2. G ⊢ L1 ⊆ⓧ[h, o, g] L2 →
- â\88\80f,I,K1,V. g = ⫯f → L1 = K1.ⓑ{I}V →
+ â\88\80f,I,K1,V. g = â\86\91f → L1 = K1.ⓑ{I}V →
∃∃K2. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ &
G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓧ.
#h #o #g #G #L1 #L2 * -g -L1 -L2
qed-.
(* Basic_2A1: uses: lcosx_inv_pair *)
-lemma lsubsx_inv_pair_sn: â\88\80h,o,f,I,G,K1,L2,V. G â\8a¢ K1.â\93\91{I}V â\8a\86â\93§[h, o, ⫯f] L2 →
+lemma lsubsx_inv_pair_sn: â\88\80h,o,f,I,G,K1,L2,V. G â\8a¢ K1.â\93\91{I}V â\8a\86â\93§[h, o, â\86\91f] L2 →
∃∃K2. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ &
G ⊢ K1 ⊆ⓧ[h, o, f] K2 & L2 = K2.ⓧ.
/2 width=6 by lsubsx_inv_pair_sn_aux/ qed-.
(* Advanced inversion lemmas ************************************************)
lemma lsubsx_inv_pair_sn_gen: ∀h,o,g,I,G,K1,L2,V. G ⊢ K1.ⓑ{I}V ⊆ⓧ[h, o, g] L2 →
- â\88¨â\88¨ â\88\83â\88\83f,K2. G â\8a¢ K1 â\8a\86â\93§[h, o, f] K2 & g = â\86\91f & L2 = K2.ⓑ{I}V
+ â\88¨â\88¨ â\88\83â\88\83f,K2. G â\8a¢ K1 â\8a\86â\93§[h, o, f] K2 & g = ⫯f & L2 = K2.ⓑ{I}V
| ∃∃f,K2. G ⊢ ⬈*[h, o, V] 𝐒⦃K2⦄ &
- G â\8a¢ K1 â\8a\86â\93§[h, o, f] K2 & g = ⫯f & L2 = K2.ⓧ.
+ G â\8a¢ K1 â\8a\86â\93§[h, o, f] K2 & g = â\86\91f & L2 = K2.ⓧ.
#h #o #g #I #G #K1 #L2 #V #H
elim (pn_split g) * #f #Hf destruct
[ elim (lsubsx_inv_push_sn … H) -H /3 width=5 by ex3_2_intro, or_introl/
(* Basic_2A1: was: cnx_inv_delta *)
lemma cnx_inv_lref_pair: ∀h,o,I,G,L,K,V,i. ⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, L⦄ ⊢ ⬈[h, o] 𝐍⦃#i⦄ → ⊥.
#h #o #I #G #L #K #V #i #HLK #H
-elim (lifts_total V (ð\9d\90\94â\9d´â«¯i❵)) #W #HVW
+elim (lifts_total V (ð\9d\90\94â\9d´â\86\91i❵)) #W #HVW
lapply (H W ?) -H /2 width=7 by cpx_delta_drops/ -HLK
#H lapply (tdeq_inv_lref1 … H) -H #H destruct
/2 width=5 by lifts_inv_lref2_uni_lt/
| cpg_ell : ∀c,G,L,V1,V2,W2. cpg Rt h c G L V1 V2 →
⬆*[1] V2 ≘ W2 → cpg Rt h (c+𝟘𝟙) G (L.ⓛV1) (#0) W2
| cpg_lref : ∀c,I,G,L,T,U,i. cpg Rt h c G L (#i) T →
- â¬\86*[1] T â\89\98 U â\86\92 cpg Rt h c G (L.â\93\98{I}) (#⫯i) U
+ â¬\86*[1] T â\89\98 U â\86\92 cpg Rt h c G (L.â\93\98{I}) (#â\86\91i) U
| cpg_bind : ∀cV,cT,p,I,G,L,V1,V2,T1,T2.
cpg Rt h cV G L V1 V2 → cpg Rt h cT G (L.ⓑ{I}V1) T1 T2 →
- cpg Rt h ((â\86\93cV)∨cT) G L (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2)
+ cpg Rt h ((â\86\95*cV)∨cT) G L (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2)
| cpg_appl : ∀cV,cT,G,L,V1,V2,T1,T2.
cpg Rt h cV G L V1 V2 → cpg Rt h cT G L T1 T2 →
- cpg Rt h ((â\86\93cV)∨cT) G L (ⓐV1.T1) (ⓐV2.T2)
+ cpg Rt h ((â\86\95*cV)∨cT) G L (ⓐV1.T1) (ⓐV2.T2)
| cpg_cast : ∀cU,cT,G,L,U1,U2,T1,T2. Rt cU cT →
cpg Rt h cU G L U1 U2 → cpg Rt h cT G L T1 T2 →
cpg Rt h (cU∨cT) G L (ⓝU1.T1) (ⓝU2.T2)
| cpg_ee : ∀c,G,L,V1,V2,T. cpg Rt h c G L V1 V2 → cpg Rt h (c+𝟘𝟙) G L (ⓝV1.T) V2
| cpg_beta : ∀cV,cW,cT,p,G,L,V1,V2,W1,W2,T1,T2.
cpg Rt h cV G L V1 V2 → cpg Rt h cW G L W1 W2 → cpg Rt h cT G (L.ⓛW1) T1 T2 →
- cpg Rt h (((â\86\93cV)â\88¨(â\86\93cW)∨cT)+𝟙𝟘) G L (ⓐV1.ⓛ{p}W1.T1) (ⓓ{p}ⓝW2.V2.T2)
+ cpg Rt h (((â\86\95*cV)â\88¨(â\86\95*cW)∨cT)+𝟙𝟘) G L (ⓐV1.ⓛ{p}W1.T1) (ⓓ{p}ⓝW2.V2.T2)
| cpg_theta: ∀cV,cW,cT,p,G,L,V1,V,V2,W1,W2,T1,T2.
cpg Rt h cV G L V1 V → ⬆*[1] V ≘ V2 → cpg Rt h cW G L W1 W2 →
cpg Rt h cT G (L.ⓓW1) T1 T2 →
- cpg Rt h (((â\86\93cV)â\88¨(â\86\93cW)∨cT)+𝟙𝟘) G L (ⓐV1.ⓓ{p}W1.T1) (ⓓ{p}W2.ⓐV2.T2)
+ cpg Rt h (((â\86\95*cV)â\88¨(â\86\95*cW)∨cT)+𝟙𝟘) G L (ⓐV1.ⓓ{p}W1.T1) (ⓓ{p}W2.ⓐV2.T2)
.
interpretation
| ∃∃cV,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⬆*[1] V2 ≘ T2 &
L = K.ⓛV1 & J = LRef 0 & c = cV+𝟘𝟙
| ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ⬈[Rt, c, h] T & ⬆*[1] T ≘ T2 &
- L = K.â\93\98{I} & J = LRef (⫯i).
+ L = K.â\93\98{I} & J = LRef (â\86\91i).
#Rt #c #h #G #L #T1 #T2 * -c -G -L -T1 -T2
[ #I #G #L #J #H destruct /3 width=1 by or5_intro0, conj/
| #G #L #s #J #H destruct /3 width=3 by or5_intro1, ex3_intro/
| ∃∃cV,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⬆*[1] V2 ≘ T2 &
L = K.ⓛV1 & J = LRef 0 & c = cV+𝟘𝟙
| ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ⬈[Rt, c, h] T & ⬆*[1] T ≘ T2 &
- L = K.â\93\98{I} & J = LRef (⫯i).
+ L = K.â\93\98{I} & J = LRef (â\86\91i).
/2 width=3 by cpg_inv_atom1_aux/ qed-.
lemma cpg_inv_sort1: ∀Rt,c,h,G,L,T2,s. ⦃G, L⦄ ⊢ ⋆s ⬈[Rt, c, h] T2 →
]
qed-.
-lemma cpg_inv_lref1: â\88\80Rt,c,h,G,L,T2,i. â¦\83G, Lâ¦\84 â\8a¢ #⫯i ⬈[Rt, c, h] T2 →
- â\88¨â\88¨ T2 = #(⫯i) ∧ c = 𝟘𝟘
+lemma cpg_inv_lref1: â\88\80Rt,c,h,G,L,T2,i. â¦\83G, Lâ¦\84 â\8a¢ #â\86\91i ⬈[Rt, c, h] T2 →
+ â\88¨â\88¨ T2 = #(â\86\91i) ∧ c = 𝟘𝟘
| ∃∃I,K,T. ⦃G, K⦄ ⊢ #i ⬈[Rt, c, h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
#Rt #c #h #G #L #T2 #i #H
elim (cpg_inv_atom1 … H) -H * /3 width=1 by or_introl, conj/
fact cpg_inv_bind1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G, L⦄ ⊢ U ⬈[Rt, c, h] U2 →
∀p,J,V1,U1. U = ⓑ{p,J}V1.U1 →
∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L.ⓑ{J}V1⦄ ⊢ U1 ⬈[Rt, cT, h] T2 &
- U2 = â\93\91{p,J}V2.T2 & c = ((â\86\93cV)∨cT)
+ U2 = â\93\91{p,J}V2.T2 & c = ((â\86\95*cV)∨cT)
| ∃∃cT,T. ⦃G, L.ⓓV1⦄ ⊢ U1 ⬈[Rt, cT, h] T & ⬆*[1] U2 ≘ T &
p = true & J = Abbr & c = cT+𝟙𝟘.
#Rt #c #h #G #L #U #U2 * -c -G -L -U -U2
lemma cpg_inv_bind1: ∀Rt,c,h,p,I,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓑ{p,I}V1.T1 ⬈[Rt, c, h] U2 →
∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
- U2 = â\93\91{p,I}V2.T2 & c = ((â\86\93cV)∨cT)
+ U2 = â\93\91{p,I}V2.T2 & c = ((â\86\95*cV)∨cT)
| ∃∃cT,T. ⦃G, L.ⓓV1⦄ ⊢ T1 ⬈[Rt, cT, h] T & ⬆*[1] U2 ≘ T &
p = true & I = Abbr & c = cT+𝟙𝟘.
/2 width=3 by cpg_inv_bind1_aux/ qed-.
lemma cpg_inv_abbr1: ∀Rt,c,h,p,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓓ{p}V1.T1 ⬈[Rt, c, h] U2 →
∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L.ⓓV1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
- U2 = â\93\93{p}V2.T2 & c = ((â\86\93cV)∨cT)
+ U2 = â\93\93{p}V2.T2 & c = ((â\86\95*cV)∨cT)
| ∃∃cT,T. ⦃G, L.ⓓV1⦄ ⊢ T1 ⬈[Rt, cT, h] T & ⬆*[1] U2 ≘ T &
p = true & c = cT+𝟙𝟘.
#Rt #c #h #p #G #L #V1 #T1 #U2 #H elim (cpg_inv_bind1 … H) -H *
lemma cpg_inv_abst1: ∀Rt,c,h,p,G,L,V1,T1,U2. ⦃G, L⦄ ⊢ ⓛ{p}V1.T1 ⬈[Rt, c, h] U2 →
∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L.ⓛV1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
- U2 = â\93\9b{p}V2.T2 & c = ((â\86\93cV)∨cT).
+ U2 = â\93\9b{p}V2.T2 & c = ((â\86\95*cV)∨cT).
#Rt #c #h #p #G #L #V1 #T1 #U2 #H elim (cpg_inv_bind1 … H) -H *
[ /3 width=8 by ex4_4_intro/
| #c #T #_ #_ #_ #H destruct
fact cpg_inv_appl1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G, L⦄ ⊢ U ⬈[Rt, c, h] U2 →
∀V1,U1. U = ⓐV1.U1 →
∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ U1 ⬈[Rt, cT, h] T2 &
- U2 = â\93\90V2.T2 & c = ((â\86\93cV)∨cT)
+ U2 = â\93\90V2.T2 & c = ((â\86\95*cV)∨cT)
| ∃∃cV,cW,cT,p,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ W1 ⬈[Rt, cW, h] W2 & ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
- U1 = â\93\9b{p}W1.T1 & U2 = â\93\93{p}â\93\9dW2.V2.T2 & c = ((â\86\93cV)â\88¨(â\86\93cW)∨cT)+𝟙𝟘
+ U1 = â\93\9b{p}W1.T1 & U2 = â\93\93{p}â\93\9dW2.V2.T2 & c = ((â\86\95*cV)â\88¨(â\86\95*cW)∨cT)+𝟙𝟘
| ∃∃cV,cW,cT,p,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V & ⬆*[1] V ≘ V2 & ⦃G, L⦄ ⊢ W1 ⬈[Rt, cW, h] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
- U1 = â\93\93{p}W1.T1 & U2 = â\93\93{p}W2.â\93\90V2.T2 & c = ((â\86\93cV)â\88¨(â\86\93cW)∨cT)+𝟙𝟘.
+ U1 = â\93\93{p}W1.T1 & U2 = â\93\93{p}W2.â\93\90V2.T2 & c = ((â\86\95*cV)â\88¨(â\86\95*cW)∨cT)+𝟙𝟘.
#Rt #c #h #G #L #U #U2 * -c -G -L -U -U2
[ #I #G #L #W #U1 #H destruct
| #G #L #s #W #U1 #H destruct
lemma cpg_inv_appl1: ∀Rt,c,h,G,L,V1,U1,U2. ⦃G, L⦄ ⊢ ⓐV1.U1 ⬈[Rt, c, h] U2 →
∨∨ ∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ U1 ⬈[Rt, cT, h] T2 &
- U2 = â\93\90V2.T2 & c = ((â\86\93cV)∨cT)
+ U2 = â\93\90V2.T2 & c = ((â\86\95*cV)∨cT)
| ∃∃cV,cW,cT,p,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ W1 ⬈[Rt, cW, h] W2 & ⦃G, L.ⓛW1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
- U1 = â\93\9b{p}W1.T1 & U2 = â\93\93{p}â\93\9dW2.V2.T2 & c = ((â\86\93cV)â\88¨(â\86\93cW)∨cT)+𝟙𝟘
+ U1 = â\93\9b{p}W1.T1 & U2 = â\93\93{p}â\93\9dW2.V2.T2 & c = ((â\86\95*cV)â\88¨(â\86\95*cW)∨cT)+𝟙𝟘
| ∃∃cV,cW,cT,p,V,V2,W1,W2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V & ⬆*[1] V ≘ V2 & ⦃G, L⦄ ⊢ W1 ⬈[Rt, cW, h] W2 & ⦃G, L.ⓓW1⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
- U1 = â\93\93{p}W1.T1 & U2 = â\93\93{p}W2.â\93\90V2.T2 & c = ((â\86\93cV)â\88¨(â\86\93cW)∨cT)+𝟙𝟘.
+ U1 = â\93\93{p}W1.T1 & U2 = â\93\93{p}W2.â\93\90V2.T2 & c = ((â\86\95*cV)â\88¨(â\86\95*cW)∨cT)+𝟙𝟘.
/2 width=3 by cpg_inv_appl1_aux/ qed-.
fact cpg_inv_cast1_aux: ∀Rt,c,h,G,L,U,U2. ⦃G, L⦄ ⊢ U ⬈[Rt, c, h] U2 →
* #z #Y #X1 #X2 #HX12 #HXT2 #H1 #H2 destruct /3 width=5 by or3_intro1, or3_intro2, ex4_2_intro/
qed-.
-lemma cpg_inv_lref1_bind: â\88\80Rt,c,h,I,G,K,T2,i. â¦\83G, K.â\93\98{I}â¦\84 â\8a¢ #⫯i ⬈[Rt, c, h] T2 →
- â\88¨â\88¨ T2 = #(⫯i) ∧ c = 𝟘𝟘
+lemma cpg_inv_lref1_bind: â\88\80Rt,c,h,I,G,K,T2,i. â¦\83G, K.â\93\98{I}â¦\84 â\8a¢ #â\86\91i ⬈[Rt, c, h] T2 →
+ â\88¨â\88¨ T2 = #(â\86\91i) ∧ c = 𝟘𝟘
| ∃∃T. ⦃G, K⦄ ⊢ #i ⬈[Rt, c, h] T & ⬆*[1] T ≘ T2.
#Rt #c #h #I #G #L #T2 #i #H elim (cpg_inv_lref1 … H) -H /2 width=1 by or_introl/
* #Z #Y #T #HT #HT2 #H destruct /3 width=3 by ex2_intro, or_intror/
(* Advanced properties ******************************************************)
lemma cpg_delta_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⬇*[i] L ≘ K.ⓓV → ⦃G, K⦄ ⊢ V ⬈[Rt, c, h] V2 →
- â¬\86*[⫯i] V2 ≘ T2 → ⦃G, L⦄ ⊢ #i ⬈[Rt, c, h] T2.
+ â¬\86*[â\86\91i] V2 ≘ T2 → ⦃G, L⦄ ⊢ #i ⬈[Rt, c, h] T2.
#Rt #c #h #G #K #V #V2 #i elim i -i
[ #L #T2 #HLK lapply (drops_fwd_isid … HLK ?) // #H destruct /3 width=3 by cpg_delta/
| #i #IH #L0 #T0 #H0 #HV2 #HVT2
elim (drops_inv_succ … H0) -H0 #I #L #HLK #H destruct
- elim (lifts_split_trans â\80¦ HVT2 (ð\9d\90\94â\9d´â«¯i❵) (𝐔❴1❵) ?) -HVT2 /3 width=3 by cpg_lref/
+ elim (lifts_split_trans â\80¦ HVT2 (ð\9d\90\94â\9d´â\86\91i❵) (𝐔❴1❵) ?) -HVT2 /3 width=3 by cpg_lref/
]
qed.
lemma cpg_ell_drops: ∀Rt,c,h,G,K,V,V2,i,L,T2. ⬇*[i] L ≘ K.ⓛV → ⦃G, K⦄ ⊢ V ⬈[Rt,c, h] V2 →
- â¬\86*[⫯i] V2 ≘ T2 → ⦃G, L⦄ ⊢ #i ⬈[Rt, c+𝟘𝟙, h] T2.
+ â¬\86*[â\86\91i] V2 ≘ T2 → ⦃G, L⦄ ⊢ #i ⬈[Rt, c+𝟘𝟙, h] T2.
#Rt #c #h #G #K #V #V2 #i elim i -i
[ #L #T2 #HLK lapply (drops_fwd_isid … HLK ?) // #H destruct /3 width=3 by cpg_ell/
| #i #IH #L0 #T0 #H0 #HV2 #HVT2
elim (drops_inv_succ … H0) -H0 #I #L #HLK #H destruct
- elim (lifts_split_trans â\80¦ HVT2 (ð\9d\90\94â\9d´â«¯i❵) (𝐔❴1❵) ?) -HVT2 /3 width=3 by cpg_lref/
+ elim (lifts_split_trans â\80¦ HVT2 (ð\9d\90\94â\9d´â\86\91i❵) (𝐔❴1❵) ?) -HVT2 /3 width=3 by cpg_lref/
]
qed.
lemma cpg_inv_lref1_drops: ∀Rt,c,h,G,i,L,T2. ⦃G, L⦄ ⊢ #i ⬈[Rt,c, h] T2 →
∨∨ T2 = #i ∧ c = 𝟘𝟘
| ∃∃cV,K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ⬈[Rt, cV, h] V2 &
- â¬\86*[⫯i] V2 ≘ T2 & c = cV
+ â¬\86*[â\86\91i] V2 ≘ T2 & c = cV
| ∃∃cV,K,V,V2. ⬇*[i] L ≘ K.ⓛV & ⦃G, K⦄ ⊢ V ⬈[Rt, cV, h] V2 &
- â¬\86*[⫯i] V2 ≘ T2 & c = cV + 𝟘𝟙.
+ â¬\86*[â\86\91i] V2 ≘ T2 & c = cV + 𝟘𝟙.
#Rt #c #h #G #i elim i -i
[ #L #T2 #H elim (cpg_inv_zero1 … H) -H * /3 width=1 by or3_intro0, conj/
/4 width=8 by drops_refl, ex4_4_intro, or3_intro2, or3_intro1/
∨∨ T2 = ⓪{I} ∧ c = 𝟘𝟘
| ∃∃s. T2 = ⋆(next h s) & I = Sort s & c = 𝟘𝟙
| ∃∃cV,i,K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ⬈[Rt, cV, h] V2 &
- â¬\86*[⫯i] V2 ≘ T2 & I = LRef i & c = cV
+ â¬\86*[â\86\91i] V2 ≘ T2 & I = LRef i & c = cV
| ∃∃cV,i,K,V,V2. ⬇*[i] L ≘ K.ⓛV & ⦃G, K⦄ ⊢ V ⬈[Rt, cV, h] V2 &
- â¬\86*[⫯i] V2 ≘ T2 & I = LRef i & c = cV + 𝟘𝟙.
+ â¬\86*[â\86\91i] V2 ≘ T2 & I = LRef i & c = cV + 𝟘𝟙.
#Rt #c #h * #n #G #L #T2 #H
[ elim (cpg_inv_sort1 … H) -H *
/3 width=3 by or4_intro0, or4_intro1, ex3_intro, conj/
elim (drops_inv_skip2 … HY) -HY #Z #L0 #HLK0 #HZ #H destruct
elim (liftsb_inv_pair_sn … HZ) -HZ #W #HVW #H destruct
elim (IH … HV2 … HLK0 … HVW) -IH /2 width=2 by fqup_lref/ -K -K0 -V #W2 #HVW2 #HW2
- elim (lifts_total W2 (ð\9d\90\94â\9d´â«¯i2❵)) #U2 #HWU2
+ elim (lifts_total W2 (ð\9d\90\94â\9d´â\86\91i2❵)) #U2 #HWU2
lapply (lifts_trans … HVW2 … HWU2 ??) -HVW2 [3,6: |*: // ] #HVU2
lapply (lifts_conf … HVT2 … HVU2 f ?) -V2 [1,3: /2 width=3 by after_uni_succ_sn/ ]
/4 width=8 by cpg_ell_drops, cpg_delta_drops, drops_inv_gen, ex2_intro/
| #cT #T2 #HT12 #HXT2 #H1 #H2 #H3 destruct
elim (IH … HT12 … HTU1) -IH -HT12 -HTU1 [ |*: /3 width=3 by drops_skip, ext2_pair/ ] #U2 #HTU2 #HU12
lapply (lifts_trans … HXT2 … HTU2 ??) -T2 [3: |*: // ] #HXU2
- elim (lifts_split_trans â\80¦ HXU2 f (ð\9d\90\94â\9d´â«¯O❵)) [2: /2 width=1 by after_uni_one_dx/ ]
+ elim (lifts_split_trans â\80¦ HXU2 f (ð\9d\90\94â\9d´â\86\91O❵)) [2: /2 width=1 by after_uni_one_dx/ ]
/3 width=5 by cpg_zeta, ex2_intro/
]
| * #V1 #T1 #HG #HK #HT #c #X2 #H2 #b #f #L #HLK #X1 #H1 destruct
elim (IH … HT12 … HTU1) -IH -HT12 -HTU1 [ |*: /3 width=3 by drops_skip, ext2_pair/ ]
elim (lifts_total W2 (𝐔❴1❵)) #W20 #HW20
lapply (lifts_trans … HVW2 … HW20 ??) -HVW2 [3: |*: // ] #H
- lapply (lifts_conf â\80¦ HV20 â\80¦ H (â\86\91f) ?) -V2 /2 width=3 by after_uni_one_sn/
+ lapply (lifts_conf â\80¦ HV20 â\80¦ H (⫯f) ?) -V2 /2 width=3 by after_uni_one_sn/
/4 width=9 by cpg_theta, lifts_bind, lifts_flat, ex2_intro/
]
| elim (cpg_inv_cast1 … H2) -H2 *
elim (IH … HZ12 … HLK … HYZ1) -HZ12 //
elim (IH … HU12 … HTU1) -IH -HU12 -HTU1 [ |*: /3 width=3 by drops_skip, ext2_pair/ ]
lapply (lifts_trans … HVW2 … HW20 ??) -W2 [3: |*: // ] #H
- elim (lifts_split_trans â\80¦ H ? (â\86\91f)) -H [ |*: /2 width=3 by after_uni_one_sn/ ]
+ elim (lifts_split_trans â\80¦ H ? (⫯f)) -H [ |*: /2 width=3 by after_uni_one_sn/ ]
/4 width=9 by cpg_theta, lifts_bind, lifts_flat, ex2_intro/
]
| elim (cpg_inv_cast1 … H2) -H2 *
(* Note: the main property of simple terms *)
lemma cpg_inv_appl1_simple: ∀Rt,c,h,G,L,V1,T1,U. ⦃G, L⦄ ⊢ ⓐV1.T1 ⬈[Rt, c, h] U → 𝐒⦃T1⦄ →
∃∃cV,cT,V2,T2. ⦃G, L⦄ ⊢ V1 ⬈[Rt, cV, h] V2 & ⦃G, L⦄ ⊢ T1 ⬈[Rt, cT, h] T2 &
- U = â\93\90V2.T2 & c = ((â\86\93cV)∨cT).
+ U = â\93\90V2.T2 & c = ((â\86\95*cV)∨cT).
#Rt #c #h #G #L #V1 #T1 #U #H #HT1 elim (cpg_inv_appl1 … H) -H *
[ /2 width=8 by ex4_4_intro/
| #cV #cW #cT #p #V2 #W1 #W2 #U1 #U2 #_ #_ #_ #H destruct
qed.
lemma cpm_ell: ∀n,h,G,K,V1,V2,W2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 →
- â¬\86*[1] V2 â\89\98 W2 â\86\92 â¦\83G, K.â\93\9bV1â¦\84 â\8a¢ #0 â\9e¡[⫯n, h] W2.
+ â¬\86*[1] V2 â\89\98 W2 â\86\92 â¦\83G, K.â\93\9bV1â¦\84 â\8a¢ #0 â\9e¡[â\86\91n, h] W2.
#n #h #G #K #V1 #V2 #W2 *
/3 width=5 by cpg_ell, ex2_intro, isrt_succ/
qed.
lemma cpm_lref: ∀n,h,I,G,K,T,U,i. ⦃G, K⦄ ⊢ #i ➡[n, h] T →
- â¬\86*[1] T â\89\98 U â\86\92 â¦\83G, K.â\93\98{I}â¦\84 â\8a¢ #⫯i ➡[n, h] U.
+ â¬\86*[1] T â\89\98 U â\86\92 â¦\83G, K.â\93\98{I}â¦\84 â\8a¢ #â\86\91i ➡[n, h] U.
#n #h #I #G #K #T #U #i *
/3 width=5 by cpg_lref, ex2_intro/
qed.
/3 width=3 by cpg_eps, isrt_plus_O2, ex2_intro/
qed.
-lemma cpm_ee: â\88\80n,h,G,L,V1,V2,T. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[n, h] V2 â\86\92 â¦\83G, Lâ¦\84 â\8a¢ â\93\9dV1.T â\9e¡[⫯n, h] V2.
+lemma cpm_ee: â\88\80n,h,G,L,V1,V2,T. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[n, h] V2 â\86\92 â¦\83G, Lâ¦\84 â\8a¢ â\93\9dV1.T â\9e¡[â\86\91n, h] V2.
#n #h #G #L #V1 #V2 #T *
/3 width=3 by cpg_ee, isrt_succ, ex2_intro/
qed.
| ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 & ⬆*[1] V2 ≘ T2 &
L = K.ⓓV1 & J = LRef 0
| ∃∃k,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[k, h] V2 & ⬆*[1] V2 ≘ T2 &
- L = K.â\93\9bV1 & J = LRef 0 & n = ⫯k
+ L = K.â\93\9bV1 & J = LRef 0 & n = â\86\91k
| ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ➡[n, h] T & ⬆*[1] T ≘ T2 &
- L = K.â\93\98{I} & J = LRef (⫯i).
+ L = K.â\93\98{I} & J = LRef (â\86\91i).
#n #h #J #G #L #T2 * #c #Hc #H elim (cpg_inv_atom1 … H) -H *
[ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or5_intro0, conj/
| #s #H1 #H2 #H3 destruct /4 width=3 by isrt_inv_01, or5_intro1, ex3_intro/
| ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[n, h] V2 & ⬆*[1] V2 ≘ T2 &
L = K.ⓓV1
| ∃∃k,K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[k, h] V2 & ⬆*[1] V2 ≘ T2 &
- L = K.â\93\9bV1 & n = ⫯k.
+ L = K.â\93\9bV1 & n = â\86\91k.
#n #h #G #L #T2 * #c #Hc #H elim (cpg_inv_zero1 … H) -H *
[ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or3_intro0, conj/
| #cV #K #V1 #V2 #HV12 #HVT2 #H1 #H2 destruct
]
qed-.
-lemma cpm_inv_lref1: â\88\80n,h,G,L,T2,i. â¦\83G, Lâ¦\84 â\8a¢ #⫯i ➡[n, h] T2 →
- â\88¨â\88¨ T2 = #(⫯i) ∧ n = 0
+lemma cpm_inv_lref1: â\88\80n,h,G,L,T2,i. â¦\83G, Lâ¦\84 â\8a¢ #â\86\91i ➡[n, h] T2 →
+ â\88¨â\88¨ T2 = #(â\86\91i) ∧ n = 0
| ∃∃I,K,T. ⦃G, K⦄ ⊢ #i ➡[n, h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
#n #h #G #L #T2 #i * #c #Hc #H elim (cpg_inv_lref1 … H) -H *
[ #H1 #H2 destruct /4 width=1 by isrt_inv_00, or_introl, conj/
∨∨ ∃∃V2,T2. ⦃G, L⦄ ⊢ V1 ➡[n, h] V2 & ⦃G, L⦄ ⊢ U1 ➡[n, h] T2 &
U2 = ⓝV2.T2
| ⦃G, L⦄ ⊢ U1 ➡[n, h] U2
- | â\88\83â\88\83k. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[k, h] U2 & n = ⫯k.
+ | â\88\83â\88\83k. â¦\83G, Lâ¦\84 â\8a¢ V1 â\9e¡[k, h] U2 & n = â\86\91k.
#n #h #G #L #V1 #U1 #U2 * #c #Hc #H elim (cpg_inv_cast1 … H) -H *
[ #cV #cT #V2 #T2 #HV12 #HT12 #HcVT #H1 #H2 destruct
elim (isrt_inv_max … Hc) -Hc #nV #nT #HcV #HcT #H destruct
(* Basic_2A1: includes: cpr_delta *)
lemma cpm_delta_drops: ∀n,h,G,L,K,V,V2,W2,i.
⬇*[i] L ≘ K.ⓓV → ⦃G, K⦄ ⊢ V ➡[n, h] V2 →
- â¬\86*[⫯i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ➡[n, h] W2.
+ â¬\86*[â\86\91i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ➡[n, h] W2.
#n #h #G #L #K #V #V2 #W2 #i #HLK *
/3 width=8 by cpg_delta_drops, ex2_intro/
qed.
lemma cpm_ell_drops: ∀n,h,G,L,K,V,V2,W2,i.
⬇*[i] L ≘ K.ⓛV → ⦃G, K⦄ ⊢ V ➡[n, h] V2 →
- â¬\86*[⫯i] V2 â\89\98 W2 â\86\92 â¦\83G, Lâ¦\84 â\8a¢ #i â\9e¡[⫯n, h] W2.
+ â¬\86*[â\86\91i] V2 â\89\98 W2 â\86\92 â¦\83G, Lâ¦\84 â\8a¢ #i â\9e¡[â\86\91n, h] W2.
#n #h #G #L #K #V #V2 #W2 #i #HLK *
/3 width=8 by cpg_ell_drops, isrt_succ, ex2_intro/
qed.
∨∨ T2 = ⓪{I} ∧ n = 0
| ∃∃s. T2 = ⋆(next h s) & I = Sort s & n = 1
| ∃∃K,V,V2,i. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ➡[n, h] V2 &
- â¬\86*[⫯i] V2 ≘ T2 & I = LRef i
+ â¬\86*[â\86\91i] V2 ≘ T2 & I = LRef i
| ∃∃m,K,V,V2,i. ⬇*[i] L ≘ K.ⓛV & ⦃G, K⦄ ⊢ V ➡[m, h] V2 &
- â¬\86*[⫯i] V2 â\89\98 T2 & I = LRef i & n = ⫯m.
+ â¬\86*[â\86\91i] V2 â\89\98 T2 & I = LRef i & n = â\86\91m.
#n #h #I #G #L #T2 * #c #Hc #H elim (cpg_inv_atom1_drops … H) -H *
[ #H1 #H2 destruct lapply (isrt_inv_00 … Hc) -Hc
/3 width=1 by or4_intro0, conj/
lemma cpm_inv_lref1_drops: ∀n,h,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡[n, h] T2 →
∨∨ T2 = #i ∧ n = 0
| ∃∃K,V,V2. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ➡[n, h] V2 &
- â¬\86*[⫯i] V2 ≘ T2
+ â¬\86*[â\86\91i] V2 ≘ T2
| ∃∃m,K,V,V2. ⬇*[i] L ≘ K. ⓛV & ⦃G, K⦄ ⊢ V ➡[m, h] V2 &
- â¬\86*[⫯i] V2 â\89\98 T2 & n = ⫯m.
+ â¬\86*[â\86\91i] V2 â\89\98 T2 & n = â\86\91m.
#n #h #G #L #T2 #i * #c #Hc #H elim (cpg_inv_lref1_drops … H) -H *
[ #H1 #H2 destruct lapply (isrt_inv_00 … Hc) -Hc
/3 width=1 by or3_intro0, conj/
| ∃∃K,V1,V2. ⦃G, K⦄ ⊢ V1 ➡[h] V2 & ⬆*[1] V2 ≘ T2 &
L = K.ⓓV1 & J = LRef 0
| ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ➡[h] T & ⬆*[1] T ≘ T2 &
- L = K.â\93\98{I} & J = LRef (⫯i).
+ L = K.â\93\98{I} & J = LRef (â\86\91i).
#h #J #G #L #T2 #H elim (cpm_inv_atom1 … H) -H *
/3 width=8 by tri_lt, or3_intro0, or3_intro1, or3_intro2, ex4_4_intro, ex4_3_intro/
#n #_ #_ #H destruct
#n #K #V1 #V2 #_ #_ #_ #H destruct
qed-.
-lemma cpr_inv_lref1: â\88\80h,G,L,T2,i. â¦\83G, Lâ¦\84 â\8a¢ #⫯i ➡[h] T2 →
- â\88¨â\88¨ T2 = #(⫯i)
+lemma cpr_inv_lref1: â\88\80h,G,L,T2,i. â¦\83G, Lâ¦\84 â\8a¢ #â\86\91i ➡[h] T2 →
+ â\88¨â\88¨ T2 = #(â\86\91i)
| ∃∃I,K,T. ⦃G, K⦄ ⊢ #i ➡[h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
#h #G #L #T2 #i #H elim (cpm_inv_lref1 … H) -H *
/3 width=6 by ex3_3_intro, or_introl, or_intror/
lemma cpr_inv_atom1_drops: ∀h,I,G,L,T2. ⦃G, L⦄ ⊢ ⓪{I} ➡[h] T2 →
∨∨ T2 = ⓪{I}
| ∃∃K,V,V2,i. ⬇*[i] L ≘ K.ⓓV & ⦃G, K⦄ ⊢ V ➡[h] V2 &
- â¬\86*[⫯i] V2 ≘ T2 & I = LRef i.
+ â¬\86*[â\86\91i] V2 ≘ T2 & I = LRef i.
#h #I #G #L #T2 #H elim (cpm_inv_atom1_drops … H) -H *
[ /2 width=1 by or_introl/
| #s #_ #_ #H destruct
lemma cpr_inv_lref1_drops: ∀h,G,L,T2,i. ⦃G, L⦄ ⊢ #i ➡[h] T2 →
∨∨ T2 = #i
| ∃∃K,V,V2. ⬇*[i] L ≘ K. ⓓV & ⦃G, K⦄ ⊢ V ➡[h] V2 &
- â¬\86*[⫯i] V2 ≘ T2.
+ â¬\86*[â\86\91i] V2 ≘ T2.
#h #G #L #T2 #i #H elim (cpm_inv_lref1_drops … H) -H *
[ /2 width=1 by or_introl/
| /3 width=6 by ex3_3_intro, or_intror/
qed.
lemma cpx_lref: ∀h,I,G,K,T,U,i. ⦃G, K⦄ ⊢ #i ⬈[h] T →
- â¬\86*[1] T â\89\98 U â\86\92 â¦\83G, K.â\93\98{I}â¦\84 â\8a¢ #⫯i ⬈[h] U.
+ â¬\86*[1] T â\89\98 U â\86\92 â¦\83G, K.â\93\98{I}â¦\84 â\8a¢ #â\86\91i ⬈[h] U.
#h #I #G #K #T #U #i *
/3 width=4 by cpg_lref, ex_intro/
qed.
| ∃∃I,K,V1,V2. ⦃G, K⦄ ⊢ V1 ⬈[h] V2 & ⬆*[1] V2 ≘ T2 &
L = K.ⓑ{I}V1 & J = LRef 0
| ∃∃I,K,T,i. ⦃G, K⦄ ⊢ #i ⬈[h] T & ⬆*[1] T ≘ T2 &
- L = K.â\93\98{I} & J = LRef (⫯i).
+ L = K.â\93\98{I} & J = LRef (â\86\91i).
#h #J #G #L #T2 * #c #H elim (cpg_inv_atom1 … H) -H *
/4 width=8 by or4_intro0, or4_intro1, or4_intro2, or4_intro3, ex4_4_intro, ex2_intro, ex_intro/
qed-.
/4 width=7 by ex3_4_intro, ex_intro, or_introl, or_intror/
qed-.
-lemma cpx_inv_lref1: â\88\80h,G,L,T2,i. â¦\83G, Lâ¦\84 â\8a¢ #⫯i ⬈[h] T2 →
- â\88¨â\88¨ T2 = #(⫯i)
+lemma cpx_inv_lref1: â\88\80h,G,L,T2,i. â¦\83G, Lâ¦\84 â\8a¢ #â\86\91i ⬈[h] T2 →
+ â\88¨â\88¨ T2 = #(â\86\91i)
| ∃∃I,K,T. ⦃G, K⦄ ⊢ #i ⬈[h] T & ⬆*[1] T ≘ T2 & L = K.ⓘ{I}.
#h #G #L #T2 #i * #c #H elim (cpg_inv_lref1 … H) -H *
/4 width=6 by ex3_3_intro, ex_intro, or_introl, or_intror/
/4 width=3 by ex2_intro, ex_intro, or_intror, or_introl/
qed-.
-lemma cpx_inv_lref1_bind: â\88\80h,I,G,K,T2,i. â¦\83G, K.â\93\98{I}â¦\84 â\8a¢ #⫯i ⬈[h] T2 →
- â\88¨â\88¨ T2 = #(⫯i)
+lemma cpx_inv_lref1_bind: â\88\80h,I,G,K,T2,i. â¦\83G, K.â\93\98{I}â¦\84 â\8a¢ #â\86\91i ⬈[h] T2 →
+ â\88¨â\88¨ T2 = #(â\86\91i)
| ∃∃T. ⦃G, K⦄ ⊢ #i ⬈[h] T & ⬆*[1] T ≘ T2.
#h #I #G #L #T2 #i * #c #H elim (cpg_inv_lref1_bind … H) -H *
/4 width=3 by ex2_intro, ex_intro, or_introl, or_intror/
(∀I,G,K,V1,V2,W2. ⦃G, K⦄ ⊢ V1 ⬈[h] V2 → R G K V1 V2 →
⬆*[1] V2 ≘ W2 → R G (K.ⓑ{I}V1) (#0) W2
) → (∀I,G,K,T,U,i. ⦃G, K⦄ ⊢ #i ⬈[h] T → R G K (#i) T →
- â¬\86*[1] T â\89\98 U â\86\92 R G (K.â\93\98{I}) (#⫯i) (U)
+ â¬\86*[1] T â\89\98 U â\86\92 R G (K.â\93\98{I}) (#â\86\91i) (U)
) → (∀p,I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L.ⓑ{I}V1⦄ ⊢ T1 ⬈[h] T2 →
R G L V1 V2 → R G (L.ⓑ{I}V1) T1 T2 → R G L (ⓑ{p,I}V1.T1) (ⓑ{p,I}V2.T2)
) → (∀I,G,L,V1,V2,T1,T2. ⦃G, L⦄ ⊢ V1 ⬈[h] V2 → ⦃G, L⦄ ⊢ T1 ⬈[h] T2 →
(* Basic_2A1: was: cpx_delta *)
lemma cpx_delta_drops: ∀h,I,G,L,K,V,V2,W2,i.
⬇*[i] L ≘ K.ⓑ{I}V → ⦃G, K⦄ ⊢ V ⬈[h] V2 →
- â¬\86*[⫯i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ⬈[h] W2.
+ â¬\86*[â\86\91i] V2 ≘ W2 → ⦃G, L⦄ ⊢ #i ⬈[h] W2.
#h * #G #L #K #V #V2 #W2 #i #HLK *
/3 width=7 by cpg_ell_drops, cpg_delta_drops, ex_intro/
qed.
∨∨ T2 = ⓪{I}
| ∃∃s. T2 = ⋆(next h s) & I = Sort s
| ∃∃J,K,V,V2,i. ⬇*[i] L ≘ K.ⓑ{J}V & ⦃G, K⦄ ⊢ V ⬈[h] V2 &
- â¬\86*[⫯i] V2 ≘ T2 & I = LRef i.
+ â¬\86*[â\86\91i] V2 ≘ T2 & I = LRef i.
#h #I #G #L #T2 * #c #H elim (cpg_inv_atom1_drops … H) -H *
/4 width=9 by or3_intro0, or3_intro1, or3_intro2, ex4_5_intro, ex2_intro, ex_intro/
qed-.
lemma cpx_inv_lref1_drops: ∀h,G,L,T2,i. ⦃G, L⦄ ⊢ #i ⬈[h] T2 →
T2 = #i ∨
∃∃J,K,V,V2. ⬇*[i] L ≘ K. ⓑ{J}V & ⦃G, K⦄ ⊢ V ⬈[h] V2 &
- â¬\86*[⫯i] V2 ≘ T2.
+ â¬\86*[â\86\91i] V2 ≘ T2.
#h #G #L #T1 #i * #c #H elim (cpg_inv_lref1_drops … H) -H *
/4 width=7 by ex3_4_intro, ex_intro, or_introl, or_intror/
qed-.
/2 width=1 by lfxs_pair/ qed.
lemma lfpr_lref: ∀h,I1,I2,G,L1,L2,i.
- â¦\83G, L1â¦\84 â\8a¢ â\9e¡[h, #i] L2 â\86\92 â¦\83G, L1.â\93\98{I1}â¦\84 â\8a¢ â\9e¡[h, #⫯i] L2.ⓘ{I2}.
+ â¦\83G, L1â¦\84 â\8a¢ â\9e¡[h, #i] L2 â\86\92 â¦\83G, L1.â\93\98{I1}â¦\84 â\8a¢ â\9e¡[h, #â\86\91i] L2.ⓘ{I2}.
/2 width=1 by lfxs_lref/ qed.
lemma lfpr_gref: ∀h,I1,I2,G,L1,L2,l.
Y1 = L1.ⓑ{I}V1 & Y2 = L2.ⓑ{I}V2.
/2 width=1 by lfxs_inv_zero/ qed-.
*)
-lemma lfpr_inv_lref: â\88\80h,G,Y1,Y2,i. â¦\83G, Y1â¦\84 â\8a¢ â\9e¡[h, #⫯i] Y2 →
+lemma lfpr_inv_lref: â\88\80h,G,Y1,Y2,i. â¦\83G, Y1â¦\84 â\8a¢ â\9e¡[h, #â\86\91i] Y2 →
∨∨ Y1 = ⋆ ∧ Y2 = ⋆
| ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ➡[h, #i] L2 &
Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
Y1 = L1.ⓑ{I}V1.
/2 width=1 by lfxs_inv_zero_pair_dx/ qed-.
-lemma lfpr_inv_lref_bind_sn: â\88\80h,I1,G,Y2,L1,i. â¦\83G, L1.â\93\98{I1}â¦\84 â\8a¢ â\9e¡[h, #⫯i] Y2 →
+lemma lfpr_inv_lref_bind_sn: â\88\80h,I1,G,Y2,L1,i. â¦\83G, L1.â\93\98{I1}â¦\84 â\8a¢ â\9e¡[h, #â\86\91i] Y2 →
∃∃I2,L2. ⦃G, L1⦄ ⊢ ➡[h, #i] L2 & Y2 = L2.ⓘ{I2}.
/2 width=2 by lfxs_inv_lref_bind_sn/ qed-.
-lemma lfpr_inv_lref_bind_dx: â\88\80h,I2,G,Y1,L2,i. â¦\83G, Y1â¦\84 â\8a¢ â\9e¡[h, #⫯i] L2.ⓘ{I2} →
+lemma lfpr_inv_lref_bind_dx: â\88\80h,I2,G,Y1,L2,i. â¦\83G, Y1â¦\84 â\8a¢ â\9e¡[h, #â\86\91i] L2.ⓘ{I2} →
∃∃I1,L1. ⦃G, L1⦄ ⊢ ➡[h, #i] L2 & Y1 = L1.ⓘ{I1}.
/2 width=2 by lfxs_inv_lref_bind_dx/ qed-.
∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡[h] T0 & ⦃G, L2⦄ ⊢ T2 ➡[h] T0
) →
∀K0,V0. ⬇*[i] L0 ≘ K0.ⓓV0 →
- â\88\80V2. â¦\83G, K0â¦\84 â\8a¢ V0 â\9e¡[h] V2 â\86\92 â\88\80T2. â¬\86*[⫯i] V2 ≘ T2 →
+ â\88\80V2. â¦\83G, K0â¦\84 â\8a¢ V0 â\9e¡[h] V2 â\86\92 â\88\80T2. â¬\86*[â\86\91i] V2 ≘ T2 →
∀L1. ⦃G, L0⦄ ⊢ ➡[h, #i] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h, #i] L2 →
∃∃T. ⦃G, L1⦄ ⊢ #i ➡[h] T & ⦃G, L2⦄ ⊢ T2 ➡[h] T.
#h #G #L0 #i #IH #K0 #V0 #HLK0 #V2 #HV02 #T2 #HVT2 #L1 #HL01 #L2 #HL02
∃∃T0. ⦃G, L1⦄ ⊢ T1 ➡[h] T0 & ⦃G, L2⦄ ⊢ T2 ➡[h] T0
) →
∀K0,V0. ⬇*[i] L0 ≘ K0.ⓓV0 →
- â\88\80V1. â¦\83G, K0â¦\84 â\8a¢ V0 â\9e¡[h] V1 â\86\92 â\88\80T1. â¬\86*[⫯i] V1 ≘ T1 →
+ â\88\80V1. â¦\83G, K0â¦\84 â\8a¢ V0 â\9e¡[h] V1 â\86\92 â\88\80T1. â¬\86*[â\86\91i] V1 ≘ T1 →
∀KX,VX. ⬇*[i] L0 ≘ KX.ⓓVX →
- â\88\80V2. â¦\83G, KXâ¦\84 â\8a¢ VX â\9e¡[h] V2 â\86\92 â\88\80T2. â¬\86*[⫯i] V2 ≘ T2 →
+ â\88\80V2. â¦\83G, KXâ¦\84 â\8a¢ VX â\9e¡[h] V2 â\86\92 â\88\80T2. â¬\86*[â\86\91i] V2 ≘ T2 →
∀L1. ⦃G, L0⦄ ⊢ ➡[h, #i] L1 → ∀L2. ⦃G, L0⦄ ⊢ ➡[h, #i] L2 →
∃∃T. ⦃G, L1⦄ ⊢ T1 ➡[h] T & ⦃G, L2⦄ ⊢ T2 ➡[h] T.
#h #G #L0 #i #IH #K0 #V0 #HLK0 #V1 #HV01 #T1 #HVT1
/2 width=1 by lfxs_pair/ qed.
lemma lfpx_lref: ∀h,I1,I2,G,L1,L2,i.
- â¦\83G, L1â¦\84 â\8a¢ â¬\88[h, #i] L2 â\86\92 â¦\83G, L1.â\93\98{I1}â¦\84 â\8a¢ â¬\88[h, #⫯i] L2.ⓘ{I2}.
+ â¦\83G, L1â¦\84 â\8a¢ â¬\88[h, #i] L2 â\86\92 â¦\83G, L1.â\93\98{I1}â¦\84 â\8a¢ â¬\88[h, #â\86\91i] L2.ⓘ{I2}.
/2 width=1 by lfxs_lref/ qed.
lemma lfpx_gref: ∀h,I1,I2,G,L1,L2,l.
Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
/2 width=1 by lfxs_inv_sort/ qed-.
-lemma lfpx_inv_lref: â\88\80h,G,Y1,Y2,i. â¦\83G, Y1â¦\84 â\8a¢ â¬\88[h, #⫯i] Y2 →
+lemma lfpx_inv_lref: â\88\80h,G,Y1,Y2,i. â¦\83G, Y1â¦\84 â\8a¢ â¬\88[h, #â\86\91i] Y2 →
∨∨ Y1 = ⋆ ∧ Y2 = ⋆
| ∃∃I1,I2,L1,L2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 &
Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
Y1 = L1.ⓑ{I}V1.
/2 width=1 by lfxs_inv_zero_pair_dx/ qed-.
-lemma lfpx_inv_lref_bind_sn: â\88\80h,I1,G,Y2,L1,i. â¦\83G, L1.â\93\98{I1}â¦\84 â\8a¢ â¬\88[h, #⫯i] Y2 →
+lemma lfpx_inv_lref_bind_sn: â\88\80h,I1,G,Y2,L1,i. â¦\83G, L1.â\93\98{I1}â¦\84 â\8a¢ â¬\88[h, #â\86\91i] Y2 →
∃∃I2,L2. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y2 = L2.ⓘ{I2}.
/2 width=2 by lfxs_inv_lref_bind_sn/ qed-.
-lemma lfpx_inv_lref_bind_dx: â\88\80h,I2,G,Y1,L2,i. â¦\83G, Y1â¦\84 â\8a¢ â¬\88[h, #⫯i] L2.ⓘ{I2} →
+lemma lfpx_inv_lref_bind_dx: â\88\80h,I2,G,Y1,L2,i. â¦\83G, Y1â¦\84 â\8a¢ â¬\88[h, #â\86\91i] L2.ⓘ{I2} →
∃∃I1,L1. ⦃G, L1⦄ ⊢ ⬈[h, #i] L2 & Y1 = L1.ⓘ{I1}.
/2 width=2 by lfxs_inv_lref_bind_dx/ qed-.
(* Properties with generic slicing for local environments *******************)
-lemma fqup_drops_succ: â\88\80b,G,K,T,i,L,U. â¬\87*[⫯i] L â\89\98 K â\86\92 â¬\86*[⫯i] T ≘ U →
+lemma fqup_drops_succ: â\88\80b,G,K,T,i,L,U. â¬\87*[â\86\91i] L â\89\98 K â\86\92 â¬\86*[â\86\91i] T ≘ U →
⦃G, L, U⦄ ⊐+[b] ⦃G, K, T⦄.
#b #G #K #T #i elim i -i
[ #L #U #HLK #HTU elim (drops_inv_succ … HLK) -HLK
/3 width=2 by fqu_fqup, fqu_drop/
| #l #IH #L #U #HLK #HTU elim (drops_inv_succ … HLK) -HLK
#I #Y #HY #H destruct
- elim (lifts_split_trans â\80¦ HTU â\80¦ (ð\9d\90\94â\9d´â«¯l❵) (𝐔❴1❵)) -HTU
+ elim (lifts_split_trans â\80¦ HTU â\80¦ (ð\9d\90\94â\9d´â\86\91l❵) (𝐔❴1❵)) -HTU
/4 width=5 by fqup_strap2, fqu_drop/
]
qed.
lemma fqus_inv_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
∨∨ ∧∧ G1 = G2 & L1 = L2 & #i = T2
| ∃∃J,L,V. ⦃G1, L, V⦄ ⊐*[b] ⦃G2, L2, T2⦄ & L1 = L.ⓑ{J}V & i = 0
- | â\88\83â\88\83J,L,j. â¦\83G1, L, #jâ¦\84 â\8a\90*[b] â¦\83G2, L2, T2â¦\84 & L1 = L.â\93\98{J} & i = ⫯j.
+ | â\88\83â\88\83J,L,j. â¦\83G1, L, #jâ¦\84 â\8a\90*[b] â¦\83G2, L2, T2â¦\84 & L1 = L.â\93\98{J} & i = â\86\91j.
#b #G1 #G2 #L1 #L2 #T2 #i #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or3_intro0/
#G #L #T #H elim (fqu_inv_lref1 … H) -H * /3 width=7 by or3_intro1, or3_intro2, ex3_4_intro, ex3_3_intro/
qed-.
#H1 #H2 #H3 #H destruct /2 width=1 by or_intror/
qed-.
-lemma fqus_inv_lref1_bind: â\88\80b,I,G1,G2,L1,L2,T2,i. â¦\83G1, L1.â\93\98{I}, #⫯i⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
- (â\88§â\88§ G1 = G2 & L1.â\93\98{I} = L2 & #(⫯i) = T2) ∨ ⦃G1, L1, #i⦄ ⊐*[b] ⦃G2, L2, T2⦄.
+lemma fqus_inv_lref1_bind: â\88\80b,I,G1,G2,L1,L2,T2,i. â¦\83G1, L1.â\93\98{I}, #â\86\91i⦄ ⊐*[b] ⦃G2, L2, T2⦄ →
+ (â\88§â\88§ G1 = G2 & L1.â\93\98{I} = L2 & #(â\86\91i) = T2) ∨ ⦃G1, L1, #i⦄ ⊐*[b] ⦃G2, L2, T2⦄.
#b #I #G1 #G2 #L1 #L2 #T2 #i #H elim (fqus_inv_fqu_sn … H) -H * /3 width=1 by and3_intro, or_introl/
#G #L #T #H elim (fqu_inv_lref1_bind … H) -H
#H1 #H2 #H3 #H destruct /2 width=1 by or_intror/
lemma fqu_sort: ∀b,I,G,L,s. ⦃G, L.ⓘ{I}, ⋆s⦄ ⊐[b] ⦃G, L, ⋆s⦄.
/2 width=1 by fqu_drop/ qed.
-lemma fqu_lref_S: â\88\80b,I,G,L,i. â¦\83G, L.â\93\98{I}, #⫯i⦄ ⊐[b] ⦃G, L, #i⦄.
+lemma fqu_lref_S: â\88\80b,I,G,L,i. â¦\83G, L.â\93\98{I}, #â\86\91i⦄ ⊐[b] ⦃G, L, #i⦄.
/2 width=1 by fqu_drop/ qed.
lemma fqu_gref: ∀b,I,G,L,l. ⦃G, L.ⓘ{I}, §l⦄ ⊐[b] ⦃G, L, §l⦄.
fact fqu_inv_lref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
∀i. T1 = #i →
(∃∃J,V. G1 = G2 & L1 = L2.ⓑ{J}V & T2 = V & i = 0) ∨
- â\88\83â\88\83J,j. G1 = G2 & L1 = L2.â\93\98{J} & T2 = #j & i = ⫯j.
+ â\88\83â\88\83J,j. G1 = G2 & L1 = L2.â\93\98{J} & T2 = #j & i = â\86\91j.
#b #G1 #G2 #L1 #L2 #T1 #T2 * -G1 -G2 -L1 -L2 -T1 -T2
[ #I #G #L #T #i #H destruct /3 width=4 by ex4_2_intro, or_introl/
| #I #G #L #V #T #i #H destruct
lemma fqu_inv_lref1: ∀b,G1,G2,L1,L2,T2,i. ⦃G1, L1, #i⦄ ⊐[b] ⦃G2, L2, T2⦄ →
(∃∃J,V. G1 = G2 & L1 = L2.ⓑ{J}V & T2 = V & i = 0) ∨
- â\88\83â\88\83J,j. G1 = G2 & L1 = L2.â\93\98{J} & T2 = #j & i = ⫯j.
+ â\88\83â\88\83J,j. G1 = G2 & L1 = L2.â\93\98{J} & T2 = #j & i = â\86\91j.
/2 width=4 by fqu_inv_lref1_aux/ qed-.
fact fqu_inv_gref1_aux: ∀b,G1,G2,L1,L2,T1,T2. ⦃G1, L1, T1⦄ ⊐[b] ⦃G2, L2, T2⦄ →
#Z #X #H1 #H2 #H3 #H4 destruct /2 width=1 by and3_intro/
qed-.
-lemma fqu_inv_lref1_bind: â\88\80b,I,G1,G2,K,L2,T2,i. â¦\83G1, K.â\93\98{I}, #(⫯i)⦄ ⊐[b] ⦃G2, L2, T2⦄ →
+lemma fqu_inv_lref1_bind: â\88\80b,I,G1,G2,K,L2,T2,i. â¦\83G1, K.â\93\98{I}, #(â\86\91i)⦄ ⊐[b] ⦃G2, L2, T2⦄ →
∧∧ G1 = G2 & L2 = K & T2 = #i.
#b #I #G1 #G2 #K #L2 #T2 #i #H elim (fqu_inv_lref1 … H) -H *
#Z #X #H1 #H2 #H3 #H4 destruct /2 width=1 by and3_intro/
inductive aaa: relation4 genv lenv term aarity ≝
| aaa_sort: ∀G,L,s. aaa G L (⋆s) (⓪)
| aaa_zero: ∀I,G,L,V,B. aaa G L V B → aaa G (L.ⓑ{I}V) (#0) B
-| aaa_lref: â\88\80I,G,L,A,i. aaa G L (#i) A â\86\92 aaa G (L.â\93\98{I}) (#⫯i) A
+| aaa_lref: â\88\80I,G,L,A,i. aaa G L (#i) A â\86\92 aaa G (L.â\93\98{I}) (#â\86\91i) A
| aaa_abbr: ∀p,G,L,V,T,B,A.
aaa G L V B → aaa G (L.ⓓV) T A → aaa G L (ⓓ{p}V.T) A
| aaa_abst: ∀p,G,L,V,T,B,A.
∃∃I,K,V. L = K.ⓑ{I}V & ⦃G, K⦄ ⊢ V ⁝ A.
/2 width=3 by aaa_inv_zero_aux/ qed-.
-fact aaa_inv_lref_aux: â\88\80G,L,T,A. â¦\83G, Lâ¦\84 â\8a¢ T â\81\9d A â\86\92 â\88\80i. T = #(⫯i) →
+fact aaa_inv_lref_aux: â\88\80G,L,T,A. â¦\83G, Lâ¦\84 â\8a¢ T â\81\9d A â\86\92 â\88\80i. T = #(â\86\91i) →
∃∃I,K. L = K.ⓘ{I} & ⦃G, K⦄ ⊢ #i ⁝ A.
#G #L #T #A * -G -L -T -A
[ #G #L #s #j #H destruct
]
qed-.
-lemma aaa_inv_lref: â\88\80G,L,A,i. â¦\83G, Lâ¦\84 â\8a¢ #⫯i ⁝ A →
+lemma aaa_inv_lref: â\88\80G,L,A,i. â¦\83G, Lâ¦\84 â\8a¢ #â\86\91i ⁝ A →
∃∃I,K. L = K.ⓘ{I} & ⦃G, K⦄ ⊢ #i ⁝ A.
/2 width=3 by aaa_inv_lref_aux/ qed-.
inductive frees: relation3 lenv term rtmap ≝
| frees_sort: ∀f,L,s. 𝐈⦃f⦄ → frees L (⋆s) f
-| frees_atom: â\88\80f,i. ð\9d\90\88â¦\83fâ¦\84 â\86\92 frees (â\8b\86) (#i) (â\86\91*[i]⫯f)
+| frees_atom: â\88\80f,i. ð\9d\90\88â¦\83fâ¦\84 â\86\92 frees (â\8b\86) (#i) (⫯*[i]â\86\91f)
| frees_pair: ∀f,I,L,V. frees L V f →
- frees (L.â\93\91{I}V) (#0) (⫯f)
-| frees_unit: â\88\80f,I,L. ð\9d\90\88â¦\83fâ¦\84 â\86\92 frees (L.â\93¤{I}) (#0) (⫯f)
+ frees (L.â\93\91{I}V) (#0) (â\86\91f)
+| frees_unit: â\88\80f,I,L. ð\9d\90\88â¦\83fâ¦\84 â\86\92 frees (L.â\93¤{I}) (#0) (â\86\91f)
| frees_lref: ∀f,I,L,i. frees L (#i) f →
- frees (L.â\93\98{I}) (#⫯i) (â\86\91f)
+ frees (L.â\93\98{I}) (#â\86\91i) (⫯f)
| frees_gref: ∀f,L,l. 𝐈⦃f⦄ → frees L (§l) f
| frees_bind: ∀f1,f2,f,p,I,L,V,T. frees L V f1 → frees (L.ⓑ{I}V) T f2 →
f1 ⋓ ⫱f2 ≘ f → frees L (ⓑ{p,I}V.T) f
/2 width=5 by frees_inv_sort_aux/ qed-.
fact frees_inv_atom_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀i. L = ⋆ → X = #i →
- â\88\83â\88\83g. ð\9d\90\88â¦\83gâ¦\84 & f = â\86\91*[i]⫯g.
+ â\88\83â\88\83g. ð\9d\90\88â¦\83gâ¦\84 & f = ⫯*[i]â\86\91g.
#f #L #X #H elim H -f -L -X
[ #f #L #s #_ #j #_ #H destruct
| #f #i #Hf #j #_ #H destruct /2 width=3 by ex2_intro/
]
qed-.
-lemma frees_inv_atom: â\88\80f,i. â\8b\86 â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 f â\86\92 â\88\83â\88\83g. ð\9d\90\88â¦\83gâ¦\84 & f = â\86\91*[i]⫯g.
+lemma frees_inv_atom: â\88\80f,i. â\8b\86 â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 f â\86\92 â\88\83â\88\83g. ð\9d\90\88â¦\83gâ¦\84 & f = ⫯*[i]â\86\91g.
/2 width=5 by frees_inv_atom_aux/ qed-.
fact frees_inv_pair_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K,V. L = K.ⓑ{I}V → X = #0 →
- â\88\83â\88\83g. K â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & f = ⫯g.
+ â\88\83â\88\83g. K â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & f = â\86\91g.
#f #L #X * -f -L -X
[ #f #L #s #_ #Z #Y #X #_ #H destruct
| #f #i #_ #Z #Y #X #H destruct
]
qed-.
-lemma frees_inv_pair: â\88\80f,I,K,V. K.â\93\91{I}V â\8a¢ ð\9d\90\85*â¦\83#0â¦\84 â\89\98 f â\86\92 â\88\83â\88\83g. K â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & f = ⫯g.
+lemma frees_inv_pair: â\88\80f,I,K,V. K.â\93\91{I}V â\8a¢ ð\9d\90\85*â¦\83#0â¦\84 â\89\98 f â\86\92 â\88\83â\88\83g. K â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & f = â\86\91g.
/2 width=6 by frees_inv_pair_aux/ qed-.
fact frees_inv_unit_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀I,K. L = K.ⓤ{I} → X = #0 →
- â\88\83â\88\83g. ð\9d\90\88â¦\83gâ¦\84 & f = ⫯g.
+ â\88\83â\88\83g. ð\9d\90\88â¦\83gâ¦\84 & f = â\86\91g.
#f #L #X * -f -L -X
[ #f #L #s #_ #Z #Y #_ #H destruct
| #f #i #_ #Z #Y #H destruct
]
qed-.
-lemma frees_inv_unit: â\88\80f,I,K. K.â\93¤{I} â\8a¢ ð\9d\90\85*â¦\83#0â¦\84 â\89\98 f â\86\92 â\88\83â\88\83g. ð\9d\90\88â¦\83gâ¦\84 & f = ⫯g.
+lemma frees_inv_unit: â\88\80f,I,K. K.â\93¤{I} â\8a¢ ð\9d\90\85*â¦\83#0â¦\84 â\89\98 f â\86\92 â\88\83â\88\83g. ð\9d\90\88â¦\83gâ¦\84 & f = â\86\91g.
/2 width=7 by frees_inv_unit_aux/ qed-.
-fact frees_inv_lref_aux: â\88\80f,L,X. L â\8a¢ ð\9d\90\85*â¦\83Xâ¦\84 â\89\98 f â\86\92 â\88\80I,K,j. L = K.â\93\98{I} â\86\92 X = #(⫯j) →
- â\88\83â\88\83g. K â\8a¢ ð\9d\90\85*â¦\83#jâ¦\84 â\89\98 g & f = â\86\91g.
+fact frees_inv_lref_aux: â\88\80f,L,X. L â\8a¢ ð\9d\90\85*â¦\83Xâ¦\84 â\89\98 f â\86\92 â\88\80I,K,j. L = K.â\93\98{I} â\86\92 X = #(â\86\91j) →
+ â\88\83â\88\83g. K â\8a¢ ð\9d\90\85*â¦\83#jâ¦\84 â\89\98 g & f = ⫯g.
#f #L #X * -f -L -X
[ #f #L #s #_ #Z #Y #j #_ #H destruct
| #f #i #_ #Z #Y #j #H destruct
]
qed-.
-lemma frees_inv_lref: â\88\80f,I,K,i. K.â\93\98{I} â\8a¢ ð\9d\90\85*â¦\83#(⫯i)⦄ ≘ f →
- â\88\83â\88\83g. K â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 g & f = â\86\91g.
+lemma frees_inv_lref: â\88\80f,I,K,i. K.â\93\98{I} â\8a¢ ð\9d\90\85*â¦\83#(â\86\91i)⦄ ≘ f →
+ â\88\83â\88\83g. K â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 g & f = ⫯g.
/2 width=6 by frees_inv_lref_aux/ qed-.
fact frees_inv_gref_aux: ∀f,L,X. L ⊢ 𝐅*⦃X⦄ ≘ f → ∀x. X = §x → 𝐈⦃f⦄.
#L #T @eq_repl_sym /2 width=3 by frees_eq_repl_back/
qed-.
-lemma frees_lref_push: â\88\80f,i. â\8b\86 â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 f â\86\92 â\8b\86 â\8a¢ ð\9d\90\85*â¦\83#⫯iâ¦\84 â\89\98 â\86\91f.
+lemma frees_lref_push: â\88\80f,i. â\8b\86 â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 f â\86\92 â\8b\86 â\8a¢ ð\9d\90\85*â¦\83#â\86\91iâ¦\84 â\89\98 ⫯f.
#f #i #H
elim (frees_inv_atom … H) -H #g #Hg #H destruct
/2 width=1 by frees_atom/
(* Advanced properties ******************************************************)
lemma frees_atom_drops: ∀b,L,i. ⬇*[b, 𝐔❴i❵] L ≘ ⋆ →
- â\88\80f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 L â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 â\86\91*[i]⫯f.
+ â\88\80f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 L â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 ⫯*[i]â\86\91f.
#b #L elim L -L /2 width=1 by frees_atom/
#L #I #IH *
[ #H lapply (drops_fwd_isid … H ?) -H // #H destruct
qed.
lemma frees_pair_drops: ∀f,K,V. K ⊢ 𝐅*⦃V⦄ ≘ f →
- â\88\80i,I,L. â¬\87*[i] L â\89\98 K.â\93\91{I}V â\86\92 L â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 â\86\91*[i] ⫯f.
+ â\88\80i,I,L. â¬\87*[i] L â\89\98 K.â\93\91{I}V â\86\92 L â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 ⫯*[i] â\86\91f.
#f #K #V #Hf #i elim i -i
[ #I #L #H lapply (drops_fwd_isid … H ?) -H /2 width=1 by frees_pair/
| #i #IH #I #L #H elim (drops_inv_succ … H) -H /3 width=2 by frees_lref/
qed.
lemma frees_unit_drops: ∀f. 𝐈⦃f⦄ → ∀I,K,i,L. ⬇*[i] L ≘ K.ⓤ{I} →
- L â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 â\86\91*[i] ⫯f.
+ L â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 ⫯*[i] â\86\91f.
#f #Hf #I #K #i elim i -i
[ #L #H lapply (drops_fwd_isid … H ?) -H /2 width=1 by frees_unit/
| #i #IH #Y #H elim (drops_inv_succ … H) -H
qed.
(*
lemma frees_sort_pushs: ∀f,K,s. K ⊢ 𝐅*⦃⋆s⦄ ≘ f →
- â\88\80i,L. â¬\87*[i] L â\89\98 K â\86\92 L â\8a¢ ð\9d\90\85*â¦\83â\8b\86sâ¦\84 â\89\98 â\86\91*[i] f.
+ â\88\80i,L. â¬\87*[i] L â\89\98 K â\86\92 L â\8a¢ ð\9d\90\85*â¦\83â\8b\86sâ¦\84 â\89\98 ⫯*[i] f.
#f #K #s #Hf #i elim i -i
[ #L #H lapply (drops_fwd_isid … H ?) -H //
| #i #IH #L #H elim (drops_inv_succ … H) -H /3 width=1 by frees_sort/
qed.
*)
lemma frees_lref_pushs: ∀f,K,j. K ⊢ 𝐅*⦃#j⦄ ≘ f →
- â\88\80i,L. â¬\87*[i] L â\89\98 K â\86\92 L â\8a¢ ð\9d\90\85*â¦\83#(i+j)â¦\84 â\89\98 â\86\91*[i] f.
+ â\88\80i,L. â¬\87*[i] L â\89\98 K â\86\92 L â\8a¢ ð\9d\90\85*â¦\83#(i+j)â¦\84 â\89\98 ⫯*[i] f.
#f #K #j #Hf #i elim i -i
[ #L #H lapply (drops_fwd_isid … H ?) -H //
| #i #IH #L #H elim (drops_inv_succ … H) -H
qed.
(*
lemma frees_gref_pushs: ∀f,K,l. K ⊢ 𝐅*⦃§l⦄ ≘ f →
- â\88\80i,L. â¬\87*[i] L â\89\98 K â\86\92 L â\8a¢ ð\9d\90\85*â¦\83§lâ¦\84 â\89\98 â\86\91*[i] f.
+ â\88\80i,L. â¬\87*[i] L â\89\98 K â\86\92 L â\8a¢ ð\9d\90\85*â¦\83§lâ¦\84 â\89\98 ⫯*[i] f.
#f #K #l #Hf #i elim i -i
[ #L #H lapply (drops_fwd_isid … H ?) -H //
| #i #IH #L #H elim (drops_inv_succ … H) -H /3 width=1 by frees_gref/
(* Advanced inversion lemmas ************************************************)
lemma frees_inv_lref_drops: ∀L,i,f. L ⊢ 𝐅*⦃#i⦄ ≘ f →
- â\88¨â\88¨ â\88\83â\88\83g. â¬\87*[â\92», ð\9d\90\94â\9d´iâ\9dµ] L â\89\98 â\8b\86 & ð\9d\90\88â¦\83gâ¦\84 & f = â\86\91*[i] ⫯g
+ â\88¨â\88¨ â\88\83â\88\83g. â¬\87*[â\92», ð\9d\90\94â\9d´iâ\9dµ] L â\89\98 â\8b\86 & ð\9d\90\88â¦\83gâ¦\84 & f = ⫯*[i] â\86\91g
| ∃∃g,I,K,V. K ⊢ 𝐅*⦃V⦄ ≘ g &
- â¬\87*[i] L â\89\98 K.â\93\91{I}V & f = â\86\91*[i] ⫯g
- | â\88\83â\88\83g,I,K. â¬\87*[i] L â\89\98 K.â\93¤{I} & ð\9d\90\88â¦\83gâ¦\84 & f = â\86\91*[i] ⫯g.
+ â¬\87*[i] L â\89\98 K.â\93\91{I}V & f = ⫯*[i] â\86\91g
+ | â\88\83â\88\83g,I,K. â¬\87*[i] L â\89\98 K.â\93¤{I} & ð\9d\90\88â¦\83gâ¦\84 & f = ⫯*[i] â\86\91g.
#L elim L -L
[ #i #g | #L #I #IH * [ #g cases I -I [ #I | #I #V ] -IH | #i #g ] ] #H
[ elim (frees_inv_atom … H) -H #f #Hf #H destruct
qed-.
lemma frees_lifts_SO: ∀b,L,K. ⬇*[b, 𝐔❴1❵] L ≘ K → ∀T,U. ⬆*[1] T ≘ U →
- â\88\80f. K â\8a¢ ð\9d\90\85*â¦\83Tâ¦\84 â\89\98 f â\86\92 L â\8a¢ ð\9d\90\85*â¦\83Uâ¦\84 â\89\98 â\86\91f.
+ â\88\80f. K â\8a¢ ð\9d\90\85*â¦\83Tâ¦\84 â\89\98 f â\86\92 L â\8a¢ ð\9d\90\85*â¦\83Uâ¦\84 â\89\98 ⫯f.
#b #L #K #HLK #T #U #HTU #f #Hf
@(frees_lifts b … Hf … HTU) // (**) (* auto fails *)
qed.
(* Note: this is used by lfxs_conf and might be modified *)
lemma frees_inv_drops_next: ∀f1,L1,T1. L1 ⊢ 𝐅*⦃T1⦄ ≘ f1 →
∀I2,L2,V2,n. ⬇*[n] L1 ≘ L2.ⓑ{I2}V2 →
- â\88\80g1. ⫯g1 = ⫱*[n] f1 →
+ â\88\80g1. â\86\91g1 = ⫱*[n] f1 →
∃∃g2. L2 ⊢ 𝐅*⦃V2⦄ ≘ g2 & g2 ⊆ g1.
#f1 #L1 #T1 #H elim H -f1 -L1 -T1
[ #f1 #L1 #s #Hf1 #I2 #L2 #V2 #n #_ #g1 #H1 -I2 -L1 -s
lapply (sor_comm … Hz) -Hz #Hz
lapply (sor_mono … f Hz ?) // -Hz #H
lapply (sor_inv_sle_sn … Hf) -Hf #Hf
- lapply (frees_eq_repl_back â\80¦ Hf0 (⫯f) ?) /2 width=5 by eq_next/ -z #Hf0
+ lapply (frees_eq_repl_back â\80¦ Hf0 (â\86\91f) ?) /2 width=5 by eq_next/ -z #Hf0
@(frees_bind … Hf1 Hf0) -Hf1 -Hf0 (**) (* constructor needed *)
/2 width=1 by sor_sle_dx/
]
(
∀f,L,s. 𝐈⦃f⦄ → R L (⋆s) f
) → (
- â\88\80f,i. ð\9d\90\88â¦\83fâ¦\84 â\86\92 R (â\8b\86) (#i) (â\86\91*[i]⫯f)
+ â\88\80f,i. ð\9d\90\88â¦\83fâ¦\84 â\86\92 R (â\8b\86) (#i) (⫯*[i]â\86\91f)
) → (
∀f,I,L,V.
- L â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 f â\86\92 R L V fâ\86\92 R (L.â\93\91{I}V) (#O) (⫯f)
+ L â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 f â\86\92 R L V fâ\86\92 R (L.â\93\91{I}V) (#O) (â\86\91f)
) → (
- â\88\80f,I,L. ð\9d\90\88â¦\83fâ¦\84 â\86\92 R (L.â\93¤{I}) (#O) (⫯f)
+ â\88\80f,I,L. ð\9d\90\88â¦\83fâ¦\84 â\86\92 R (L.â\93¤{I}) (#O) (â\86\91f)
) → (
∀f,I,L,i.
- L â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 f â\86\92 R L (#i) f â\86\92 R (L.â\93\98{I}) (#(⫯i)) (â\86\91f)
+ L â\8a¢ ð\9d\90\85*â¦\83#iâ¦\84 â\89\98 f â\86\92 R L (#i) f â\86\92 R (L.â\93\98{I}) (#(â\86\91i)) (⫯f)
) → (
∀f,L,l. 𝐈⦃f⦄ → R L (§l) f
) → (
(* Main inversion lemmas ****************************************************)
-theorem frees_mono: â\88\80f1,L,T. L â\8a¢ ð\9d\90\85*â¦\83Tâ¦\84 â\89\98 f1 â\86\92 â\88\80f2. L â\8a¢ ð\9d\90\85*â¦\83Tâ¦\84 â\89\98 f2 â\86\92 f1 â\89\97 f2.
+theorem frees_mono: â\88\80f1,L,T. L â\8a¢ ð\9d\90\85*â¦\83Tâ¦\84 â\89\98 f1 â\86\92 â\88\80f2. L â\8a¢ ð\9d\90\85*â¦\83Tâ¦\84 â\89\98 f2 â\86\92 f1 â\89¡ f2.
#f1 #L #T #H elim H -f1 -L -T
[ /3 width=3 by frees_inv_sort, isid_inv_eq_repl/
| #f1 #i #Hf1 #g2 #H
lapply (drops_tls_at … Hf … HY) -Hf -HY #HY
elim (drops_inv_skip2 … HY) -HY #Z #K0 #HK01 #HZ #H destruct
elim (liftsb_inv_pair_sn … HZ) -HZ #V0 #HV10 #H destruct
- elim (lifts_total V0 (ð\9d\90\94â\9d´â«¯j❵)) #V #HV0
+ elim (lifts_total V0 (ð\9d\90\94â\9d´â\86\91j❵)) #V #HV0
elim (lsubc_drops_trans_isuni … HL20 … HLK0) -HL20 -HLK0 // #Y #HLK2 #H
elim (lsubc_inv_bind2 … H) -H *
[ #K2 #HK20 #H destruct
lapply (drops_isuni_fwd_drop2 … HLK2) // #HLK2b
lapply (aaa_lifts … HKV1 … HK01 … HV10) -HKV1 -HK01 -HV10 #HKV0A
lapply (aaa_mono … HKV0B … HKV0A) #H destruct -HKV0B -HKV0A
- elim (lifts_total V2 (ð\9d\90\94â\9d´â«¯j❵)) #V3 #HV23
+ elim (lifts_total V2 (ð\9d\90\94â\9d´â\86\91j❵)) #V3 #HV23
lapply (s5 … HA … G … (◊) … (ⓝW2.V2) (ⓝV.V3) ????)
[3: |*: /2 width=9 by drops_inv_gen, lifts_flat/ ] -HLK2
lapply (s7 … HA G L2 (◊)) -HA /3 width=7 by acr_lifts/
elim (drops_lsubc_trans … H1RP … HL32 … HL20) -L2 #L2 #HL32 #HL20
lapply (aaa_lifts … HW … (f3∘f) L2 … W3 ?) -HW
[4: |*: /2 width=8 by drops_trans, lifts_trans/ ] #HW3
- @(IH â\80¦ ((â\86\91f3)â\88\98â\86\91f) … (L2. ⓛW3)) -IH
+ @(IH â\80¦ ((⫯f3)â\88\98⫯f) … (L2. ⓛW3)) -IH
/4 width=12 by lsubc_beta, drops_trans, drops_skip, lifts_trans, ext2_pair/
| #V #T #HG #HL #HT #A #HA #b #f #L0 #HL01 #X0 #H0 #L2 #HL20 destruct
elim (aaa_inv_appl … HA) -HA #B #HV #HT
∀G,L,Vs. all … (RP G L) Vs → ∀s. C G L (ⒶVs.⋆s).
definition S5 ≝ λC:candidate. ∀I,G,L,K,Vs,V1,V2,i.
- C G L (â\92¶Vs.V2) â\86\92 â¬\86*[⫯i] V1 ≘ V2 →
+ C G L (â\92¶Vs.V2) â\86\92 â¬\86*[â\86\91i] V1 ≘ V2 →
⬇*[i] L ≘ K.ⓑ{I}V1 → C G L (ⒶVs.#i).
definition S6 ≝ λRP,C:candidate.
lapply (drops_tls_at … Hf … HY) -HY #HY
elim (drops_inv_skip2 … HY) -HY #Z #K0 #HK0 #HZ #H destruct
elim (liftsb_inv_pair_sn … HZ) -HZ #W1 #HVW1 #H destruct
- elim (lifts_total W1 (ð\9d\90\94â\9d´â«¯j❵)) #W2 #HW12
+ elim (lifts_total W1 (ð\9d\90\94â\9d´â\86\91j❵)) #W2 #HW12
lapply (lifts_trans … HVW1 … HW12 ??) -HVW1 [3: |*: // ] #H
lapply (lifts_conf … HV12 … H f ?) -V1 [ /2 width=3 by after_uni_succ_sn/ ] #HVW2
@(s5 … IHA … (V0@V0s) … HW12) /3 width=4 by drops_inv_gen, lifts_applv/
elim (lifts_total V10 (𝐔❴1❵)) #V20 #HV120
elim (liftsv_total (𝐔❴1❵) V10s) #V20s #HV120s
@(s6 … IHA … (V10@V10s) (V20@V20s)) /3 width=7 by cp2, liftsv_cons/
- @(HA â\80¦ (â\86\91f)) /3 width=2 by drops_skip, ext2_pair/
+ @(HA â\80¦ (⫯f)) /3 width=2 by drops_skip, ext2_pair/
[ @lifts_applv //
lapply (liftsv_trans … HV10s … HV120s ??) -V10s [3: |*: // ] #H
- elim (liftsv_split_trans â\80¦ H (ð\9d\90\94â\9d´1â\9dµ) (â\86\91f)) /2 width=1 by after_uni_one_sn/ #V10s #HV10s #HV120s
+ elim (liftsv_split_trans â\80¦ H (ð\9d\90\94â\9d´1â\9dµ) (⫯f)) /2 width=1 by after_uni_one_sn/ #V10s #HV10s #HV120s
>(liftsv_mono … HV12s … HV10s) -V1s //
| @(acr_lifts … H1RP … HB … HV120) /3 width=2 by drops_refl, drops_drop/
]
lemma acr_abst: ∀RR,RS,RP. gcp RR RS RP → gcr RR RS RP RP →
∀p,G,L,W,T,A,B. ⦃G, L, W⦄ ϵ[RP] 〚B〛 → (
- â\88\80b,f,L0,V0,W0,T0. â¬\87*[b, f] L0 â\89\98 L â\86\92 â¬\86*[f] W â\89\98 W0 â\86\92 â¬\86*[â\86\91f] T ≘ T0 →
+ â\88\80b,f,L0,V0,W0,T0. â¬\87*[b, f] L0 â\89\98 L â\86\92 â¬\86*[f] W â\89\98 W0 â\86\92 â¬\86*[⫯f] T ≘ T0 →
⦃G, L0, V0⦄ ϵ[RP] 〚B〛 → ⦃G, L0, W0⦄ ϵ[RP] 〚B〛 → ⦃G, L0.ⓓⓝW0.V0, T0⦄ ϵ[RP] 〚A〛
) →
⦃G, L, ⓛ{p}W.T⦄ ϵ[RP] 〚②B.A〛.
/2 width=3 by lfxs_unit/ qed.
*)
lemma lfdeq_lref: ∀h,o,I1,I2,L1,L2,i.
- L1 â\89\9b[h, o, #i] L2 â\86\92 L1.â\93\98{I1} â\89\9b[h, o, #⫯i] L2.ⓘ{I2}.
+ L1 â\89\9b[h, o, #i] L2 â\86\92 L1.â\93\98{I1} â\89\9b[h, o, #â\86\91i] L2.ⓘ{I2}.
/2 width=1 by lfxs_lref/ qed.
(* Basic_2A1: uses: lleq_gref *)
/3 width=9 by or3_intro0, or3_intro1, or3_intro2, ex4_5_intro, ex4_4_intro, conj/
qed-.
*)
-lemma lfdeq_inv_lref: â\88\80h,o,Y1,Y2,i. Y1 â\89\9b[h, o, #⫯i] Y2 →
+lemma lfdeq_inv_lref: â\88\80h,o,Y1,Y2,i. Y1 â\89\9b[h, o, #â\86\91i] Y2 →
(Y1 = ⋆ ∧ Y2 = ⋆) ∨
∃∃I1,I2,L1,L2. L1 ≛[h, o, #i] L2 &
Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
∃∃L1,V1. L1 ≛[h, o, V1] L2 & V1 ≛[h, o] V2 & Y1 = L1.ⓑ{I}V1.
/2 width=1 by lfxs_inv_zero_pair_dx/ qed-.
-lemma lfdeq_inv_lref_bind_sn: â\88\80h,o,I1,Y2,L1,i. L1.â\93\98{I1} â\89\9b[h, o, #⫯i] Y2 →
+lemma lfdeq_inv_lref_bind_sn: â\88\80h,o,I1,Y2,L1,i. L1.â\93\98{I1} â\89\9b[h, o, #â\86\91i] Y2 →
∃∃I2,L2. L1 ≛[h, o, #i] L2 & Y2 = L2.ⓘ{I2}.
/2 width=2 by lfxs_inv_lref_bind_sn/ qed-.
-lemma lfdeq_inv_lref_bind_dx: â\88\80h,o,I2,Y1,L2,i. Y1 â\89\9b[h, o, #⫯i] L2.ⓘ{I2} →
+lemma lfdeq_inv_lref_bind_dx: â\88\80h,o,I2,Y1,L2,i. Y1 â\89\9b[h, o, #â\86\91i] L2.ⓘ{I2} →
∃∃I1,L1. L1 ≛[h, o, #i] L2 & Y1 = L1.ⓘ{I1}.
/2 width=2 by lfxs_inv_lref_bind_dx/ qed-.
/2 width=3 by ex2_intro/
qed-.
-lemma lfeq_inv_lref_bind_sn: â\88\80I1,K1,L2,i. K1.â\93\98{I1} â\89¡[#⫯i] L2 →
+lemma lfeq_inv_lref_bind_sn: â\88\80I1,K1,L2,i. K1.â\93\98{I1} â\89¡[#â\86\91i] L2 →
∃∃I2,K2. K1 ≡[#i] K2 & L2 = K2.ⓘ{I2}.
/2 width=2 by lfxs_inv_lref_bind_sn/ qed-.
-lemma lfeq_inv_lref_bind_dx: â\88\80I2,K2,L1,i. L1 â\89¡[#⫯i] K2.ⓘ{I2} →
+lemma lfeq_inv_lref_bind_dx: â\88\80I2,K2,L1,i. L1 â\89¡[#â\86\91i] K2.ⓘ{I2} →
∃∃I1,K1. K1 ≡[#i] K2 & L1 = K1.ⓘ{I1}.
/2 width=2 by lfxs_inv_lref_bind_dx/ qed-.
]
qed-.
-lemma lfxs_inv_lref: â\88\80R,Y1,Y2,i. Y1 ⪤*[R, #⫯i] Y2 →
+lemma lfxs_inv_lref: â\88\80R,Y1,Y2,i. Y1 ⪤*[R, #â\86\91i] Y2 →
∨∨ Y1 = ⋆ ∧ Y2 = ⋆
| ∃∃I1,I2,L1,L2. L1 ⪤*[R, #i] L2 &
Y1 = L1.ⓘ{I1} & Y2 = L2.ⓘ{I2}.
]
qed-.
-lemma lfxs_inv_lref_bind_sn: â\88\80R,I1,K1,L2,i. K1.â\93\98{I1} ⪤*[R, #⫯i] L2 →
+lemma lfxs_inv_lref_bind_sn: â\88\80R,I1,K1,L2,i. K1.â\93\98{I1} ⪤*[R, #â\86\91i] L2 →
∃∃I2,K2. K1 ⪤*[R, #i] K2 & L2 = K2.ⓘ{I2}.
#R #I1 #K1 #L2 #i #H elim (lfxs_inv_lref … H) -H *
[ #H destruct
]
qed-.
-lemma lfxs_inv_lref_bind_dx: â\88\80R,I2,K2,L1,i. L1 ⪤*[R, #⫯i] K2.ⓘ{I2} →
+lemma lfxs_inv_lref_bind_dx: â\88\80R,I2,K2,L1,i. L1 ⪤*[R, #â\86\91i] K2.ⓘ{I2} →
∃∃I1,K1. K1 ⪤*[R, #i] K2 & L1 = K1.ⓘ{I1}.
#R #I2 #K2 #L1 #i #H elim (lfxs_inv_lref … H) -H *
[ #_ #H destruct
/4 width=3 by frees_unit, lexs_next, ext2_unit, ex2_intro/ qed.
lemma lfxs_lref: ∀R,I1,I2,L1,L2,i.
- L1 ⪤*[R, #i] L2 â\86\92 L1.â\93\98{I1} ⪤*[R, #⫯i] L2.ⓘ{I2}.
+ L1 ⪤*[R, #i] L2 â\86\92 L1.â\93\98{I1} ⪤*[R, #â\86\91i] L2.ⓘ{I2}.
#R #I1 #I2 #L1 #L2 #i * /3 width=3 by lexs_push, frees_lref, ex2_intro/
qed.
definition lfxs_transitive_next: relation3 … ≝ λR1,R2,R3.
∀f,L,T. L ⊢ 𝐅*⦃T⦄ ≘ f →
- â\88\80g,I,K,n. â¬\87*[n] L â\89\98 K.â\93\98{I} â\86\92 ⫯g = ⫱*[n] f →
+ â\88\80g,I,K,n. â¬\87*[n] L â\89\98 K.â\93\98{I} â\86\92 â\86\91g = ⫱*[n] f →
lexs_transitive (cext2 R1) (cext2 R2) (cext2 R3) (cext2 R1) cfull g K I.
(* Properties with generic slicing for local environments *******************)
(* RESTRICTED REFINEMENT FOR CONTEXT-SENSITIVE FREE VARIABLES ***************)
inductive lsubf: relation4 lenv rtmap lenv rtmap ≝
-| lsubf_atom: â\88\80f1,f2. f1 â\89\97 f2 → lsubf (⋆) f1 (⋆) f2
+| lsubf_atom: â\88\80f1,f2. f1 â\89¡ f2 → lsubf (⋆) f1 (⋆) f2
| lsubf_push: ∀f1,f2,I1,I2,L1,L2. lsubf L1 (f1) L2 (f2) →
- lsubf (L1.â\93\98{I1}) (â\86\91f1) (L2.â\93\98{I2}) (â\86\91f2)
+ lsubf (L1.â\93\98{I1}) (⫯f1) (L2.â\93\98{I2}) (⫯f2)
| lsubf_bind: ∀f1,f2,I,L1,L2. lsubf L1 f1 L2 f2 →
- lsubf (L1.â\93\98{I}) (⫯f1) (L2.â\93\98{I}) (⫯f2)
+ lsubf (L1.â\93\98{I}) (â\86\91f1) (L2.â\93\98{I}) (â\86\91f2)
| lsubf_beta: ∀f,f0,f1,f2,L1,L2,W,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ f1 →
- lsubf L1 f0 L2 f2 â\86\92 lsubf (L1.â\93\93â\93\9dW.V) (⫯f1) (L2.â\93\9bW) (⫯f2)
+ lsubf L1 f0 L2 f2 â\86\92 lsubf (L1.â\93\93â\93\9dW.V) (â\86\91f1) (L2.â\93\9bW) (â\86\91f2)
| lsubf_unit: ∀f,f0,f1,f2,I1,I2,L1,L2,V. L1 ⊢ 𝐅*⦃V⦄ ≘ f → f0 ⋓ f ≘ f1 →
- lsubf L1 f0 L2 f2 â\86\92 lsubf (L1.â\93\91{I1}V) (⫯f1) (L2.â\93¤{I2}) (⫯f2)
+ lsubf L1 f0 L2 f2 â\86\92 lsubf (L1.â\93\91{I1}V) (â\86\91f1) (L2.â\93¤{I2}) (â\86\91f2)
.
interpretation
(* Basic inversion lemmas ***************************************************)
fact lsubf_inv_atom1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L1 = ⋆ →
- f1 â\89\97 f2 ∧ L2 = ⋆.
+ f1 â\89¡ f2 ∧ L2 = ⋆.
#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
[ /2 width=1 by conj/
| #f1 #f2 #I1 #I2 #L1 #L2 #_ #H destruct
]
qed-.
-lemma lsubf_inv_atom1: â\88\80f1,f2,L2. â¦\83â\8b\86, f1â¦\84 â«\83ð\9d\90\85* â¦\83L2, f2â¦\84 â\86\92 f1 â\89\97 f2 ∧ L2 = ⋆.
+lemma lsubf_inv_atom1: â\88\80f1,f2,L2. â¦\83â\8b\86, f1â¦\84 â«\83ð\9d\90\85* â¦\83L2, f2â¦\84 â\86\92 f1 â\89¡ f2 ∧ L2 = ⋆.
/2 width=3 by lsubf_inv_atom1_aux/ qed-.
fact lsubf_inv_push1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
- â\88\80g1,I1,K1. f1 = â\86\91g1 → L1 = K1.ⓘ{I1} →
- â\88\83â\88\83g2,I2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = â\86\91g2 & L2 = K2.ⓘ{I2}.
+ â\88\80g1,I1,K1. f1 = ⫯g1 → L1 = K1.ⓘ{I1} →
+ â\88\83â\88\83g2,I2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = ⫯g2 & L2 = K2.ⓘ{I2}.
#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
[ #f1 #f2 #_ #g1 #J1 #K1 #_ #H destruct
| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J1 #K1 #H1 #H2 destruct
]
qed-.
-lemma lsubf_inv_push1: â\88\80g1,f2,I1,K1,L2. â¦\83K1.â\93\98{I1}, â\86\91g1⦄ ⫃𝐅* ⦃L2, f2⦄ →
- â\88\83â\88\83g2,I2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = â\86\91g2 & L2 = K2.ⓘ{I2}.
+lemma lsubf_inv_push1: â\88\80g1,f2,I1,K1,L2. â¦\83K1.â\93\98{I1}, ⫯g1⦄ ⫃𝐅* ⦃L2, f2⦄ →
+ â\88\83â\88\83g2,I2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = ⫯g2 & L2 = K2.ⓘ{I2}.
/2 width=6 by lsubf_inv_push1_aux/ qed-.
fact lsubf_inv_pair1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
- â\88\80g1,I,K1,X. f1 = ⫯g1 → L1 = K1.ⓑ{I}X →
- â\88¨â\88¨ â\88\83â\88\83g2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = ⫯g2 & L2 = K2.ⓑ{I}X
+ â\88\80g1,I,K1,X. f1 = â\86\91g1 → L1 = K1.ⓑ{I}X →
+ â\88¨â\88¨ â\88\83â\88\83g2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = â\86\91g2 & L2 = K2.ⓑ{I}X
| ∃∃g,g0,g2,K2,W,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ &
- K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = ⫯g2 &
+ K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = â\86\91g2 &
I = Abbr & X = ⓝW.V & L2 = K2.ⓛW
| ∃∃g,g0,g2,J,K2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ &
- K1 â\8a¢ ð\9d\90\85*â¦\83Xâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = ⫯g2 &
+ K1 â\8a¢ ð\9d\90\85*â¦\83Xâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = â\86\91g2 &
L2 = K2.ⓤ{J}.
#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
[ #f1 #f2 #_ #g1 #J #K1 #X #_ #H destruct
]
qed-.
-lemma lsubf_inv_pair1: â\88\80g1,f2,I,K1,L2,X. â¦\83K1.â\93\91{I}X, ⫯g1⦄ ⫃𝐅* ⦃L2, f2⦄ →
- â\88¨â\88¨ â\88\83â\88\83g2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = ⫯g2 & L2 = K2.ⓑ{I}X
+lemma lsubf_inv_pair1: â\88\80g1,f2,I,K1,L2,X. â¦\83K1.â\93\91{I}X, â\86\91g1⦄ ⫃𝐅* ⦃L2, f2⦄ →
+ â\88¨â\88¨ â\88\83â\88\83g2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = â\86\91g2 & L2 = K2.ⓑ{I}X
| ∃∃g,g0,g2,K2,W,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ &
- K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = ⫯g2 &
+ K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = â\86\91g2 &
I = Abbr & X = ⓝW.V & L2 = K2.ⓛW
| ∃∃g,g0,g2,J,K2. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ &
- K1 â\8a¢ ð\9d\90\85*â¦\83Xâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = ⫯g2 &
+ K1 â\8a¢ ð\9d\90\85*â¦\83Xâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = â\86\91g2 &
L2 = K2.ⓤ{J}.
/2 width=5 by lsubf_inv_pair1_aux/ qed-.
fact lsubf_inv_unit1_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
- â\88\80g1,I,K1. f1 = ⫯g1 → L1 = K1.ⓤ{I} →
- â\88\83â\88\83g2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = ⫯g2 & L2 = K2.ⓤ{I}.
+ â\88\80g1,I,K1. f1 = â\86\91g1 → L1 = K1.ⓤ{I} →
+ â\88\83â\88\83g2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = â\86\91g2 & L2 = K2.ⓤ{I}.
#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
[ #f1 #f2 #_ #g1 #J #K1 #_ #H destruct
| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g1 #J #K1 #H elim (discr_push_next … H)
]
qed-.
-lemma lsubf_inv_unit1: â\88\80g1,f2,I,K1,L2. â¦\83K1.â\93¤{I}, ⫯g1⦄ ⫃𝐅* ⦃L2, f2⦄ →
- â\88\83â\88\83g2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = ⫯g2 & L2 = K2.ⓤ{I}.
+lemma lsubf_inv_unit1: â\88\80g1,f2,I,K1,L2. â¦\83K1.â\93¤{I}, â\86\91g1⦄ ⫃𝐅* ⦃L2, f2⦄ →
+ â\88\83â\88\83g2,K2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = â\86\91g2 & L2 = K2.ⓤ{I}.
/2 width=5 by lsubf_inv_unit1_aux/ qed-.
fact lsubf_inv_atom2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ → L2 = ⋆ →
- f1 â\89\97 f2 ∧ L1 = ⋆.
+ f1 â\89¡ f2 ∧ L1 = ⋆.
#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
[ /2 width=1 by conj/
| #f1 #f2 #I1 #I2 #L1 #L2 #_ #H destruct
]
qed-.
-lemma lsubf_inv_atom2: â\88\80f1,f2,L1. â¦\83L1, f1â¦\84 â«\83ð\9d\90\85* â¦\83â\8b\86, f2â¦\84 â\86\92 f1 â\89\97 f2 ∧ L1 = ⋆.
+lemma lsubf_inv_atom2: â\88\80f1,f2,L1. â¦\83L1, f1â¦\84 â«\83ð\9d\90\85* â¦\83â\8b\86, f2â¦\84 â\86\92 f1 â\89¡ f2 ∧ L1 = ⋆.
/2 width=3 by lsubf_inv_atom2_aux/ qed-.
fact lsubf_inv_push2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
- â\88\80g2,I2,K2. f2 = â\86\91g2 → L2 = K2.ⓘ{I2} →
- â\88\83â\88\83g1,I1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = â\86\91g1 & L1 = K1.ⓘ{I1}.
+ â\88\80g2,I2,K2. f2 = ⫯g2 → L2 = K2.ⓘ{I2} →
+ â\88\83â\88\83g1,I1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = ⫯g1 & L1 = K1.ⓘ{I1}.
#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
[ #f1 #f2 #_ #g2 #J2 #K2 #_ #H destruct
| #f1 #f2 #I1 #I2 #L1 #L2 #H12 #g2 #J2 #K2 #H1 #H2 destruct
]
qed-.
-lemma lsubf_inv_push2: â\88\80f1,g2,I2,L1,K2. â¦\83L1, f1â¦\84 â«\83ð\9d\90\85* â¦\83K2.â\93\98{I2}, â\86\91g2⦄ →
- â\88\83â\88\83g1,I1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = â\86\91g1 & L1 = K1.ⓘ{I1}.
+lemma lsubf_inv_push2: â\88\80f1,g2,I2,L1,K2. â¦\83L1, f1â¦\84 â«\83ð\9d\90\85* â¦\83K2.â\93\98{I2}, ⫯g2⦄ →
+ â\88\83â\88\83g1,I1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = ⫯g1 & L1 = K1.ⓘ{I1}.
/2 width=6 by lsubf_inv_push2_aux/ qed-.
fact lsubf_inv_pair2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
- â\88\80g2,I,K2,W. f2 = ⫯g2 → L2 = K2.ⓑ{I}W →
- â\88¨â\88¨ â\88\83â\88\83g1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = ⫯g1 & L1 = K1.ⓑ{I}W
+ â\88\80g2,I,K2,W. f2 = â\86\91g2 → L2 = K2.ⓑ{I}W →
+ â\88¨â\88¨ â\88\83â\88\83g1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = â\86\91g1 & L1 = K1.ⓑ{I}W
| ∃∃g,g0,g1,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ &
- K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f1 = ⫯g1 &
+ K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f1 = â\86\91g1 &
I = Abst & L1 = K1.ⓓⓝW.V.
#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
[ #f1 #f2 #_ #g2 #J #K2 #X #_ #H destruct
]
qed-.
-lemma lsubf_inv_pair2: â\88\80f1,g2,I,L1,K2,W. â¦\83L1, f1â¦\84 â«\83ð\9d\90\85* â¦\83K2.â\93\91{I}W, ⫯g2⦄ →
- â\88¨â\88¨ â\88\83â\88\83g1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = ⫯g1 & L1 = K1.ⓑ{I}W
+lemma lsubf_inv_pair2: â\88\80f1,g2,I,L1,K2,W. â¦\83L1, f1â¦\84 â«\83ð\9d\90\85* â¦\83K2.â\93\91{I}W, â\86\91g2⦄ →
+ â\88¨â\88¨ â\88\83â\88\83g1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = â\86\91g1 & L1 = K1.ⓑ{I}W
| ∃∃g,g0,g1,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ &
- K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f1 = ⫯g1 &
+ K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f1 = â\86\91g1 &
I = Abst & L1 = K1.ⓓⓝW.V.
/2 width=5 by lsubf_inv_pair2_aux/ qed-.
fact lsubf_inv_unit2_aux: ∀f1,f2,L1,L2. ⦃L1, f1⦄ ⫃𝐅* ⦃L2, f2⦄ →
- â\88\80g2,I,K2. f2 = ⫯g2 → L2 = K2.ⓤ{I} →
- â\88¨â\88¨ â\88\83â\88\83g1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = ⫯g1 & L1 = K1.ⓤ{I}
+ â\88\80g2,I,K2. f2 = â\86\91g2 → L2 = K2.ⓤ{I} →
+ â\88¨â\88¨ â\88\83â\88\83g1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = â\86\91g1 & L1 = K1.ⓤ{I}
| ∃∃g,g0,g1,J,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ &
- K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f1 = ⫯g1 &
+ K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f1 = â\86\91g1 &
L1 = K1.ⓑ{J}V.
#f1 #f2 #L1 #L2 * -f1 -f2 -L1 -L2
[ #f1 #f2 #_ #g2 #J #K2 #_ #H destruct
]
qed-.
-lemma lsubf_inv_unit2: â\88\80f1,g2,I,L1,K2. â¦\83L1, f1â¦\84 â«\83ð\9d\90\85* â¦\83K2.â\93¤{I}, ⫯g2⦄ →
- â\88¨â\88¨ â\88\83â\88\83g1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = ⫯g1 & L1 = K1.ⓤ{I}
+lemma lsubf_inv_unit2: â\88\80f1,g2,I,L1,K2. â¦\83L1, f1â¦\84 â«\83ð\9d\90\85* â¦\83K2.â\93¤{I}, â\86\91g2⦄ →
+ â\88¨â\88¨ â\88\83â\88\83g1,K1. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f1 = â\86\91g1 & L1 = K1.ⓤ{I}
| ∃∃g,g0,g1,J,K1,V. ⦃K1, g0⦄ ⫃𝐅* ⦃K2, g2⦄ &
- K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f1 = ⫯g1 &
+ K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f1 = â\86\91g1 &
L1 = K1.ⓑ{J}V.
/2 width=5 by lsubf_inv_unit2_aux/ qed-.
(* Advanced inversion lemmas ************************************************)
-lemma lsubf_inv_atom: â\88\80f1,f2. â¦\83â\8b\86, f1â¦\84 â«\83ð\9d\90\85* â¦\83â\8b\86, f2â¦\84 â\86\92 f1 â\89\97 f2.
+lemma lsubf_inv_atom: â\88\80f1,f2. â¦\83â\8b\86, f1â¦\84 â«\83ð\9d\90\85* â¦\83â\8b\86, f2â¦\84 â\86\92 f1 â\89¡ f2.
#f1 #f2 #H elim (lsubf_inv_atom1 … H) -H //
qed-.
-lemma lsubf_inv_push_sn: â\88\80g1,f2,I1,I2,K1,K2. â¦\83K1.â\93\98{I1}, â\86\91g1⦄ ⫃𝐅* ⦃K2.ⓘ{I2}, f2⦄ →
- â\88\83â\88\83g2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = â\86\91g2.
+lemma lsubf_inv_push_sn: â\88\80g1,f2,I1,I2,K1,K2. â¦\83K1.â\93\98{I1}, ⫯g1⦄ ⫃𝐅* ⦃K2.ⓘ{I2}, f2⦄ →
+ â\88\83â\88\83g2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = ⫯g2.
#g1 #f2 #I #K1 #K2 #X #H elim (lsubf_inv_push1 … H) -H
#g2 #I #Y #H0 #H2 #H destruct /2 width=3 by ex2_intro/
qed-.
-lemma lsubf_inv_bind_sn: â\88\80g1,f2,I,K1,K2. â¦\83K1.â\93\98{I}, ⫯g1⦄ ⫃𝐅* ⦃K2.ⓘ{I}, f2⦄ →
- â\88\83â\88\83g2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = ⫯g2.
+lemma lsubf_inv_bind_sn: â\88\80g1,f2,I,K1,K2. â¦\83K1.â\93\98{I}, â\86\91g1⦄ ⫃𝐅* ⦃K2.ⓘ{I}, f2⦄ →
+ â\88\83â\88\83g2. â¦\83K1, g1â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & f2 = â\86\91g2.
#g1 #f2 * #I [2: #X ] #K1 #K2 #H
[ elim (lsubf_inv_pair1 … H) -H *
[ #z2 #Y2 #H2 #H #H0 destruct /2 width=3 by ex2_intro/
]
qed-.
-lemma lsubf_inv_beta_sn: â\88\80g1,f2,K1,K2,V,W. â¦\83K1.â\93\93â\93\9dW.V, ⫯g1⦄ ⫃𝐅* ⦃K2.ⓛW, f2⦄ →
- â\88\83â\88\83g,g0,g2. â¦\83K1, g0â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = ⫯g2.
+lemma lsubf_inv_beta_sn: â\88\80g1,f2,K1,K2,V,W. â¦\83K1.â\93\93â\93\9dW.V, â\86\91g1⦄ ⫃𝐅* ⦃K2.ⓛW, f2⦄ →
+ â\88\83â\88\83g,g0,g2. â¦\83K1, g0â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = â\86\91g2.
#g1 #f2 #K1 #K2 #V #W #H elim (lsubf_inv_pair1 … H) -H *
[ #z2 #Y2 #_ #_ #H destruct
| #z #z0 #z2 #Y2 #X0 #X #H02 #Hz #Hg1 #H #_ #H0 #H1 destruct
]
qed-.
-lemma lsubf_inv_unit_sn: â\88\80g1,f2,I,J,K1,K2,V. â¦\83K1.â\93\91{I}V, ⫯g1⦄ ⫃𝐅* ⦃K2.ⓤ{J}, f2⦄ →
- â\88\83â\88\83g,g0,g2. â¦\83K1, g0â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = ⫯g2.
+lemma lsubf_inv_unit_sn: â\88\80g1,f2,I,J,K1,K2,V. â¦\83K1.â\93\91{I}V, â\86\91g1⦄ ⫃𝐅* ⦃K2.ⓤ{J}, f2⦄ →
+ â\88\83â\88\83g,g0,g2. â¦\83K1, g0â¦\84 â«\83ð\9d\90\85* â¦\83K2, g2â¦\84 & K1 â\8a¢ ð\9d\90\85*â¦\83Vâ¦\84 â\89\98 g & g0 â\8b\93 g â\89\98 g1 & f2 = â\86\91g2.
#g1 #f2 #I #J #K1 #K2 #V #H elim (lsubf_inv_pair1 … H) -H *
[ #z2 #Y2 #_ #_ #H destruct
| #z #z0 #z2 #Y2 #X0 #X #_ #_ #_ #_ #_ #_ #H destruct
]
qed-.
-lemma lsubf_inv_refl: â\88\80L,f1,f2. â¦\83L,f1â¦\84 â«\83ð\9d\90\85* â¦\83L,f2â¦\84 â\86\92 f1 â\89\97 f2.
+lemma lsubf_inv_refl: â\88\80L,f1,f2. â¦\83L,f1â¦\84 â«\83ð\9d\90\85* â¦\83L,f2â¦\84 â\86\92 f1 â\89¡ f2.
#L elim L -L /2 width=1 by lsubf_inv_atom/
#L #I #IH #f1 #f2 #H12
elim (pn_split f1) * #g1 #H destruct
/2 width=1 by lsubf_push, lsubf_bind/
qed.
-lemma lsubf_refl_eq: â\88\80f1,f2,L. f1 â\89\97 f2 → ⦃L, f1⦄ ⫃𝐅* ⦃L, f2⦄.
+lemma lsubf_refl_eq: â\88\80f1,f2,L. f1 â\89¡ f2 → ⦃L, f1⦄ ⫃𝐅* ⦃L, f2⦄.
/2 width=3 by lsubf_eq_repl_back2/ qed.
lemma lsubf_bind_tl_dx: ∀g1,f2,I,L1,L2. ⦃L1, g1⦄ ⫃𝐅* ⦃L2, ⫱f2⦄ →
#f #f0 #g1 #L1 #V #Hf #Hg1 #f2
elim (pn_split f2) * #x2 #H2 #L2 #W #HL12 destruct
[ /3 width=4 by lsubf_push, sor_inv_sle_sn, ex2_intro/
-| @(ex2_intro â\80¦ (⫯g1)) /2 width=5 by lsubf_beta/ (**) (* full auto fails *)
+| @(ex2_intro â\80¦ (â\86\91g1)) /2 width=5 by lsubf_beta/ (**) (* full auto fails *)
]
qed-.
#L2 #I >append_bind >length_bind >length_bind //
qed.
-lemma ltail_length: â\88\80I,L. |â\93\98{I}.L| = ⫯|L|.
+lemma ltail_length: â\88\80I,L. |â\93\98{I}.L| = â\86\91|L|.
#I #L >append_length //
qed.
(* Advanced inversion lemmas on length for local environments ***************)
(* Basic_2A1: was: length_inv_pos_dx_ltail *)
-lemma length_inv_succ_dx_ltail: â\88\80L,n. |L| = ⫯n →
+lemma length_inv_succ_dx_ltail: â\88\80L,n. |L| = â\86\91n →
∃∃I,K. |K| = n & L = ⓘ{I}.K.
#Y #n #H elim (length_inv_succ_dx … H) -H #I #L #Hn #HLK destruct
elim (lenv_case_tail … L) [2: * #K #J ]
qed-.
(* Basic_2A1: was: length_inv_pos_sn_ltail *)
-lemma length_inv_succ_sn_ltail: â\88\80L,n. ⫯n = |L| →
+lemma length_inv_succ_sn_ltail: â\88\80L,n. â\86\91n = |L| →
∃∃I,K. n = |K| & L = ⓘ{I}.K.
#Y #n #H elim (length_inv_succ_sn … H) -H #I #L #Hn #HLK destruct
elim (lenv_case_tail … L) [2: * #K #J ]
deg : relation nat; (* degree of the sort *)
deg_total: ∀s. ∃d. deg s d; (* functional relation axioms *)
deg_mono : ∀s,d1,d2. deg s d1 → deg s d2 → d1 = d2;
- deg_next : â\88\80s,d. deg s d â\86\92 deg (next h s) (â«°d) (* compatibility condition *)
+ deg_next : â\88\80s,d. deg s d â\86\92 deg (next h s) (â\86\93d) (* compatibility condition *)
}.
(* Notable specifications ***************************************************)
(* Basic_2A1: includes: deg_SO_pos *)
inductive deg_SO (h:sh) (s:nat) (s0:nat): predicate nat ≝
-| deg_SO_succ : â\88\80n. (next h)^n s0 = s â\86\92 deg_SO h s s0 (⫯n)
+| deg_SO_succ : â\88\80n. (next h)^n s0 = s â\86\92 deg_SO h s s0 (â\86\91n)
| deg_SO_zero: ((∃n. (next h)^n s0 = s) → ⊥) → deg_SO h s s0 0
.
-fact deg_SO_inv_succ_aux: â\88\80h,s,s0,n0. deg_SO h s s0 n0 â\86\92 â\88\80n. n0 = ⫯n →
+fact deg_SO_inv_succ_aux: â\88\80h,s,s0,n0. deg_SO h s s0 n0 â\86\92 â\88\80n. n0 = â\86\91n →
(next h)^n s0 = s.
#h #s #s0 #n0 * -n0
[ #n #Hn #x #H destruct //
qed-.
(* Basic_2A1: was: deg_SO_inv_pos *)
-lemma deg_SO_inv_succ: â\88\80h,s,s0,n. deg_SO h s s0 (⫯n) → (next h)^n s0 = s.
+lemma deg_SO_inv_succ: â\88\80h,s,s0,n. deg_SO h s s0 (â\86\91n) → (next h)^n s0 = s.
/2 width=3 by deg_SO_inv_succ_aux/ qed-.
lemma deg_SO_refl: ∀h,s. deg_SO h s s 1.
[ #d #H destruct elim d -d normalize
/2 width=1 by deg_SO_gt, deg_SO_succ, next_lt/
| #H1 @deg_SO_zero * #d #H2 destruct
- @H1 -H1 @(ex_intro â\80¦ (⫯d)) /2 width=1 by sym_eq/ (**) (* explicit constructor *)
+ @H1 -H1 @(ex_intro â\80¦ (â\86\91d)) /2 width=1 by sym_eq/ (**) (* explicit constructor *)
]
]
defined.
(* Basic inversion lemmas ***************************************************)
-lemma deg_inv_pred: â\88\80h,o,s,d. deg h o (next h s) (⫯d) â\86\92 deg h o s (⫯⫯d).
+lemma deg_inv_pred: â\88\80h,o,s,d. deg h o (next h s) (â\86\91d) â\86\92 deg h o s (â\86\91â\86\91d).
#h #o #s #d #H1
elim (deg_total h o s) #n #H0
lapply (deg_next … H0) #H2
lapply (deg_mono … H1 H2) -H1 -H2 #H >H >S_pred /2 width=2 by ltn_to_ltO/
qed-.
-lemma deg_inv_prec: â\88\80h,o,s,n,d. deg h o ((next h)^n s) (⫯d) â\86\92 deg h o s (⫯(d+n)).
+lemma deg_inv_prec: â\88\80h,o,s,n,d. deg h o ((next h)^n s) (â\86\91d) â\86\92 deg h o s (â\86\91(d+n)).
#h #o #s #n elim n -n normalize /3 width=1 by deg_inv_pred/
qed-.
#h #o #s #d #n elim n -n normalize /3 width=1 by deg_next/
qed.
-lemma deg_next_SO: â\88\80h,o,s,d. deg h o s (⫯d) → deg h o (next h s) d.
+lemma deg_next_SO: â\88\80h,o,s,d. deg h o s (â\86\91d) → deg h o (next h s) d.
/2 width=1 by deg_next/ qed-.
-lemma sd_d_SS: â\88\80h,s,d. sd_d h s (⫯⫯d) = sd_d h (next h s) (⫯d).
+lemma sd_d_SS: â\88\80h,s,d. sd_d h s (â\86\91â\86\91d) = sd_d h (next h s) (â\86\91d).
// qed.
lemma sd_d_correct: ∀h,d,s. deg h (sd_d h s d) s d.
lapply (le_to_lt_to_lt … IH H) -IH -H /2 width=2 by lt_to_le/
qed.
-lemma nexts_lt: â\88\80h,s,n. s < (next h)^(⫯n) s.
+lemma nexts_lt: â\88\80h,s,n. s < (next h)^(â\86\91n) s.
#h #s #n normalize
lapply (nexts_le h s n) #H
@(le_to_lt_to_lt … H) //
rec definition length L ≝ match L with
[ LAtom ⇒ 0
-| LBind L _ â\87\92 ⫯(length L)
+| LBind L _ â\87\92 â\86\91(length L)
].
interpretation "length (local environment)" 'card L = (length L).
// qed.
(* Basic_2A1: uses: length_pair *)
-lemma length_bind: â\88\80I,L. |L.â\93\98{I}| = ⫯|L|.
+lemma length_bind: â\88\80I,L. |L.â\93\98{I}| = â\86\91|L|.
// qed.
(* Basic inversion lemmas ***************************************************)
/2 width=1 by length_inv_zero_dx/ qed-.
(* Basic_2A1: was: length_inv_pos_dx *)
-lemma length_inv_succ_dx: â\88\80n,L. |L| = ⫯n →
+lemma length_inv_succ_dx: â\88\80n,L. |L| = â\86\91n →
∃∃I,K. |K| = n & L = K. ⓘ{I}.
#n *
[ >length_atom #H destruct
qed-.
(* Basic_2A1: was: length_inv_pos_sn *)
-lemma length_inv_succ_sn: â\88\80n,L. ⫯n = |L| →
+lemma length_inv_succ_sn: â\88\80n,L. â\86\91n = |L| →
∃∃I,K. n = |K| & L = K. ⓘ{I}.
#n #L #H lapply (sym_eq ??? H) -H
#H elim (length_inv_succ_dx … H) -H /2 width=4 by ex2_2_intro/
| lveq_bind : ∀I1,I2,K1,K2. lveq 0 K1 0 K2 →
lveq 0 (K1.ⓘ{I1}) 0 (K2.ⓘ{I2})
| lveq_void_sn: ∀K1,K2,n1. lveq n1 K1 0 K2 →
- lveq (⫯n1) (K1.ⓧ) 0 K2
+ lveq (â\86\91n1) (K1.ⓧ) 0 K2
| lveq_void_dx: ∀K1,K2,n2. lveq 0 K1 n2 K2 →
- lveq 0 K1 (⫯n2) (K2.ⓧ)
+ lveq 0 K1 (â\86\91n2) (K2.ⓧ)
.
interpretation "equivalence up to exclusion binders (local environment)"
/2 width=5 by lveq_inv_zero_aux/ qed-.
fact lveq_inv_succ_sn_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
- â\88\80m1. ⫯m1 = n1 →
+ â\88\80m1. â\86\91m1 = n1 →
∃∃K1. K1 ≋ⓧ*[m1, 0] L2 & K1.ⓧ = L1 & 0 = n2.
#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2
[1: #m #H destruct
]
qed-.
-lemma lveq_inv_succ_sn: â\88\80L1,K2,n1,n2. L1 â\89\8bâ\93§*[⫯n1, n2] K2 →
+lemma lveq_inv_succ_sn: â\88\80L1,K2,n1,n2. L1 â\89\8bâ\93§*[â\86\91n1, n2] K2 →
∃∃K1. K1 ≋ⓧ*[n1, 0] K2 & K1.ⓧ = L1 & 0 = n2.
/2 width=3 by lveq_inv_succ_sn_aux/ qed-.
-lemma lveq_inv_succ_dx: â\88\80K1,L2,n1,n2. K1 â\89\8bâ\93§*[n1, ⫯n2] L2 →
+lemma lveq_inv_succ_dx: â\88\80K1,L2,n1,n2. K1 â\89\8bâ\93§*[n1, â\86\91n2] L2 →
∃∃K2. K1 ≋ⓧ*[0, n2] K2 & K2.ⓧ = L2 & 0 = n1.
#K1 #L2 #n1 #n2 #H
lapply (lveq_sym … H) -H #H
qed-.
fact lveq_inv_succ_aux: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2 →
- â\88\80m1,m2. ⫯m1 = n1 â\86\92 ⫯m2 = n2 → ⊥.
+ â\88\80m1,m2. â\86\91m1 = n1 â\86\92 â\86\91m2 = n2 → ⊥.
#L1 #L2 #n1 #n2 * -L1 -L2 -n1 -n2
[1: #m1 #m2 #H1 #H2 destruct
|2: #I1 #I2 #K1 #K2 #_ #m1 #m2 #H1 #H2 destruct
]
qed-.
-lemma lveq_inv_succ: â\88\80L1,L2,n1,n2. L1 â\89\8bâ\93§*[⫯n1, ⫯n2] L2 → ⊥.
+lemma lveq_inv_succ: â\88\80L1,L2,n1,n2. L1 â\89\8bâ\93§*[â\86\91n1, â\86\91n2] L2 → ⊥.
/2 width=9 by lveq_inv_succ_aux/ qed-.
(* Advanced inversion lemmas ************************************************)
qed-.
lemma lveq_inv_bind_atom: ∀I1,K1,n1,n2. K1.ⓘ{I1} ≋ⓧ*[n1, n2] ⋆ →
- â\88\83â\88\83m1. K1 â\89\8bâ\93§*[m1, 0] â\8b\86 & BUnit Void = I1 & ⫯m1 = n1 & 0 = n2.
+ â\88\83â\88\83m1. K1 â\89\8bâ\93§*[m1, 0] â\8b\86 & BUnit Void = I1 & â\86\91m1 = n1 & 0 = n2.
#I1 #K1 * [2: #n1 ] * [2,4: #n2 ] #H
[ elim (lveq_inv_succ … H)
| elim (lveq_inv_succ_dx … H) -H #Y #_ #H1 #H2 destruct
qed-.
lemma lveq_inv_atom_bind: ∀I2,K2,n1,n2. ⋆ ≋ⓧ*[n1, n2] K2.ⓘ{I2} →
- â\88\83â\88\83m2. â\8b\86 â\89\8bâ\93§*[0, m2] K2 & BUnit Void = I2 & 0 = n1 & ⫯m2 = n2.
+ â\88\83â\88\83m2. â\8b\86 â\89\8bâ\93§*[0, m2] K2 & BUnit Void = I2 & 0 = n1 & â\86\91m2 = n2.
#I2 #K2 #n1 #n2 #H
lapply (lveq_sym … H) -H #H
elim (lveq_inv_bind_atom … H) -H
]
qed-.
-lemma lveq_inv_void_succ_sn: â\88\80L1,L2,n1,n2. L1.â\93§ â\89\8bâ\93§*[⫯n1, n2] L2 →
+lemma lveq_inv_void_succ_sn: â\88\80L1,L2,n1,n2. L1.â\93§ â\89\8bâ\93§*[â\86\91n1, n2] L2 →
∧∧ L1 ≋ ⓧ*[n1, 0] L2 & 0 = n2.
#L1 #L2 #n1 #n2 #H
elim (lveq_inv_succ_sn … H) -H #Y #HY #H1 #H2 destruct /2 width=1 by conj/
qed-.
-lemma lveq_inv_void_succ_dx: â\88\80L1,L2,n1,n2. L1 â\89\8bâ\93§*[n1, ⫯n2] L2.ⓧ →
+lemma lveq_inv_void_succ_dx: â\88\80L1,L2,n1,n2. L1 â\89\8bâ\93§*[n1, â\86\91n2] L2.ⓧ →
∧∧ L1 ≋ ⓧ*[0, n2] L2 & 0 = n1.
#L1 #L2 #n1 #n2 #H
lapply (lveq_sym … H) -H #H
(* Inversion lemmas with length for local environments **********************)
lemma lveq_inv_void_dx_length: ∀L1,L2,n1,n2. L1 ≋ⓧ*[n1, n2] L2.ⓧ → |L1| ≤ |L2| →
- â\88\83â\88\83m2. L1 â\89\8b â\93§*[n1, m2] L2 & 0 = n1 & ⫯m2 = n2.
+ â\88\83â\88\83m2. L1 â\89\8b â\93§*[n1, m2] L2 & 0 = n1 & â\86\91m2 = n2.
#L1 #L2 #n1 #n2 #H #HL12
lapply (lveq_fwd_length_plus … H) normalize >plus_n_Sm #H0
lapply (plus2_inv_le_sn … H0 HL12) -H0 -HL12 #H0
qed-.
lemma lveq_inv_void_sn_length: ∀L1,L2,n1,n2. L1.ⓧ ≋ⓧ*[n1, n2] L2 → |L2| ≤ |L1| →
- â\88\83â\88\83m1. L1 â\89\8b â\93§*[m1, n2] L2 & ⫯m1 = n1 & 0 = n2.
+ â\88\83â\88\83m1. L1 â\89\8b â\93§*[m1, n2] L2 & â\86\91m1 = n1 & 0 = n2.
#L1 #L2 #n1 #n2 #H #HL
lapply (lveq_sym … H) -H #H
elim (lveq_inv_void_dx_length … H HL) -H -HL
theorem lveq_inj_void_sn_ge: ∀K1,K2. |K2| ≤ |K1| →
∀n1,n2. K1 ≋ⓧ*[n1, n2] K2 →
∀m1,m2. K1.ⓧ ≋ⓧ*[m1, m2] K2 →
- â\88§â\88§ ⫯n1 = m1 & 0 = m2 & 0 = n2.
+ â\88§â\88§ â\86\91n1 = m1 & 0 = m2 & 0 = n2.
#L1 #L2 #HL #n1 #n2 #Hn #m1 #m2 #Hm
elim (lveq_fwd_length … Hn) -Hn #H1 #H2 destruct
elim (lveq_fwd_length … Hm) -Hm #H1 #H2 destruct
theorem lveq_inj_void_dx_le: ∀K1,K2. |K1| ≤ |K2| →
∀n1,n2. K1 ≋ⓧ*[n1, n2] K2 →
∀m1,m2. K1 ≋ⓧ*[m1, m2] K2.ⓧ →
- â\88§â\88§ ⫯n2 = m2 & 0 = m1 & 0 = n1.
+ â\88§â\88§ â\86\91n2 = m2 & 0 = m1 & 0 = n1.
/3 width=5 by lveq_inj_void_sn_ge, lveq_sym/ qed-. (* auto: 2x lveq_sym *)
rec definition tw T ≝ match T with
[ TAtom _ ⇒ 1
-| TPair _ V T â\87\92 ⫯(tw V + tw T)
+| TPair _ V T â\87\92 â\86\91(tw V + tw T)
].
interpretation "weight (term)" 'Weight T = (tw T).
(* *)
(**************************************************************************)
-include "ground_2/notation/constructors/successor_1.ma".
-include "ground_2/notation/functions/predecessor_1.ma".
+include "ground_2/notation/constructors/uparrow_1.ma".
+include "ground_2/notation/functions/downarrow_1.ma".
include "arithmetics/nat.ma".
include "ground_2/lib/relations.ma".
(* ARITHMETICAL PROPERTIES **************************************************)
-interpretation "nat successor" 'Successor m = (S m).
+interpretation "nat successor" 'UpArrow m = (S m).
-interpretation "nat predecessor" 'Predecessor m = (pred m).
+interpretation "nat predecessor" 'DownArrow m = (pred m).
interpretation "nat min" 'and x y = (min x y).
lemma pred_S: ∀m. pred (S m) = m.
// qed.
-lemma plus_S1: â\88\80x,y. ⫯(x+y) = (⫯x) + y.
+lemma plus_S1: â\88\80x,y. â\86\91(x+y) = (â\86\91x) + y.
// qed.
lemma max_O1: ∀n. n = (0 ∨ n).
lemma max_O2: ∀n. n = (n ∨ 0).
// qed.
-lemma max_SS: â\88\80n1,n2. ⫯(n1â\88¨n2) = (⫯n1 â\88¨ ⫯n2).
+lemma max_SS: â\88\80n1,n2. â\86\91(n1â\88¨n2) = (â\86\91n1 â\88¨ â\86\91n2).
#n1 #n2 elim (decidable_le n1 n2) #H normalize
[ >(le_to_leb_true … H) | >(not_le_to_leb_false … H) ] -H //
qed.
(* Equations ****************************************************************)
-lemma plus_SO: â\88\80n. n + 1 = ⫯n.
+lemma plus_SO: â\88\80n. n + 1 = â\86\91n.
// qed.
lemma minus_plus_m_m_commutative: ∀n,m:nat. n = m + n - m.
@le_S_S_to_le >S_pred /2 width=3 by transitive_lt/
qed.
-lemma lt_S_S: â\88\80x,y. x < y â\86\92 ⫯x < ⫯y.
+lemma lt_S_S: â\88\80x,y. x < y â\86\92 â\86\91x < â\86\91y.
/2 width=1 by le_S_S/ qed.
-lemma lt_S: â\88\80n,m. n < m â\86\92 n < ⫯m.
+lemma lt_S: â\88\80n,m. n < m â\86\92 n < â\86\91m.
/2 width=1 by le_S/ qed.
-lemma max_S1_le_S: â\88\80n1,n2,n. (n1 â\88¨ n2) â\89¤ n â\86\92 (⫯n1 â\88¨ n2) â\89¤ ⫯n.
+lemma max_S1_le_S: â\88\80n1,n2,n. (n1 â\88¨ n2) â\89¤ n â\86\92 (â\86\91n1 â\88¨ n2) â\89¤ â\86\91n.
/4 width=2 by to_max, le_maxr, le_S_S, le_S/ qed-.
-lemma max_S2_le_S: â\88\80n1,n2,n. (n1 â\88¨ n2) â\89¤ n â\86\92 (n1 â\88¨ ⫯n2) â\89¤ ⫯n.
+lemma max_S2_le_S: â\88\80n1,n2,n. (n1 â\88¨ n2) â\89¤ n â\86\92 (n1 â\88¨ â\86\91n2) â\89¤ â\86\91n.
/2 width=1 by max_S1_le_S/ qed-.
lemma arith_j: ∀x,y,z. x-y-1 ≤ x-(y-z)-1.
lemma lt_le_false: ∀x,y. x < y → y ≤ x → ⊥.
/3 width=4 by lt_refl_false, lt_to_le_to_lt/ qed-.
-lemma succ_inv_refl_sn: â\88\80x. ⫯x = x → ⊥.
-#x #H @(lt_le_false x (⫯x)) //
+lemma succ_inv_refl_sn: â\88\80x. â\86\91x = x → ⊥.
+#x #H @(lt_le_false x (â\86\91x)) //
qed-.
lemma le_plus_xSy_O_false: ∀x,y. x + S y ≤ 0 → ⊥.
/2 width=2 by le_plus_to_le/
qed-.
-lemma lt_S_S_to_lt: â\88\80x,y. ⫯x < ⫯y → x < y.
+lemma lt_S_S_to_lt: â\88\80x,y. â\86\91x < â\86\91y → x < y.
/2 width=1 by le_S_S_to_le/ qed-.
(* Note this should go in nat.ma *)
#H destruct
qed-.
-lemma lt_inv_O1: â\88\80n. 0 < n â\86\92 â\88\83m. ⫯m = n.
+lemma lt_inv_O1: â\88\80n. 0 < n â\86\92 â\88\83m. â\86\91m = n.
* /2 width=2 by ex_intro/
#H cases (lt_le_false … H) -H //
qed-.
-lemma lt_inv_S1: â\88\80m,n. ⫯m < n â\86\92 â\88\83â\88\83p. m < p & ⫯p = n.
+lemma lt_inv_S1: â\88\80m,n. â\86\91m < n â\86\92 â\88\83â\88\83p. m < p & â\86\91p = n.
#m * /3 width=3 by lt_S_S_to_lt, ex2_intro/
#H cases (lt_le_false … H) -H //
qed-.
-lemma lt_inv_gen: â\88\80y,x. x < y â\86\92 â\88\83â\88\83z. x â\89¤ z & ⫯z = y.
+lemma lt_inv_gen: â\88\80y,x. x < y â\86\92 â\88\83â\88\83z. x â\89¤ z & â\86\91z = y.
* /3 width=3 by le_S_S_to_le, ex2_intro/
#x #H elim (lt_le_false … H) -H //
qed-.
* /2 width=1 by conj/ #x #y normalize #H destruct
qed-.
-lemma nat_split: â\88\80x. x = 0 â\88¨ â\88\83y. ⫯y = x.
+lemma nat_split: â\88\80x. x = 0 â\88¨ â\88\83y. â\86\91y = x.
* /3 width=2 by ex_intro, or_introl, or_intror/
qed-.
lemma lt_elim: ∀R:relation nat.
- (â\88\80n2. R O (⫯n2)) →
- (â\88\80n1,n2. R n1 n2 â\86\92 R (⫯n1) (⫯n2)) →
+ (â\88\80n2. R O (â\86\91n2)) →
+ (â\88\80n1,n2. R n1 n2 â\86\92 R (â\86\91n1) (â\86\91n2)) →
∀n2,n1. n1 < n2 → R n1 n2.
#R #IH1 #IH2 #n2 elim n2 -n2
[ #n1 #H elim (lt_le_false … H) -H //
lemma le_elim: ∀R:relation nat.
(∀n2. R O (n2)) →
- (â\88\80n1,n2. R n1 n2 â\86\92 R (⫯n1) (⫯n2)) →
+ (â\88\80n1,n2. R n1 n2 â\86\92 R (â\86\91n1) (â\86\91n2)) →
∀n1,n2. n1 ≤ n2 → R n1 n2.
#R #IH1 #IH2 #n1 #n2 @(nat_elim2 … n1 n2) -n1 -n2
/4 width=1 by monotonic_pred/ -IH1 -IH2
rec definition length (A:Type[0]) (l:list A) on l ≝ match l with
[ nil ⇒ 0
-| cons _ l â\87\92 ⫯(length A l)
+| cons _ l â\87\92 â\86\91(length A l)
].
interpretation "length (list)"
lemma length_nil (A:Type[0]): |nil A| = 0.
// qed.
-lemma length_cons (A:Type[0]) (l:list A) (a:A): |a@l| = ⫯|l|.
+lemma length_cons (A:Type[0]) (l:list A) (a:A): |a@l| = â\86\91|l|.
// qed.
(* Basic inversion lemmas on length *****************************************)
lemma length_inv_zero_sn (A:Type[0]) (l:list A): 0 = |l| → l = ◊.
/2 width=1 by length_inv_zero_dx/ qed-.
-lemma length_inv_succ_dx (A:Type[0]) (l:list A) (x): |l| = ⫯x →
+lemma length_inv_succ_dx (A:Type[0]) (l:list A) (x): |l| = â\86\91x →
∃∃tl,a. x = |tl| & l = a @ tl.
#A * /2 width=4 by ex2_2_intro/
>length_nil #x #H destruct
qed-.
-lemma length_inv_succ_sn (A:Type[0]) (l:list A) (x): ⫯x = |l| →
+lemma length_inv_succ_sn (A:Type[0]) (l:list A) (x): â\86\91x = |l| →
∃∃tl,a. x = |tl| & l = a @ tl.
/2 width=1 by length_inv_succ_dx/ qed.
rec definition length2 (A1,A2:Type[0]) (l:list2 A1 A2) on l ≝ match l with
[ nil2 ⇒ 0
-| cons2 _ _ l â\87\92 ⫯(length2 A1 A2 l)
+| cons2 _ _ l â\87\92 â\86\91(length2 A1 A2 l)
].
interpretation "length (list of pairs)"
(* *)
(**************************************************************************)
-include "ground_2/notation/relations/exteq_3.ma".
+include "ground_2/notation/relations/ringeq_3.ma".
include "ground_2/lib/streams.ma".
(* STREAMS ******************************************************************)
.
interpretation "extensional equivalence (nstream)"
- 'ExtEq A t1 t2 = (eq_stream A t1 t2).
+ 'RingEq A t1 t2 = (eq_stream A t1 t2).
definition eq_stream_repl (A) (R:relation …) ≝
- â\88\80t1,t2. t1 â\89\90â¦\8bAâ¦\8c t2 → R t1 t2.
+ â\88\80t1,t2. t1 â\89\97{A} t2 → R t1 t2.
definition eq_stream_repl_back (A) (R:predicate …) ≝
- â\88\80t1. R t1 â\86\92 â\88\80t2. t1 â\89\90â¦\8bAâ¦\8c t2 → R t2.
+ â\88\80t1. R t1 â\86\92 â\88\80t2. t1 â\89\97{A} t2 → R t2.
definition eq_stream_repl_fwd (A) (R:predicate …) ≝
- â\88\80t1. R t1 â\86\92 â\88\80t2. t2 â\89\90â¦\8bAâ¦\8c t1 → R t2.
+ â\88\80t1. R t1 â\86\92 â\88\80t2. t2 â\89\97{A} t1 → R t2.
(* Basic inversion lemmas ***************************************************)
-lemma eq_stream_inv_seq: â\88\80A,t1,t2. t1 â\89\90â¦\8bAâ¦\8c t2 →
+lemma eq_stream_inv_seq: â\88\80A,t1,t2. t1 â\89\97{A} t2 →
∀u1,u2,a1,a2. a1@u1 = t1 → a2@u2 = t2 →
- u1 â\89\90 u2 ∧ a1 = a2.
+ u1 â\89\97 u2 ∧ a1 = a2.
#A #t1 #t2 * -t1 -t2
#t1 #t2 #b1 #b2 #Hb #Ht #u1 #u2 #a1 #a2 #H1 #H2 destruct /2 width=1 by conj/
qed-.
/3 width=7 by eq_seq/
qed-.
-theorem eq_stream_canc_sn: â\88\80A,t,t1,t2. t â\89\90 t1 â\86\92 t â\89\90 t2 â\86\92 t1 â\89\90â¦\8bAâ¦\8c t2.
+theorem eq_stream_canc_sn: â\88\80A,t,t1,t2. t â\89\97 t1 â\86\92 t â\89\97 t2 â\86\92 t1 â\89\97{A} t2.
/3 width=3 by eq_stream_trans, eq_stream_sym/ qed-.
-theorem eq_stream_canc_dx: â\88\80A,t,t1,t2. t1 â\89\90 t â\86\92 t2 â\89\90 t â\86\92 t1 â\89\90â¦\8bAâ¦\8c t2.
+theorem eq_stream_canc_dx: â\88\80A,t,t1,t2. t1 â\89\97 t â\86\92 t2 â\89\97 t â\86\92 t1 â\89\97{A} t2.
/3 width=3 by eq_stream_trans, eq_stream_sym/ qed-.
(* *)
(**************************************************************************)
-include "ground_2/notation/functions/drop_1.ma".
+include "ground_2/notation/functions/downspoon_1.ma".
include "ground_2/lib/streams_eq.ma".
include "ground_2/lib/arith.ma".
definition tl (A:Type[0]): stream A → stream A ≝
λt. match t with [ seq _ t ⇒ t ].
-interpretation "tail (streams)" 'Drop t = (tl ? t).
+interpretation "tail (streams)" 'DownSpoon t = (tl ? t).
(* basic properties *********************************************************)
lemma tl_rew (A) (a) (t): t = tl A (a@t).
// qed.
-lemma eq_stream_split (A) (t): (hd â\80¦ t) @ â\86\93t â\89\90â¦\8bAâ¦\8c t.
+lemma eq_stream_split (A) (t): (hd â\80¦ t) @ â«°t â\89\97{A} t.
#A * //
qed.
(* *)
(**************************************************************************)
-include "ground_2/notation/functions/drops_2.ma".
+include "ground_2/notation/functions/downspoonstar_2.ma".
include "ground_2/lib/streams_hdtl.ma".
(* STREAMS ******************************************************************)
cases n -n [ #t @t | #n #t @tl @(tls … n t) ]
defined.
-interpretation "recursive tail (strams)" 'Drops n f = (tls ? n f).
+interpretation "recursive tail (strams)" 'DownSpoonStar n f = (tls ? n f).
(* basic properties *********************************************************)
lemma tls_rew_O (A) (t): t = tls A 0 t.
// qed.
-lemma tls_rew_S (A) (n) (t): â\86\93â\86\93*[n]t = tls A (⫯n) t.
+lemma tls_rew_S (A) (n) (t): â«°â«°*[n]t = tls A (â\86\91n) t.
// qed.
-lemma tls_S1 (A) (n) (t): â\86\93*[n]â\86\93t = tls A (⫯n) t.
+lemma tls_S1 (A) (n) (t): â«°*[n]â«°t = tls A (â\86\91n) t.
#A #n elim n -n //
qed.
-lemma tls_eq_repl (A) (n): eq_stream_repl A (λt1,t2. â\86\93*[n] t1 â\89\90 â\86\93*[n] t2).
+lemma tls_eq_repl (A) (n): eq_stream_repl A (λt1,t2. â«°*[n] t1 â\89\97 â«°*[n] t2).
#A #n elim n -n //
#n #IH * #n1 #t1 * #n2 #t2 #H elim (eq_stream_inv_seq … H) /2 width=7 by/
qed.
+++ /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 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ⫯ term 70 T )"
- non associative with precedence 70
- for @{ 'Successor $T }.
--- /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 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ↑ term 70 T )"
+ non associative with precedence 70
+ for @{ 'UpArrow $T }.
--- /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 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ↓ term 70 T )"
+ non associative with precedence 70
+ for @{ 'DownArrow $T }.
--- /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 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ⫰ term 46 T )"
+ non associative with precedence 46
+ for @{ 'DownSpoon $T }.
--- /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 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ⫰ * [ term 46 n ] term 46 T )"
+ non associative with precedence 46
+ for @{ 'DownSpoonStar $n $T }.
+++ /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 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ↓ term 46 T )"
- non associative with precedence 46
- for @{ 'Drop $T }.
+++ /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 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ↓ * [ term 46 n ] term 46 T )"
- non associative with precedence 46
- for @{ 'Drops $n $T }.
+++ /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 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ↑ term 46 T )"
- non associative with precedence 46
- for @{ 'Lift $T }.
+++ /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 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ↑ * [ term 46 n ] term 46 T )"
- non associative with precedence 46
- for @{ 'LiftStar $n $T }.
+++ /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 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ⫰ term 70 T )"
- non associative with precedence 70
- for @{ 'Predecessor $T }.
+++ /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 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( ⫯ * [ term 46 n ] term 70 T )"
- non associative with precedence 70
- for @{ 'SuccessorStar $n $T }.
--- /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 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ↑ * [ term 46 n ] term 70 T )"
+ non associative with precedence 70
+ for @{ 'UpArrowStar $n $T }.
--- /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 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ↕* term 46 T )"
+ non associative with precedence 46
+ for @{ 'UpDownArrowStar $T }.
--- /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 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ⫯ term 46 T )"
+ non associative with precedence 46
+ for @{ 'UpSpoon $T }.
--- /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 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( ⫯ * [ term 46 n ] term 46 T )"
+ non associative with precedence 46
+ for @{ 'UpSpoonStar $n $T }.
+++ /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 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation < "hvbox( v1 ≐ break term 46 v2 )"
- non associative with precedence 45
- for @{ 'ExtEq $M $v1 $v2 }.
-
-notation > "hvbox( v1 ≐ break term 46 v2 )"
- non associative with precedence 45
- for @{ 'ExtEq ? $v1 $v2 }.
-
-notation > "hvbox( v1 ≐ break ⦋ term 46 M ⦌ break term 46 v2 )"
- non associative with precedence 45
- for @{ 'ExtEq $M $v1 $v2 }.
+++ /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 *)
-(* *)
-(**************************************************************************)
-
-(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
-
-notation "hvbox( f1 ≗ break term 46 f2 )"
- non associative with precedence 45
- for @{ 'FunExtEq $f1 $f2 }.
--- /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 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation "hvbox( f1 ≡ break term 46 f2 )"
+ non associative with precedence 45
+ for @{ 'IdEq $f1 $f2 }.
--- /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 *)
+(* *)
+(**************************************************************************)
+
+(* GENERAL NOTATION USED BY THE FORMAL SYSTEM λδ ****************************)
+
+notation < "hvbox( v1 ≗ break term 46 v2 )"
+ non associative with precedence 45
+ for @{ 'RingEq $M $v1 $v2 }.
+
+notation > "hvbox( v1 ≗ break term 46 v2 )"
+ non associative with precedence 45
+ for @{ 'RingEq ? $v1 $v2 }.
+
+notation > "hvbox( v1 ≗{ break term 46 M } break term 46 v2 )"
+ non associative with precedence 45
+ for @{ 'RingEq $M $v1 $v2 }.
(* Basic properties *********************************************************)
-lemma pluss_SO2: â\88\80l,m,cs. ({l, m} @ cs) + 1 = {⫯l, m} @ cs + 1.
+lemma pluss_SO2: â\88\80l,m,cs. ({l, m} @ cs) + 1 = {â\86\91l, m} @ cs + 1.
normalize // qed.
(* Basic inversion lemmas ***************************************************)
(* *)
(**************************************************************************)
-include "ground_2/notation/functions/lift_1.ma".
+include "ground_2/notation/functions/upspoon_1.ma".
include "ground_2/lib/streams_tls.ma".
(* RELOCATION N-STREAM ******************************************************)
definition push: rtmap → rtmap ≝ λf. 0@f.
-interpretation "push (nstream)" 'Lift f = (push f).
+interpretation "push (nstream)" 'UpSpoon f = (push f).
definition next: rtmap → rtmap.
-* #n #f @(⫯n@f)
+* #n #f @(â\86\91n@f)
defined.
-interpretation "next (nstream)" 'Successor f = (next f).
+interpretation "next (nstream)" 'UpArrow f = (next f).
(* Basic properties *********************************************************)
-lemma push_rew: â\88\80f. 0@f = â\86\91f.
+lemma push_rew: â\88\80f. 0@f = ⫯f.
// qed.
-lemma next_rew: â\88\80f,n. (⫯n)@f = ⫯(n@f).
+lemma next_rew: â\88\80f,n. (â\86\91n)@f = â\86\91(n@f).
// qed.
(* Basic inversion lemmas ***************************************************)
#f1 #f2 normalize #H destruct //
qed-.
-lemma discr_push_next: â\88\80f1,f2. â\86\91f1 = ⫯f2 → ⊥.
+lemma discr_push_next: â\88\80f1,f2. ⫯f1 = â\86\91f2 → ⊥.
#f1 * #n2 #f2 normalize #H destruct
qed-.
-lemma discr_next_push: â\88\80f1,f2. ⫯f1 = â\86\91f2 → ⊥.
+lemma discr_next_push: â\88\80f1,f2. â\86\91f1 = ⫯f2 → ⊥.
* #n1 #f1 #f2 normalize #H destruct
qed-.
* #n1 #f1 * #n2 #f2 normalize #H destruct //
qed-.
-lemma push_inv_seq_sn: â\88\80f,g,n. n@g = â\86\91f → 0 = n ∧ g = f.
+lemma push_inv_seq_sn: â\88\80f,g,n. n@g = ⫯f → 0 = n ∧ g = f.
#f #g #n <push_rew #H destruct /2 width=1 by conj/
qed-.
-lemma push_inv_seq_dx: â\88\80f,g,n. â\86\91f = n@g → 0 = n ∧ g = f.
+lemma push_inv_seq_dx: â\88\80f,g,n. ⫯f = n@g → 0 = n ∧ g = f.
#f #g #n <push_rew #H destruct /2 width=1 by conj/
qed-.
-lemma next_inv_seq_sn: â\88\80f,g,n. n@g = ⫯f â\86\92 â\88\83â\88\83m. m@g = f & ⫯m = n.
+lemma next_inv_seq_sn: â\88\80f,g,n. n@g = â\86\91f â\86\92 â\88\83â\88\83m. m@g = f & â\86\91m = n.
* #m #f #g #n <next_rew #H destruct /2 width=3 by ex2_intro/
qed-.
-lemma next_inv_seq_dx: â\88\80f,g,n. ⫯f = n@g â\86\92 â\88\83â\88\83m. m@g = f & ⫯m = n.
+lemma next_inv_seq_dx: â\88\80f,g,n. â\86\91f = n@g â\86\92 â\88\83â\88\83m. m@g = f & â\86\91m = n.
* #m #f #g #n <next_rew #H destruct /2 width=3 by ex2_intro/
qed-.
lemma case_prop: ∀R:predicate rtmap.
- (â\88\80f. R (â\86\91f)) â\86\92 (â\88\80f. R (⫯f)) → ∀f. R f.
+ (â\88\80f. R (⫯f)) â\86\92 (â\88\80f. R (â\86\91f)) → ∀f. R f.
#R #H1 #H2 * * //
qed-.
lemma case_type0: ∀R:rtmap→Type[0].
- (â\88\80f. R (â\86\91f)) â\86\92 (â\88\80f. R (⫯f)) → ∀f. R f.
+ (â\88\80f. R (⫯f)) â\86\92 (â\88\80f. R (â\86\91f)) → ∀f. R f.
#R #H1 #H2 * * //
qed-.
-lemma iota_push: â\88\80R,a,b,f. a f = case_type0 R a b (â\86\91f).
+lemma iota_push: â\88\80R,a,b,f. a f = case_type0 R a b (⫯f).
// qed.
-lemma iota_next: â\88\80R,a,b,f. b f = case_type0 R a b (⫯f).
+lemma iota_next: â\88\80R,a,b,f. b f = case_type0 R a b (â\86\91f).
#R #a #b * //
qed.
(* Specific properties ******************************************************)
-lemma tl_push: â\88\80f. f = â\86\93â\86\91f.
+lemma tl_push: â\88\80f. f = ⫰⫯f.
// qed.
-lemma tl_next: â\88\80f. â\86\93f = â\86\93⫯f.
+lemma tl_next: â\88\80f. â«°f = â«°â\86\91f.
* // qed.
corec definition compose: rtmap → rtmap → rtmap.
#f2 * #n1 #f1 @(seq … (f2@❴n1❵)) @(compose ? f1) -compose -f1
-@(â\86\93*[⫯n1] f2)
+@(â«°*[â\86\91n1] f2)
defined.
interpretation "functional composition (nstream)"
(* Basic properies on compose ***********************************************)
-lemma compose_rew: â\88\80f2,f1,n1. f2@â\9d´n1â\9dµ@(â\86\93*[⫯n1]f2)∘f1 = f2∘(n1@f1).
+lemma compose_rew: â\88\80f2,f1,n1. f2@â\9d´n1â\9dµ@(â«°*[â\86\91n1]f2)∘f1 = f2∘(n1@f1).
#f2 #f1 #n1 <(stream_rew … (f2∘(n1@f1))) normalize //
qed.
-lemma compose_next: â\88\80f2,f1,f. f2â\88\98f1 = f â\86\92 (⫯f2)â\88\98f1 = ⫯f.
+lemma compose_next: â\88\80f2,f1,f. f2â\88\98f1 = f â\86\92 (â\86\91f2)â\88\98f1 = â\86\91f.
#f2 * #n1 #f1 #f <compose_rew <compose_rew
* -f <tls_S1 /2 width=1 by eq_f2/
qed.
(* Basic inversion lemmas on compose ****************************************)
lemma compose_inv_rew: ∀f2,f1,f,n1,n. f2∘(n1@f1) = n@f →
- f2@â\9d´n1â\9dµ = n â\88§ (â\86\93*[⫯n1]f2)∘f1 = f.
+ f2@â\9d´n1â\9dµ = n â\88§ (â«°*[â\86\91n1]f2)∘f1 = f.
#f2 #f1 #f #n1 #n <(stream_rew … (f2∘(n1@f1))) normalize
#H destruct /2 width=1 by conj/
qed-.
-lemma compose_inv_O2: â\88\80f2,f1,f,n2,n. (n2@f2)â\88\98(â\86\91f1) = n@f →
+lemma compose_inv_O2: â\88\80f2,f1,f,n2,n. (n2@f2)â\88\98(⫯f1) = n@f →
n2 = n ∧ f2∘f1 = f.
#f2 #f1 #f #n2 #n <compose_rew
#H destruct /2 width=1 by conj/
qed-.
-lemma compose_inv_S2: â\88\80f2,f1,f,n2,n1,n. (n2@f2)â\88\98(⫯n1@f1) = n@f →
- ⫯(n2+f2@❴n1❵) = n ∧ f2∘(n1@f1) = f2@❴n1❵@f.
+lemma compose_inv_S2: â\88\80f2,f1,f,n2,n1,n. (n2@f2)â\88\98(â\86\91n1@f1) = n@f →
+ â\86\91(n2+f2@❴n1❵) = n ∧ f2∘(n1@f1) = f2@❴n1❵@f.
#f2 #f1 #f #n2 #n1 #n <compose_rew
#H destruct <tls_S1 /2 width=1 by conj/
qed-.
-lemma compose_inv_S1: â\88\80f2,f1,f,n1,n. (⫯f2)∘(n1@f1) = n@f →
- ⫯(f2@❴n1❵) = n ∧ f2∘(n1@f1) = f2@❴n1❵@f.
+lemma compose_inv_S1: â\88\80f2,f1,f,n1,n. (â\86\91f2)∘(n1@f1) = n@f →
+ â\86\91(f2@❴n1❵) = n ∧ f2∘(n1@f1) = f2@❴n1❵@f.
#f2 #f1 #f #n1 #n <compose_rew
#H destruct <tls_S1 /2 width=1 by conj/
qed-.
(* Specific properties on after *********************************************)
lemma after_O2: ∀f2,f1,f. f2 ⊚ f1 ≘ f →
- â\88\80n. n@f2 â\8a\9a â\86\91f1 ≘ n@f.
+ â\88\80n. n@f2 â\8a\9a ⫯f1 ≘ n@f.
#f2 #f1 #f #Hf #n elim n -n /2 width=7 by after_refl, after_next/
qed.
lemma after_S2: ∀f2,f1,f,n1,n. f2 ⊚ n1@f1 ≘ n@f →
- â\88\80n2. n2@f2 â\8a\9a ⫯n1@f1 â\89\98 ⫯(n2+n)@f.
+ â\88\80n2. n2@f2 â\8a\9a â\86\91n1@f1 â\89\98 â\86\91(n2+n)@f.
#f2 #f1 #f #n1 #n #Hf #n2 elim n2 -n2 /2 width=7 by after_next, after_push/
qed.
-lemma after_apply: â\88\80n1,f2,f1,f. (â\86\93*[⫯n1] f2) ⊚ f1 ≘ f → f2 ⊚ n1@f1 ≘ f2@❴n1❵@f.
+lemma after_apply: â\88\80n1,f2,f1,f. (â«°*[â\86\91n1] f2) ⊚ f1 ≘ f → f2 ⊚ n1@f1 ≘ f2@❴n1❵@f.
#n1 elim n1 -n1
[ * /2 width=1 by after_O2/
| #n1 #IH * /3 width=1 by after_S2/
(* Specific inversion lemmas on after ***************************************)
-lemma after_inv_xpx: â\88\80f2,g2,f,n2,n. n2@f2 â\8a\9a g2 â\89\98 n@f â\86\92 â\88\80f1. â\86\91f1 = g2 →
+lemma after_inv_xpx: â\88\80f2,g2,f,n2,n. n2@f2 â\8a\9a g2 â\89\98 n@f â\86\92 â\88\80f1. ⫯f1 = g2 →
f2 ⊚ f1 ≘ f ∧ n2 = n.
#f2 #g2 #f #n2 elim n2 -n2
[ #n #Hf #f1 #H2 elim (after_inv_ppx … Hf … H2) -g2 [2,3: // ]
]
qed-.
-lemma after_inv_xnx: â\88\80f2,g2,f,n2,n. n2@f2 â\8a\9a g2 â\89\98 n@f â\86\92 â\88\80f1. ⫯f1 = g2 →
- â\88\83â\88\83m. f2 â\8a\9a f1 â\89\98 m@f & ⫯(n2+m) = n.
+lemma after_inv_xnx: â\88\80f2,g2,f,n2,n. n2@f2 â\8a\9a g2 â\89\98 n@f â\86\92 â\88\80f1. â\86\91f1 = g2 →
+ â\88\83â\88\83m. f2 â\8a\9a f1 â\89\98 m@f & â\86\91(n2+m) = n.
#f2 #g2 #f #n2 elim n2 -n2
[ #n #Hf #f1 #H2 elim (after_inv_pnx … Hf … H2) -g2 [2,3: // ]
#g #Hf #H elim (next_inv_seq_dx … H) -H
]
qed-.
-lemma after_inv_total: â\88\80f2,f1,f. f2 â\8a\9a f1 â\89\98 f â\86\92 f2 â\88\98 f1 â\89\97 f.
+lemma after_inv_total: â\88\80f2,f1,f. f2 â\8a\9a f1 â\89\98 f â\86\92 f2 â\88\98 f1 â\89¡ f.
/2 width=4 by after_mono/ qed-.
(* Specific forward lemmas on after *****************************************)
qed-.
lemma after_fwd_tls: ∀f,f1,n1,f2,n2,n. n2@f2 ⊚ n1@f1 ≘ n@f →
- (â\86\93*[n1]f2) ⊚ f1 ≘ f.
+ (â«°*[n1]f2) ⊚ f1 ≘ f.
#f #f1 #n1 elim n1 -n1
[ #f2 #n2 #n #H elim (after_inv_xpx … H) -H //
| #n1 #IH * #m1 #f2 #n2 #n #H elim (after_inv_xnx … H) -H [2,3: // ]
qed-.
lemma after_inv_apply: ∀f2,f1,f,n2,n1,n. n2@f2 ⊚ n1@f1 ≘ n@f →
- (n2@f2)@â\9d´n1â\9dµ = n â\88§ (â\86\93*[n1]f2) ⊚ f1 ≘ f.
+ (n2@f2)@â\9d´n1â\9dµ = n â\88§ (â«°*[n1]f2) ⊚ f1 ≘ f.
/3 width=3 by after_fwd_tls, after_fwd_hd, conj/ qed-.
rec definition fun0 (n1:nat) on n1: rtmap → nat.
* * [ | #n2 #f2 @0 ]
#f2 cases n1 -n1 [ @0 ]
-#n1 @(⫯(fun0 n1 f2))
+#n1 @(â\86\91(fun0 n1 f2))
defined.
rec definition fun2 (n1:nat) on n1: rtmap → rtmap.
(* Basic properties on funs *************************************************)
(* Note: we need theese since matita blocks recursive δ when ι is blocked *)
-lemma fun0_xn: â\88\80f2,n1. 0 = fun0 n1 (⫯f2).
+lemma fun0_xn: â\88\80f2,n1. 0 = fun0 n1 (â\86\91f2).
* #n2 #f2 * //
qed.
-lemma fun2_xn: â\88\80f2,n1. f2 = fun2 n1 (⫯f2).
+lemma fun2_xn: â\88\80f2,n1. f2 = fun2 n1 (â\86\91f2).
* #n2 #f2 * //
qed.
-lemma fun1_xxn: â\88\80f2,f1,n1. fun1 n1 f1 (⫯f2) = n1@f1.
+lemma fun1_xxn: â\88\80f2,f1,n1. fun1 n1 f1 (â\86\91f2) = n1@f1.
* #n2 #f2 #f1 * //
qed.
(* Basic inversion lemmas on compose ****************************************)
-lemma cocompose_inv_ppx: â\88\80f2,f1,f,x. (â\86\91f2) ~â\88\98 (â\86\91f1) = x@f →
+lemma cocompose_inv_ppx: â\88\80f2,f1,f,x. (⫯f2) ~â\88\98 (⫯f1) = x@f →
0 = x ∧ f2 ~∘ f1 = f.
#f2 #f1 #f #x
<cocompose_rew #H destruct
normalize /2 width=1 by conj/
qed-.
-lemma cocompose_inv_pnx: â\88\80f2,f1,f,n1,x. (â\86\91f2) ~â\88\98 ((⫯n1)@f1) = x@f →
- â\88\83â\88\83n. ⫯n = x & f2 ~∘ (n1@f1) = n@f.
+lemma cocompose_inv_pnx: â\88\80f2,f1,f,n1,x. (⫯f2) ~â\88\98 ((â\86\91n1)@f1) = x@f →
+ â\88\83â\88\83n. â\86\91n = x & f2 ~∘ (n1@f1) = n@f.
#f2 #f1 #f #n1 #x
<cocompose_rew #H destruct
@(ex2_intro … (fun0 n1 f2)) // <cocompose_rew
/3 width=1 by eq_f2/
qed-.
-lemma cocompose_inv_nxx: â\88\80f2,f1,f,n1,x. (⫯f2) ~∘ (n1@f1) = x@f →
+lemma cocompose_inv_nxx: â\88\80f2,f1,f,n1,x. (â\86\91f2) ~∘ (n1@f1) = x@f →
0 = x ∧ f2 ~∘ (n1@f1) = f.
#f2 #f1 #f #n1 #x
<cocompose_rew #H destruct
(* Specific properties ******************************************************)
-fact eq_inv_seq_aux: â\88\80f1,f2,n1,n2. n1@f1 â\89\97 n2@f2 â\86\92 n1 = n2 â\88§ f1 â\89\97 f2.
+fact eq_inv_seq_aux: â\88\80f1,f2,n1,n2. n1@f1 â\89¡ n2@f2 â\86\92 n1 = n2 â\88§ f1 â\89¡ f2.
#f1 #f2 #n1 #n2 @(nat_elim2 … n1 n2) -n1 -n2
[ #n2 #H elim (eq_inv_px … H) -H [2,3: // ]
#g1 #H1 #H elim (push_inv_seq_dx … H) -H /2 width=1 by conj/
]
qed-.
-lemma eq_inv_seq: â\88\80g1,g2. g1 â\89\97 g2 → ∀f1,f2,n1,n2. n1@f1 = g1 → n2@f2 = g2 →
- n1 = n2 â\88§ f1 â\89\97 f2.
+lemma eq_inv_seq: â\88\80g1,g2. g1 â\89¡ g2 → ∀f1,f2,n1,n2. n1@f1 = g1 → n2@f2 = g2 →
+ n1 = n2 â\88§ f1 â\89¡ f2.
/2 width=1 by eq_inv_seq_aux/ qed-.
-corec lemma nstream_eq: â\88\80f1,f2. f1 â\89\97 f2 â\86\92 f1 â\89\90 f2.
+corec lemma nstream_eq: â\88\80f1,f2. f1 â\89¡ f2 â\86\92 f1 â\89\97 f2.
* #n1 #f1 * #n2 #f2 #Hf cases (eq_inv_gen … Hf) -Hf *
#g1 #g2 #Hg #H1 #H2
[ cases (push_inv_seq_dx … H1) -H1 * -n1 #H1
]
qed-.
-corec lemma nstream_inv_eq: â\88\80f1,f2. f1 â\89\90 f2 â\86\92 f1 â\89\97 f2.
+corec lemma nstream_inv_eq: â\88\80f1,f2. f1 â\89\97 f2 â\86\92 f1 â\89¡ f2.
* #n1 #f1 * #n2 #f2 #H cases (eq_stream_inv_seq ??? H) -H [2,3,4,5,6,7: // ]
#Hf * -n2 cases n1 -n1 /3 width=5 by eq_push/
#n @eq_next /3 width=5 by eq_seq/
qed.
-lemma eq_seq_id: â\88\80f1,f2. f1 â\89\97 f2 â\86\92 â\88\80n. n@f1 â\89\97 n@f2.
+lemma eq_seq_id: â\88\80f1,f2. f1 â\89¡ f2 â\86\92 â\88\80n. n@f1 â\89¡ n@f2.
/4 width=1 by nstream_inv_eq, nstream_eq, eq_seq/ qed.
(* RELOCATION N-STREAM ******************************************************)
-corec definition id: rtmap â\89\9d â\86\91id.
+corec definition id: rtmap â\89\9d ⫯id.
interpretation "identity (nstream)"
'Identity = (id).
(* Basic properties *********************************************************)
-lemma id_rew: â\86\91𝐈𝐝 = 𝐈𝐝.
+lemma id_rew: ⫯𝐈𝐝 = 𝐈𝐝.
<(stream_rew … (𝐈𝐝)) in ⊢ (???%); normalize //
qed.
-lemma id_eq_rew: â\86\91ð\9d\90\88ð\9d\90\9d â\89\97 𝐈𝐝.
+lemma id_eq_rew: ⫯ð\9d\90\88ð\9d\90\9d â\89¡ 𝐈𝐝.
cases id_rew in ⊢ (??%); //
qed.
* #n #f cases i -i
[ @n
| #i lapply (apply i f) -apply -i -f
- #i @(⫯(n+i))
+ #i @(â\86\91(n+i))
]
defined.
#i2 elim i2 -i2 /2 width=5 by at_refl, at_next/
qed.
-lemma at_S1: â\88\80n,f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 @â¦\83⫯i1, n@fâ¦\84 â\89\98 ⫯(n+i2).
+lemma at_S1: â\88\80n,f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 @â¦\83â\86\91i1, n@fâ¦\84 â\89\98 â\86\91(n+i2).
#n elim n -n /3 width=7 by at_push, at_next/
qed.
#j2 #Hj * -i2 /3 width=1 by eq_f/
qed-.
-lemma at_inv_S1: â\88\80f,n,j1,i2. @â¦\83⫯j1, n@f⦄ ≘ i2 →
- â\88\83â\88\83j2. @â¦\83j1, fâ¦\84 â\89\98 j2 & ⫯(n+j2) = i2.
+lemma at_inv_S1: â\88\80f,n,j1,i2. @â¦\83â\86\91j1, n@f⦄ ≘ i2 →
+ â\88\83â\88\83j2. @â¦\83j1, fâ¦\84 â\89\98 j2 & â\86\91(n+j2) = i2.
#f #n elim n -n /2 width=5 by at_inv_npx/
#n #IH #j1 #i2 #H elim (at_inv_xnx … H) -H [2,3: // ]
#j2 #Hj * -i2 elim (IH … Hj) -IH -Hj
#Hn #Hf /4 width=1 by eq_f2, eq_f/
qed.
-lemma apply_S1: â\88\80f,i. (⫯f)@â\9d´iâ\9dµ = ⫯(f@❴i❵).
+lemma apply_S1: â\88\80f,i. (â\86\91f)@â\9d´iâ\9dµ = â\86\91(f@❴i❵).
* #n #f * //
qed.
(* RELOCATION MAP ***********************************************************)
-lemma pn_split: â\88\80f. (â\88\83g. â\86\91g = f) â\88¨ (â\88\83g. ⫯g = f).
+lemma pn_split: â\88\80f. (â\88\83g. ⫯g = f) â\88¨ (â\88\83g. â\86\91g = f).
@case_prop /3 width=2 by or_introl, or_intror, ex_intro/
qed-.
coinductive after: relation3 rtmap rtmap rtmap ≝
| after_refl: ∀f1,f2,f,g1,g2,g.
- after f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → after g1 g2 g
+ after f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → after g1 g2 g
| after_push: ∀f1,f2,f,g1,g2,g.
- after f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → after g1 g2 g
+ after f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → after g1 g2 g
| after_next: ∀f1,f2,f,g1,g.
- after f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 ⫯f = g → after g1 f2 g
+ after f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f = g → after g1 f2 g
.
interpretation "relational composition (rtmap)"
definition H_after_inj: predicate rtmap ≝
λf1. 𝐓⦃f1⦄ →
- â\88\80f,f21,f22. f1 â\8a\9a f21 â\89\98 f â\86\92 f1 â\8a\9a f22 â\89\98 f â\86\92 f21 â\89\97 f22.
+ â\88\80f,f21,f22. f1 â\8a\9a f21 â\89\98 f â\86\92 f1 â\8a\9a f22 â\89\98 f â\86\92 f21 â\89¡ f22.
(* Basic inversion lemmas ***************************************************)
-lemma after_inv_ppx: â\88\80g1,g2,g. g1 â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 →
- â\88\83â\88\83f. f1 â\8a\9a f2 â\89\98 f & â\86\91f = g.
+lemma after_inv_ppx: â\88\80g1,g2,g. g1 â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 →
+ â\88\83â\88\83f. f1 â\8a\9a f2 â\89\98 f & ⫯f = g.
#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
[ #g2 #g #Hf #H1 #H2 #H #x1 #x2 #Hx1 #Hx2 destruct
>(injective_push … Hx1) >(injective_push … Hx2) -x2 -x1
]
qed-.
-lemma after_inv_pnx: â\88\80g1,g2,g. g1 â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 →
- â\88\83â\88\83f. f1 â\8a\9a f2 â\89\98 f & ⫯f = g.
+lemma after_inv_pnx: â\88\80g1,g2,g. g1 â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 →
+ â\88\83â\88\83f. f1 â\8a\9a f2 â\89\98 f & â\86\91f = g.
#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
[ #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct
elim (discr_next_push … Hx2)
]
qed-.
-lemma after_inv_nxx: â\88\80g1,f2,g. g1 â\8a\9a f2 â\89\98 g â\86\92 â\88\80f1. ⫯f1 = g1 →
- â\88\83â\88\83f. f1 â\8a\9a f2 â\89\98 f & ⫯f = g.
+lemma after_inv_nxx: â\88\80g1,f2,g. g1 â\8a\9a f2 â\89\98 g â\86\92 â\88\80f1. â\86\91f1 = g1 →
+ â\88\83â\88\83f. f1 â\8a\9a f2 â\89\98 f & â\86\91f = g.
#g1 #f2 #g * -g1 -f2 -g #f1 #f2 #f #g1
[ #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct
elim (discr_next_push … Hx1)
(* Advanced inversion lemmas ************************************************)
lemma after_inv_ppp: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → f1 ⊚ f2 ≘ f.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → f1 ⊚ f2 ≘ f.
#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_ppx … Hg … H1 H2) -g1 -g2
#x #Hf #Hx destruct <(injective_push … Hx) -f //
qed-.
lemma after_inv_ppn: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 ⫯f = g → ⊥.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 â\86\91f = g → ⊥.
#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_ppx … Hg … H1 H2) -g1 -g2
#x #Hf #Hx destruct elim (discr_push_next … Hx)
qed-.
lemma after_inv_pnn: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → f1 ⊚ f2 ≘ f.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → f1 ⊚ f2 ≘ f.
#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_pnx … Hg … H1 H2) -g1 -g2
#x #Hf #Hx destruct <(injective_next … Hx) -f //
qed-.
lemma after_inv_pnp: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 â\86\91f = g → ⊥.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 ⫯f = g → ⊥.
#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H elim (after_inv_pnx … Hg … H1 H2) -g1 -g2
#x #Hf #Hx destruct elim (discr_next_push … Hx)
qed-.
lemma after_inv_nxn: ∀g1,f2,g. g1 ⊚ f2 ≘ g →
- â\88\80f1,f. ⫯f1 = g1 â\86\92 ⫯f = g → f1 ⊚ f2 ≘ f.
+ â\88\80f1,f. â\86\91f1 = g1 â\86\92 â\86\91f = g → f1 ⊚ f2 ≘ f.
#g1 #f2 #g #Hg #f1 #f #H1 #H elim (after_inv_nxx … Hg … H1) -g1
#x #Hf #Hx destruct <(injective_next … Hx) -f //
qed-.
lemma after_inv_nxp: ∀g1,f2,g. g1 ⊚ f2 ≘ g →
- â\88\80f1,f. ⫯f1 = g1 â\86\92 â\86\91f = g → ⊥.
+ â\88\80f1,f. â\86\91f1 = g1 â\86\92 ⫯f = g → ⊥.
#g1 #f2 #g #Hg #f1 #f #H1 #H elim (after_inv_nxx … Hg … H1) -g1
#x #Hf #Hx destruct elim (discr_next_push … Hx)
qed-.
lemma after_inv_pxp: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- â\88\80f1,f. â\86\91f1 = g1 â\86\92 â\86\91f = g →
- â\88\83â\88\83f2. f1 â\8a\9a f2 â\89\98 f & â\86\91f2 = g2.
+ â\88\80f1,f. ⫯f1 = g1 â\86\92 ⫯f = g →
+ â\88\83â\88\83f2. f1 â\8a\9a f2 â\89\98 f & ⫯f2 = g2.
#g1 * * [2: #m2] #g2 #g #Hg #f1 #f #H1 #H
[ elim (after_inv_pnp … Hg … H1 … H) -g1 -g -f1 -f //
| lapply (after_inv_ppp … Hg … H1 … H) -g1 -g /2 width=3 by ex2_intro/
qed-.
lemma after_inv_pxn: ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- â\88\80f1,f. â\86\91f1 = g1 â\86\92 ⫯f = g →
- â\88\83â\88\83f2. f1 â\8a\9a f2 â\89\98 f & ⫯f2 = g2.
+ â\88\80f1,f. ⫯f1 = g1 â\86\92 â\86\91f = g →
+ â\88\83â\88\83f2. f1 â\8a\9a f2 â\89\98 f & â\86\91f2 = g2.
#g1 * * [2: #m2] #g2 #g #Hg #f1 #f #H1 #H
[ lapply (after_inv_pnn … Hg … H1 … H) -g1 -g /2 width=3 by ex2_intro/
| elim (after_inv_ppn … Hg … H1 … H) -g1 -g -f1 -f //
]
qed-.
-lemma after_inv_xxp: â\88\80g1,g2,g. g1 â\8a\9a g2 â\89\98 g â\86\92 â\88\80f. â\86\91f = g →
- â\88\83â\88\83f1,f2. f1 â\8a\9a f2 â\89\98 f & â\86\91f1 = g1 & â\86\91f2 = g2.
+lemma after_inv_xxp: â\88\80g1,g2,g. g1 â\8a\9a g2 â\89\98 g â\86\92 â\88\80f. ⫯f = g →
+ â\88\83â\88\83f1,f2. f1 â\8a\9a f2 â\89\98 f & ⫯f1 = g1 & ⫯f2 = g2.
* * [2: #m1 ] #g1 #g2 #g #Hg #f #H
[ elim (after_inv_nxp … Hg … H) -g2 -g -f //
| elim (after_inv_pxp … Hg … H) -g /2 width=5 by ex3_2_intro/
]
qed-.
-lemma after_inv_xxn: â\88\80g1,g2,g. g1 â\8a\9a g2 â\89\98 g â\86\92 â\88\80f. ⫯f = g →
- (â\88\83â\88\83f1,f2. f1 â\8a\9a f2 â\89\98 f & â\86\91f1 = g1 & ⫯f2 = g2) ∨
- â\88\83â\88\83f1. f1 â\8a\9a g2 â\89\98 f & ⫯f1 = g1.
+lemma after_inv_xxn: â\88\80g1,g2,g. g1 â\8a\9a g2 â\89\98 g â\86\92 â\88\80f. â\86\91f = g →
+ (â\88\83â\88\83f1,f2. f1 â\8a\9a f2 â\89\98 f & ⫯f1 = g1 & â\86\91f2 = g2) ∨
+ â\88\83â\88\83f1. f1 â\8a\9a g2 â\89\98 f & â\86\91f1 = g1.
* * [2: #m1 ] #g1 #g2 #g #Hg #f #H
[ /4 width=5 by after_inv_nxn, or_intror, ex2_intro/
| elim (after_inv_pxn … Hg … H) -g
]
qed-.
-lemma after_inv_pxx: â\88\80g1,g2,g. g1 â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1. â\86\91f1 = g1 →
- (â\88\83â\88\83f2,f. f1 â\8a\9a f2 â\89\98 f & â\86\91f2 = g2 & â\86\91f = g) ∨
- (â\88\83â\88\83f2,f. f1 â\8a\9a f2 â\89\98 f & ⫯f2 = g2 & ⫯f = g).
+lemma after_inv_pxx: â\88\80g1,g2,g. g1 â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1. ⫯f1 = g1 →
+ (â\88\83â\88\83f2,f. f1 â\8a\9a f2 â\89\98 f & ⫯f2 = g2 & ⫯f = g) ∨
+ (â\88\83â\88\83f2,f. f1 â\8a\9a f2 â\89\98 f & â\86\91f2 = g2 & â\86\91f = g).
#g1 * * [2: #m2 ] #g2 #g #Hg #f1 #H
[ elim (after_inv_pnx … Hg … H) -g1
/3 width=5 by or_intror, ex3_2_intro/
(* Main inversion lemmas ****************************************************)
-corec theorem after_mono: â\88\80f1,f2,x,y. f1 â\8a\9a f2 â\89\98 x â\86\92 f1 â\8a\9a f2 â\89\98 y â\86\92 x â\89\97 y.
+corec theorem after_mono: â\88\80f1,f2,x,y. f1 â\8a\9a f2 â\89\98 x â\86\92 f1 â\8a\9a f2 â\89\98 y â\86\92 x â\89¡ y.
#f1 #f2 #x #y * -f1 -f2 -x
#f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy
[ cases (after_inv_ppx … Hy … H1 H2) -g1 -g2 /3 width=8 by eq_push/
qed-.
lemma after_mono_eq: ∀f1,f2,f. f1 ⊚ f2 ≘ f → ∀g1,g2,g. g1 ⊚ g2 ≘ g →
- f1 â\89\97 g1 â\86\92 f2 â\89\97 g2 â\86\92 f â\89\97 g.
+ f1 â\89¡ g1 â\86\92 f2 â\89¡ g2 â\86\92 f â\89¡ g.
/4 width=4 by after_mono, after_eq_repl_back1, after_eq_repl_back2/ qed-.
(* Properties on tls ********************************************************)
(* Inversion lemmas on isid *************************************************)
-lemma after_isid_inv_sn: â\88\80f1,f2,f. f1 â\8a\9a f2 â\89\98 f â\86\92 ð\9d\90\88â¦\83f1â¦\84 â\86\92 f2 â\89\97 f.
+lemma after_isid_inv_sn: â\88\80f1,f2,f. f1 â\8a\9a f2 â\89\98 f â\86\92 ð\9d\90\88â¦\83f1â¦\84 â\86\92 f2 â\89¡ f.
/3 width=6 by after_isid_sn, after_mono/ qed-.
-lemma after_isid_inv_dx: â\88\80f1,f2,f. f1 â\8a\9a f2 â\89\98 f â\86\92 ð\9d\90\88â¦\83f2â¦\84 â\86\92 f1 â\89\97 f.
+lemma after_isid_inv_dx: â\88\80f1,f2,f. f1 â\8a\9a f2 â\89\98 f â\86\92 ð\9d\90\88â¦\83f2â¦\84 â\86\92 f1 â\89¡ f.
/3 width=6 by after_isid_dx, after_mono/ qed-.
corec lemma after_fwd_isid1: ∀f1,f2,f. f1 ⊚ f2 ≘ f → 𝐈⦃f⦄ → 𝐈⦃f1⦄.
(* Properties on isuni ******************************************************)
-lemma after_isid_isuni: â\88\80f1,f2. ð\9d\90\88â¦\83f2â¦\84 â\86\92 ð\9d\90\94â¦\83f1â¦\84 â\86\92 f1 â\8a\9a ⫯f2 â\89\98 ⫯f1.
+lemma after_isid_isuni: â\88\80f1,f2. ð\9d\90\88â¦\83f2â¦\84 â\86\92 ð\9d\90\94â¦\83f1â¦\84 â\86\92 f1 â\8a\9a â\86\91f2 â\89\98 â\86\91f1.
#f1 #f2 #Hf2 #H elim H -H
/5 width=7 by after_isid_dx, after_eq_repl_back2, after_next, after_push, eq_push_inv_isid/
qed.
-lemma after_uni_next2: â\88\80f2. ð\9d\90\94â¦\83f2â¦\84 â\86\92 â\88\80f1,f. ⫯f2 â\8a\9a f1 â\89\98 f â\86\92 f2 â\8a\9a ⫯f1 ≘ f.
+lemma after_uni_next2: â\88\80f2. ð\9d\90\94â¦\83f2â¦\84 â\86\92 â\88\80f1,f. â\86\91f2 â\8a\9a f1 â\89\98 f â\86\92 f2 â\8a\9a â\86\91f1 ≘ f.
#f2 #H elim H -f2
[ #f2 #Hf2 #f1 #f #Hf
elim (after_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct
qed-.
lemma after_uni_succ_dx: ∀i2,i1,f2. @⦃i1, f2⦄ ≘ i2 →
- â\88\80f. f2 â\8a\9a ð\9d\90\94â\9d´â«¯i1â\9dµ â\89\98 f â\86\92 ð\9d\90\94â\9d´â«¯i2â\9dµ â\8a\9a ⫱*[⫯i2] f2 ≘ f.
+ â\88\80f. f2 â\8a\9a ð\9d\90\94â\9d´â\86\91i1â\9dµ â\89\98 f â\86\92 ð\9d\90\94â\9d´â\86\91i2â\9dµ â\8a\9a ⫱*[â\86\91i2] f2 ≘ f.
#i2 elim i2 -i2
[ #i1 #f2 #Hf2 #f #Hf
elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
qed.
lemma after_uni_succ_sn: ∀i2,i1,f2. @⦃i1, f2⦄ ≘ i2 →
- â\88\80f. ð\9d\90\94â\9d´â«¯i2â\9dµ â\8a\9a ⫱*[⫯i2] f2 â\89\98 f â\86\92 f2 â\8a\9a ð\9d\90\94â\9d´â«¯i1❵ ≘ f.
+ â\88\80f. ð\9d\90\94â\9d´â\86\91i2â\9dµ â\8a\9a ⫱*[â\86\91i2] f2 â\89\98 f â\86\92 f2 â\8a\9a ð\9d\90\94â\9d´â\86\91i1❵ ≘ f.
#i2 elim i2 -i2
[ #i1 #f2 #Hf2 #f #Hf
elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
]
qed-.
-lemma after_uni_one_dx: â\88\80f2,f. â\86\91f2 â\8a\9a ð\9d\90\94â\9d´â«¯Oâ\9dµ â\89\98 f â\86\92 ð\9d\90\94â\9d´â«¯O❵ ⊚ f2 ≘ f.
-#f2 #f #H @(after_uni_succ_dx â\80¦ (â\86\91f2)) /2 width=3 by at_refl/
+lemma after_uni_one_dx: â\88\80f2,f. ⫯f2 â\8a\9a ð\9d\90\94â\9d´â\86\91Oâ\9dµ â\89\98 f â\86\92 ð\9d\90\94â\9d´â\86\91O❵ ⊚ f2 ≘ f.
+#f2 #f #H @(after_uni_succ_dx â\80¦ (⫯f2)) /2 width=3 by at_refl/
qed.
-lemma after_uni_one_sn: â\88\80f1,f. ð\9d\90\94â\9d´â«¯Oâ\9dµ â\8a\9a f1 â\89\98 f â\86\92 â\86\91f1 â\8a\9a ð\9d\90\94â\9d´â«¯O❵ ≘ f.
+lemma after_uni_one_sn: â\88\80f1,f. ð\9d\90\94â\9d´â\86\91Oâ\9dµ â\8a\9a f1 â\89\98 f â\86\92 ⫯f1 â\8a\9a ð\9d\90\94â\9d´â\86\91O❵ ≘ f.
/3 width=3 by after_uni_succ_sn, at_refl/ qed-.
(* Forward lemmas on istot **************************************************)
/3 width=8 by after_fwd_at, ex2_intro/
qed-.
-lemma after_fwd_isid_sn: â\88\80f2,f1,f. ð\9d\90\93â¦\83fâ¦\84 â\86\92 f2 â\8a\9a f1 â\89\98 f â\86\92 f1 â\89\97 f → 𝐈⦃f2⦄.
+lemma after_fwd_isid_sn: â\88\80f2,f1,f. ð\9d\90\93â¦\83fâ¦\84 â\86\92 f2 â\8a\9a f1 â\89\98 f â\86\92 f1 â\89¡ f → 𝐈⦃f2⦄.
#f2 #f1 #f #H #Hf elim (after_inv_istot … Hf H) -H
#Hf2 #Hf1 #H @isid_at_total // -Hf2
#i2 #i #Hf2 elim (Hf1 i2) -Hf1
/3 width=7 by at_eq_repl_back, at_mono, at_id_le/
qed-.
-lemma after_fwd_isid_dx: â\88\80f2,f1,f. ð\9d\90\93â¦\83fâ¦\84 â\86\92 f2 â\8a\9a f1 â\89\98 f â\86\92 f2 â\89\97 f → 𝐈⦃f1⦄.
+lemma after_fwd_isid_dx: â\88\80f2,f1,f. ð\9d\90\93â¦\83fâ¦\84 â\86\92 f2 â\8a\9a f1 â\89\98 f â\86\92 f2 â\89¡ f → 𝐈⦃f1⦄.
#f2 #f1 #f #H #Hf elim (after_inv_istot … Hf H) -H
#Hf2 #Hf1 #H2 @isid_at_total // -Hf1
#i1 #i2 #Hi12 elim (after_at1_fwd … Hi12 … Hf) -f1
(* RELOCATION MAP ***********************************************************)
coinductive at: rtmap → relation nat ≝
-| at_refl: â\88\80f,g,j1,j2. â\86\91f = g → 0 = j1 → 0 = j2 → at g j1 j2
-| at_push: â\88\80f,i1,i2. at f i1 i2 â\86\92 â\88\80g,j1,j2. â\86\91f = g â\86\92 ⫯i1 = j1 â\86\92 ⫯i2 = j2 → at g j1 j2
-| at_next: â\88\80f,i1,i2. at f i1 i2 â\86\92 â\88\80g,j2. ⫯f = g â\86\92 ⫯i2 = j2 → at g i1 j2
+| at_refl: â\88\80f,g,j1,j2. ⫯f = g → 0 = j1 → 0 = j2 → at g j1 j2
+| at_push: â\88\80f,i1,i2. at f i1 i2 â\86\92 â\88\80g,j1,j2. ⫯f = g â\86\92 â\86\91i1 = j1 â\86\92 â\86\91i2 = j2 → at g j1 j2
+| at_next: â\88\80f,i1,i2. at f i1 i2 â\86\92 â\88\80g,j2. â\86\91f = g â\86\92 â\86\91i2 = j2 → at g i1 j2
.
interpretation "relational application (rtmap)"
(* Basic inversion lemmas ***************************************************)
-lemma at_inv_ppx: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g. 0 = i1 â\86\92 â\86\91g = f → 0 = i2.
+lemma at_inv_ppx: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g. 0 = i1 â\86\92 ⫯g = f → 0 = i2.
#f #i1 #i2 * -f -i1 -i2 //
[ #f #i1 #i2 #_ #g #j1 #j2 #_ * #_ #x #H destruct
| #f #i1 #i2 #_ #g #j2 * #_ #x #_ #H elim (discr_push_next … H)
]
qed-.
-lemma at_inv_npx: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g,j1. ⫯j1 = i1 â\86\92 â\86\91g = f →
- â\88\83â\88\83j2. @â¦\83j1, gâ¦\84 â\89\98 j2 & ⫯j2 = i2.
+lemma at_inv_npx: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g,j1. â\86\91j1 = i1 â\86\92 ⫯g = f →
+ â\88\83â\88\83j2. @â¦\83j1, gâ¦\84 â\89\98 j2 & â\86\91j2 = i2.
#f #i1 #i2 * -f -i1 -i2
[ #f #g #j1 #j2 #_ * #_ #x #x1 #H destruct
| #f #i1 #i2 #Hi #g #j1 #j2 * * * #x #x1 #H #Hf >(injective_push … Hf) -g destruct /2 width=3 by ex2_intro/
]
qed-.
-lemma at_inv_xnx: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g. ⫯g = f →
- â\88\83â\88\83j2. @â¦\83i1, gâ¦\84 â\89\98 j2 & ⫯j2 = i2.
+lemma at_inv_xnx: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g. â\86\91g = f →
+ â\88\83â\88\83j2. @â¦\83i1, gâ¦\84 â\89\98 j2 & â\86\91j2 = i2.
#f #i1 #i2 * -f -i1 -i2
[ #f #g #j1 #j2 * #_ #_ #x #H elim (discr_next_push … H)
| #f #i1 #i2 #_ #g #j1 #j2 * #_ #_ #x #H elim (discr_next_push … H)
(* Advanced inversion lemmas ************************************************)
lemma at_inv_ppn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
- â\88\80g,j2. 0 = i1 â\86\92 â\86\91g = f â\86\92 ⫯j2 = i2 → ⊥.
+ â\88\80g,j2. 0 = i1 â\86\92 ⫯g = f â\86\92 â\86\91j2 = i2 → ⊥.
#f #i1 #i2 #Hf #g #j2 #H1 #H <(at_inv_ppx … Hf … H1 H) -f -g -i1 -i2
#H destruct
qed-.
lemma at_inv_npp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
- â\88\80g,j1. ⫯j1 = i1 â\86\92 â\86\91g = f → 0 = i2 → ⊥.
+ â\88\80g,j1. â\86\91j1 = i1 â\86\92 ⫯g = f → 0 = i2 → ⊥.
#f #i1 #i2 #Hf #g #j1 #H1 #H elim (at_inv_npx … Hf … H1 H) -f -i1
#x2 #Hg * -i2 #H destruct
qed-.
lemma at_inv_npn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
- â\88\80g,j1,j2. ⫯j1 = i1 â\86\92 â\86\91g = f â\86\92 ⫯j2 = i2 → @⦃j1, g⦄ ≘ j2.
+ â\88\80g,j1,j2. â\86\91j1 = i1 â\86\92 ⫯g = f â\86\92 â\86\91j2 = i2 → @⦃j1, g⦄ ≘ j2.
#f #i1 #i2 #Hf #g #j1 #j2 #H1 #H elim (at_inv_npx … Hf … H1 H) -f -i1
#x2 #Hg * -i2 #H destruct //
qed-.
lemma at_inv_xnp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
- â\88\80g. ⫯g = f → 0 = i2 → ⊥.
+ â\88\80g. â\86\91g = f → 0 = i2 → ⊥.
#f #i1 #i2 #Hf #g #H elim (at_inv_xnx … Hf … H) -f
#x2 #Hg * -i2 #H destruct
qed-.
lemma at_inv_xnn: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
- â\88\80g,j2. ⫯g = f â\86\92 ⫯j2 = i2 → @⦃i1, g⦄ ≘ j2.
+ â\88\80g,j2. â\86\91g = f â\86\92 â\86\91j2 = i2 → @⦃i1, g⦄ ≘ j2.
#f #i1 #i2 #Hf #g #j2 #H elim (at_inv_xnx … Hf … H) -f
#x2 #Hg * -i2 #H destruct //
qed-.
-lemma at_inv_pxp: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 0 = i1 â\86\92 0 = i2 â\86\92 â\88\83g. â\86\91g = f.
+lemma at_inv_pxp: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 0 = i1 â\86\92 0 = i2 â\86\92 â\88\83g. ⫯g = f.
#f elim (pn_split … f) * /2 width=2 by ex_intro/
#g #H #i1 #i2 #Hf #H1 #H2 cases (at_inv_xnp … Hf … H H2)
qed-.
-lemma at_inv_pxn: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80j2. 0 = i1 â\86\92 ⫯j2 = i2 →
- â\88\83â\88\83g. @â¦\83i1, gâ¦\84 â\89\98 j2 & ⫯g = f.
+lemma at_inv_pxn: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80j2. 0 = i1 â\86\92 â\86\91j2 = i2 →
+ â\88\83â\88\83g. @â¦\83i1, gâ¦\84 â\89\98 j2 & â\86\91g = f.
#f elim (pn_split … f) *
#g #H #i1 #i2 #Hf #j2 #H1 #H2
[ elim (at_inv_ppn … Hf … H1 H H2)
qed-.
lemma at_inv_nxp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 →
- â\88\80j1. ⫯j1 = i1 → 0 = i2 → ⊥.
+ â\88\80j1. â\86\91j1 = i1 → 0 = i2 → ⊥.
#f elim (pn_split f) *
#g #H #i1 #i2 #Hf #j1 #H1 #H2
[ elim (at_inv_npp … Hf … H1 H H2)
]
qed-.
-lemma at_inv_nxn: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80j1,j2. ⫯j1 = i1 â\86\92 ⫯j2 = i2 →
- (â\88\83â\88\83g. @â¦\83j1, gâ¦\84 â\89\98 j2 & â\86\91g = f) ∨
- â\88\83â\88\83g. @â¦\83i1, gâ¦\84 â\89\98 j2 & ⫯g = f.
+lemma at_inv_nxn: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80j1,j2. â\86\91j1 = i1 â\86\92 â\86\91j2 = i2 →
+ (â\88\83â\88\83g. @â¦\83j1, gâ¦\84 â\89\98 j2 & ⫯g = f) ∨
+ â\88\83â\88\83g. @â¦\83i1, gâ¦\84 â\89\98 j2 & â\86\91g = f.
#f elim (pn_split f) *
/4 width=7 by at_inv_xnn, at_inv_npn, ex2_intro, or_intror, or_introl/
qed-.
(* Note: the following inversion lemmas must be checked *)
-lemma at_inv_xpx: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g. â\86\91g = f →
+lemma at_inv_xpx: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g. ⫯g = f →
(0 = i1 ∧ 0 = i2) ∨
- â\88\83â\88\83j1,j2. @â¦\83j1, gâ¦\84 â\89\98 j2 & ⫯j1 = i1 & ⫯j2 = i2.
+ â\88\83â\88\83j1,j2. @â¦\83j1, gâ¦\84 â\89\98 j2 & â\86\91j1 = i1 & â\86\91j2 = i2.
#f * [2: #i1 ] #i2 #Hf #g #H
[ elim (at_inv_npx … Hf … H) -f /3 width=5 by or_intror, ex3_2_intro/
| >(at_inv_ppx … Hf … H) -f /3 width=1 by conj, or_introl/
]
qed-.
-lemma at_inv_xpp: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g. â\86\91g = f → 0 = i2 → 0 = i1.
+lemma at_inv_xpp: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g. ⫯g = f → 0 = i2 → 0 = i1.
#f #i1 #i2 #Hf #g #H elim (at_inv_xpx … Hf … H) -f * //
#j1 #j2 #_ #_ * -i2 #H destruct
qed-.
-lemma at_inv_xpn: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g,j2. â\86\91g = f â\86\92 ⫯j2 = i2 →
- â\88\83â\88\83j1. @â¦\83j1, gâ¦\84 â\89\98 j2 & ⫯j1 = i1.
+lemma at_inv_xpn: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80g,j2. ⫯g = f â\86\92 â\86\91j2 = i2 →
+ â\88\83â\88\83j1. @â¦\83j1, gâ¦\84 â\89\98 j2 & â\86\91j1 = i1.
#f #i1 #i2 #Hf #g #j2 #H elim (at_inv_xpx … Hf … H) -f *
[ #_ * -i2 #H destruct
| #x1 #x2 #Hg #H1 * -i2 #H destruct /2 width=3 by ex2_intro/
qed-.
lemma at_inv_xxp: ∀f,i1,i2. @⦃i1, f⦄ ≘ i2 → 0 = i2 →
- â\88\83â\88\83g. 0 = i1 & â\86\91g = f.
+ â\88\83â\88\83g. 0 = i1 & ⫯g = f.
#f elim (pn_split f) *
#g #H #i1 #i2 #Hf #H2
[ /3 width=6 by at_inv_xpp, ex2_intro/
]
qed-.
-lemma at_inv_xxn: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80j2. ⫯j2 = i2 →
- (â\88\83â\88\83g,j1. @â¦\83j1, gâ¦\84 â\89\98 j2 & ⫯j1 = i1 & â\86\91g = f) ∨
- â\88\83â\88\83g. @â¦\83i1, gâ¦\84 â\89\98 j2 & ⫯g = f.
+lemma at_inv_xxn: â\88\80f,i1,i2. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\88\80j2. â\86\91j2 = i2 →
+ (â\88\83â\88\83g,j1. @â¦\83j1, gâ¦\84 â\89\98 j2 & â\86\91j1 = i1 & ⫯g = f) ∨
+ â\88\83â\88\83g. @â¦\83i1, gâ¦\84 â\89\98 j2 & â\86\91g = f.
#f elim (pn_split f) *
#g #H #i1 #i2 #Hf #j2 #H2
[ elim (at_inv_xpn … Hf … H H2) -i2 /3 width=5 by or_introl, ex3_2_intro/
]
qed-.
-lemma at_increasing_strict: â\88\80g,i1,i2. @â¦\83i1, gâ¦\84 â\89\98 i2 â\86\92 â\88\80f. ⫯f = g →
- i1 < i2 â\88§ @â¦\83i1, fâ¦\84 â\89\98 â«°i2.
+lemma at_increasing_strict: â\88\80g,i1,i2. @â¦\83i1, gâ¦\84 â\89\98 i2 â\86\92 â\88\80f. â\86\91f = g →
+ i1 < i2 â\88§ @â¦\83i1, fâ¦\84 â\89\98 â\86\93i2.
#g #i1 #i2 #Hg #f #H elim (at_inv_xnx … Hg … H) -Hg -H
/4 width=2 by conj, at_increasing, le_S_S/
qed-.
-lemma at_fwd_id_ex: â\88\80f,i. @â¦\83i, fâ¦\84 â\89\98 i â\86\92 â\88\83g. â\86\91g = f.
+lemma at_fwd_id_ex: â\88\80f,i. @â¦\83i, fâ¦\84 â\89\98 i â\86\92 â\88\83g. ⫯g = f.
#f elim (pn_split f) * /2 width=2 by ex_intro/
#g #H #i #Hf elim (at_inv_xnx … Hf … H) -Hf -H
#j2 #Hg #H destruct lapply (at_increasing … Hg) -Hg
qed-.
theorem at_div_pp: ∀f2,g2,f1,g1.
- H_at_div f2 g2 f1 g1 â\86\92 H_at_div (â\86\91f2) (â\86\91g2) (â\86\91f1) (â\86\91g1).
+ H_at_div f2 g2 f1 g1 â\86\92 H_at_div (⫯f2) (⫯g2) (⫯f1) (⫯g1).
#f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
elim (at_inv_xpx … Hf) -Hf [1,2: * |*: // ]
[ #H1 #H2 destruct -IH
qed-.
theorem at_div_nn: ∀f2,g2,f1,g1.
- H_at_div f2 g2 f1 g1 â\86\92 H_at_div (⫯f2) (⫯g2) (f1) (g1).
+ H_at_div f2 g2 f1 g1 â\86\92 H_at_div (â\86\91f2) (â\86\91g2) (f1) (g1).
#f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
elim (at_inv_xnx … Hf) -Hf [ |*: // ] #i #Hf2 #H destruct
lapply (at_inv_xnn … Hg ????) -Hg [5: |*: // ] #Hg2
qed-.
theorem at_div_np: ∀f2,g2,f1,g1.
- H_at_div f2 g2 f1 g1 â\86\92 H_at_div (⫯f2) (â\86\91g2) (f1) (⫯g1).
+ H_at_div f2 g2 f1 g1 â\86\92 H_at_div (â\86\91f2) (⫯g2) (f1) (â\86\91g1).
#f2 #g2 #f1 #g1 #IH #jf #jg #j #Hf #Hg
elim (at_inv_xnx … Hf) -Hf [ |*: // ] #i #Hf2 #H destruct
lapply (at_inv_xpn … Hg ????) -Hg [5: * |*: // ] #xg #Hg2 #H destruct
qed-.
theorem at_div_pn: ∀f2,g2,f1,g1.
- H_at_div f2 g2 f1 g1 â\86\92 H_at_div (â\86\91f2) (⫯g2) (⫯f1) (g1).
+ H_at_div f2 g2 f1 g1 â\86\92 H_at_div (⫯f2) (â\86\91g2) (â\86\91f1) (g1).
/4 width=6 by at_div_np, at_div_comm/ qed-.
(* Properties on tls ********************************************************)
<tls_xn /2 width=1 by/
qed.
-lemma at_tls: â\88\80i2,f. â\86\91⫱*[⫯i2]f â\89\97 ⫱*[i2]f → ∃i1. @⦃i1, f⦄ ≘ i2.
+lemma at_tls: â\88\80i2,f. ⫯⫱*[â\86\91i2]f â\89¡ ⫱*[i2]f → ∃i1. @⦃i1, f⦄ ≘ i2.
#i2 elim i2 -i2
[ /4 width=4 by at_eq_repl_back, at_refl, ex_intro/
| #i2 #IH #f <tls_xn <tls_xn in ⊢ (??%→?); #H
(* Inversion lemmas with tls ************************************************)
-lemma at_inv_nxx: â\88\80n,g,i1,j2. @â¦\83⫯i1, g⦄ ≘ j2 → @⦃0, g⦄ ≘ n →
- â\88\83â\88\83i2. @â¦\83i1, ⫱*[⫯n]gâ¦\84 â\89\98 i2 & ⫯(n+i2) = j2.
+lemma at_inv_nxx: â\88\80n,g,i1,j2. @â¦\83â\86\91i1, g⦄ ≘ j2 → @⦃0, g⦄ ≘ n →
+ â\88\83â\88\83i2. @â¦\83i1, ⫱*[â\86\91n]gâ¦\84 â\89\98 i2 & â\86\91(n+i2) = j2.
#n elim n -n
[ #g #i1 #j2 #Hg #H
elim (at_inv_pxp … H) -H [ |*: // ] #f #H0
]
qed-.
-lemma at_inv_tls: â\88\80i2,i1,f. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 â\86\91⫱*[⫯i2]f â\89\97 ⫱*[i2]f.
+lemma at_inv_tls: â\88\80i2,i1,f. @â¦\83i1, fâ¦\84 â\89\98 i2 â\86\92 ⫯⫱*[â\86\91i2]f â\89¡ ⫱*[i2]f.
#i2 elim i2 -i2
[ #i1 #f #Hf elim (at_inv_xxp … Hf) -Hf // #g #H1 #H destruct
/2 width=1 by eq_refl/
(* Advanced properties on id ************************************************)
-lemma id_inv_at: â\88\80f. (â\88\80i. @â¦\83i, fâ¦\84 â\89\98 i) â\86\92 ð\9d\90\88ð\9d\90\9d â\89\97 f.
+lemma id_inv_at: â\88\80f. (â\88\80i. @â¦\83i, fâ¦\84 â\89\98 i) â\86\92 ð\9d\90\88ð\9d\90\9d â\89¡ f.
/3 width=1 by isid_at, eq_id_inv_isid/ qed-.
lemma id_at: ∀i. @⦃i, 𝐈𝐝⦄ ≘ i.
coinductive coafter: relation3 rtmap rtmap rtmap ≝
| coafter_refl: ∀f1,f2,f,g1,g2,g. coafter f1 f2 f →
- â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → coafter g1 g2 g
+ ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → coafter g1 g2 g
| coafter_push: ∀f1,f2,f,g1,g2,g. coafter f1 f2 f →
- â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → coafter g1 g2 g
+ ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → coafter g1 g2 g
| coafter_next: ∀f1,f2,f,g1,g. coafter f1 f2 f →
- ⫯f1 = g1 â\86\92 â\86\91f = g → coafter g1 f2 g
+ â\86\91f1 = g1 â\86\92 ⫯f = g → coafter g1 f2 g
.
interpretation "relational co-composition (rtmap)"
definition H_coafter_inj: predicate rtmap ≝
λf1. 𝐓⦃f1⦄ →
- â\88\80f,f21,f22. f1 ~â\8a\9a f21 â\89\98 f â\86\92 f1 ~â\8a\9a f22 â\89\98 f â\86\92 f21 â\89\97 f22.
+ â\88\80f,f21,f22. f1 ~â\8a\9a f21 â\89\98 f â\86\92 f1 ~â\8a\9a f22 â\89\98 f â\86\92 f21 â\89¡ f22.
definition H_coafter_fwd_isid2: predicate rtmap ≝
λf1. ∀f2,f. f1 ~⊚ f2 ≘ f → 𝐓⦃f1⦄ → 𝐈⦃f⦄ → 𝐈⦃f2⦄.
(* Basic inversion lemmas ***************************************************)
-lemma coafter_inv_ppx: â\88\80g1,g2,g. g1 ~â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 →
- â\88\83â\88\83f. f1 ~â\8a\9a f2 â\89\98 f & â\86\91f = g.
+lemma coafter_inv_ppx: â\88\80g1,g2,g. g1 ~â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 →
+ â\88\83â\88\83f. f1 ~â\8a\9a f2 â\89\98 f & ⫯f = g.
#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
[ #g2 #g #Hf #H1 #H2 #H #x1 #x2 #Hx1 #Hx2 destruct
>(injective_push … Hx1) >(injective_push … Hx2) -x2 -x1
]
qed-.
-lemma coafter_inv_pnx: â\88\80g1,g2,g. g1 ~â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 →
- â\88\83â\88\83f. f1 ~â\8a\9a f2 â\89\98 f & ⫯f = g.
+lemma coafter_inv_pnx: â\88\80g1,g2,g. g1 ~â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 →
+ â\88\83â\88\83f. f1 ~â\8a\9a f2 â\89\98 f & â\86\91f = g.
#g1 #g2 #g * -g1 -g2 -g #f1 #f2 #f #g1
[ #g2 #g #_ #_ #H2 #_ #x1 #x2 #_ #Hx2 destruct
elim (discr_next_push … Hx2)
]
qed-.
-lemma coafter_inv_nxx: â\88\80g1,f2,g. g1 ~â\8a\9a f2 â\89\98 g â\86\92 â\88\80f1. ⫯f1 = g1 →
- â\88\83â\88\83f. f1 ~â\8a\9a f2 â\89\98 f & â\86\91f = g.
+lemma coafter_inv_nxx: â\88\80g1,f2,g. g1 ~â\8a\9a f2 â\89\98 g â\86\92 â\88\80f1. â\86\91f1 = g1 →
+ â\88\83â\88\83f. f1 ~â\8a\9a f2 â\89\98 f & ⫯f = g.
#g1 #f2 #g * -g1 -f2 -g #f1 #f2 #f #g1
[ #g2 #g #_ #H1 #_ #_ #x1 #Hx1 destruct
elim (discr_next_push … Hx1)
(* Advanced inversion lemmas ************************************************)
lemma coafter_inv_ppp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → f1 ~⊚ f2 ≘ f.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → f1 ~⊚ f2 ≘ f.
#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
elim (coafter_inv_ppx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
<(injective_push … Hx) -f //
qed-.
lemma coafter_inv_ppn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 ⫯f = g → ⊥.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 â\86\91f = g → ⊥.
#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
elim (coafter_inv_ppx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
elim (discr_push_next … Hx)
qed-.
lemma coafter_inv_pnn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → f1 ~⊚ f2 ≘ f.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → f1 ~⊚ f2 ≘ f.
#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
elim (coafter_inv_pnx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
<(injective_next … Hx) -f //
qed-.
lemma coafter_inv_pnp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 â\86\91f = g → ⊥.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 ⫯f = g → ⊥.
#g1 #g2 #g #Hg #f1 #f2 #f #H1 #H2 #H
elim (coafter_inv_pnx … Hg … H1 H2) -g1 -g2 #x #Hf #Hx destruct
elim (discr_next_push … Hx)
qed-.
lemma coafter_inv_nxp: ∀g1,f2,g. g1 ~⊚ f2 ≘ g →
- â\88\80f1,f. ⫯f1 = g1 â\86\92 â\86\91f = g → f1 ~⊚ f2 ≘ f.
+ â\88\80f1,f. â\86\91f1 = g1 â\86\92 ⫯f = g → f1 ~⊚ f2 ≘ f.
#g1 #f2 #g #Hg #f1 #f #H1 #H
elim (coafter_inv_nxx … Hg … H1) -g1 #x #Hf #Hx destruct
<(injective_push … Hx) -f //
qed-.
lemma coafter_inv_nxn: ∀g1,f2,g. g1 ~⊚ f2 ≘ g →
- â\88\80f1,f. ⫯f1 = g1 â\86\92 ⫯f = g → ⊥.
+ â\88\80f1,f. â\86\91f1 = g1 â\86\92 â\86\91f = g → ⊥.
#g1 #f2 #g #Hg #f1 #f #H1 #H
elim (coafter_inv_nxx … Hg … H1) -g1 #x #Hf #Hx destruct
elim (discr_push_next … Hx)
qed-.
lemma coafter_inv_pxp: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- â\88\80f1,f. â\86\91f1 = g1 â\86\92 â\86\91f = g →
- â\88\83â\88\83f2. f1 ~â\8a\9a f2 â\89\98 f & â\86\91f2 = g2.
+ â\88\80f1,f. ⫯f1 = g1 â\86\92 ⫯f = g →
+ â\88\83â\88\83f2. f1 ~â\8a\9a f2 â\89\98 f & ⫯f2 = g2.
#g1 #g2 #g #Hg #f1 #f #H1 #H elim (pn_split g2) * #f2 #H2
[ lapply (coafter_inv_ppp … Hg … H1 H2 H) -g1 -g /2 width=3 by ex2_intro/
| elim (coafter_inv_pnp … Hg … H1 H2 H)
qed-.
lemma coafter_inv_pxn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- â\88\80f1,f. â\86\91f1 = g1 â\86\92 ⫯f = g →
- â\88\83â\88\83f2. f1 ~â\8a\9a f2 â\89\98 f & ⫯f2 = g2.
+ â\88\80f1,f. ⫯f1 = g1 â\86\92 â\86\91f = g →
+ â\88\83â\88\83f2. f1 ~â\8a\9a f2 â\89\98 f & â\86\91f2 = g2.
#g1 #g2 #g #Hg #f1 #f #H1 #H elim (pn_split g2) * #f2 #H2
[ elim (coafter_inv_ppn … Hg … H1 H2 H)
| lapply (coafter_inv_pnn … Hg … H1 … H) -g1 -g /2 width=3 by ex2_intro/
]
qed-.
-lemma coafter_inv_xxn: â\88\80g1,g2,g. g1 ~â\8a\9a g2 â\89\98 g â\86\92 â\88\80f. ⫯f = g →
- â\88\83â\88\83f1,f2. f1 ~â\8a\9a f2 â\89\98 f & â\86\91f1 = g1 & ⫯f2 = g2.
+lemma coafter_inv_xxn: â\88\80g1,g2,g. g1 ~â\8a\9a g2 â\89\98 g â\86\92 â\88\80f. â\86\91f = g →
+ â\88\83â\88\83f1,f2. f1 ~â\8a\9a f2 â\89\98 f & ⫯f1 = g1 & â\86\91f2 = g2.
#g1 #g2 #g #Hg #f #H elim (pn_split g1) * #f1 #H1
[ elim (coafter_inv_pxn … Hg … H1 H) -g /2 width=5 by ex3_2_intro/
| elim (coafter_inv_nxn … Hg … H1 H)
qed-.
lemma coafter_inv_xnn: ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- â\88\80f2,f. ⫯f2 = g2 â\86\92 ⫯f = g →
- â\88\83â\88\83f1. f1 ~â\8a\9a f2 â\89\98 f & â\86\91f1 = g1.
+ â\88\80f2,f. â\86\91f2 = g2 â\86\92 â\86\91f = g →
+ â\88\83â\88\83f1. f1 ~â\8a\9a f2 â\89\98 f & ⫯f1 = g1.
#g1 #g2 #g #Hg #f2 #f #H2 destruct #H
elim (coafter_inv_xxn … Hg … H) -g
#z1 #z2 #Hf #H1 #H2 destruct /2 width=3 by ex2_intro/
qed-.
-lemma coafter_inv_xxp: â\88\80g1,g2,g. g1 ~â\8a\9a g2 â\89\98 g â\86\92 â\88\80f. â\86\91f = g →
- (â\88\83â\88\83f1,f2. f1 ~â\8a\9a f2 â\89\98 f & â\86\91f1 = g1 & â\86\91f2 = g2) ∨
- â\88\83â\88\83f1. f1 ~â\8a\9a g2 â\89\98 f & ⫯f1 = g1.
+lemma coafter_inv_xxp: â\88\80g1,g2,g. g1 ~â\8a\9a g2 â\89\98 g â\86\92 â\88\80f. ⫯f = g →
+ (â\88\83â\88\83f1,f2. f1 ~â\8a\9a f2 â\89\98 f & ⫯f1 = g1 & ⫯f2 = g2) ∨
+ â\88\83â\88\83f1. f1 ~â\8a\9a g2 â\89\98 f & â\86\91f1 = g1.
#g1 #g2 #g #Hg #f #H elim (pn_split g1) * #f1 #H1
[ elim (coafter_inv_pxp … Hg … H1 H) -g
/3 width=5 by or_introl, ex3_2_intro/
]
qed-.
-lemma coafter_inv_pxx: â\88\80g1,g2,g. g1 ~â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1. â\86\91f1 = g1 →
- (â\88\83â\88\83f2,f. f1 ~â\8a\9a f2 â\89\98 f & â\86\91f2 = g2 & â\86\91f = g) ∨
- (â\88\83â\88\83f2,f. f1 ~â\8a\9a f2 â\89\98 f & ⫯f2 = g2 & ⫯f = g).
+lemma coafter_inv_pxx: â\88\80g1,g2,g. g1 ~â\8a\9a g2 â\89\98 g â\86\92 â\88\80f1. ⫯f1 = g1 →
+ (â\88\83â\88\83f2,f. f1 ~â\8a\9a f2 â\89\98 f & ⫯f2 = g2 & ⫯f = g) ∨
+ (â\88\83â\88\83f2,f. f1 ~â\8a\9a f2 â\89\98 f & â\86\91f2 = g2 & â\86\91f = g).
#g1 #g2 #g #Hg #f1 #H1 elim (pn_split g2) * #f2 #H2
[ elim (coafter_inv_ppx … Hg … H1 H2) -g1
/3 width=5 by or_introl, ex3_2_intro/
(* Main inversion lemmas ****************************************************)
-corec theorem coafter_mono: â\88\80f1,f2,x,y. f1 ~â\8a\9a f2 â\89\98 x â\86\92 f1 ~â\8a\9a f2 â\89\98 y â\86\92 x â\89\97 y.
+corec theorem coafter_mono: â\88\80f1,f2,x,y. f1 ~â\8a\9a f2 â\89\98 x â\86\92 f1 ~â\8a\9a f2 â\89\98 y â\86\92 x â\89¡ y.
#f1 #f2 #x #y * -f1 -f2 -x
#f1 #f2 #x #g1 [1,2: #g2 ] #g #Hx #H1 [1,2: #H2 ] #H0x #Hy
[ cases (coafter_inv_ppx … Hy … H1 H2) -g1 -g2 /3 width=8 by eq_push/
qed-.
lemma coafter_mono_eq: ∀f1,f2,f. f1 ~⊚ f2 ≘ f → ∀g1,g2,g. g1 ~⊚ g2 ≘ g →
- f1 â\89\97 g1 â\86\92 f2 â\89\97 g2 â\86\92 f â\89\97 g.
+ f1 â\89¡ g1 â\86\92 f2 â\89¡ g2 â\86\92 f â\89¡ g.
/4 width=4 by coafter_mono, coafter_eq_repl_back1, coafter_eq_repl_back2/ qed-.
(* Forward lemmas with pushs ************************************************)
-lemma coafter_fwd_pushs: â\88\80j,i,g2,f1,g. g2 ~â\8a\9a â\86\91*[i]f1 ≘ g → @⦃i, g2⦄ ≘ j →
- â\88\83f. â\86\91*[j] f = g.
+lemma coafter_fwd_pushs: â\88\80j,i,g2,f1,g. g2 ~â\8a\9a ⫯*[i]f1 ≘ g → @⦃i, g2⦄ ≘ j →
+ â\88\83f. ⫯*[j] f = g.
#j elim j -j
[ #i #g2 #f1 #g #Hg #H
elim (at_inv_xxp … H) -H [|*: // ] #f2 #H1 #H2 destruct
(* Inversion lemmas with tail ***********************************************)
lemma coafter_inv_tl1: ∀g2,g1,g. g2 ~⊚ ⫱g1 ≘ g →
- â\88\83â\88\83f. â\86\91g2 ~⊚ g1 ≘ f & ⫱f = g.
+ â\88\83â\88\83f. ⫯g2 ~⊚ g1 ≘ f & ⫱f = g.
#g2 #g1 #g elim (pn_split g1) * #f1 #H1 #H destruct
[ /3 width=7 by coafter_refl, ex2_intro/
-| @(ex2_intro â\80¦ (⫯g)) /2 width=7 by coafter_push/ (**) (* full auto fails *)
+| @(ex2_intro â\80¦ (â\86\91g)) /2 width=7 by coafter_push/ (**) (* full auto fails *)
]
qed-.
lemma coafter_inv_tl0: ∀g2,g1,g. g2 ~⊚ g1 ≘ ⫱g →
- â\88\83â\88\83f1. â\86\91g2 ~⊚ f1 ≘ g & ⫱f1 = g1.
+ â\88\83â\88\83f1. ⫯g2 ~⊚ f1 ≘ g & ⫱f1 = g1.
#g2 #g1 #g elim (pn_split g) * #f #H0 #H destruct
[ /3 width=7 by coafter_refl, ex2_intro/
-| @(ex2_intro â\80¦ (⫯g1)) /2 width=7 by coafter_push/ (**) (* full auto fails *)
+| @(ex2_intro â\80¦ (â\86\91g1)) /2 width=7 by coafter_push/ (**) (* full auto fails *)
]
qed-.
/2 width=1 by coafter_tls/ qed.
lemma coafter_tls_succ: ∀g2,g1,g. g2 ~⊚ g1 ≘ g →
- â\88\80n. @â¦\830, g2â¦\84 â\89\98 n â\86\92 ⫱*[⫯n]g2 ~â\8a\9a ⫱g1 â\89\98 ⫱*[⫯n]g.
+ â\88\80n. @â¦\830, g2â¦\84 â\89\98 n â\86\92 ⫱*[â\86\91n]g2 ~â\8a\9a ⫱g1 â\89\98 ⫱*[â\86\91n]g.
#g2 #g1 #g #Hg #n #Hg2
lapply (coafter_tls … Hg2 … Hg) -Hg #Hg
lapply (at_pxx_tls … Hg2) -Hg2 #H
<tls_S <tls_S <H2 <H0 -g2 -g -n //
qed.
-lemma coafter_fwd_xpx_pushs: â\88\80g2,f1,g,i,j. @â¦\83i, g2â¦\84 â\89\98 j â\86\92 g2 ~â\8a\9a â\86\91*[⫯i]f1 ≘ g →
- â\88\83â\88\83f. ⫱*[⫯j]g2 ~â\8a\9a f1 â\89\98 f & â\86\91*[⫯j]f = g.
+lemma coafter_fwd_xpx_pushs: â\88\80g2,f1,g,i,j. @â¦\83i, g2â¦\84 â\89\98 j â\86\92 g2 ~â\8a\9a ⫯*[â\86\91i]f1 ≘ g →
+ â\88\83â\88\83f. ⫱*[â\86\91j]g2 ~â\8a\9a f1 â\89\98 f & ⫯*[â\86\91j]f = g.
#g2 #g1 #g #i #j #Hg2 <pushs_xn #Hg
elim (coafter_fwd_pushs … Hg Hg2) #f #H0 destruct
lapply (coafter_tls … Hg2 Hg) -Hg <tls_pushs <tls_pushs #Hf
/2 width=3 by ex2_intro/
qed-.
-lemma coafter_fwd_xnx_pushs: â\88\80g2,f1,g,i,j. @â¦\83i, g2â¦\84 â\89\98 j â\86\92 g2 ~â\8a\9a â\86\91*[i]⫯f1 ≘ g →
- â\88\83â\88\83f. ⫱*[⫯j]g2 ~â\8a\9a f1 â\89\98 f & â\86\91*[j] ⫯f = g.
+lemma coafter_fwd_xnx_pushs: â\88\80g2,f1,g,i,j. @â¦\83i, g2â¦\84 â\89\98 j â\86\92 g2 ~â\8a\9a ⫯*[i]â\86\91f1 ≘ g →
+ â\88\83â\88\83f. ⫱*[â\86\91j]g2 ~â\8a\9a f1 â\89\98 f & ⫯*[j] â\86\91f = g.
#g2 #g1 #g #i #j #Hg2 #Hg
elim (coafter_fwd_pushs … Hg Hg2) #f #H0 destruct
lapply (coafter_tls … Hg2 Hg) -Hg <tls_pushs <tls_pushs #Hf
(* Inversion lemmas with test for identity **********************************)
-lemma coafter_isid_inv_sn: â\88\80f1,f2,f. f1 ~â\8a\9a f2 â\89\98 f â\86\92 ð\9d\90\88â¦\83f1â¦\84 â\86\92 f2 â\89\97 f.
+lemma coafter_isid_inv_sn: â\88\80f1,f2,f. f1 ~â\8a\9a f2 â\89\98 f â\86\92 ð\9d\90\88â¦\83f1â¦\84 â\86\92 f2 â\89¡ f.
/3 width=6 by coafter_isid_sn, coafter_mono/ qed-.
lemma coafter_isid_inv_dx: ∀f1,f2,f. f1 ~⊚ f2 ≘ f → 𝐈⦃f2⦄ → 𝐈⦃f⦄.
(*
-lemma coafter_isid_isuni: â\88\80f1,f2. ð\9d\90\88â¦\83f2â¦\84 â\86\92 ð\9d\90\94â¦\83f1â¦\84 â\86\92 f1 ~â\8a\9a ⫯f2 â\89\98 ⫯f1.
+lemma coafter_isid_isuni: â\88\80f1,f2. ð\9d\90\88â¦\83f2â¦\84 â\86\92 ð\9d\90\94â¦\83f1â¦\84 â\86\92 f1 ~â\8a\9a â\86\91f2 â\89\98 â\86\91f1.
#f1 #f2 #Hf2 #H elim H -H
/5 width=7 by coafter_isid_dx, coafter_eq_repl_back2, coafter_next, coafter_push, eq_push_inv_isid/
qed.
-lemma coafter_uni_next2: â\88\80f2. ð\9d\90\94â¦\83f2â¦\84 â\86\92 â\88\80f1,f. ⫯f2 ~â\8a\9a f1 â\89\98 f â\86\92 f2 ~â\8a\9a ⫯f1 ≘ f.
+lemma coafter_uni_next2: â\88\80f2. ð\9d\90\94â¦\83f2â¦\84 â\86\92 â\88\80f1,f. â\86\91f2 ~â\8a\9a f1 â\89\98 f â\86\92 f2 ~â\8a\9a â\86\91f1 ≘ f.
#f2 #H elim H -f2
[ #f2 #Hf2 #f1 #f #Hf
elim (coafter_inv_nxx … Hf) -Hf [2,3: // ] #g #Hg #H0 destruct
(* Properties with uniform relocations **************************************)
-lemma coafter_uni_sn: â\88\80i,f. ð\9d\90\94â\9d´iâ\9dµ ~â\8a\9a f â\89\98 â\86\91*[i] f.
+lemma coafter_uni_sn: â\88\80i,f. ð\9d\90\94â\9d´iâ\9dµ ~â\8a\9a f â\89\98 ⫯*[i] f.
#i elim i -i /2 width=5 by coafter_isid_sn, coafter_next/
qed.
qed-.
lemma coafter_uni_succ_dx: ∀i2,i1,f2. @⦃i1, f2⦄ ≘ i2 →
- â\88\80f. f2 ~â\8a\9a ð\9d\90\94â\9d´â«¯i1â\9dµ â\89\98 f â\86\92 ð\9d\90\94â\9d´â«¯i2â\9dµ ~â\8a\9a ⫱*[⫯i2] f2 ≘ f.
+ â\88\80f. f2 ~â\8a\9a ð\9d\90\94â\9d´â\86\91i1â\9dµ â\89\98 f â\86\92 ð\9d\90\94â\9d´â\86\91i2â\9dµ ~â\8a\9a ⫱*[â\86\91i2] f2 ≘ f.
#i2 elim i2 -i2
[ #i1 #f2 #Hf2 #f #Hf
elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
qed.
lemma coafter_uni_succ_sn: ∀i2,i1,f2. @⦃i1, f2⦄ ≘ i2 →
- â\88\80f. ð\9d\90\94â\9d´â«¯i2â\9dµ ~â\8a\9a ⫱*[⫯i2] f2 â\89\98 f â\86\92 f2 ~â\8a\9a ð\9d\90\94â\9d´â«¯i1❵ ≘ f.
+ â\88\80f. ð\9d\90\94â\9d´â\86\91i2â\9dµ ~â\8a\9a ⫱*[â\86\91i2] f2 â\89\98 f â\86\92 f2 ~â\8a\9a ð\9d\90\94â\9d´â\86\91i1❵ ≘ f.
#i2 elim i2 -i2
[ #i1 #f2 #Hf2 #f #Hf
elim (at_inv_xxp … Hf2) -Hf2 // #g2 #H1 #H2 destruct
]
qed-.
-lemma coafter_uni_one_dx: â\88\80f2,f. â\86\91f2 ~â\8a\9a ð\9d\90\94â\9d´â«¯Oâ\9dµ â\89\98 f â\86\92 ð\9d\90\94â\9d´â«¯O❵ ~⊚ f2 ≘ f.
-#f2 #f #H @(coafter_uni_succ_dx â\80¦ (â\86\91f2)) /2 width=3 by at_refl/
+lemma coafter_uni_one_dx: â\88\80f2,f. ⫯f2 ~â\8a\9a ð\9d\90\94â\9d´â\86\91Oâ\9dµ â\89\98 f â\86\92 ð\9d\90\94â\9d´â\86\91O❵ ~⊚ f2 ≘ f.
+#f2 #f #H @(coafter_uni_succ_dx â\80¦ (⫯f2)) /2 width=3 by at_refl/
qed.
-lemma coafter_uni_one_sn: â\88\80f1,f. ð\9d\90\94â\9d´â«¯Oâ\9dµ ~â\8a\9a f1 â\89\98 f â\86\92 â\86\91f1 ~â\8a\9a ð\9d\90\94â\9d´â«¯O❵ ≘ f.
+lemma coafter_uni_one_sn: â\88\80f1,f. ð\9d\90\94â\9d´â\86\91Oâ\9dµ ~â\8a\9a f1 â\89\98 f â\86\92 ⫯f1 ~â\8a\9a ð\9d\90\94â\9d´â\86\91O❵ ≘ f.
/3 width=3 by coafter_uni_succ_sn, at_refl/ qed-.
*)
(* Forward lemmas with istot ************************************************)
/3 width=8 by coafter_fwd_at, ex2_intro/
qed-.
-lemma coafter_fwd_isid_sn: â\88\80f2,f1,f. ð\9d\90\93â¦\83fâ¦\84 â\86\92 f2 ~â\8a\9a f1 â\89\98 f â\86\92 f1 â\89\97 f → 𝐈⦃f2⦄.
+lemma coafter_fwd_isid_sn: â\88\80f2,f1,f. ð\9d\90\93â¦\83fâ¦\84 â\86\92 f2 ~â\8a\9a f1 â\89\98 f â\86\92 f1 â\89¡ f → 𝐈⦃f2⦄.
#f2 #f1 #f #H #Hf elim (coafter_inv_istot … Hf H) -H
#Hf2 #Hf1 #H @isid_at_total // -Hf2
#i2 #i #Hf2 elim (Hf1 i2) -Hf1
/3 width=7 by at_eq_repl_back, at_mono, at_id_le/
qed-.
-lemma coafter_fwd_isid_dx: â\88\80f2,f1,f. ð\9d\90\93â¦\83fâ¦\84 â\86\92 f2 ~â\8a\9a f1 â\89\98 f â\86\92 f2 â\89\97 f → 𝐈⦃f1⦄.
+lemma coafter_fwd_isid_dx: â\88\80f2,f1,f. ð\9d\90\93â¦\83fâ¦\84 â\86\92 f2 ~â\8a\9a f1 â\89\98 f â\86\92 f2 â\89¡ f → 𝐈⦃f1⦄.
#f2 #f1 #f #H #Hf elim (coafter_inv_istot … Hf H) -H
#Hf2 #Hf1 #H2 @isid_at_total // -Hf1
#i1 #i2 #Hi12 elim (coafter_at1_fwd … Hi12 … Hf) -f1
(* *)
(**************************************************************************)
-include "ground_2/notation/relations/funexteq_2.ma".
+include "ground_2/notation/relations/ideq_2.ma".
include "ground_2/relocation/rtmap.ma".
(* RELOCATION MAP ***********************************************************)
coinductive eq: relation rtmap ≝
-| eq_push: â\88\80f1,f2,g1,g2. eq f1 f2 â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 → eq g1 g2
-| eq_next: â\88\80f1,f2,g1,g2. eq f1 f2 â\86\92 ⫯f1 = g1 â\86\92 ⫯f2 = g2 → eq g1 g2
+| eq_push: â\88\80f1,f2,g1,g2. eq f1 f2 â\86\92 ⫯f1 = g1 â\86\92 ⫯f2 = g2 → eq g1 g2
+| eq_next: â\88\80f1,f2,g1,g2. eq f1 f2 â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 → eq g1 g2
.
interpretation "extensional equivalence (rtmap)"
- 'FunExtEq f1 f2 = (eq f1 f2).
+ 'IdEq f1 f2 = (eq f1 f2).
definition eq_repl (R:relation …) ≝
- â\88\80f1,f2. f1 â\89\97 f2 → R f1 f2.
+ â\88\80f1,f2. f1 â\89¡ f2 → R f1 f2.
definition eq_repl_back (R:predicate …) ≝
- â\88\80f1. R f1 â\86\92 â\88\80f2. f1 â\89\97 f2 → R f2.
+ â\88\80f1. R f1 â\86\92 â\88\80f2. f1 â\89¡ f2 → R f2.
definition eq_repl_fwd (R:predicate …) ≝
- â\88\80f1. R f1 â\86\92 â\88\80f2. f2 â\89\97 f1 → R f2.
+ â\88\80f1. R f1 â\86\92 â\88\80f2. f2 â\89¡ f1 → R f2.
(* Basic properties *********************************************************)
(* Basic inversion lemmas ***************************************************)
-lemma eq_inv_px: â\88\80g1,g2. g1 â\89\97 g2 â\86\92 â\88\80f1. â\86\91f1 = g1 →
- â\88\83â\88\83f2. f1 â\89\97 f2 & â\86\91f2 = g2.
+lemma eq_inv_px: â\88\80g1,g2. g1 â\89¡ g2 â\86\92 â\88\80f1. ⫯f1 = g1 →
+ â\88\83â\88\83f2. f1 â\89¡ f2 & ⫯f2 = g2.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
#x1 #H
]
qed-.
-lemma eq_inv_nx: â\88\80g1,g2. g1 â\89\97 g2 â\86\92 â\88\80f1. ⫯f1 = g1 →
- â\88\83â\88\83f2. f1 â\89\97 f2 & ⫯f2 = g2.
+lemma eq_inv_nx: â\88\80g1,g2. g1 â\89¡ g2 â\86\92 â\88\80f1. â\86\91f1 = g1 →
+ â\88\83â\88\83f2. f1 â\89¡ f2 & â\86\91f2 = g2.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
#x1 #H
]
qed-.
-lemma eq_inv_xp: â\88\80g1,g2. g1 â\89\97 g2 â\86\92 â\88\80f2. â\86\91f2 = g2 →
- â\88\83â\88\83f1. f1 â\89\97 f2 & â\86\91f1 = g1.
+lemma eq_inv_xp: â\88\80g1,g2. g1 â\89¡ g2 â\86\92 â\88\80f2. ⫯f2 = g2 →
+ â\88\83â\88\83f1. f1 â\89¡ f2 & ⫯f1 = g1.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
#x2 #H
]
qed-.
-lemma eq_inv_xn: â\88\80g1,g2. g1 â\89\97 g2 â\86\92 â\88\80f2. ⫯f2 = g2 →
- â\88\83â\88\83f1. f1 â\89\97 f2 & ⫯f1 = g1.
+lemma eq_inv_xn: â\88\80g1,g2. g1 â\89¡ g2 â\86\92 â\88\80f2. â\86\91f2 = g2 →
+ â\88\83â\88\83f1. f1 â\89¡ f2 & â\86\91f1 = g1.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #Hf * * -g1 -g2
#x2 #H
(* Advanced inversion lemmas ************************************************)
-lemma eq_inv_pp: â\88\80g1,g2. g1 â\89\97 g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 f1 â\89\97 f2.
+lemma eq_inv_pp: â\88\80g1,g2. g1 â\89¡ g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 f1 â\89¡ f2.
#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_px … H … H1) -g1
#x2 #Hx2 * -g2
#H lapply (injective_push … H) -H //
qed-.
-lemma eq_inv_nn: â\88\80g1,g2. g1 â\89\97 g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 f1 â\89\97 f2.
+lemma eq_inv_nn: â\88\80g1,g2. g1 â\89¡ g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 f1 â\89¡ f2.
#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_nx … H … H1) -g1
#x2 #Hx2 * -g2
#H lapply (injective_next … H) -H //
qed-.
-lemma eq_inv_pn: â\88\80g1,g2. g1 â\89\97 g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 → ⊥.
+lemma eq_inv_pn: â\88\80g1,g2. g1 â\89¡ g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 → ⊥.
#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_px … H … H1) -g1
#x2 #Hx2 * -g2
#H elim (discr_next_push … H)
qed-.
-lemma eq_inv_np: â\88\80g1,g2. g1 â\89\97 g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 → ⊥.
+lemma eq_inv_np: â\88\80g1,g2. g1 â\89¡ g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 → ⊥.
#g1 #g2 #H #f1 #f2 #H1 elim (eq_inv_nx … H … H1) -g1
#x2 #Hx2 * -g2
#H elim (discr_push_next … H)
qed-.
-lemma eq_inv_gen: â\88\80f1,f2. f1 â\89\97 f2 →
- (â\88\83â\88\83g1,g2. g1 â\89\97 g2 & â\86\91g1 = f1 & â\86\91g2 = f2) ∨
- â\88\83â\88\83g1,g2. g1 â\89\97 g2 & ⫯g1 = f1 & ⫯g2 = f2.
+lemma eq_inv_gen: â\88\80f1,f2. f1 â\89¡ f2 →
+ (â\88\83â\88\83g1,g2. g1 â\89¡ g2 & ⫯g1 = f1 & ⫯g2 = f2) ∨
+ â\88\83â\88\83g1,g2. g1 â\89¡ g2 & â\86\91g1 = f1 & â\86\91g2 = f2.
#f1 elim (pn_split f1) * #g1 #H1 #f2 #Hf
[ elim (eq_inv_px … Hf … H1) -Hf /3 width=5 by or_introl, ex3_2_intro/
| elim (eq_inv_nx … Hf … H1) -Hf /3 width=5 by or_intror, ex3_2_intro/
/3 width=5 by eq_push, eq_next/
qed-.
-theorem eq_canc_sn: â\88\80f2. eq_repl_back (λf. f â\89\97 f2).
+theorem eq_canc_sn: â\88\80f2. eq_repl_back (λf. f â\89¡ f2).
/3 width=3 by eq_trans, eq_sym/ qed-.
-theorem eq_canc_dx: â\88\80f1. eq_repl_fwd (λf. f1 â\89\97 f).
+theorem eq_canc_dx: â\88\80f1. eq_repl_fwd (λf. f1 â\89¡ f).
/3 width=3 by eq_trans, eq_sym/ qed-.
inductive fcla: relation2 rtmap nat ≝
| fcla_isid: ∀f. 𝐈⦃f⦄ → fcla f 0
-| fcla_push: â\88\80f,n. fcla f n â\86\92 fcla (â\86\91f) n
-| fcla_next: â\88\80f,n. fcla f n â\86\92 fcla (⫯f) (⫯n)
+| fcla_push: â\88\80f,n. fcla f n â\86\92 fcla (⫯f) n
+| fcla_next: â\88\80f,n. fcla f n â\86\92 fcla (â\86\91f) (â\86\91n)
.
interpretation "finite colength assignment (rtmap)"
(* Basic inversion lemmas ***************************************************)
-lemma fcla_inv_px: â\88\80g,m. ð\9d\90\82â¦\83gâ¦\84 â\89\98 m â\86\92 â\88\80f. â\86\91f = g → 𝐂⦃f⦄ ≘ m.
+lemma fcla_inv_px: â\88\80g,m. ð\9d\90\82â¦\83gâ¦\84 â\89\98 m â\86\92 â\88\80f. ⫯f = g → 𝐂⦃f⦄ ≘ m.
#g #m * -g -m /3 width=3 by fcla_isid, isid_inv_push/
#g #m #_ #f #H elim (discr_push_next … H)
qed-.
-lemma fcla_inv_nx: â\88\80g,m. ð\9d\90\82â¦\83gâ¦\84 â\89\98 m â\86\92 â\88\80f. ⫯f = g →
- â\88\83â\88\83n. ð\9d\90\82â¦\83fâ¦\84 â\89\98 n & ⫯n = m.
+lemma fcla_inv_nx: â\88\80g,m. ð\9d\90\82â¦\83gâ¦\84 â\89\98 m â\86\92 â\88\80f. â\86\91f = g →
+ â\88\83â\88\83n. ð\9d\90\82â¦\83fâ¦\84 â\89\98 n & â\86\91n = m.
#g #m * -g -m /2 width=3 by ex2_intro/
[ #g #Hg #f #H elim (isid_inv_next … H) -H //
| #g #m #_ #f #H elim (discr_next_push … H)
(* Advanced inversion lemmas ************************************************)
-lemma cla_inv_nn: â\88\80g,m. ð\9d\90\82â¦\83gâ¦\84 â\89\98 m â\86\92 â\88\80f,n. ⫯f = g â\86\92 ⫯n = m → 𝐂⦃f⦄ ≘ n.
+lemma cla_inv_nn: â\88\80g,m. ð\9d\90\82â¦\83gâ¦\84 â\89\98 m â\86\92 â\88\80f,n. â\86\91f = g â\86\92 â\86\91n = m → 𝐂⦃f⦄ ≘ n.
#g #m #H #f #n #H1 #H2 elim (fcla_inv_nx … H … H1) -g
#x #Hf #H destruct //
qed-.
-lemma cla_inv_np: â\88\80g,m. ð\9d\90\82â¦\83gâ¦\84 â\89\98 m â\86\92 â\88\80f. ⫯f = g → 0 = m → ⊥.
+lemma cla_inv_np: â\88\80g,m. ð\9d\90\82â¦\83gâ¦\84 â\89\98 m â\86\92 â\88\80f. â\86\91f = g → 0 = m → ⊥.
#g #m #H #f #H1 elim (fcla_inv_nx … H … H1) -g
#x #_ #H1 #H2 destruct
qed-.
(* Alternative definition of isid *******************************************)
-lemma eq_id_isid: â\88\80f. ð\9d\90\88ð\9d\90\9d â\89\97 f → 𝐈⦃f⦄.
+lemma eq_id_isid: â\88\80f. ð\9d\90\88ð\9d\90\9d â\89¡ f → 𝐈⦃f⦄.
/2 width=3 by isid_eq_repl_back/ qed.
-lemma eq_id_inv_isid: â\88\80f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 ð\9d\90\88ð\9d\90\9d â\89\97 f.
+lemma eq_id_inv_isid: â\88\80f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 ð\9d\90\88ð\9d\90\9d â\89¡ f.
/2 width=1 by isid_inv_eq_repl/ qed-.
(* RELOCATION MAP ***********************************************************)
coinductive isdiv: predicate rtmap ≝
-| isdiv_next: â\88\80f,g. isdiv f â\86\92 ⫯f = g → isdiv g
+| isdiv_next: â\88\80f,g. isdiv f â\86\92 â\86\91f = g → isdiv g
.
interpretation "test for divergence (rtmap)"
(* Basic inversion lemmas ***************************************************)
-lemma isdiv_inv_gen: â\88\80g. ð\9d\9b\80â¦\83gâ¦\84 â\86\92 â\88\83â\88\83f. ð\9d\9b\80â¦\83fâ¦\84 & ⫯f = g.
+lemma isdiv_inv_gen: â\88\80g. ð\9d\9b\80â¦\83gâ¦\84 â\86\92 â\88\83â\88\83f. ð\9d\9b\80â¦\83fâ¦\84 & â\86\91f = g.
#g * -g
#f #g #Hf * /2 width=3 by ex2_intro/
qed-.
(* Advanced inversion lemmas ************************************************)
-lemma isdiv_inv_next: â\88\80g. ð\9d\9b\80â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → 𝛀⦃f⦄.
+lemma isdiv_inv_next: â\88\80g. ð\9d\9b\80â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → 𝛀⦃f⦄.
#g #H elim (isdiv_inv_gen … H) -H
#f #Hf * -g #g #H >(injective_next … H) -H //
qed-.
-lemma isdiv_inv_push: â\88\80g. ð\9d\9b\80â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → ⊥.
+lemma isdiv_inv_push: â\88\80g. ð\9d\9b\80â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → ⊥.
#g #H elim (isdiv_inv_gen … H) -H
#f #Hf * -g #g #H elim (discr_push_next … H)
qed-.
(* Main inversion lemmas ****************************************************)
-corec theorem isdiv_inv_eq_repl: â\88\80f1,f2. ð\9d\9b\80â¦\83f1â¦\84 â\86\92 ð\9d\9b\80â¦\83f2â¦\84 â\86\92 f1 â\89\97 f2.
+corec theorem isdiv_inv_eq_repl: â\88\80f1,f2. ð\9d\9b\80â¦\83f1â¦\84 â\86\92 ð\9d\9b\80â¦\83f2â¦\84 â\86\92 f1 â\89¡ f2.
#f1 #f2 #H1 #H2
cases (isdiv_inv_gen … H1) -H1
cases (isdiv_inv_gen … H2) -H2
(* Alternative definition ***************************************************)
-corec lemma eq_next_isdiv: â\88\80f. ⫯f â\89\97 f → 𝛀⦃f⦄.
+corec lemma eq_next_isdiv: â\88\80f. â\86\91f â\89¡ f → 𝛀⦃f⦄.
#f #H cases (eq_inv_nx … H) -H /4 width=3 by isdiv_next, eq_trans/
qed.
-corec lemma eq_next_inv_isdiv: â\88\80f. ð\9d\9b\80â¦\83fâ¦\84 â\86\92 ⫯f â\89\97 f.
+corec lemma eq_next_inv_isdiv: â\88\80f. ð\9d\9b\80â¦\83fâ¦\84 â\86\92 â\86\91f â\89¡ f.
#f * -f
#f #g #Hf #Hg @(eq_next … Hg) [2: @eq_next_inv_isdiv // | skip ]
@eq_f //
(* Properties with iterated next ********************************************)
-lemma isdiv_nexts: â\88\80n,f. ð\9d\9b\80â¦\83fâ¦\84 â\86\92 ð\9d\9b\80â¦\83⫯*[n]f⦄.
+lemma isdiv_nexts: â\88\80n,f. ð\9d\9b\80â¦\83fâ¦\84 â\86\92 ð\9d\9b\80â¦\83â\86\91*[n]f⦄.
#n elim n -n /3 width=3 by isdiv_next/
qed.
(* Inversion lemmas with iterated next **************************************)
-lemma isdiv_inv_nexts: â\88\80n,g. ð\9d\9b\80â¦\83⫯*[n]g⦄ → 𝛀⦃g⦄.
+lemma isdiv_inv_nexts: â\88\80n,g. ð\9d\9b\80â¦\83â\86\91*[n]g⦄ → 𝛀⦃g⦄.
#n elim n -n /3 width=3 by isdiv_inv_next/
qed.
(* Basic eliminators ********************************************************)
lemma isfin_ind (R:predicate rtmap): (∀f. 𝐈⦃f⦄ → R f) →
- (∀f. 𝐅⦃f⦄ → R f → R (↑f)) →
(∀f. 𝐅⦃f⦄ → R f → R (⫯f)) →
+ (∀f. 𝐅⦃f⦄ → R f → R (↑f)) →
∀f. 𝐅⦃f⦄ → R f.
#R #IH1 #IH2 #IH3 #f #H elim H -H
#n #H elim H -f -n /3 width=2 by ex_intro/
(* Basic inversion lemmas ***************************************************)
-lemma isfin_inv_push: â\88\80g. ð\9d\90\85â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → 𝐅⦃f⦄.
+lemma isfin_inv_push: â\88\80g. ð\9d\90\85â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → 𝐅⦃f⦄.
#g * /3 width=4 by fcla_inv_px, ex_intro/
qed-.
-lemma isfin_inv_next: â\88\80g. ð\9d\90\85â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → 𝐅⦃f⦄.
+lemma isfin_inv_next: â\88\80g. ð\9d\90\85â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → 𝐅⦃f⦄.
#g * #n #H #f #H0 elim (fcla_inv_nx … H … H0) -g
/2 width=2 by ex_intro/
qed-.
lemma isfin_isid: ∀f. 𝐈⦃f⦄ → 𝐅⦃f⦄.
/3 width=2 by fcla_isid, ex_intro/ qed.
-lemma isfin_push: â\88\80f. ð\9d\90\85â¦\83fâ¦\84 â\86\92 ð\9d\90\85â¦\83â\86\91f⦄.
+lemma isfin_push: â\88\80f. ð\9d\90\85â¦\83fâ¦\84 â\86\92 ð\9d\90\85â¦\83⫯f⦄.
#f * /3 width=2 by fcla_push, ex_intro/
qed.
-lemma isfin_next: â\88\80f. ð\9d\90\85â¦\83fâ¦\84 â\86\92 ð\9d\90\85â¦\83⫯f⦄.
+lemma isfin_next: â\88\80f. ð\9d\90\85â¦\83fâ¦\84 â\86\92 ð\9d\90\85â¦\83â\86\91f⦄.
#f * /3 width=2 by fcla_next, ex_intro/
qed.
(* Properties with iterated push ********************************************)
-lemma isfin_pushs: â\88\80n,f. ð\9d\90\85â¦\83fâ¦\84 â\86\92 ð\9d\90\85â¦\83â\86\91*[n]f⦄.
+lemma isfin_pushs: â\88\80n,f. ð\9d\90\85â¦\83fâ¦\84 â\86\92 ð\9d\90\85â¦\83⫯*[n]f⦄.
#n elim n -n /3 width=3 by isfin_push/
qed.
(* Inversion lemmas with iterated push **************************************)
-lemma isfin_inv_pushs: â\88\80n,g. ð\9d\90\85â¦\83â\86\91*[n]g⦄ → 𝐅⦃g⦄.
+lemma isfin_inv_pushs: â\88\80n,g. ð\9d\90\85â¦\83⫯*[n]g⦄ → 𝐅⦃g⦄.
#n elim n -n /3 width=3 by isfin_inv_push/
qed.
(* RELOCATION MAP ***********************************************************)
coinductive isid: predicate rtmap ≝
-| isid_push: â\88\80f,g. isid f â\86\92 â\86\91f = g → isid g
+| isid_push: â\88\80f,g. isid f â\86\92 ⫯f = g → isid g
.
interpretation "test for identity (rtmap)"
(* Basic inversion lemmas ***************************************************)
-lemma isid_inv_gen: â\88\80g. ð\9d\90\88â¦\83gâ¦\84 â\86\92 â\88\83â\88\83f. ð\9d\90\88â¦\83fâ¦\84 & â\86\91f = g.
+lemma isid_inv_gen: â\88\80g. ð\9d\90\88â¦\83gâ¦\84 â\86\92 â\88\83â\88\83f. ð\9d\90\88â¦\83fâ¦\84 & ⫯f = g.
#g * -g
#f #g #Hf * /2 width=3 by ex2_intro/
qed-.
(* Advanced inversion lemmas ************************************************)
-lemma isid_inv_push: â\88\80g. ð\9d\90\88â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → 𝐈⦃f⦄.
+lemma isid_inv_push: â\88\80g. ð\9d\90\88â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → 𝐈⦃f⦄.
#g #H elim (isid_inv_gen … H) -H
#f #Hf * -g #g #H >(injective_push … H) -H //
qed-.
-lemma isid_inv_next: â\88\80g. ð\9d\90\88â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → ⊥.
+lemma isid_inv_next: â\88\80g. ð\9d\90\88â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → ⊥.
#g #H elim (isid_inv_gen … H) -H
#f #Hf * -g #g #H elim (discr_next_push … H)
qed-.
(* Main inversion lemmas ****************************************************)
-corec theorem isid_inv_eq_repl: â\88\80f1,f2. ð\9d\90\88â¦\83f1â¦\84 â\86\92 ð\9d\90\88â¦\83f2â¦\84 â\86\92 f1 â\89\97 f2.
+corec theorem isid_inv_eq_repl: â\88\80f1,f2. ð\9d\90\88â¦\83f1â¦\84 â\86\92 ð\9d\90\88â¦\83f2â¦\84 â\86\92 f1 â\89¡ f2.
#f1 #f2 #H1 #H2
cases (isid_inv_gen … H1) -H1
cases (isid_inv_gen … H2) -H2
(* Alternative definition ***************************************************)
-corec lemma eq_push_isid: â\88\80f. â\86\91f â\89\97 f → 𝐈⦃f⦄.
+corec lemma eq_push_isid: â\88\80f. ⫯f â\89¡ f → 𝐈⦃f⦄.
#f #H cases (eq_inv_px … H) -H /4 width=3 by isid_push, eq_trans/
qed.
-corec lemma eq_push_inv_isid: â\88\80f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 â\86\91f â\89\97 f.
+corec lemma eq_push_inv_isid: â\88\80f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 ⫯f â\89¡ f.
#f * -f
#f #g #Hf #Hg @(eq_push … Hg) [2: @eq_push_inv_isid // | skip ]
@eq_f //
(* Properties with iterated push ********************************************)
-lemma isid_pushs: â\88\80n,f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 ð\9d\90\88â¦\83â\86\91*[n]f⦄.
+lemma isid_pushs: â\88\80n,f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 ð\9d\90\88â¦\83⫯*[n]f⦄.
#n elim n -n /3 width=3 by isid_push/
qed.
(* Inversion lemmas with iterated push **************************************)
-lemma isid_inv_pushs: â\88\80n,g. ð\9d\90\88â¦\83â\86\91*[n]g⦄ → 𝐈⦃g⦄.
+lemma isid_inv_pushs: â\88\80n,g. ð\9d\90\88â¦\83⫯*[n]g⦄ → 𝐈⦃g⦄.
#n elim n -n /3 width=3 by isid_inv_push/
qed.
(* Basic inversion lemmas ***************************************************)
-lemma istot_inv_push: â\88\80g. ð\9d\90\93â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → 𝐓⦃f⦄.
-#g #Hg #f #H #i elim (Hg (⫯i)) -Hg
+lemma istot_inv_push: â\88\80g. ð\9d\90\93â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → 𝐓⦃f⦄.
+#g #Hg #f #H #i elim (Hg (â\86\91i)) -Hg
#j #Hg elim (at_inv_npx … Hg … H) -Hg -H /2 width=3 by ex_intro/
qed-.
-lemma istot_inv_next: â\88\80g. ð\9d\90\93â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → 𝐓⦃f⦄.
+lemma istot_inv_next: â\88\80g. ð\9d\90\93â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → 𝐓⦃f⦄.
#g #Hg #f #H #i elim (Hg i) -Hg
#j #Hg elim (at_inv_xnx … Hg … H) -Hg -H /2 width=2 by ex_intro/
qed-.
corec theorem at_ext: ∀f1,f2. 𝐓⦃f1⦄ → 𝐓⦃f2⦄ →
(∀i,i1,i2. @⦃i, f1⦄ ≘ i1 → @⦃i, f2⦄ ≘ i2 → i1 = i2) →
- f1 â\89\97 f2.
+ f1 â\89¡ f2.
#f1 cases (pn_split f1) * #g1 #H1
#f2 cases (pn_split f2) * #g2 #H2
#Hf1 #Hf2 #Hi
[ @(eq_push … H1 H2) @at_ext -at_ext /2 width=3 by istot_inv_push/ -Hf1 -Hf2
- #i #i1 #i2 #Hg1 #Hg2 lapply (Hi (⫯i) (⫯i1) (⫯i2) ??) /2 width=7 by at_push/
+ #i #i1 #i2 #Hg1 #Hg2 lapply (Hi (â\86\91i) (â\86\91i1) (â\86\91i2) ??) /2 width=7 by at_push/
| cases (Hf2 0) -Hf1 -Hf2 -at_ext
#j2 #Hf2 cases (at_increasing_strict … Hf2 … H2) -H2
lapply (Hi 0 0 j2 … Hf2) /2 width=2 by at_refl/ -Hi -Hf2 -H1
lapply (Hi 0 j1 0 Hf1 ?) /2 width=2 by at_refl/ -Hi -Hf1 -H2
#H1 #H cases (lt_le_false … H) -H //
| @(eq_next … H1 H2) @at_ext -at_ext /2 width=3 by istot_inv_next/ -Hf1 -Hf2
- #i #i1 #i2 #Hg1 #Hg2 lapply (Hi i (⫯i1) (⫯i2) ??) /2 width=5 by at_next/
+ #i #i1 #i2 #Hg1 #Hg2 lapply (Hi i (â\86\91i1) (â\86\91i2) ??) /2 width=5 by at_next/
]
qed-.
qed-.
lemma is_at_dec: ∀f,i2. 𝐓⦃f⦄ → Decidable (∃i1. @⦃i1, f⦄ ≘ i2).
-#f #i2 #Hf @(is_at_dec_le ?? (⫯i2)) /2 width=4 by lt_le_false/
+#f #i2 #Hf @(is_at_dec_le ?? (â\86\91i2)) /2 width=4 by lt_le_false/
qed-.
(* Advanced properties on isid **********************************************)
inductive isuni: predicate rtmap ≝
| isuni_isid: ∀f. 𝐈⦃f⦄ → isuni f
-| isuni_next: â\88\80f. isuni f â\86\92 â\88\80g. ⫯f = g → isuni g
+| isuni_next: â\88\80f. isuni f â\86\92 â\88\80g. â\86\91f = g → isuni g
.
interpretation "test for uniformity (rtmap)"
(* Basic inversion lemmas ***************************************************)
-lemma isuni_inv_push: â\88\80g. ð\9d\90\94â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → 𝐈⦃f⦄.
+lemma isuni_inv_push: â\88\80g. ð\9d\90\94â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → 𝐈⦃f⦄.
#g * -g /2 width=3 by isid_inv_push/
#f #_ #g #H #x #Hx destruct elim (discr_push_next … Hx)
qed-.
-lemma isuni_inv_next: â\88\80g. ð\9d\90\94â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → 𝐔⦃f⦄.
+lemma isuni_inv_next: â\88\80g. ð\9d\90\94â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → 𝐔⦃f⦄.
#g * -g #f #Hf
[ #x #Hx elim (isid_inv_next … Hf … Hx)
| #g #H #x #Hx destruct /2 width=1 by injective_push/
]
qed-.
-lemma isuni_split: â\88\80g. ð\9d\90\94â¦\83gâ¦\84 â\86\92 (â\88\83â\88\83f. ð\9d\90\88â¦\83fâ¦\84 & â\86\91f = g) â\88¨ (â\88\83â\88\83f.ð\9d\90\94â¦\83fâ¦\84 & ⫯f = g).
+lemma isuni_split: â\88\80g. ð\9d\90\94â¦\83gâ¦\84 â\86\92 (â\88\83â\88\83f. ð\9d\90\88â¦\83fâ¦\84 & ⫯f = g) â\88¨ (â\88\83â\88\83f.ð\9d\90\94â¦\83fâ¦\84 & â\86\91f = g).
#g #H elim (pn_split g) * #f #Hf
/4 width=3 by isuni_inv_next, isuni_inv_push, or_introl, or_intror, ex2_intro/
qed-.
(* basic forward lemmas *****************************************************)
-lemma isuni_fwd_push: â\88\80g. ð\9d\90\94â¦\83gâ¦\84 â\86\92 â\88\80f. â\86\91f = g → 𝐔⦃f⦄.
+lemma isuni_fwd_push: â\88\80g. ð\9d\90\94â¦\83gâ¦\84 â\86\92 â\88\80f. ⫯f = g → 𝐔⦃f⦄.
/3 width=3 by isuni_inv_push, isuni_isid/ qed-.
(* Forward lemmas with test for finite colength *****************************)
(* *)
(**************************************************************************)
-include "ground_2/notation/functions/successorstar_2.ma".
+include "ground_2/notation/functions/uparrowstar_2.ma".
include "ground_2/relocation/rtmap_eq.ma".
(* RELOCATION MAP ***********************************************************)
rec definition nexts (f:rtmap) (n:nat) on n: rtmap ≝ match n with
-[ O â\87\92 f | S m â\87\92 ⫯(nexts f m) ].
+[ O â\87\92 f | S m â\87\92 â\86\91(nexts f m) ].
-interpretation "nexts (rtmap)" 'SuccessorStar n f = (nexts f n).
+interpretation "nexts (rtmap)" 'UpArrowStar n f = (nexts f n).
(* Basic_inversion lemmas *****************************************************)
-lemma eq_inv_nexts_sn: â\88\80n,f1,g2. ⫯*[n] f1 â\89\97 g2 →
- â\88\83â\88\83f2. f1 â\89\97 f2 & ⫯*[n] f2 = g2.
+lemma eq_inv_nexts_sn: â\88\80n,f1,g2. â\86\91*[n] f1 â\89¡ g2 →
+ â\88\83â\88\83f2. f1 â\89¡ f2 & â\86\91*[n] f2 = g2.
#n elim n -n /2 width=3 by ex2_intro/
#n #IH #f1 #g2 #H elim (eq_inv_nx … H) -H [|*: // ]
#f0 #Hf10 #H1 elim (IH … Hf10) -IH -Hf10 #f2 #Hf12 #H2 destruct
/2 width=3 by ex2_intro/
qed-.
-lemma eq_inv_nexts_dx: â\88\80n,f2,g1. g1 â\89\97 ⫯*[n] f2 →
- â\88\83â\88\83f1. f1 â\89\97 f2 & ⫯*[n] f1 = g1.
+lemma eq_inv_nexts_dx: â\88\80n,f2,g1. g1 â\89¡ â\86\91*[n] f2 →
+ â\88\83â\88\83f1. f1 â\89¡ f2 & â\86\91*[n] f1 = g1.
#n elim n -n /2 width=3 by ex2_intro/
#n #IH #f2 #g1 #H elim (eq_inv_xn … H) -H [|*: // ]
#f0 #Hf02 #H1 elim (IH … Hf02) -IH -Hf02 #f1 #Hf12 #H2 destruct
(* Basic properties *********************************************************)
-lemma nexts_O: â\88\80f. f = ⫯*[0] f.
+lemma nexts_O: â\88\80f. f = â\86\91*[0] f.
// qed.
-lemma nexts_S: â\88\80f,n. ⫯⫯*[n] f = ⫯*[⫯n] f.
+lemma nexts_S: â\88\80f,n. â\86\91â\86\91*[n] f = â\86\91*[â\86\91n] f.
// qed.
-lemma nexts_eq_repl: â\88\80n. eq_repl (λf1,f2. ⫯*[n] f1 â\89\97 ⫯*[n] f2).
+lemma nexts_eq_repl: â\88\80n. eq_repl (λf1,f2. â\86\91*[n] f1 â\89¡ â\86\91*[n] f2).
#n elim n -n /3 width=5 by eq_next/
qed.
(* Advanced properties ******************************************************)
-lemma nexts_xn: â\88\80n,f. ⫯*[n] ⫯f = ⫯*[⫯n] f.
+lemma nexts_xn: â\88\80n,f. â\86\91*[n] â\86\91f = â\86\91*[â\86\91n] f.
#n elim n -n //
qed.
(* *)
(**************************************************************************)
-include "ground_2/notation/functions/liftstar_2.ma".
+include "ground_2/notation/functions/upspoonstar_2.ma".
include "ground_2/relocation/rtmap_eq.ma".
(* RELOCATION MAP ***********************************************************)
rec definition pushs (f:rtmap) (n:nat) on n: rtmap ≝ match n with
-[ O â\87\92 f | S m â\87\92 â\86\91(pushs f m) ].
+[ O â\87\92 f | S m â\87\92 ⫯(pushs f m) ].
-interpretation "pushs (rtmap)" 'LiftStar n f = (pushs f n).
+interpretation "pushs (rtmap)" 'UpSpoonStar n f = (pushs f n).
(* Basic_inversion lemmas *****************************************************)
-lemma eq_inv_pushs_sn: â\88\80n,f1,g2. â\86\91*[n] f1 â\89\97 g2 →
- â\88\83â\88\83f2. f1 â\89\97 f2 & â\86\91*[n] f2 = g2.
+lemma eq_inv_pushs_sn: â\88\80n,f1,g2. ⫯*[n] f1 â\89¡ g2 →
+ â\88\83â\88\83f2. f1 â\89¡ f2 & ⫯*[n] f2 = g2.
#n elim n -n /2 width=3 by ex2_intro/
#n #IH #f1 #g2 #H elim (eq_inv_px … H) -H [|*: // ]
#f0 #Hf10 #H1 elim (IH … Hf10) -IH -Hf10 #f2 #Hf12 #H2 destruct
/2 width=3 by ex2_intro/
qed-.
-lemma eq_inv_pushs_dx: â\88\80n,f2,g1. g1 â\89\97 â\86\91*[n] f2 →
- â\88\83â\88\83f1. f1 â\89\97 f2 & â\86\91*[n] f1 = g1.
+lemma eq_inv_pushs_dx: â\88\80n,f2,g1. g1 â\89¡ ⫯*[n] f2 →
+ â\88\83â\88\83f1. f1 â\89¡ f2 & ⫯*[n] f1 = g1.
#n elim n -n /2 width=3 by ex2_intro/
#n #IH #f2 #g1 #H elim (eq_inv_xp … H) -H [|*: // ]
#f0 #Hf02 #H1 elim (IH … Hf02) -IH -Hf02 #f1 #Hf12 #H2 destruct
(* Basic properties *********************************************************)
-lemma pushs_O: â\88\80f. f = â\86\91*[0] f.
+lemma pushs_O: â\88\80f. f = ⫯*[0] f.
// qed.
-lemma pushs_S: â\88\80f,n. â\86\91â\86\91*[n] f = â\86\91*[⫯n] f.
+lemma pushs_S: â\88\80f,n. ⫯⫯*[n] f = ⫯*[â\86\91n] f.
// qed.
-lemma pushs_eq_repl: â\88\80n. eq_repl (λf1,f2. â\86\91*[n] f1 â\89\97 â\86\91*[n] f2).
+lemma pushs_eq_repl: â\88\80n. eq_repl (λf1,f2. ⫯*[n] f1 â\89¡ ⫯*[n] f2).
#n elim n -n /3 width=5 by eq_push/
qed.
(* Advanced properties ******************************************************)
-lemma pushs_xn: â\88\80n,f. â\86\91*[n] â\86\91f = â\86\91*[⫯n] f.
+lemma pushs_xn: â\88\80n,f. ⫯*[n] ⫯f = ⫯*[â\86\91n] f.
#n elim n -n //
qed.
include "ground_2/relocation/rtmap_sle.ma".
coinductive sand: relation3 rtmap rtmap rtmap ≝
-| sand_pp: â\88\80f1,f2,f,g1,g2,g. sand f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → sand g1 g2 g
-| sand_np: â\88\80f1,f2,f,g1,g2,g. sand f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → sand g1 g2 g
-| sand_pn: â\88\80f1,f2,f,g1,g2,g. sand f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 â\86\91f = g → sand g1 g2 g
-| sand_nn: â\88\80f1,f2,f,g1,g2,g. sand f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → sand g1 g2 g
+| sand_pp: â\88\80f1,f2,f,g1,g2,g. sand f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → sand g1 g2 g
+| sand_np: â\88\80f1,f2,f,g1,g2,g. sand f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → sand g1 g2 g
+| sand_pn: â\88\80f1,f2,f,g1,g2,g. sand f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 ⫯f = g → sand g1 g2 g
+| sand_nn: â\88\80f1,f2,f,g1,g2,g. sand f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → sand g1 g2 g
.
interpretation "intersection (rtmap)"
(* Basic inversion lemmas ***************************************************)
-lemma sand_inv_ppx: â\88\80g1,g2,g. g1 â\8b\92 g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 →
- â\88\83â\88\83f. f1 â\8b\92 f2 â\89\98 f & â\86\91f = g.
+lemma sand_inv_ppx: â\88\80g1,g2,g. g1 â\8b\92 g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 →
+ â\88\83â\88\83f. f1 â\8b\92 f2 â\89\98 f & ⫯f = g.
#g1 #g2 #g * -g1 -g2 -g
#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
/2 width=3 by ex2_intro/
qed-.
-lemma sand_inv_npx: â\88\80g1,g2,g. g1 â\8b\92 g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 →
- â\88\83â\88\83f. f1 â\8b\92 f2 â\89\98 f & â\86\91f = g.
+lemma sand_inv_npx: â\88\80g1,g2,g. g1 â\8b\92 g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 →
+ â\88\83â\88\83f. f1 â\8b\92 f2 â\89\98 f & ⫯f = g.
#g1 #g2 #g * -g1 -g2 -g
#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
/2 width=3 by ex2_intro/
qed-.
-lemma sand_inv_pnx: â\88\80g1,g2,g. g1 â\8b\92 g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 →
- â\88\83â\88\83f. f1 â\8b\92 f2 â\89\98 f & â\86\91f = g.
+lemma sand_inv_pnx: â\88\80g1,g2,g. g1 â\8b\92 g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 →
+ â\88\83â\88\83f. f1 â\8b\92 f2 â\89\98 f & ⫯f = g.
#g1 #g2 #g * -g1 -g2 -g
#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
/2 width=3 by ex2_intro/
qed-.
-lemma sand_inv_nnx: â\88\80g1,g2,g. g1 â\8b\92 g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 →
- â\88\83â\88\83f. f1 â\8b\92 f2 â\89\98 f & ⫯f = g.
+lemma sand_inv_nnx: â\88\80g1,g2,g. g1 â\8b\92 g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 →
+ â\88\83â\88\83f. f1 â\8b\92 f2 â\89\98 f & â\86\91f = g.
#g1 #g2 #g * -g1 -g2 -g
#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
(* RELOCATION MAP ***********************************************************)
coinductive sdj: relation rtmap ≝
-| sdj_pp: â\88\80f1,f2,g1,g2. sdj f1 f2 â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 → sdj g1 g2
-| sdj_np: â\88\80f1,f2,g1,g2. sdj f1 f2 â\86\92 ⫯f1 = g1 â\86\92 â\86\91f2 = g2 → sdj g1 g2
-| sdj_pn: â\88\80f1,f2,g1,g2. sdj f1 f2 â\86\92 â\86\91f1 = g1 â\86\92 ⫯f2 = g2 → sdj g1 g2
+| sdj_pp: â\88\80f1,f2,g1,g2. sdj f1 f2 â\86\92 ⫯f1 = g1 â\86\92 ⫯f2 = g2 → sdj g1 g2
+| sdj_np: â\88\80f1,f2,g1,g2. sdj f1 f2 â\86\92 â\86\91f1 = g1 â\86\92 ⫯f2 = g2 → sdj g1 g2
+| sdj_pn: â\88\80f1,f2,g1,g2. sdj f1 f2 â\86\92 ⫯f1 = g1 â\86\92 â\86\91f2 = g2 → sdj g1 g2
.
interpretation "disjointness (rtmap)"
(* Basic inversion lemmas ***************************************************)
-lemma sdj_inv_pp: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 → f1 ∥ f2.
+lemma sdj_inv_pp: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 → f1 ∥ f2.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
[ lapply (injective_push … Hx1) -Hx1
]
qed-.
-lemma sdj_inv_np: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 → f1 ∥ f2.
+lemma sdj_inv_np: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 → f1 ∥ f2.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
[ elim (discr_next_push … Hx1)
]
qed-.
-lemma sdj_inv_pn: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 → f1 ∥ f2.
+lemma sdj_inv_pn: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 → f1 ∥ f2.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
[ elim (discr_next_push … Hx2)
]
qed-.
-lemma sdj_inv_nn: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 → ⊥.
+lemma sdj_inv_nn: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 → ⊥.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
[ elim (discr_next_push … Hx1)
(* Advanced inversion lemmas ************************************************)
-lemma sdj_inv_nx: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1. ⫯f1 = g1 →
- â\88\83â\88\83f2. f1 â\88¥ f2 & â\86\91f2 = g2.
+lemma sdj_inv_nx: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1. â\86\91f1 = g1 →
+ â\88\83â\88\83f2. f1 â\88¥ f2 & ⫯f2 = g2.
#g1 #g2 elim (pn_split g2) * #f2 #H2 #H #f1 #H1
[ lapply (sdj_inv_np … H … H1 H2) -H /2 width=3 by ex2_intro/
| elim (sdj_inv_nn … H … H1 H2)
]
qed-.
-lemma sdj_inv_xn: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f2. ⫯f2 = g2 →
- â\88\83â\88\83f1. f1 â\88¥ f2 & â\86\91f1 = g1.
+lemma sdj_inv_xn: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f2. â\86\91f2 = g2 →
+ â\88\83â\88\83f1. f1 â\88¥ f2 & ⫯f1 = g1.
#g1 #g2 elim (pn_split g1) * #f1 #H1 #H #f2 #H2
[ lapply (sdj_inv_pn … H … H1 H2) -H /2 width=3 by ex2_intro/
| elim (sdj_inv_nn … H … H1 H2)
]
qed-.
-lemma sdj_inv_xp: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f2. â\86\91f2 = g2 →
- â\88¨â\88¨ â\88\83â\88\83f1. f1 â\88¥ f2 & â\86\91f1 = g1
- | â\88\83â\88\83f1. f1 â\88¥ f2 & ⫯f1 = g1.
+lemma sdj_inv_xp: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f2. ⫯f2 = g2 →
+ â\88¨â\88¨ â\88\83â\88\83f1. f1 â\88¥ f2 & ⫯f1 = g1
+ | â\88\83â\88\83f1. f1 â\88¥ f2 & â\86\91f1 = g1.
#g1 #g2 elim (pn_split g1) * #f1 #H1 #H #f2 #H2
[ lapply (sdj_inv_pp … H … H1 H2) | lapply (sdj_inv_np … H … H1 H2) ] -H -H2
/3 width=3 by ex2_intro, or_introl, or_intror/
qed-.
-lemma sdj_inv_px: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1. â\86\91f1 = g1 →
- â\88¨â\88¨ â\88\83â\88\83f2. f1 â\88¥ f2 & â\86\91f2 = g2
- | â\88\83â\88\83f2. f1 â\88¥ f2 & ⫯f2 = g2.
+lemma sdj_inv_px: â\88\80g1,g2. g1 â\88¥ g2 â\86\92 â\88\80f1. ⫯f1 = g1 →
+ â\88¨â\88¨ â\88\83â\88\83f2. f1 â\88¥ f2 & ⫯f2 = g2
+ | â\88\83â\88\83f2. f1 â\88¥ f2 & â\86\91f2 = g2.
#g1 #g2 elim (pn_split g2) * #f2 #H2 #H #f1 #H1
[ lapply (sdj_inv_pp … H … H1 H2) | lapply (sdj_inv_pn … H … H1 H2) ] -H -H1
/3 width=3 by ex2_intro, or_introl, or_intror/
(* RELOCATION MAP ***********************************************************)
coinductive sle: relation rtmap ≝
-| sle_push: â\88\80f1,f2,g1,g2. sle f1 f2 â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 → sle g1 g2
-| sle_next: â\88\80f1,f2,g1,g2. sle f1 f2 â\86\92 ⫯f1 = g1 â\86\92 ⫯f2 = g2 → sle g1 g2
-| sle_weak: â\88\80f1,f2,g1,g2. sle f1 f2 â\86\92 â\86\91f1 = g1 â\86\92 ⫯f2 = g2 → sle g1 g2
+| sle_push: â\88\80f1,f2,g1,g2. sle f1 f2 â\86\92 ⫯f1 = g1 â\86\92 ⫯f2 = g2 → sle g1 g2
+| sle_next: â\88\80f1,f2,g1,g2. sle f1 f2 â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 → sle g1 g2
+| sle_weak: â\88\80f1,f2,g1,g2. sle f1 f2 â\86\92 ⫯f1 = g1 â\86\92 â\86\91f2 = g2 → sle g1 g2
.
interpretation "inclusion (rtmap)"
[ @(sle_push … H H) | @(sle_next … H H) ] -H //
qed.
-lemma sle_refl_eq: â\88\80f1,f2. f1 â\89\97 f2 → f1 ⊆ f2.
+lemma sle_refl_eq: â\88\80f1,f2. f1 â\89¡ f2 → f1 ⊆ f2.
/2 width=3 by sle_eq_repl_back2/ qed.
(* Basic inversion lemmas ***************************************************)
-lemma sle_inv_xp: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f2. â\86\91f2 = g2 →
- â\88\83â\88\83f1. f1 â\8a\86 f2 & â\86\91f1 = g1.
+lemma sle_inv_xp: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f2. ⫯f2 = g2 →
+ â\88\83â\88\83f1. f1 â\8a\86 f2 & ⫯f1 = g1.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #H #H1 #H2 #x2 #Hx2 destruct
[ lapply (injective_push … Hx2) -Hx2 /2 width=3 by ex2_intro/ ]
elim (discr_push_next … Hx2)
qed-.
-lemma sle_inv_nx: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1. ⫯f1 = g1 →
- â\88\83â\88\83f2. f1 â\8a\86 f2 & ⫯f2 = g2.
+lemma sle_inv_nx: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1. â\86\91f1 = g1 →
+ â\88\83â\88\83f2. f1 â\8a\86 f2 & â\86\91f2 = g2.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #Hx1 destruct
[2: lapply (injective_next … Hx1) -Hx1 /2 width=3 by ex2_intro/ ]
elim (discr_next_push … Hx1)
qed-.
-lemma sle_inv_pn: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 → f1 ⊆ f2.
+lemma sle_inv_pn: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 → f1 ⊆ f2.
#g1 #g2 * -g1 -g2
#f1 #f2 #g1 #g2 #H #H1 #H2 #x1 #x2 #Hx1 #Hx2 destruct
[ elim (discr_next_push … Hx2)
(* Advanced inversion lemmas ************************************************)
-lemma sle_inv_pp: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 → f1 ⊆ f2.
+lemma sle_inv_pp: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 → f1 ⊆ f2.
#g1 #g2 #H #f1 #f2 #H1 #H2 elim (sle_inv_xp … H … H2) -g2
#x1 #H #Hx1 destruct lapply (injective_push … Hx1) -Hx1 //
qed-.
-lemma sle_inv_nn: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 → f1 ⊆ f2.
+lemma sle_inv_nn: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 → f1 ⊆ f2.
#g1 #g2 #H #f1 #f2 #H1 #H2 elim (sle_inv_nx … H … H1) -g1
#x2 #H #Hx2 destruct lapply (injective_next … Hx2) -Hx2 //
qed-.
-lemma sle_inv_px: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1. â\86\91f1 = g1 →
- (â\88\83â\88\83f2. f1 â\8a\86 f2 & â\86\91f2 = g2) â\88¨ â\88\83â\88\83f2. f1 â\8a\86 f2 & ⫯f2 = g2.
+lemma sle_inv_px: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1. ⫯f1 = g1 →
+ (â\88\83â\88\83f2. f1 â\8a\86 f2 & ⫯f2 = g2) â\88¨ â\88\83â\88\83f2. f1 â\8a\86 f2 & â\86\91f2 = g2.
#g1 #g2 elim (pn_split g2) * #f2 #H2 #H #f1 #H1
[ lapply (sle_inv_pp … H … H1 H2) | lapply (sle_inv_pn … H … H1 H2) ] -H -H1
/3 width=3 by ex2_intro, or_introl, or_intror/
qed-.
-lemma sle_inv_xn: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f2. ⫯f2 = g2 →
- (â\88\83â\88\83f1. f1 â\8a\86 f2 & â\86\91f1 = g1) â\88¨ â\88\83â\88\83f1. f1 â\8a\86 f2 & ⫯f1 = g1.
+lemma sle_inv_xn: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f2. â\86\91f2 = g2 →
+ (â\88\83â\88\83f1. f1 â\8a\86 f2 & ⫯f1 = g1) â\88¨ â\88\83â\88\83f1. f1 â\8a\86 f2 & â\86\91f1 = g1.
#g1 #g2 elim (pn_split g1) * #f1 #H1 #H #f2 #H2
[ lapply (sle_inv_pn … H … H1 H2) | lapply (sle_inv_nn … H … H1 H2) ] -H -H2
/3 width=3 by ex2_intro, or_introl, or_intror/
(* Properties with iteraded push ********************************************)
-lemma sle_pushs: â\88\80f1,f2. f1 â\8a\86 f2 â\86\92 â\88\80i. â\86\91*[i] f1 â\8a\86 â\86\91*[i] f2.
+lemma sle_pushs: â\88\80f1,f2. f1 â\8a\86 f2 â\86\92 â\88\80i. ⫯*[i] f1 â\8a\86 ⫯*[i] f2.
#f1 #f2 #Hf12 #i elim i -i /2 width=5 by sle_push/
qed.
(* Properties with tail *****************************************************)
-lemma sle_px_tl: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1. â\86\91f1 = g1 → f1 ⊆ ⫱g2.
+lemma sle_px_tl: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f1. ⫯f1 = g1 → f1 ⊆ ⫱g2.
#g1 #g2 #H #f1 #H1 elim (sle_inv_px … H … H1) -H -H1 * //
qed.
-lemma sle_xn_tl: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f2. ⫯f2 = g2 → ⫱g1 ⊆ f2.
+lemma sle_xn_tl: â\88\80g1,g2. g1 â\8a\86 g2 â\86\92 â\88\80f2. â\86\91f2 = g2 → ⫱g1 ⊆ f2.
#g1 #g2 #H #f2 #H2 elim (sle_inv_xn … H … H2) -H -H2 * //
qed.
(* Inversion lemmas with tail ***********************************************)
-lemma sle_inv_tl_sn: â\88\80f1,f2. ⫱f1 â\8a\86 f2 â\86\92 f1 â\8a\86 ⫯f2.
+lemma sle_inv_tl_sn: â\88\80f1,f2. ⫱f1 â\8a\86 f2 â\86\92 f1 â\8a\86 â\86\91f2.
#f1 elim (pn_split f1) * #g1 #H destruct
/2 width=5 by sle_next, sle_weak/
qed-.
-lemma sle_inv_tl_dx: â\88\80f1,f2. f1 â\8a\86 ⫱f2 â\86\92 â\86\91f1 ⊆ f2.
+lemma sle_inv_tl_dx: â\88\80f1,f2. f1 â\8a\86 ⫱f2 â\86\92 ⫯f1 ⊆ f2.
#f1 #f2 elim (pn_split f2) * #g2 #H destruct
/2 width=5 by sle_push, sle_weak/
qed-.
include "ground_2/relocation/rtmap_sle.ma".
coinductive sor: relation3 rtmap rtmap rtmap ≝
-| sor_pp: â\88\80f1,f2,f,g1,g2,g. sor f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → sor g1 g2 g
-| sor_np: â\88\80f1,f2,f,g1,g2,g. sor f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 ⫯f = g → sor g1 g2 g
-| sor_pn: â\88\80f1,f2,f,g1,g2,g. sor f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → sor g1 g2 g
-| sor_nn: â\88\80f1,f2,f,g1,g2,g. sor f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → sor g1 g2 g
+| sor_pp: â\88\80f1,f2,f,g1,g2,g. sor f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → sor g1 g2 g
+| sor_np: â\88\80f1,f2,f,g1,g2,g. sor f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 â\86\91f = g → sor g1 g2 g
+| sor_pn: â\88\80f1,f2,f,g1,g2,g. sor f1 f2 f â\86\92 ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → sor g1 g2 g
+| sor_nn: â\88\80f1,f2,f,g1,g2,g. sor f1 f2 f â\86\92 â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → sor g1 g2 g
.
interpretation "union (rtmap)"
(* Basic inversion lemmas ***************************************************)
-lemma sor_inv_ppx: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 →
- â\88\83â\88\83f. f1 â\8b\93 f2 â\89\98 f & â\86\91f = g.
+lemma sor_inv_ppx: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 →
+ â\88\83â\88\83f. f1 â\8b\93 f2 â\89\98 f & ⫯f = g.
#g1 #g2 #g * -g1 -g2 -g
#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
/2 width=3 by ex2_intro/
qed-.
-lemma sor_inv_npx: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 →
- â\88\83â\88\83f. f1 â\8b\93 f2 â\89\98 f & ⫯f = g.
+lemma sor_inv_npx: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 →
+ â\88\83â\88\83f. f1 â\8b\93 f2 â\89\98 f & â\86\91f = g.
#g1 #g2 #g * -g1 -g2 -g
#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
/2 width=3 by ex2_intro/
qed-.
-lemma sor_inv_pnx: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 →
- â\88\83â\88\83f. f1 â\8b\93 f2 â\89\98 f & ⫯f = g.
+lemma sor_inv_pnx: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 →
+ â\88\83â\88\83f. f1 â\8b\93 f2 â\89\98 f & â\86\91f = g.
#g1 #g2 #g * -g1 -g2 -g
#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
/2 width=3 by ex2_intro/
qed-.
-lemma sor_inv_nnx: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f1,f2. ⫯f1 = g1 â\86\92 ⫯f2 = g2 →
- â\88\83â\88\83f. f1 â\8b\93 f2 â\89\98 f & ⫯f = g.
+lemma sor_inv_nnx: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f1,f2. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 →
+ â\88\83â\88\83f. f1 â\8b\93 f2 â\89\98 f & â\86\91f = g.
#g1 #g2 #g * -g1 -g2 -g
#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #x1 #x2 #Hx1 #Hx2 destruct
try (>(injective_push … Hx1) -x1) try (>(injective_next … Hx1) -x1)
(* Advanced inversion lemmas ************************************************)
lemma sor_inv_ppn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 ⫯f = g → ⊥.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 â\86\91f = g → ⊥.
#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
elim (sor_inv_ppx … H … H1 H2) -g1 -g2 #x #_ #H destruct
/2 width=3 by discr_push_next/
qed-.
lemma sor_inv_nxp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f1,f. ⫯f1 = g1 â\86\92 â\86\91f = g → ⊥.
+ â\88\80f1,f. â\86\91f1 = g1 â\86\92 ⫯f = g → ⊥.
#g1 #g2 #g #H #f1 #f #H1 #H0
elim (pn_split g2) * #f2 #H2
[ elim (sor_inv_npx … H … H1 H2)
qed-.
lemma sor_inv_xnp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f2,f. ⫯f2 = g2 â\86\92 â\86\91f = g → ⊥.
+ â\88\80f2,f. â\86\91f2 = g2 â\86\92 ⫯f = g → ⊥.
#g1 #g2 #g #H #f2 #f #H2 #H0
elim (pn_split g1) * #f1 #H1
[ elim (sor_inv_pnx … H … H1 H2)
qed-.
lemma sor_inv_ppp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → f1 ⋓ f2 ≘ f.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → f1 ⋓ f2 ≘ f.
#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
elim (sor_inv_ppx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
<(injective_push … H) -f //
qed-.
lemma sor_inv_npn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 ⫯f = g → f1 ⋓ f2 ≘ f.
+ â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 â\86\91f = g → f1 ⋓ f2 ≘ f.
#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
elim (sor_inv_npx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
<(injective_next … H) -f //
qed-.
lemma sor_inv_pnn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → f1 ⋓ f2 ≘ f.
+ â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → f1 ⋓ f2 ≘ f.
#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
elim (sor_inv_pnx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
<(injective_next … H) -f //
qed-.
lemma sor_inv_nnn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f1,f2,f. ⫯f1 = g1 â\86\92 ⫯f2 = g2 â\86\92 ⫯f = g → f1 ⋓ f2 ≘ f.
+ â\88\80f1,f2,f. â\86\91f1 = g1 â\86\92 â\86\91f2 = g2 â\86\92 â\86\91f = g → f1 ⋓ f2 ≘ f.
#g1 #g2 #g #H #f1 #f2 #f #H1 #H2 #H0
elim (sor_inv_nnx … H … H1 H2) -g1 -g2 #x #Hx #H destruct
<(injective_next … H) -f //
qed-.
lemma sor_inv_pxp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f1,f. â\86\91f1 = g1 â\86\92 â\86\91f = g →
- â\88\83â\88\83f2. f1 â\8b\93 f2 â\89\98 f & â\86\91f2 = g2.
+ â\88\80f1,f. ⫯f1 = g1 â\86\92 ⫯f = g →
+ â\88\83â\88\83f2. f1 â\8b\93 f2 â\89\98 f & ⫯f2 = g2.
#g1 #g2 #g #H #f1 #f #H1 #H0
elim (pn_split g2) * #f2 #H2
[ /3 width=7 by sor_inv_ppp, ex2_intro/
qed-.
lemma sor_inv_xpp: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f2,f. â\86\91f2 = g2 â\86\92 â\86\91f = g →
- â\88\83â\88\83f1. f1 â\8b\93 f2 â\89\98 f & â\86\91f1 = g1.
+ â\88\80f2,f. ⫯f2 = g2 â\86\92 ⫯f = g →
+ â\88\83â\88\83f1. f1 â\8b\93 f2 â\89\98 f & ⫯f1 = g1.
#g1 #g2 #g #H #f2 #f #H2 #H0
elim (pn_split g1) * #f1 #H1
[ /3 width=7 by sor_inv_ppp, ex2_intro/
qed-.
lemma sor_inv_pxn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f1,f. â\86\91f1 = g1 â\86\92 ⫯f = g →
- â\88\83â\88\83f2. f1 â\8b\93 f2 â\89\98 f & ⫯f2 = g2.
+ â\88\80f1,f. ⫯f1 = g1 â\86\92 â\86\91f = g →
+ â\88\83â\88\83f2. f1 â\8b\93 f2 â\89\98 f & â\86\91f2 = g2.
#g1 #g2 #g #H #f1 #f #H1 #H0
elim (pn_split g2) * #f2 #H2
[ elim (sor_inv_ppn … H … H1 H2 H0)
qed-.
lemma sor_inv_xpn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f2,f. â\86\91f2 = g2 â\86\92 ⫯f = g →
- â\88\83â\88\83f1. f1 â\8b\93 f2 â\89\98 f & ⫯f1 = g1.
+ â\88\80f2,f. ⫯f2 = g2 â\86\92 â\86\91f = g →
+ â\88\83â\88\83f1. f1 â\8b\93 f2 â\89\98 f & â\86\91f1 = g1.
#g1 #g2 #g #H #f2 #f #H2 #H0
elim (pn_split g1) * #f1 #H1
[ elim (sor_inv_ppn … H … H1 H2 H0)
]
qed-.
-lemma sor_inv_xxp: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f. â\86\91f = g →
- â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & â\86\91f1 = g1 & â\86\91f2 = g2.
+lemma sor_inv_xxp: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f. ⫯f = g →
+ â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & ⫯f1 = g1 & ⫯f2 = g2.
#g1 #g2 #g #H #f #H0
elim (pn_split g1) * #f1 #H1
[ elim (sor_inv_pxp … H … H1 H0) -g /2 width=5 by ex3_2_intro/
qed-.
lemma sor_inv_nxn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f1,f. ⫯f1 = g1 â\86\92 ⫯f = g →
- (â\88\83â\88\83f2. f1 â\8b\93 f2 â\89\98 f & â\86\91f2 = g2) ∨
- â\88\83â\88\83f2. f1 â\8b\93 f2 â\89\98 f & ⫯f2 = g2.
+ â\88\80f1,f. â\86\91f1 = g1 â\86\92 â\86\91f = g →
+ (â\88\83â\88\83f2. f1 â\8b\93 f2 â\89\98 f & ⫯f2 = g2) ∨
+ â\88\83â\88\83f2. f1 â\8b\93 f2 â\89\98 f & â\86\91f2 = g2.
#g1 #g2 elim (pn_split g2) *
/4 width=7 by sor_inv_npn, sor_inv_nnn, ex2_intro, or_intror, or_introl/
qed-.
lemma sor_inv_xnn: ∀g1,g2,g. g1 ⋓ g2 ≘ g →
- â\88\80f2,f. ⫯f2 = g2 â\86\92 ⫯f = g →
- (â\88\83â\88\83f1. f1 â\8b\93 f2 â\89\98 f & â\86\91f1 = g1) ∨
- â\88\83â\88\83f1. f1 â\8b\93 f2 â\89\98 f & ⫯f1 = g1.
+ â\88\80f2,f. â\86\91f2 = g2 â\86\92 â\86\91f = g →
+ (â\88\83â\88\83f1. f1 â\8b\93 f2 â\89\98 f & ⫯f1 = g1) ∨
+ â\88\83â\88\83f1. f1 â\8b\93 f2 â\89\98 f & â\86\91f1 = g1.
#g1 elim (pn_split g1) *
/4 width=7 by sor_inv_pnn, sor_inv_nnn, ex2_intro, or_intror, or_introl/
qed-.
-lemma sor_inv_xxn: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f. ⫯f = g →
- â\88¨â\88¨ â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & ⫯f1 = g1 & â\86\91f2 = g2
- | â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & â\86\91f1 = g1 & ⫯f2 = g2
- | â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & ⫯f1 = g1 & ⫯f2 = g2.
+lemma sor_inv_xxn: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f. â\86\91f = g →
+ â\88¨â\88¨ â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & â\86\91f1 = g1 & ⫯f2 = g2
+ | â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & ⫯f1 = g1 & â\86\91f2 = g2
+ | â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & â\86\91f1 = g1 & â\86\91f2 = g2.
#g1 #g2 #g #H #f #H0
elim (pn_split g1) * #f1 #H1
[ elim (sor_inv_pxn … H … H1 H0) -g
(* Main inversion lemmas ****************************************************)
-corec theorem sor_mono: â\88\80f1,f2,x,y. f1 â\8b\93 f2 â\89\98 x â\86\92 f1 â\8b\93 f2 â\89\98 y â\86\92 x â\89\97 y.
+corec theorem sor_mono: â\88\80f1,f2,x,y. f1 â\8b\93 f2 â\89\98 x â\86\92 f1 â\8b\93 f2 â\89\98 y â\86\92 x â\89¡ y.
#f1 #f2 #x #y * -f1 -f2 -x
#f1 #f2 #f #g1 #g2 #g #Hf #H1 #H2 #H0 #H
[ cases (sor_inv_ppx … H … H1 H2)
] -Hf #g #Hg #H destruct //
qed.
-lemma sor_xxn_tl: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f. ⫯f = g →
- (â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & ⫯f1 = g1 & ⫱g2 = f2) ∨
- (â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & ⫱g1 = f1 & ⫯f2 = g2).
+lemma sor_xxn_tl: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f. â\86\91f = g →
+ (â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & â\86\91f1 = g1 & ⫱g2 = f2) ∨
+ (â\88\83â\88\83f1,f2. f1 â\8b\93 f2 â\89\98 f & ⫱g1 = f1 & â\86\91f2 = g2).
#g1 #g2 #g #H #f #H0 elim (sor_inv_xxn … H … H0) -H -H0 *
/3 width=5 by ex3_2_intro, or_introl, or_intror/
qed-.
-lemma sor_xnx_tl: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f2. ⫯f2 = g2 →
- â\88\83â\88\83f1,f. f1 â\8b\93 f2 â\89\98 f & ⫱g1 = f1 & ⫯f = g.
+lemma sor_xnx_tl: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f2. â\86\91f2 = g2 →
+ â\88\83â\88\83f1,f. f1 â\8b\93 f2 â\89\98 f & ⫱g1 = f1 & â\86\91f = g.
#g1 elim (pn_split g1) * #f1 #H1 #g2 #g #H #f2 #H2
[ elim (sor_inv_pnx … H … H1 H2) | elim (sor_inv_nnx … H … H1 H2) ] -g2
/3 width=5 by ex3_2_intro/
qed-.
-lemma sor_nxx_tl: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f1. ⫯f1 = g1 →
- â\88\83â\88\83f2,f. f1 â\8b\93 f2 â\89\98 f & ⫱g2 = f2 & ⫯f = g.
+lemma sor_nxx_tl: â\88\80g1,g2,g. g1 â\8b\93 g2 â\89\98 g â\86\92 â\88\80f1. â\86\91f1 = g1 →
+ â\88\83â\88\83f2,f. f1 â\8b\93 f2 â\89\98 f & ⫱g2 = f2 & â\86\91f = g.
#g1 #g2 elim (pn_split g2) * #f2 #H2 #g #H #f1 #H1
[ elim (sor_inv_npx … H … H1 H2) | elim (sor_inv_nnx … H … H1 H2) ] -g1
/3 width=5 by ex3_2_intro/
(* Inversion lemmas with tail ***********************************************)
-lemma sor_inv_tl_sn: â\88\80f1,f2,f. ⫱f1 â\8b\93 f2 â\89\98 f â\86\92 f1 â\8b\93 ⫯f2 â\89\98 ⫯f.
+lemma sor_inv_tl_sn: â\88\80f1,f2,f. ⫱f1 â\8b\93 f2 â\89\98 f â\86\92 f1 â\8b\93 â\86\91f2 â\89\98 â\86\91f.
#f1 #f2 #f elim (pn_split f1) *
#g1 #H destruct /2 width=7 by sor_pn, sor_nn/
qed-.
-lemma sor_inv_tl_dx: â\88\80f1,f2,f. f1 â\8b\93 ⫱f2 â\89\98 f â\86\92 ⫯f1 â\8b\93 f2 â\89\98 ⫯f.
+lemma sor_inv_tl_dx: â\88\80f1,f2,f. f1 â\8b\93 ⫱f2 â\89\98 f â\86\92 â\86\91f1 â\8b\93 f2 â\89\98 â\86\91f.
#f1 #f2 #f elim (pn_split f2) *
#g2 #H destruct /2 width=7 by sor_np, sor_nn/
qed-.
(* Inversion lemmas with test for identity **********************************)
-lemma sor_isid_inv_sn: â\88\80f1,f2,f. f1 â\8b\93 f2 â\89\98 f â\86\92 ð\9d\90\88â¦\83f1â¦\84 â\86\92 f2 â\89\97 f.
+lemma sor_isid_inv_sn: â\88\80f1,f2,f. f1 â\8b\93 f2 â\89\98 f â\86\92 ð\9d\90\88â¦\83f1â¦\84 â\86\92 f2 â\89¡ f.
/3 width=4 by sor_isid_sn, sor_mono/
qed-.
-lemma sor_isid_inv_dx: â\88\80f1,f2,f. f1 â\8b\93 f2 â\89\98 f â\86\92 ð\9d\90\88â¦\83f2â¦\84 â\86\92 f1 â\89\97 f.
+lemma sor_isid_inv_dx: â\88\80f1,f2,f. f1 â\8b\93 f2 â\89\98 f â\86\92 ð\9d\90\88â¦\83f2â¦\84 â\86\92 f1 â\89¡ f.
/3 width=4 by sor_isid_dx, sor_mono/
qed-.
lemma tl_rew: ∀f. case_type0 (λ_:rtmap.rtmap) (λf:rtmap.f) (λf:rtmap.f) f = ⫱f.
// qed.
-lemma tl_push_rew: â\88\80f. f = ⫱â\86\91f.
+lemma tl_push_rew: â\88\80f. f = ⫱⫯f.
#f <tl_rew <iota_push //
qed.
-lemma tl_next_rew: â\88\80f. f = ⫱⫯f.
+lemma tl_next_rew: â\88\80f. f = ⫱â\86\91f.
#f <tl_rew <iota_next //
qed.
-lemma tl_eq_repl: eq_repl â\80¦ (λf1,f2. ⫱f1 â\89\97 ⫱f2).
+lemma tl_eq_repl: eq_repl â\80¦ (λf1,f2. ⫱f1 â\89¡ ⫱f2).
#f1 #f2 * -f1 -f2 //
qed.
lemma tls_O: ∀f. f = ⫱*[0] f.
// qed.
-lemma tls_S: â\88\80f,n. ⫱ ⫱*[n] f = ⫱*[⫯n] f.
+lemma tls_S: â\88\80f,n. ⫱ ⫱*[n] f = ⫱*[â\86\91n] f.
// qed.
-lemma tls_eq_repl: â\88\80n. eq_repl (λf1,f2. ⫱*[n] f1 â\89\97 ⫱*[n] f2).
+lemma tls_eq_repl: â\88\80n. eq_repl (λf1,f2. ⫱*[n] f1 â\89¡ ⫱*[n] f2).
#n elim n -n /3 width=1 by tl_eq_repl/
qed.
(* Advanced properties ******************************************************)
-lemma tls_xn: â\88\80n,f. ⫱*[n] ⫱f = ⫱*[⫯n] f.
+lemma tls_xn: â\88\80n,f. ⫱*[n] ⫱f = ⫱*[â\86\91n] f.
#n elim n -n //
qed.
(* Properties with pushs ****************************************************)
-lemma tls_pushs: â\88\80n,f. f = ⫱*[n] â\86\91*[n] f.
+lemma tls_pushs: â\88\80n,f. f = ⫱*[n] ⫯*[n] f.
#n elim n -n //
#n #IH #f <tls_xn //
qed.
rec definition uni (n:nat) on n: rtmap ≝ match n with
[ O ⇒ 𝐈𝐝
-| S n â\87\92 ⫯(uni n)
+| S n â\87\92 â\86\91(uni n)
].
interpretation "uniform relocation (rtmap)"
lemma uni_zero: 𝐈𝐝 = 𝐔❴0❵.
// qed.
-lemma uni_succ: â\88\80n. ⫯ð\9d\90\94â\9d´nâ\9dµ = ð\9d\90\94â\9d´â«¯n❵.
+lemma uni_succ: â\88\80n. â\86\91ð\9d\90\94â\9d´nâ\9dµ = ð\9d\90\94â\9d´â\86\91n❵.
// qed.
(* Basic inversion lemmas ***************************************************)
-lemma uni_inv_push_dx: â\88\80f,n. ð\9d\90\94â\9d´nâ\9dµ â\89\97 â\86\91f â\86\92 0 = n â\88§ ð\9d\90\88ð\9d\90\9d â\89\97 f.
+lemma uni_inv_push_dx: â\88\80f,n. ð\9d\90\94â\9d´nâ\9dµ â\89¡ ⫯f â\86\92 0 = n â\88§ ð\9d\90\88ð\9d\90\9d â\89¡ f.
#f * /3 width=5 by eq_inv_pp, conj/
#n <uni_succ #H elim (eq_inv_np … H) -H //
qed-.
-lemma uni_inv_push_sn: â\88\80f,n. â\86\91f â\89\97 ð\9d\90\94â\9d´nâ\9dµ â\86\92 0 = n â\88§ ð\9d\90\88ð\9d\90\9d â\89\97 f.
+lemma uni_inv_push_sn: â\88\80f,n. ⫯f â\89¡ ð\9d\90\94â\9d´nâ\9dµ â\86\92 0 = n â\88§ ð\9d\90\88ð\9d\90\9d â\89¡ f.
/3 width=1 by uni_inv_push_dx, eq_sym/ qed-.
-lemma uni_inv_id_dx: â\88\80n. ð\9d\90\94â\9d´nâ\9dµ â\89\97 𝐈𝐝 → 0 = n.
+lemma uni_inv_id_dx: â\88\80n. ð\9d\90\94â\9d´nâ\9dµ â\89¡ 𝐈𝐝 → 0 = n.
#n <id_rew #H elim (uni_inv_push_dx … H) -H //
qed-.
-lemma uni_inv_id_sn: â\88\80n. ð\9d\90\88ð\9d\90\9d â\89\97 𝐔❴n❵ → 0 = n.
+lemma uni_inv_id_sn: â\88\80n. ð\9d\90\88ð\9d\90\9d â\89¡ 𝐔❴n❵ → 0 = n.
/3 width=1 by uni_inv_id_dx, eq_sym/ qed-.
-lemma uni_inv_next_dx: â\88\80f,n. ð\9d\90\94â\9d´nâ\9dµ â\89\97 ⫯f â\86\92 â\88\83â\88\83m. ð\9d\90\94â\9d´mâ\9dµ â\89\97 f & ⫯m = n.
+lemma uni_inv_next_dx: â\88\80f,n. ð\9d\90\94â\9d´nâ\9dµ â\89¡ â\86\91f â\86\92 â\88\83â\88\83m. ð\9d\90\94â\9d´mâ\9dµ â\89¡ f & â\86\91m = n.
#f *
[ <uni_zero <id_rew #H elim (eq_inv_pn … H) -H //
| #n <uni_succ /3 width=5 by eq_inv_nn, ex2_intro/
]
qed-.
-lemma uni_inv_next_sn: â\88\80f,n. ⫯f â\89\97 ð\9d\90\94â\9d´nâ\9dµ â\86\92 â\88\83â\88\83m. ð\9d\90\94â\9d´mâ\9dµ â\89\97 f & ⫯m = n.
+lemma uni_inv_next_sn: â\88\80f,n. â\86\91f â\89¡ ð\9d\90\94â\9d´nâ\9dµ â\86\92 â\88\83â\88\83m. ð\9d\90\94â\9d´mâ\9dµ â\89¡ f & â\86\91m = n.
/3 width=1 by uni_inv_next_dx, eq_sym/ qed-.
(* Properties with test for identity ****************************************)
-lemma uni_isid: â\88\80f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 ð\9d\90\94â\9d´0â\9dµ â\89\97 f.
+lemma uni_isid: â\88\80f. ð\9d\90\88â¦\83fâ¦\84 â\86\92 ð\9d\90\94â\9d´0â\9dµ â\89¡ f.
/2 width=1 by eq_id_inv_isid/ qed-.
(* Inversion lemmas with test for identity **********************************)
-lemma uni_inv_isid: â\88\80f. ð\9d\90\94â\9d´0â\9dµ â\89\97 f → 𝐈⦃f⦄.
+lemma uni_inv_isid: â\88\80f. ð\9d\90\94â\9d´0â\9dµ â\89¡ f → 𝐈⦃f⦄.
/2 width=1 by eq_id_isid/ qed-.
(* Properties with finite colength assignment ***************************)
#n elim n -n /3 width=3 by isuni_isid, isuni_next/
qed.
-lemma uni_isuni: â\88\80f. ð\9d\90\94â¦\83fâ¦\84 â\86\92 â\88\83n. ð\9d\90\94â\9d´nâ\9dµ â\89\97 f.
+lemma uni_isuni: â\88\80f. ð\9d\90\94â¦\83fâ¦\84 â\86\92 â\88\83n. ð\9d\90\94â\9d´nâ\9dµ â\89¡ f.
#f #H elim H -f /3 width=2 by uni_isid, ex_intro/
#f #_ #g #H * /3 width=6 by eq_next, ex_intro/
qed-.
(* Inversion lemmas with test for uniformity ********************************)
-lemma uni_inv_isuni: â\88\80n,f. ð\9d\90\94â\9d´nâ\9dµ â\89\97 f → 𝐔⦃f⦄.
+lemma uni_inv_isuni: â\88\80n,f. ð\9d\90\94â\9d´nâ\9dµ â\89¡ f → 𝐔⦃f⦄.
#n elim n -n /3 width=1 by uni_inv_isid, isuni_isid/
#n #IH #x <uni_succ #H elim (eq_inv_nx … H) -H /3 width=3 by isuni_next/
qed-.
(* Properties with shift ****************************************************)
-lemma max_shift: â\88\80c1,c2. ((â\86\93c1) â\88¨ (â\86\93c2)) = â\86\93(c1∨c2).
+lemma max_shift: â\88\80c1,c2. ((â\86\95*c1) â\88¨ (â\86\95*c2)) = â\86\95*(c1∨c2).
* #ri1 #rs1 #ti1 #ts1 * #ri2 #rs2 #ti2 #ts2
<shift_rew <shift_rew <shift_rew <max_rew //
qed.
#n #c1 #c2 #H1 #H2 >(plus_n_O n) /2 width=1 by isrt_plus/
qed.
-lemma isrt_succ: â\88\80n,c. ð\9d\90\91ð\9d\90\93â¦\83n, câ¦\84 â\86\92 ð\9d\90\91ð\9d\90\93â¦\83⫯n, c+𝟘𝟙⦄.
+lemma isrt_succ: â\88\80n,c. ð\9d\90\91ð\9d\90\93â¦\83n, câ¦\84 â\86\92 ð\9d\90\91ð\9d\90\93â¦\83â\86\91n, c+𝟘𝟙⦄.
/2 width=1 by isrt_plus/ qed.
(* Inversion properties with test for constrained rt-transition counter *****)
qed-.
lemma isrt_inv_plus_SO_dx: ∀n,c1,c2. 𝐑𝐓⦃n, c1 + c2⦄ → 𝐑𝐓⦃1, c2⦄ →
- â\88\83â\88\83m. ð\9d\90\91ð\9d\90\93â¦\83m, c1â¦\84 & n = ⫯m.
+ â\88\83â\88\83m. ð\9d\90\91ð\9d\90\93â¦\83m, c1â¦\84 & n = â\86\91m.
#n #c1 #c2 #H #H2
elim (isrt_inv_plus … H) -H #n1 #n2 #Hn1 #Hn2 #H destruct
lapply (isrt_inj … Hn2 H2) -c2 #H destruct
(* *)
(**************************************************************************)
-include "ground_2/notation/functions/drop_1.ma".
+include "ground_2/notation/functions/updownarrowstar_1.ma".
include "ground_2/steps/rtc_isrt.ma".
(* RT-TRANSITION COUNTER ****************************************************)
[ mk_rtc ri rs ti ts ⇒ 〈ri∨rs, 0, ti∨ts, 0〉 ].
interpretation "shift (rtc)"
- 'Drop c = (shift c).
+ 'UpDownArrowStar c = (shift c).
(* Basic properties *********************************************************)
-lemma shift_rew: â\88\80ri,rs,ti,ts. â\8c©riâ\88¨rs, 0, tiâ\88¨ts, 0â\8cª = â\86\93〈ri, rs, ti, ts〉.
+lemma shift_rew: â\88\80ri,rs,ti,ts. â\8c©riâ\88¨rs, 0, tiâ\88¨ts, 0â\8cª = â\86\95*〈ri, rs, ti, ts〉.
normalize //
qed.
-lemma shift_O: ð\9d\9f\98ð\9d\9f\98 = â\86\93𝟘𝟘.
+lemma shift_O: ð\9d\9f\98ð\9d\9f\98 = â\86\95*𝟘𝟘.
// qed.
(* Basic inversion properties ***********************************************)
-lemma shift_inv_dx: â\88\80ri,rs,ti,ts,c. â\8c©ri, rs, ti, tsâ\8cª = â\86\93c →
+lemma shift_inv_dx: â\88\80ri,rs,ti,ts,c. â\8c©ri, rs, ti, tsâ\8cª = â\86\95*c →
∃∃ri0,rs0,ti0,ts0. (ri0∨rs0) = ri & 0 = rs & (ti0∨ts0) = ti & 0 = ts &
〈ri0, rs0, ti0, ts0〉 = c.
#ri #rs #ti #ts * #ri0 #rs0 #ti0 #ts0 <shift_rew #H destruct
(* Properties with test for costrained rt-transition counter ****************)
-lemma isr_shift: â\88\80c. ð\9d\90\91ð\9d\90\93â¦\830, câ¦\84 â\86\92 ð\9d\90\91ð\9d\90\93â¦\830, â\86\93c⦄.
+lemma isr_shift: â\88\80c. ð\9d\90\91ð\9d\90\93â¦\830, câ¦\84 â\86\92 ð\9d\90\91ð\9d\90\93â¦\830, â\86\95*c⦄.
#c * #ri #rs #H destruct /2 width=3 by ex1_2_intro/
qed.
(* Inversion properties with test for costrained rt-counter *****************)
-lemma isrt_inv_shift: â\88\80n,c. ð\9d\90\91ð\9d\90\93â¦\83n, â\86\93c⦄ → 𝐑𝐓⦃0, c⦄ ∧ 0 = n.
+lemma isrt_inv_shift: â\88\80n,c. ð\9d\90\91ð\9d\90\93â¦\83n, â\86\95*c⦄ → 𝐑𝐓⦃0, c⦄ ∧ 0 = n.
#n #c * #ri #rs #H
elim (shift_inv_dx … H) -H #rt0 #rs0 #ti0 #ts0 #_ #_ #H1 #H2 #H3
elim (max_inv_O3 … H1) -H1 /3 width=3 by ex1_2_intro, conj/
qed-.
-lemma isr_inv_shift: â\88\80c. ð\9d\90\91ð\9d\90\93â¦\830, â\86\93c⦄ → 𝐑𝐓⦃0, c⦄.
+lemma isr_inv_shift: â\88\80c. ð\9d\90\91ð\9d\90\93â¦\830, â\86\95*c⦄ → 𝐑𝐓⦃0, c⦄.
#c #H elim (isrt_inv_shift … H) -H //
qed-.
class "water"
[ { "generic rt-transition counter" * } {
[ { "" * } {
- [ "rtc ( â\8c©?,?,?,?â\8cª ) ( ð\9d\9f\98ð\9d\9f\98 ) ( ð\9d\9f\99ð\9d\9f\98 ) ( ð\9d\9f\98ð\9d\9f\99 )" "rtc_isrc ( ð\9d\90\91ð\9d\90\93â¦\83?, ?â¦\84 )" "rtc_shift ( â\86\93? )" "rtc_max ( ? ∨ ? )" "rtc_plus ( ? + ? )" * ]
+ [ "rtc ( â\8c©?,?,?,?â\8cª ) ( ð\9d\9f\98ð\9d\9f\98 ) ( ð\9d\9f\99ð\9d\9f\98 ) ( ð\9d\9f\98ð\9d\9f\99 )" "rtc_isrc ( ð\9d\90\91ð\9d\90\93â¦\83?, ?â¦\84 )" "rtc_shift ( â\86\95*? )" "rtc_max ( ? ∨ ? )" "rtc_plus ( ? + ? )" * ]
}
]
}
class "green"
[ { "multiple relocation" * } {
[ { "" * } {
- [ "rtmap" "rtmap_eq ( ? â\89\97 ? )" "rtmap_pushs ( â\86\91*[?]? )" "rtmap_nexts ( ⫯*[?]? )"
+ [ "rtmap" "rtmap_eq ( ? â\89¡ ? )" "rtmap_pushs ( ⫯*[?]? )" "rtmap_nexts ( â\86\91*[?]? )"
"rtmap_tl ( ⫱? )" "rtmap_tls ( ⫱*[?]? )" "rtmap_isid ( 𝐈⦃?⦄ )" "rtmap_id" "rtmap_isdiv ( 𝛀⦃?⦄ )"
"rtmap_fcla ( 𝐂⦃?⦄ ≘ ? )" "rtmap_isfin ( 𝐅⦃?⦄ )" "rtmap_isuni ( 𝐔⦃?⦄ )" "rtmap_uni ( 𝐔❴?❵ )"
"rtmap_sle ( ? ⊆ ? )" "rtmap_sdj ( ? ∥ ? )" "rtmap_sand ( ? ⋒ ? ≘ ? )" "rtmap_sor ( ? ⋓ ? ≘ ? )"
"rtmap_at ( @⦃?,?⦄ ≘ ? )" "rtmap_istot ( 𝐓⦃?⦄ )" "rtmap_after ( ? ⊚ ? ≘ ? )" "rtmap_coafter ( ? ~⊚ ? ≘ ? )"
* ]
- [ "nstream ( â\86\91? ) ( ⫯? )" "nstream_eq" "" "" "" "" "nstream_isid" "nstream_id ( 𝐈𝐝 )" ""
+ [ "nstream ( ⫯? ) ( â\86\91? )" "nstream_eq" "" "" "" "" "nstream_isid" "nstream_id ( 𝐈𝐝 )" ""
"" "" "" "" "" "" "" "nstream_sor" "" "nstream_istot ( ?@❴?❵ )" "nstream_after ( ? ∘ ? )" "nstream_coafter ( ? ~∘ ? )"
* ]
(*
class "grass"
[ { "natural numbers with infinity" * } {
[ { "" * } {
- [ "ynat ( â\88\9e )" "ynat_pred ( â«°? )" "ynat_succ ( ⫯? )"
+ [ "ynat ( â\88\9e )" "ynat_pred ( â\86\93? )" "ynat_succ ( â\86\91? )"
"ynat_le ( ? ≤ ? )" "ynat_lt ( ? < ? )"
"ynat_plus ( ? + ? )" *
]
class "yellow"
[ { "extensions to the library" * } {
[ { "" * } {
- [ "stream ( ? @ ? )" "stream_eq ( ? â\89\90 ? )" "stream_hdtl ( â\86\93? )" "stream_tls ( â\86\93*[?]? )" * ]
+ [ "stream ( ? @ ? )" "stream_eq ( ? â\89\97 ? )" "stream_hdtl ( â«°? )" "stream_tls ( â«°*[?]? )" * ]
[ "list ( ◊ ) ( ? @ ? ) ( |?| )" "list2 ( ◊ ) ( {?,?} @ ? ) ( ? @@ ? ) ( |?| )" * ]
- [ "bool ( â\92» ) ( â\93\89 )" "arith ( ?^? ) ( ⫯? ) ( â«°? ) ( ? ∨ ? ) ( ? ∧ ? )" * ]
+ [ "bool ( â\92» ) ( â\93\89 )" "arith ( ?^? ) ( â\86\91? ) ( â\86\93? ) ( ? ∨ ? ) ( ? ∧ ? )" * ]
[ "relations ( ? ⊆ ? )" "star" "lstar" * ]
}
]
(* Inversion lemmas on successor ********************************************)
-fact yle_inv_succ1_aux: â\88\80x,y:ynat. x â\89¤ y â\86\92 â\88\80m. x = ⫯m â\86\92 m â\89¤ â«°y â\88§ ⫯⫰y = y.
+fact yle_inv_succ1_aux: â\88\80x,y:ynat. x â\89¤ y â\86\92 â\88\80m. x = â\86\91m â\86\92 m â\89¤ â\86\93y â\88§ â\86\91â\86\93y = y.
#x #y * -x -y
[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H
#n #H1 #H2 destruct elim (le_inv_S1 … Hxy) -Hxy
]
qed-.
-lemma yle_inv_succ1: â\88\80m,y:ynat. ⫯m â\89¤ y â\86\92 m â\89¤ â«°y â\88§ ⫯⫰y = y.
+lemma yle_inv_succ1: â\88\80m,y:ynat. â\86\91m â\89¤ y â\86\92 m â\89¤ â\86\93y â\88§ â\86\91â\86\93y = y.
/2 width=3 by yle_inv_succ1_aux/ qed-.
-lemma yle_inv_succ: â\88\80m,n. ⫯m â\89¤ ⫯n → m ≤ n.
+lemma yle_inv_succ: â\88\80m,n. â\86\91m â\89¤ â\86\91n → m ≤ n.
#m #n #H elim (yle_inv_succ1 … H) -H //
qed-.
-lemma yle_inv_succ2: â\88\80x,y. x â\89¤ ⫯y â\86\92 â«°x ≤ y.
+lemma yle_inv_succ2: â\88\80x,y. x â\89¤ â\86\91y â\86\92 â\86\93x ≤ y.
#x #y #Hxy elim (ynat_cases x)
[ #H destruct //
| * #m #H destruct /2 width=1 by yle_inv_succ/
(* Properties on predecessor ************************************************)
-lemma yle_pred_sn: â\88\80m,n. m â\89¤ n â\86\92 â«°m ≤ n.
+lemma yle_pred_sn: â\88\80m,n. m â\89¤ n â\86\92 â\86\93m ≤ n.
#m #n * -m -n /3 width=3 by transitive_le, yle_inj/
qed.
-lemma yle_refl_pred_sn: â\88\80x. â«°x ≤ x.
+lemma yle_refl_pred_sn: â\88\80x. â\86\93x ≤ x.
/2 width=1 by yle_refl, yle_pred_sn/ qed.
-lemma yle_pred: â\88\80m,n. m â\89¤ n â\86\92 â«°m â\89¤ â«°n.
+lemma yle_pred: â\88\80m,n. m â\89¤ n â\86\92 â\86\93m â\89¤ â\86\93n.
#m #n * -m -n /3 width=1 by yle_inj, monotonic_pred/
qed.
(* Properties on successor **************************************************)
-lemma yle_succ: â\88\80m,n. m â\89¤ n â\86\92 ⫯m â\89¤ ⫯n.
+lemma yle_succ: â\88\80m,n. m â\89¤ n â\86\92 â\86\91m â\89¤ â\86\91n.
#m #n * -m -n /3 width=1 by yle_inj, le_S_S/
qed.
-lemma yle_succ_dx: â\88\80m,n. m â\89¤ n â\86\92 m â\89¤ ⫯n.
+lemma yle_succ_dx: â\88\80m,n. m â\89¤ n â\86\92 m â\89¤ â\86\91n.
#m #n * -m -n /3 width=1 by le_S, yle_inj/
qed.
-lemma yle_refl_S_dx: â\88\80x. x â\89¤ ⫯x.
+lemma yle_refl_S_dx: â\88\80x. x â\89¤ â\86\91x.
/2 width=1 by yle_succ_dx/ qed.
-lemma yle_refl_SP_dx: â\88\80x. x â\89¤ ⫯⫰x.
+lemma yle_refl_SP_dx: â\88\80x. x â\89¤ â\86\91â\86\93x.
* // * //
qed.
-lemma yle_succ2: â\88\80x,y. â«°x â\89¤ y â\86\92 x â\89¤ ⫯y.
+lemma yle_succ2: â\88\80x,y. â\86\93x â\89¤ y â\86\92 x â\89¤ â\86\91y.
#x #y #Hxy elim (ynat_cases x)
[ #H destruct //
| * #m #H destruct /2 width=1 by yle_succ/
#H elim (ylt_inv_Y1 … H)
qed-.
-lemma ylt_inv_O1: â\88\80n:ynat. 0 < n â\86\92 ⫯⫰n = n.
+lemma ylt_inv_O1: â\88\80n:ynat. 0 < n â\86\92 â\86\91â\86\93n = n.
* // #n #H lapply (ylt_inv_inj … H) -H normalize
/3 width=1 by S_pred, eq_f/
qed-.
(* Inversion lemmas on successor ********************************************)
-fact ylt_inv_succ1_aux: â\88\80x,y:ynat. x < y â\86\92 â\88\80m. x = ⫯m â\86\92 m < â«°y â\88§ ⫯⫰y = y.
+fact ylt_inv_succ1_aux: â\88\80x,y:ynat. x < y â\86\92 â\88\80m. x = â\86\91m â\86\92 m < â\86\93y â\88§ â\86\91â\86\93y = y.
#x #y * -x -y
[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H
#n #H1 #H2 destruct elim (le_inv_S1 … Hxy) -Hxy
]
qed-.
-lemma ylt_inv_succ1: â\88\80m,y:ynat. ⫯m < y â\86\92 m < â«°y â\88§ ⫯⫰y = y.
+lemma ylt_inv_succ1: â\88\80m,y:ynat. â\86\91m < y â\86\92 m < â\86\93y â\88§ â\86\91â\86\93y = y.
/2 width=3 by ylt_inv_succ1_aux/ qed-.
-lemma ylt_inv_succ: â\88\80m,n. ⫯m < ⫯n → m < n.
+lemma ylt_inv_succ: â\88\80m,n. â\86\91m < â\86\91n → m < n.
#m #n #H elim (ylt_inv_succ1 … H) -H //
qed-.
(* Forward lemmas on successor **********************************************)
-fact ylt_fwd_succ2_aux: â\88\80x,y. x < y â\86\92 â\88\80n. y = ⫯n → x ≤ n.
+fact ylt_fwd_succ2_aux: â\88\80x,y. x < y â\86\92 â\88\80n. y = â\86\91n → x ≤ n.
#x #y * -x -y
[ #x #y #Hxy #m #H elim (ysucc_inv_inj_sn … H) -H
#n #H1 #H2 destruct /3 width=1 by yle_inj, le_S_S_to_le/
]
qed-.
-lemma ylt_fwd_succ2: â\88\80m,n. m < ⫯n → m ≤ n.
+lemma ylt_fwd_succ2: â\88\80m,n. m < â\86\91n → m ≤ n.
/2 width=3 by ylt_fwd_succ2_aux/ qed-.
(* inversion and forward lemmas on order ************************************)
-lemma ylt_fwd_le_succ1: â\88\80m,n. m < n â\86\92 ⫯m ≤ n.
+lemma ylt_fwd_le_succ1: â\88\80m,n. m < n â\86\92 â\86\91m ≤ n.
#m #n * -m -n /2 width=1 by yle_inj/
qed-.
-lemma ylt_fwd_le_pred2: â\88\80x,y:ynat. x < y â\86\92 x â\89¤ â«°y.
+lemma ylt_fwd_le_pred2: â\88\80x,y:ynat. x < y â\86\92 x â\89¤ â\86\93y.
#x #y #H elim H -x -y /3 width=1 by yle_inj, monotonic_pred/
qed-.
]
qed-.
-lemma ylt_inv_le: â\88\80x,y. x < y â\86\92 x < â\88\9e â\88§ ⫯x ≤ y.
+lemma ylt_inv_le: â\88\80x,y. x < y â\86\92 x < â\88\9e â\88§ â\86\91x ≤ y.
#x #y #H elim H -x -y /3 width=1 by yle_inj, conj/
qed-.
(* Basic properties *********************************************************)
-lemma ylt_O1: â\88\80x:ynat. ⫯⫰x = x → 0 < x.
+lemma ylt_O1: â\88\80x:ynat. â\86\91â\86\93x = x → 0 < x.
* // * /2 width=1 by ylt_inj/ normalize
#H destruct
qed.
(* Properties on predecessor ************************************************)
-lemma ylt_pred: â\88\80m,n:ynat. m < n â\86\92 0 < m â\86\92 â«°m < â«°n.
+lemma ylt_pred: â\88\80m,n:ynat. m < n â\86\92 0 < m â\86\92 â\86\93m < â\86\93n.
#m #n * -m -n
/4 width=1 by ylt_inv_inj, ylt_inj, monotonic_lt_pred/
qed.
(* Properties on successor **************************************************)
-lemma ylt_O_succ: â\88\80n. 0 < ⫯n.
+lemma ylt_O_succ: â\88\80n. 0 < â\86\91n.
* /2 width=1 by ylt_inj/
qed.
-lemma ylt_succ: â\88\80m,n. m < n â\86\92 ⫯m < ⫯n.
+lemma ylt_succ: â\88\80m,n. m < n â\86\92 â\86\91m < â\86\91n.
#m #n #H elim H -m -n /3 width=1 by ylt_inj, le_S_S/
qed.
-lemma ylt_succ_Y: â\88\80x. x < â\88\9e â\86\92 ⫯x < ∞.
+lemma ylt_succ_Y: â\88\80x. x < â\88\9e â\86\92 â\86\91x < ∞.
* /2 width=1 by/ qed.
-lemma yle_succ1_inj: â\88\80x. â\88\80y:ynat. ⫯yinj x ≤ y → x < y.
+lemma yle_succ1_inj: â\88\80x. â\88\80y:ynat. â\86\91yinj x ≤ y → x < y.
#x * /3 width=1 by yle_inv_inj, ylt_inj/
qed.
-lemma ylt_succ2_refl: â\88\80x,y:ynat. x < y â\86\92 x < ⫯x.
+lemma ylt_succ2_refl: â\88\80x,y:ynat. x < y â\86\92 x < â\86\91x.
#x #y #H elim (ylt_fwd_gen … H) -y /2 width=1 by ylt_inj/
qed.
]
qed-.
-lemma yle_inv_succ1_lt: â\88\80x,y:ynat. ⫯x â\89¤ y â\86\92 0 < y â\88§ x â\89¤ â«°y.
+lemma yle_inv_succ1_lt: â\88\80x,y:ynat. â\86\91x â\89¤ y â\86\92 0 < y â\88§ x â\89¤ â\86\93y.
#x #y #H elim (yle_inv_succ1 … H) -H /3 width=1 by ylt_O1, conj/
qed-.
-lemma yle_lt: â\88\80x,y. x < â\88\9e â\86\92 ⫯x ≤ y → x < y.
+lemma yle_lt: â\88\80x,y. x < â\88\9e â\86\92 â\86\91x ≤ y → x < y.
#x * // #y #H elim (ylt_inv_Y2 … H) -H #n #H destruct
/3 width=1 by ylt_inj, yle_inv_inj/
qed-.
lemma yplus_O2: ∀m:ynat. m + 0 = m.
// qed.
-lemma yplus_S2: â\88\80m:ynat. â\88\80n. m + S n = ⫯(m + n).
+lemma yplus_S2: â\88\80m:ynat. â\88\80n. m + S n = â\86\91(m + n).
// qed.
lemma yplus_Y2: ∀m:ynat. m + (∞) = ∞.
(* Properties on successor **************************************************)
-lemma yplus_succ2: â\88\80m,n. m + ⫯n = ⫯(m + n).
+lemma yplus_succ2: â\88\80m,n. m + â\86\91n = â\86\91(m + n).
#m * //
qed.
-lemma yplus_succ1: â\88\80m,n. ⫯m + n = ⫯(m + n).
+lemma yplus_succ1: â\88\80m,n. â\86\91m + n = â\86\91(m + n).
#m * // #n elim n -n //
qed.
-lemma yplus_succ_swap: â\88\80m,n. m + ⫯n = ⫯m + n.
+lemma yplus_succ_swap: â\88\80m,n. m + â\86\91n = â\86\91m + n.
// qed.
-lemma yplus_SO2: â\88\80m. m + 1 = ⫯m.
+lemma yplus_SO2: â\88\80m. m + 1 = â\86\91m.
* //
qed.
(* Inversion lemmas on successor *********************************************)
-lemma yplus_inv_succ_lt_dx: â\88\80x,y,z:ynat. 0 < y â\86\92 x + y = ⫯z â\86\92 x + â«°y = z.
+lemma yplus_inv_succ_lt_dx: â\88\80x,y,z:ynat. 0 < y â\86\92 x + y = â\86\91z â\86\92 x + â\86\93y = z.
#x #y #z #H <(ylt_inv_O1 y) // >yplus_succ2
/2 width=1 by ysucc_inv_inj/
qed-.
-lemma yplus_inv_succ_lt_sn: â\88\80x,y,z:ynat. 0 < x â\86\92 x + y = ⫯z â\86\92 â«°x + y = z.
+lemma yplus_inv_succ_lt_sn: â\88\80x,y,z:ynat. 0 < x â\86\92 x + y = â\86\91z â\86\92 â\86\93x + y = z.
#x #y #z #H <(ylt_inv_O1 x) // >yplus_succ1
/2 width=1 by ysucc_inv_inj/
#z #H elim (yplus_inv_inj … H) -H /2 width=1 by conj/
qed-.
-lemma ylt_inv_plus_sn: â\88\80x,y. x < y â\86\92 â\88\83â\88\83z. ⫯z + x = y & x < ∞.
+lemma ylt_inv_plus_sn: â\88\80x,y. x < y â\86\92 â\88\83â\88\83z. â\86\91z + x = y & x < ∞.
#x #y #H elim (ylt_inv_le … H) -H
#Hx #H elim (yle_inv_plus_sn … H) -H
/2 width=2 by ex2_intro/
qed-.
-lemma ylt_inv_plus_dx: â\88\80x,y. x < y â\86\92 â\88\83â\88\83z. x + ⫯z = y & x < ∞.
+lemma ylt_inv_plus_dx: â\88\80x,y. x < y â\86\92 â\88\83â\88\83z. x + â\86\91z = y & x < ∞.
#x #y #H elim (ylt_inv_plus_sn … H) -H
#z >yplus_comm /2 width=2 by ex2_intro/
qed-.
(* Properties on predeccessor ***********************************************)
-lemma yplus_pred1: â\88\80x,y:ynat. 0 < x â\86\92 â«°x + y = â«°(x+y).
+lemma yplus_pred1: â\88\80x,y:ynat. 0 < x â\86\92 â\86\93x + y = â\86\93(x+y).
#x * // #y elim y -y // #y #IH #Hx
>yplus_S2 >yplus_S2 >IH -IH // >ylt_inv_O1
/2 width=1 by ylt_plus_dx1_trans/
qed-.
-lemma yplus_pred2: â\88\80x,y:ynat. 0 < y â\86\92 x + â«°y = â«°(x+y).
+lemma yplus_pred2: â\88\80x,y:ynat. 0 < y â\86\92 x + â\86\93y = â\86\93(x+y).
/2 width=1 by yplus_pred1/ qed-.
(* the predecessor function *)
definition ypred: ynat → ynat ≝ λm. match m with
-[ yinj m â\87\92 â«°m
+[ yinj m â\87\92 â\86\93m
| Y ⇒ Y
].
-interpretation "ynat predecessor" 'Predecessor m = (ypred m).
+interpretation "ynat predecessor" 'DownArrow m = (ypred m).
-lemma ypred_O: â«°(yinj 0) = yinj 0.
+lemma ypred_O: â\86\93(yinj 0) = yinj 0.
// qed.
-lemma ypred_S: â\88\80m:nat. â«°(⫯m) = yinj m.
+lemma ypred_S: â\88\80m:nat. â\86\93(â\86\91m) = yinj m.
// qed.
-lemma ypred_Y: (â«°∞) = ∞.
+lemma ypred_Y: (â\86\93∞) = ∞.
// qed.
(* Inversion lemmas *********************************************************)
-lemma ypred_inv_refl: â\88\80m:ynat. â«°m = m → m = 0 ∨ m = ∞.
+lemma ypred_inv_refl: â\88\80m:ynat. â\86\93m = m → m = 0 ∨ m = ∞.
* // #m #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
/4 width=1 by pred_inv_refl, or_introl, eq_f/
qed-.
(* the successor function *)
definition ysucc: ynat → ynat ≝ λm. match m with
-[ yinj m â\87\92 ⫯m
+[ yinj m â\87\92 â\86\91m
| Y ⇒ Y
].
-interpretation "ynat successor" 'Successor m = (ysucc m).
+interpretation "ynat successor" 'UpArrow m = (ysucc m).
-lemma ysucc_inj: â\88\80m:nat. ⫯(yinj m) = yinj (⫯m).
+lemma ysucc_inj: â\88\80m:nat. â\86\91(yinj m) = yinj (â\86\91m).
// qed.
-lemma ysucc_Y: ⫯(∞) = ∞.
+lemma ysucc_Y: â\86\91(∞) = ∞.
// qed.
(* Properties ***************************************************************)
-lemma ypred_succ: â\88\80m. ⫰⫯m = m.
+lemma ypred_succ: â\88\80m. â\86\93â\86\91m = m.
* // qed.
-lemma ynat_cases: â\88\80n:ynat. n = 0 â\88¨ â\88\83m:ynat. n = ⫯m.
+lemma ynat_cases: â\88\80n:ynat. n = 0 â\88¨ â\88\83m:ynat. n = â\86\91m.
*
[ * /2 width=1 by or_introl/
#n @or_intror @(ex_intro … n) // (**) (* explicit constructor *)
(* Inversion lemmas *********************************************************)
-lemma ysucc_inv_inj: â\88\80m,n. ⫯m = ⫯n → m = n.
+lemma ysucc_inv_inj: â\88\80m,n. â\86\91m = â\86\91n → m = n.
#m #n #H <(ypred_succ m) <(ypred_succ n) //
qed-.
-lemma ysucc_inv_refl: â\88\80m. ⫯m = m → m = ∞.
+lemma ysucc_inv_refl: â\88\80m. â\86\91m = m → m = ∞.
* //
#m #H lapply (yinj_inj … H) -H (**) (* destruct lemma needed *)
#H elim (lt_refl_false m) //
qed-.
-lemma ysucc_inv_inj_sn: â\88\80m2,n1. yinj m2 = ⫯n1 →
+lemma ysucc_inv_inj_sn: â\88\80m2,n1. yinj m2 = â\86\91n1 →
∃∃m1. n1 = yinj m1 & m2 = S m1.
#m2 * normalize
[ #n1 #H destruct /2 width=3 by ex2_intro/
]
qed-.
-lemma ysucc_inv_inj_dx: â\88\80m2,n1. ⫯n1 = yinj m2 →
+lemma ysucc_inv_inj_dx: â\88\80m2,n1. â\86\91n1 = yinj m2 →
∃∃m1. n1 = yinj m1 & m2 = S m1.
/2 width=1 by ysucc_inv_inj_sn/ qed-.
-lemma ysucc_inv_Y_sn: â\88\80m. â\88\9e = ⫯m → m = ∞.
+lemma ysucc_inv_Y_sn: â\88\80m. â\88\9e = â\86\91m → m = ∞.
* // normalize
#m #H destruct
qed-.
-lemma ysucc_inv_Y_dx: â\88\80m. ⫯m = ∞ → m = ∞.
+lemma ysucc_inv_Y_dx: â\88\80m. â\86\91m = ∞ → m = ∞.
/2 width=1 by ysucc_inv_Y_sn/ qed-.
-lemma ysucc_inv_O_sn: â\88\80m. yinj 0 = ⫯m → ⊥. (**) (* explicit coercion *)
+lemma ysucc_inv_O_sn: â\88\80m. yinj 0 = â\86\91m → ⊥. (**) (* explicit coercion *)
#m #H elim (ysucc_inv_inj_sn … H) -H
#n #_ #H destruct
qed-.
-lemma ysucc_inv_O_dx: â\88\80m:ynat. ⫯m = 0 → ⊥.
+lemma ysucc_inv_O_dx: â\88\80m:ynat. â\86\91m = 0 → ⊥.
/2 width=2 by ysucc_inv_O_sn/ qed-.
(* Eliminators **************************************************************)
lemma ynat_ind: ∀R:predicate ynat.
- R 0 â\86\92 (â\88\80n:nat. R n â\86\92 R (⫯n)) → R (∞) →
+ R 0 â\86\92 (â\88\80n:nat. R n â\86\92 R (â\86\91n)) → R (∞) →
∀x. R x.
#R #H1 #H2 #H3 * // #n elim n -n /2 width=1 by/
qed-.
#!/bin/sh
-for MA in `find basic_2 -name "*.ma"`; do
-#for MA in `find -name "cpg*.ma" -or -name "cpx*.ma"`; do
- sed "s!$1!$2!g" ${MA} > ${MA}.new
- if [ ! -s ${MA}.new ] || diff ${MA} ${MA}.new > /dev/null;
- then rm -f ${MA}.new;
- else echo ${MA}; mv -f ${MA} ${MA}.old; mv -f ${MA}.new ${MA};
+for SRC in `find ground_2 basic_2 -name "*.ma" -or -name "*.tbl"`; do
+ sed "s!$1!$2!g" ${SRC} > ${SRC}.new
+ if [ ! -s ${SRC}.new ] || diff ${SRC} ${SRC}.new > /dev/null;
+ then rm -f ${SRC}.new;
+ else echo ${SRC}; mv -f ${SRC} ${SRC}.old; mv -f ${SRC}.new ${SRC};
fi
done
-unset MA
+unset SRC
["^"; "↑"; ] ;
["⇑"; "⇧"; "⬆"; ] ;
["⇓"; "⇩"; "⬇"; "⬊"; "➷"; ] ;
- ["⇕"; "⇳"; "⬍"; ];
+ ["⇕"; "⇳"; "⬍"; "↕"; ];
["↔"; "⇔"; "⬄"; "⬌"; ] ;
["≤"; "≲"; "≼"; "≰"; "≴"; "⋠"; "⊆"; "⫃"; "⊑"; ] ;
["_"; "↓"; "↙"; "⎽"; "⎼"; "⎻"; "⎺"; ];