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/arith/nat_le_minus_plus.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 >nminus_plus_assoc
22 elim (nat_split_le_ge (m11+m12) m21) #Hm1121
23 [ lapply (nle_trans m11 ??? Hm1121) // #Hm121
24 lapply (nle_minus_dx_dx … Hm1121) #Hm12211
25 <nminus_plus_comm_23 // @eq_f2 //
26 <(nle_inv_eq_zero_minus m11 ?) // <(nle_inv_eq_zero_minus m12 ?) //
27 | <(nle_inv_eq_zero_minus m21 ?) // <nplus_zero_sn <nminus_plus_assoc <nplus_comm
28 elim (nat_split_le_ge m11 m21) #Hm121
29 [ lapply (nle_minus_sn_dx … Hm1121) #Hm2112
30 <(nle_inv_eq_zero_minus m11 ?) // >nplus_minus_assoc // >nminus_assoc_comm_23 //
31 | <(nle_inv_eq_zero_minus m21 ?) // >nminus_assoc_comm_23 //
36 lemma arith_l3 (m) (n1) (n2): n1+n2-m = n1-m+(n2-(m-n1)).
39 lemma arith_l2 (n1) (n2): ↑n2-n1 = 𝟏-n1+(n2-(n1-𝟏)).
43 lemma arith_l1 (n): ninj (𝟏) = 𝟏-n+(n-(n-𝟏)).