]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/ng_assembly2/emulator/opcodes/byte_or_word.ma
wip ....
[helm.git] / matita / matita / contribs / ng_assembly2 / emulator / opcodes / byte_or_word.ma
1 (**************************************************************************)
2 (*       ___                                                              *)
3 (*      ||M||                                                             *)
4 (*      ||A||       A project by Andrea Asperti                           *)
5 (*      ||T||                                                             *)
6 (*      ||I||       Developers:                                           *)
7 (*      ||T||         The HELM team.                                      *)
8 (*      ||A||         http://helm.cs.unibo.it                             *)
9 (*      \   /                                                             *)
10 (*       \ /        This file is distributed under the terms of the       *)
11 (*        v         GNU General Public License Version 2                  *)
12 (*                                                                        *)
13 (**************************************************************************)
14
15 (* ********************************************************************** *)
16 (*                          Progetto FreeScale                            *)
17 (*                                                                        *)
18 (*   Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it              *)
19 (*   Sviluppo: 2008-2010                                                  *)
20 (*                                                                        *)
21 (* ********************************************************************** *)
22
23 include "num/word16.ma".
24
25 (* raggruppamento di byte e word in un tipo unico *)
26 ninductive byte8_or_word16 : Type ≝
27   Byte: byte8  → byte8_or_word16
28 | Word: word16 → byte8_or_word16.
29
30 ndefinition eq_b8w16 ≝
31 λbw1,bw2:byte8_or_word16.
32  match bw1 with
33   [ Byte b1 ⇒ match bw2 with [ Byte b2 ⇒ eqc ? b1 b2 | Word _ ⇒ false ]
34   | Word w1 ⇒ match bw2 with [ Byte _ ⇒ false | Word w2 ⇒ eqc ? w1 w2 ]
35   ].