]> matita.cs.unibo.it Git - helm.git/blob - matita/matita/contribs/lambdadelta/ground/arith/arith_2b.ma
update in delayed_updating
[helm.git] / matita / matita / contribs / lambdadelta / ground / arith / arith_2b.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 include "ground/arith/nat_le_minus_plus.ma".
16
17 (* ARITHMETICAL PROPERTIES FOR λδ-2B ****************************************)
18
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 //
32   ]
33 ]
34 qed.
35
36 lemma arith_l3 (m) (n1) (n2): n1+n2-m = n1-m+(n2-(m-n1)).
37 // qed.
38
39 lemma arith_l2 (n1) (n2): ↑n2-n1 = 𝟏-n1+(n2-(n1-𝟏)).
40 #n1 #n2 <arith_l3 //
41 qed.
42
43 lemma arith_l1 (n): ninj (𝟏) = 𝟏-n+(n-(n-𝟏)).
44 #n <arith_l2 //
45 qed.