X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;ds=sidebyside;f=helm%2Fsoftware%2Fmatita%2Fcontribs%2Fng_assembly%2Fnum%2Fbyte8.ma;h=bc7e6f9ceaeb06ced915251f53fc2204695e6d0e;hb=29cfb9e2961e62c836cb50217905c0594a074e81;hp=f2cbdb7583e7959eae5ebbe0182387ca84302d0d;hpb=b1c174cffd3c1d10383a52d63a6e662156fb0bb7;p=helm.git diff --git a/helm/software/matita/contribs/ng_assembly/num/byte8.ma b/helm/software/matita/contribs/ng_assembly/num/byte8.ma index f2cbdb758..bc7e6f9ce 100755 --- a/helm/software/matita/contribs/ng_assembly/num/byte8.ma +++ b/helm/software/matita/contribs/ng_assembly/num/byte8.ma @@ -15,8 +15,8 @@ (* ********************************************************************** *) (* Progetto FreeScale *) (* *) -(* Sviluppato da: Cosimo Oliboni, oliboni@cs.unibo.it *) -(* Cosimo Oliboni, oliboni@cs.unibo.it *) +(* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *) +(* Ultima modifica: 05/08/2009 *) (* *) (* ********************************************************************** *) @@ -91,10 +91,10 @@ ndefinition ror_b8 ≝ | false ⇒ mk_byte8 bh' bl' ]]]. (* operatore rotazione destra n-volte *) -nlet rec ror_b8_n (b:byte8) (n:oct) (r:rec_oct n) on r ≝ - match r with - [ oc_O ⇒ b - | oc_S t n' ⇒ ror_b8_n (ror_b8 b) t n' ]. +nlet rec ror_b8_n (b:byte8) (n:nat) on n ≝ + match n with + [ O ⇒ b + | S n' ⇒ ror_b8_n (ror_b8 b) n' ]. (* operatore rotazione sinistra con carry *) ndefinition rcl_b8 ≝ @@ -117,10 +117,10 @@ ndefinition rol_b8 ≝ | false ⇒ mk_byte8 bh' bl' ]]]. (* operatore rotazione sinistra n-volte *) -nlet rec rol_b8_n (b:byte8) (n:oct) (r:rec_oct n) on r ≝ - match r with - [ oc_O ⇒ b - | oc_S t n' ⇒ rol_b8_n (rol_b8 b) t n' ]. +nlet rec rol_b8_n (b:byte8) (n:nat) on n ≝ + match n with + [ O ⇒ b + | S n' ⇒ rol_b8_n (rol_b8 b) n' ]. (* operatore not/complemento a 1 *) ndefinition not_b8 ≝ @@ -346,8 +346,12 @@ ndefinition b8_to_recb8_aux3 : Πn1,n2.rec_byte8 〈n1,x0〉 → rec_byte8 〈n1 | xF ⇒ b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? (b8_S ? recb)))))))))))))) ]. -ndefinition b8_to_recb8 ≝ -λn.b8_to_recb8_aux3 (b8h n) (b8l n) (b8_to_recb8_aux2 (b8h n) (ex_to_recex (b8h n))). +ndefinition b8_to_recb8 : Πb.rec_byte8 b. + #b; + nletin K ≝ (b8_to_recb8_aux3 (b8h b) (b8l b) (b8_to_recb8_aux2 (b8h b) (ex_to_recex (b8h b)))); + nelim b in K:(%) ⊢ %; + #e1; #e2; nnormalize; #H; napply H. +nqed. (* ottali → esadecimali *) ndefinition b8_of_bit ≝