X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Fcontribs%2Flambdadelta%2Fground_2%2Fsteps%2Frtc_plus.ma;h=6993f318d1c7176c7efef18da714a6562a6476ab;hb=bd53c4e895203eb049e75434f638f26b5a161a2b;hp=75a58b25f55b0abc1b7a8e4fc5280c139b0e927f;hpb=e31ce850917b3e95f5158a687626c679e551fd25;p=helm.git diff --git a/matita/matita/contribs/lambdadelta/ground_2/steps/rtc_plus.ma b/matita/matita/contribs/lambdadelta/ground_2/steps/rtc_plus.ma index 75a58b25f..6993f318d 100644 --- a/matita/matita/contribs/lambdadelta/ground_2/steps/rtc_plus.ma +++ b/matita/matita/contribs/lambdadelta/ground_2/steps/rtc_plus.ma @@ -12,15 +12,86 @@ (* *) (**************************************************************************) -include "ground_2/steps/rtc.ma". +include "ground_2/xoa/ex_3_2.ma". +include "ground_2/xoa/ex_6_8.ma". +include "ground_2/steps/rtc_isrt.ma". (* RT-TRANSITION COUNTER ****************************************************) -definition plus (r1:rtc) (r2:rtc): rtc ≝ match r1 with [ - mk_rtc ri1 rh1 ti1 th1 ⇒ match r2 with [ - mk_rtc ri2 rh2 ti2 th2 ⇒ 〈ri1+ri2, rh1+rh2, ti1+ti2, th1+th2〉 +definition plus (c1:rtc) (c2:rtc): rtc ≝ match c1 with [ + mk_rtc ri1 rs1 ti1 ts1 ⇒ match c2 with [ + mk_rtc ri2 rs2 ti2 ts2 ⇒ 〈ri1+ri2,rs1+rs2,ti1+ti2,ts1+ts2〉 ] ]. interpretation "plus (rtc)" - 'plus r1 r2 = (plus r1 r2). + 'plus c1 c2 = (plus c1 c2). + +(* Basic properties *********************************************************) + +(**) (* plus is not disambiguated parentheses *) +lemma plus_rew: ∀ri1,ri2,rs1,rs2,ti1,ti2,ts1,ts2. + 〈ri1+ri2,rs1+rs2,ti1+ti2,ts1+ts2〉 = + (〈ri1,rs1,ti1,ts1〉) + (〈ri2,rs2,ti2,ts2〉). +// qed. + +lemma plus_O_dx: ∀c. c = c + 𝟘𝟘. +* #ri #rs #ti #ts (plus_n_O n) /2 width=1 by isrt_plus/ +qed. + +lemma isrt_succ: ∀n,c. 𝐑𝐓❪n,c❫ → 𝐑𝐓❪↑n,c+𝟘𝟙❫. +/2 width=1 by isrt_plus/ qed. + +(* Inversion properties with test for constrained rt-transition counter *****) + +lemma isrt_inv_plus: ∀n,c1,c2. 𝐑𝐓❪n,c1 + c2❫ → + ∃∃n1,n2. 𝐑𝐓❪n1,c1❫ & 𝐑𝐓❪n2,c2❫ & n1 + n2 = n. +#n #c1 #c2 * #ri #rs #H +elim (plus_inv_dx … H) -H #ri1 #rs1 #ti1 #ts1 #ri2 #rs2 #ti2 #ts2 #_ #_ #H1 #H2 #H3 #H4 +elim (plus_inv_O3 … H1) -H1 /3 width=5 by ex3_2_intro, ex1_2_intro/ +qed-. + +lemma isrt_inv_plus_O_dx: ∀n,c1,c2. 𝐑𝐓❪n,c1 + c2❫ → 𝐑𝐓❪0,c2❫ → 𝐑𝐓❪n,c1❫. +#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 // +qed-. + +lemma isrt_inv_plus_SO_dx: ∀n,c1,c2. 𝐑𝐓❪n,c1 + c2❫ → 𝐑𝐓❪1,c2❫ → + ∃∃m. 𝐑𝐓❪m,c1❫ & n = ↑m. +#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 +/2 width=3 by ex2_intro/ +qed-.