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 include "ground_2/lib/arith.ma".
17 (* ARITHMETICAL PROPERTIES FOR λδ-2B ****************************************)
19 lemma arith_l4 (m11) (m12) (m21) (m22):
20 m21+m22-(m11+m12) = m21-m11-m12+(m22-(m11-m21)-(m12-(m21-m11))).
21 #m11 #m12 #m21 #m22 >minus_plus
22 elim (le_or_ge (m11+m12) m21) #Hm1121
23 [ lapply (transitive_le m11 ??? Hm1121) // #Hm121
24 lapply (le_plus_to_minus_l … Hm1121) #Hm12211
25 <plus_minus // @eq_f2 // >(eq_minus_O m11 ?) // >(eq_minus_O m12 ?) //
26 | >(eq_minus_O m21 ?) // <plus_O_n <minus_plus <commutative_plus
27 elim (le_or_ge m11 m21) #Hm121
28 [ lapply (le_plus_to_minus_comm … Hm1121) #Hm2112
29 >(eq_minus_O m11 ?) // <plus_minus_associative // <minus_le_minus_minus_comm //
30 | >(eq_minus_O m21 ?) // <minus_le_minus_minus_comm //
35 lemma arith_l3 (m) (n1) (n2): n1+n2-m = n1-m+(n2-(m-n1)).
38 lemma arith_l2 (n1) (n2): ↑n2-n1 = 1-n1+(n2-(n1-1)).
42 lemma arith_l1: ∀x. 1 = 1-x+(x-(x-1)).