Metamath Proof Explorer


Theorem nndi

Description: Distributive law for natural numbers (left-distributivity). Theorem 4K(3) of Enderton p. 81. (Contributed by NM, 20-Sep-1995) (Revised by Mario Carneiro, 15-Nov-2014)

Ref Expression
Assertion nndi AωBωCωA𝑜B+𝑜C=A𝑜B+𝑜A𝑜C

Proof

Step Hyp Ref Expression
1 oveq2 x=CB+𝑜x=B+𝑜C
2 1 oveq2d x=CA𝑜B+𝑜x=A𝑜B+𝑜C
3 oveq2 x=CA𝑜x=A𝑜C
4 3 oveq2d x=CA𝑜B+𝑜A𝑜x=A𝑜B+𝑜A𝑜C
5 2 4 eqeq12d x=CA𝑜B+𝑜x=A𝑜B+𝑜A𝑜xA𝑜B+𝑜C=A𝑜B+𝑜A𝑜C
6 5 imbi2d x=CAωBωA𝑜B+𝑜x=A𝑜B+𝑜A𝑜xAωBωA𝑜B+𝑜C=A𝑜B+𝑜A𝑜C
7 oveq2 x=B+𝑜x=B+𝑜
8 7 oveq2d x=A𝑜B+𝑜x=A𝑜B+𝑜
9 oveq2 x=A𝑜x=A𝑜
10 9 oveq2d x=A𝑜B+𝑜A𝑜x=A𝑜B+𝑜A𝑜
11 8 10 eqeq12d x=A𝑜B+𝑜x=A𝑜B+𝑜A𝑜xA𝑜B+𝑜=A𝑜B+𝑜A𝑜
12 oveq2 x=yB+𝑜x=B+𝑜y
13 12 oveq2d x=yA𝑜B+𝑜x=A𝑜B+𝑜y
14 oveq2 x=yA𝑜x=A𝑜y
15 14 oveq2d x=yA𝑜B+𝑜A𝑜x=A𝑜B+𝑜A𝑜y
16 13 15 eqeq12d x=yA𝑜B+𝑜x=A𝑜B+𝑜A𝑜xA𝑜B+𝑜y=A𝑜B+𝑜A𝑜y
17 oveq2 x=sucyB+𝑜x=B+𝑜sucy
18 17 oveq2d x=sucyA𝑜B+𝑜x=A𝑜B+𝑜sucy
19 oveq2 x=sucyA𝑜x=A𝑜sucy
20 19 oveq2d x=sucyA𝑜B+𝑜A𝑜x=A𝑜B+𝑜A𝑜sucy
21 18 20 eqeq12d x=sucyA𝑜B+𝑜x=A𝑜B+𝑜A𝑜xA𝑜B+𝑜sucy=A𝑜B+𝑜A𝑜sucy
22 nna0 BωB+𝑜=B
23 22 adantl AωBωB+𝑜=B
24 23 oveq2d AωBωA𝑜B+𝑜=A𝑜B
25 nnmcl AωBωA𝑜Bω
26 nna0 A𝑜BωA𝑜B+𝑜=A𝑜B
27 25 26 syl AωBωA𝑜B+𝑜=A𝑜B
28 24 27 eqtr4d AωBωA𝑜B+𝑜=A𝑜B+𝑜
29 nnm0 AωA𝑜=
30 29 adantr AωBωA𝑜=
31 30 oveq2d AωBωA𝑜B+𝑜A𝑜=A𝑜B+𝑜
32 28 31 eqtr4d AωBωA𝑜B+𝑜=A𝑜B+𝑜A𝑜
33 oveq1 A𝑜B+𝑜y=A𝑜B+𝑜A𝑜yA𝑜B+𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
34 nnasuc BωyωB+𝑜sucy=sucB+𝑜y
35 34 3adant1 AωBωyωB+𝑜sucy=sucB+𝑜y
36 35 oveq2d AωBωyωA𝑜B+𝑜sucy=A𝑜sucB+𝑜y
37 nnacl BωyωB+𝑜yω
38 nnmsuc AωB+𝑜yωA𝑜sucB+𝑜y=A𝑜B+𝑜y+𝑜A
39 37 38 sylan2 AωBωyωA𝑜sucB+𝑜y=A𝑜B+𝑜y+𝑜A
40 39 3impb AωBωyωA𝑜sucB+𝑜y=A𝑜B+𝑜y+𝑜A
41 36 40 eqtrd AωBωyωA𝑜B+𝑜sucy=A𝑜B+𝑜y+𝑜A
42 nnmsuc AωyωA𝑜sucy=A𝑜y+𝑜A
43 42 3adant2 AωBωyωA𝑜sucy=A𝑜y+𝑜A
44 43 oveq2d AωBωyωA𝑜B+𝑜A𝑜sucy=A𝑜B+𝑜A𝑜y+𝑜A
45 nnmcl AωyωA𝑜yω
46 nnaass A𝑜BωA𝑜yωAωA𝑜B+𝑜A𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
47 25 46 syl3an1 AωBωA𝑜yωAωA𝑜B+𝑜A𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
48 45 47 syl3an2 AωBωAωyωAωA𝑜B+𝑜A𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
49 48 3exp AωBωAωyωAωA𝑜B+𝑜A𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
50 49 exp4b AωBωAωyωAωA𝑜B+𝑜A𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
51 50 pm2.43a AωBωyωAωA𝑜B+𝑜A𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
52 51 com4r AωAωBωyωA𝑜B+𝑜A𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
53 52 pm2.43i AωBωyωA𝑜B+𝑜A𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
54 53 3imp AωBωyωA𝑜B+𝑜A𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
55 44 54 eqtr4d AωBωyωA𝑜B+𝑜A𝑜sucy=A𝑜B+𝑜A𝑜y+𝑜A
56 41 55 eqeq12d AωBωyωA𝑜B+𝑜sucy=A𝑜B+𝑜A𝑜sucyA𝑜B+𝑜y+𝑜A=A𝑜B+𝑜A𝑜y+𝑜A
57 33 56 imbitrrid AωBωyωA𝑜B+𝑜y=A𝑜B+𝑜A𝑜yA𝑜B+𝑜sucy=A𝑜B+𝑜A𝑜sucy
58 57 3exp AωBωyωA𝑜B+𝑜y=A𝑜B+𝑜A𝑜yA𝑜B+𝑜sucy=A𝑜B+𝑜A𝑜sucy
59 58 com3r yωAωBωA𝑜B+𝑜y=A𝑜B+𝑜A𝑜yA𝑜B+𝑜sucy=A𝑜B+𝑜A𝑜sucy
60 59 impd yωAωBωA𝑜B+𝑜y=A𝑜B+𝑜A𝑜yA𝑜B+𝑜sucy=A𝑜B+𝑜A𝑜sucy
61 11 16 21 32 60 finds2 xωAωBωA𝑜B+𝑜x=A𝑜B+𝑜A𝑜x
62 6 61 vtoclga CωAωBωA𝑜B+𝑜C=A𝑜B+𝑜A𝑜C
63 62 expdcom AωBωCωA𝑜B+𝑜C=A𝑜B+𝑜A𝑜C
64 63 3imp AωBωCωA𝑜B+𝑜C=A𝑜B+𝑜A𝑜C