X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=matita%2Fmatita%2Flib%2Fturing%2Fmulti_universal%2Ftuples.ma;h=428d99ccf0f415ec705d79aeec8de150e3a56ad1;hb=53273ac4ac4e742f8767fc1f9ef0f279c0b80a1d;hp=76e56068df9303450f7d7c179b3daf0eb0576827;hpb=1f740f74d94187a2376228a86faf79ea949c0dff;p=helm.git diff --git a/matita/matita/lib/turing/multi_universal/tuples.ma b/matita/matita/lib/turing/multi_universal/tuples.ma index 76e56068d..428d99ccf 100644 --- a/matita/matita/lib/turing/multi_universal/tuples.ma +++ b/matita/matita/lib/turing/multi_universal/tuples.ma @@ -21,8 +21,30 @@ lemma table_TM_cons: ∀n,h,t,o. table_TM n (t::o) h = (tuple_encoding n h t)@(table_TM n o h). // qed. +lemma initial_bar: ∀n,h,l. l ≠ [ ] → + table_TM n l h = bar :: tail ? (table_TM n l h). +#n #h * + [* #H @False_ind @H // + |#a #tl #_ >table_TM_cons lapply (is_tuple n h a) + * #qin * #cin * #qout * #cout * #mv * #_ #Htup >Htup % + ] +qed. + (************************** matching in a table *******************************) -lemma list_to_table: ∀n,l,h,tup. mem ? tup (tuples_list n h l) → +lemma list_to_table: ∀n,l,h,t. mem ? t l → + ∃ll,lr.table_TM n l h = ll@(tuple_encoding n h t)@lr. +#n #l #h #t elim l + [@False_ind + |#hd #tl #Hind * + [#Htup %{[]} %{(table_TM n tl h)} >Htup % + |#H cases (Hind H) #ll * #lr #H1 + %{((tuple_encoding n h hd)@ll)} %{lr} + >associative_append

Heq1 >(cons_injective_l ????? Heq) // - |%2 % // >Heq1 >(cons_injective_l ????? Heq) // - ] - |@(cons_injective_r ????? Heq) - ] - ] - ] -qed. - lemma table_to_list: ∀n,l,h,c. is_config n c → (∃ll,lr.table_TM n l h = ll@c@lr) → ∃out,t. tuple_encoding n h t = (c@out) ∧ mem ? t l.