1 (**************************************************************************)
4 (* ||A|| A project by Andrea Asperti *)
6 (* ||I|| Developers: *)
7 (* ||T|| The HELM team. *)
8 (* ||A|| http://helm.cs.unibo.it *)
10 (* \ / This file is distributed under the terms of the *)
11 (* v GNU General Public License Version 2 *)
13 (**************************************************************************)
15 (* ********************************************************************** *)
16 (* Progetto FreeScale *)
18 (* Sviluppato da: Ing. Cosimo Oliboni, oliboni@cs.unibo.it *)
19 (* Sviluppo: 2008-2010 *)
21 (* ********************************************************************** *)
23 include "num/bool_lemmas.ma".
24 include "emulator/opcodes/IP2022_pseudo.ma".
26 nlemma eq_to_eqIP2022pseudo : ∀n1,n2.n1 = n2 → eq_IP2022_pseudo n1 n2 = true.
34 nlemma neqIP2022pseudo_to_neq : ∀n1,n2.eq_IP2022_pseudo n1 n2 = false → n1 ≠ n2.
36 napply (not_to_not (n1 = n2) (eq_IP2022_pseudo n1 n2 = true) …);
37 ##[ ##1: napply (eq_to_eqIP2022pseudo n1 n2)
38 ##| ##2: napply (eqfalse_to_neqtrue … H)
42 (* !!! per brevita... *)
43 naxiom eqIP2022pseudo_to_eq : ∀c1,c2.eq_IP2022_pseudo c1 c2 = true → c1 = c2.
45 nlemma neq_to_neqIP2022pseudo : ∀n1,n2.n1 ≠ n2 → eq_IP2022_pseudo n1 n2 = false.
47 napply (neqtrue_to_eqfalse (eq_IP2022_pseudo n1 n2));
48 napply (not_to_not (eq_IP2022_pseudo n1 n2 = true) (n1 = n2) ? H);
49 napply (eqIP2022pseudo_to_eq n1 n2).
52 nlemma decidable_IP2022pseudo : ∀x,y:IP2022_pseudo.decidable (x = y).
54 napply (or2_elim (eq_IP2022_pseudo x y = true) (eq_IP2022_pseudo x y = false) ? (decidable_bexpr ?));
55 ##[ ##1: #H; napply (or2_intro1 (x = y) (x ≠ y) (eqIP2022pseudo_to_eq … H))
56 ##| ##2: #H; napply (or2_intro2 (x = y) (x ≠ y) (neqIP2022pseudo_to_neq … H))
60 nlemma symmetric_eqIP2022pseudo : symmetricT IP2022_pseudo bool eq_IP2022_pseudo.
62 napply (or2_elim (n1 = n2) (n1 ≠ n2) ? (decidable_IP2022pseudo n1 n2));
63 ##[ ##1: #H; nrewrite > H; napply refl_eq
64 ##| ##2: #H; nrewrite > (neq_to_neqIP2022pseudo n1 n2 H);
65 napply (symmetric_eq ? (eq_IP2022_pseudo n2 n1) false);
66 napply (neq_to_neqIP2022pseudo n2 n1 (symmetric_neq ? n1 n2 H))