HomeHome Metamath Proof Explorer < Previous   Next >
Related theorems
Unicode version

Theorem nnesqi 7912
Description: A natural number is even iff its square is even.
Hypothesis
Ref Expression
nnsqcl.1 |- N e. NN
Assertion
Ref Expression
nnesqi |- ((N / 2) e. NN <-> ((N^2) / 2) e. NN)

Proof of Theorem nnesqi
StepHypRef Expression
1 nnmulcl 7124 . . . 4 |- (((N / 2) e. NN /\ (N / 2) e. NN) -> ((N / 2) x. (N / 2)) e. NN)
21anidms 480 . . 3 |- ((N / 2) e. NN -> ((N / 2) x. (N / 2)) e. NN)
3 2nn 7183 . . . . 5 |- 2 e. NN
4 nnmulcl 7124 . . . . 5 |- ((2 e. NN /\ ((N / 2) x. (N / 2)) e. NN) -> (2 x. ((N / 2) x. (N / 2))) e. NN)
53, 4mpan 759 . . . 4 |- (((N / 2) x. (N / 2)) e. NN -> (2 x. ((N / 2) x. (N / 2))) e. NN)
6 2cn 7164 . . . . . 6 |- 2 e. CC
7 nnsqcl.1 . . . . . . . 8 |- N e. NN
87nncni 7115 . . . . . . 7 |- N e. CC
9 2ne0 7174 . . . . . . 7 |- 2 =/= 0
108, 6, 9divcli 6899 . . . . . 6 |- (N / 2) e. CC
116, 10, 10mulassi 6478 . . . . 5 |- ((2 x. (N / 2)) x. (N / 2)) = (2 x. ((N / 2) x. (N / 2)))
128, 8, 6, 9divassi 6929 . . . . . 6 |- ((N x. N) / 2) = (N x. (N / 2))
138sqvali 7859 . . . . . . 7 |- (N^2) = (N x. N)
1413opreq1i 4892 . . . . . 6 |- ((N^2) / 2) = ((N x. N) / 2)
158, 6, 9divcan2i 6905 . . . . . . 7 |- (2 x. (N / 2)) = N
1615opreq1i 4892 . . . . . 6 |- ((2 x. (N / 2)) x. (N / 2)) = (N x. (N / 2))
1712, 14, 163eqtr4ri 1923 . . . . 5 |- ((2 x. (N / 2)) x. (N / 2)) = ((N^2) / 2)
1811, 17eqtr3i 1910 . . . 4 |- (2 x. ((N / 2) x. (N / 2))) = ((N^2) / 2)
195, 18syl5eqelr 1976 . . 3 |- (((N / 2) x. (N / 2)) e. NN -> ((N^2) / 2) e. NN)
202, 19syl 12 . 2 |- ((N / 2) e. NN -> ((N^2) / 2) e. NN)
21 nnmulcl 7124 . . . . . 6 |- ((((N + 1) / 2) e. NN /\ ((N + 1) / 2) e. NN) -> (((N + 1) / 2) x. ((N + 1) / 2)) e. NN)
2221anidms 480 . . . . 5 |- (((N + 1) / 2) e. NN -> (((N + 1) / 2) x. ((N + 1) / 2)) e. NN)
23 nnmulcl 7124 . . . . . 6 |- ((2 e. NN /\ (((N + 1) / 2) x. ((N + 1) / 2)) e. NN) -> (2 x. (((N + 1) / 2) x. ((N + 1) / 2))) e. NN)
243, 23mpan 759 . . . . 5 |- ((((N + 1) / 2) x. ((N + 1) / 2)) e. NN -> (2 x. (((N + 1) / 2) x. ((N + 1) / 2))) e. NN)
25 ax1cn 6422 . . . . . . . . . . 11 |- 1 e. CC
268, 25addcli 6473 . . . . . . . . . 10 |- (N + 1) e. CC
2726, 6, 9divcan2i 6905 . . . . . . . . 9 |- (2 x. ((N + 1) / 2)) = (N + 1)
2827opreq1i 4892 . . . . . . . 8 |- ((2 x. ((N + 1) / 2)) x. ((N + 1) / 2)) = ((N + 1) x. ((N + 1) / 2))
2926, 6, 9divcli 6899 . . . . . . . . 9 |- ((N + 1) / 2) e. CC
306, 29, 29mulassi 6478 . . . . . . . 8 |- ((2 x. ((N + 1) / 2)) x. ((N + 1) / 2)) = (2 x. (((N + 1) / 2) x. ((N + 1) / 2)))
3126, 26, 6, 9divassi 6929 . . . . . . . . 9 |- (((N + 1) x. (N + 1)) / 2) = ((N + 1) x. ((N + 1) / 2))
3226sqvali 7859 . . . . . . . . . . . 12 |- ((N + 1)^2) = ((N + 1) x. (N + 1))
338, 25binom2i 7890 . . . . . . . . . . . . 13 |- ((N + 1)^2) = (((N^2) + (2 x. (N x. 1))) + (1^2))
348mulid1i 6485 . . . . . . . . . . . . . . . 16 |- (N x. 1) = N
3534opreq2i 4893 . . . . . . . . . . . . . . 15 |- (2 x. (N x. 1)) = (2 x. N)
3635opreq2i 4893 . . . . . . . . . . . . . 14 |- ((N^2) + (2 x. (N x. 1))) = ((N^2) + (2 x. N))
37 sq1 7882 . . . . . . . . . . . . . 14 |- (1^2) = 1
3836, 37opreq12i 4894 . . . . . . . . . . . . 13 |- (((N^2) + (2 x. (N x. 1))) + (1^2)) = (((N^2) + (2 x. N)) + 1)
397nnsqcli 7910 . . . . . . . . . . . . . . 15 |- (N^2) e. NN
4039nncni 7115 . . . . . . . . . . . . . 14 |- (N^2) e. CC
416, 8mulcli 6474 . . . . . . . . . . . . . 14 |- (2 x. N) e. CC
4240, 41, 25add23i 6495 . . . . . . . . . . . . 13 |- (((N^2) + (2 x. N)) + 1) = (((N^2) + 1) + (2 x. N))
4333, 38, 423eqtri 1912 . . . . . . . . . . . 12 |- ((N + 1)^2) = (((N^2) + 1) + (2 x. N))
4432, 43eqtr3i 1910 . . . . . . . . . . 11 |- ((N + 1) x. (N + 1)) = (((N^2) + 1) + (2 x. N))
4544opreq1i 4892 . . . . . . . . . 10 |- (((N + 1) x. (N + 1)) / 2) = ((((N^2) + 1) + (2 x. N)) / 2)
4639nnrei 7114 . . . . . . . . . . . . 13 |- (N^2) e. RR
47 1re 6598 . . . . . . . . . . . . 13 |- 1 e. RR
4846, 47readdcli 6487 . . . . . . . . . . . 12 |- ((N^2) + 1) e. RR
4948recni 6467 . . . . . . . . . . 11 |- ((N^2) + 1) e. CC
5049, 41, 6, 9divdiri 6930 . . . . . . . . . 10 |- ((((N^2) + 1) + (2 x. N)) / 2) = ((((N^2) + 1) / 2) + ((2 x. N) / 2))
518, 6, 9divcan3i 6934 . . . . . . . . . . 11 |- ((2 x. N) / 2) = N
5251opreq2i 4893 . . . . . . . . . 10 |- ((((N^2) + 1) / 2) + ((2 x. N) / 2)) = ((((N^2) + 1) / 2) + N)
5345, 50, 523eqtri 1912 . . . . . . . . 9 |- (((N + 1) x. (N + 1)) / 2) = ((((N^2) + 1) / 2) + N)
5431, 53eqtr3i 1910 . . . . . . . 8 |- ((N + 1) x. ((N + 1) / 2)) = ((((N^2) + 1) / 2) + N)
5528, 30, 543eqtr3i 1918 . . . . . . 7 |- (2 x. (((N + 1) / 2) x. ((N + 1) / 2))) = ((((N^2) + 1) / 2) + N)
5655eleq1i 1960 . . . . . 6 |- ((2 x. (((N + 1) / 2) x. ((N + 1) / 2))) e. NN <-> ((((N^2) + 1) / 2) + N) e. NN)
578addid2i 6484 . . . . . . . . 9 |- (0 + N) = N
58 2re 7163 . . . . . . . . . . 11 |- 2 e. RR
5939nngt0i 7133 . . . . . . . . . . . 12 |- 0 < (N^2)
60 lt01 6871 . . . . . . . . . . . 12 |- 0 < 1
6146, 47, 59, 60addgt0ii 6781 . . . . . . . . . . 11 |- 0 < ((N^2) + 1)
62 2pos 7173 . . . . . . . . . . 11 |- 0 < 2
6348, 58, 61, 62divgt0ii 7042 . . . . . . . . . 10 |- 0 < (((N^2) + 1) / 2)
64 0re 6603 . . . . . . . . . . 11 |- 0 e. RR
6548, 58, 9redivcli 6976 . . . . . . . . . . 11 |- (((N^2) + 1) / 2) e. RR
667nnrei 7114 . . . . . . . . . . 11 |- N e. RR
6764, 65, 66ltadd1i 6766 . . . . . . . . . 10 |- (0 < (((N^2) + 1) / 2) <-> (0 + N) < ((((N^2) + 1) / 2) + N))
6863, 67mpbi 206 . . . . . . . . 9 |- (0 + N) < ((((N^2) + 1) / 2) + N)
6957, 68eqbrtrri 3358 . . . . . . . 8 |- N < ((((N^2) + 1) / 2) + N)
70 nnsub 7141 . . . . . . . . 9 |- ((N e. NN /\ ((((N^2) + 1) / 2) + N) e. NN) -> (N < ((((N^2) + 1) / 2) + N) <-> (((((N^2) + 1) / 2) + N) - N) e. NN))
717, 70mpan 759 . . . . . . . 8 |- (((((N^2) + 1) / 2) + N) e. NN -> (N < ((((N^2) + 1) / 2) + N) <-> (((((N^2) + 1) / 2) + N) - N) e. NN))
7269, 71mpbii 210 . . . . . . 7 |- (((((N^2) + 1) / 2) + N) e. NN -> (((((N^2) + 1) / 2) + N) - N) e. NN)
7365recni 6467 . . . . . . . . 9 |- (((N^2) + 1) / 2) e. CC
7473, 8, 8addsubassi 6546 . . . . . . . 8 |- (((((N^2) + 1) / 2) + N) - N) = ((((N^2) + 1) / 2) + (N - N))
758subidi 6551 . . . . . . . . 9 |- (N - N) = 0
7675opreq2i 4893 . . . . . . . 8 |- ((((N^2) + 1) / 2) + (N - N)) = ((((N^2) + 1) / 2) + 0)
7773addid1i 6483 . . . . . . . 8 |- ((((N^2) + 1) / 2) + 0) = (((N^2) + 1) / 2)
7874, 76, 773eqtri 1912 . . . . . . 7 |- (((((N^2) + 1) / 2) + N) - N) = (((N^2) + 1) / 2)
7972, 78syl5eqelr 1976 . . . . . 6 |- (((((N^2) + 1) / 2) + N) e. NN -> (((N^2) + 1) / 2) e. NN)
8056, 79sylbi 216 . . . . 5 |- ((2 x. (((N + 1) / 2) x. ((N + 1) / 2))) e. NN -> (((N^2) + 1) / 2) e. NN)
8122, 24, 803syl 24 . . . 4 |- (((N + 1) / 2) e. NN -> (((N^2) + 1) / 2) e. NN)
8281con3i 114 . . 3 |- (-. (((N^2) + 1) / 2) e. NN -> -. ((N + 1) / 2) e. NN)
8339nneoi 7409 . . 3 |- (((N^2) / 2) e. NN <-> -. (((N^2) + 1) / 2) e. NN)
847nneoi 7409 . . 3 |- ((N / 2) e. NN <-> -. ((N + 1) / 2) e. NN)
8582, 83, 843imtr4i 236 . 2 |- (((N^2) / 2) e. NN -> (N / 2) e. NN)
8620, 85impbii 174 1 |- ((N / 2) e. NN <-> ((N^2) / 2) e. NN)
Colors of variables: wff set class
Syntax hints:  -. wn 2   <-> wb 163   e. wcel 1300   class class class wbr 3338  (class class class)co 4884  0cc0 6386  1c1 6387   + caddc 6389   x. cmul 6391   - cmin 6445   / cdiv 6447  NNcn 6449   < clt 6653  2c2 7145  ^cexp 7811
This theorem is referenced by:  sqr2irrlem1 7974
This theorem was proved from axioms:  ax-1 4  ax-2 5  ax-3 6  ax-mp 7  ax-7 1304  ax-gen 1305  ax-8 1306  ax-9 1307  ax-10 1308  ax-11 1309  ax-12 1310  ax-13 1311  ax-14 1312  ax-17 1317  ax-4 1319  ax-5o 1321  ax-6o 1324  ax-9o 1481  ax-10o 1500  ax-16 1580  ax-11o 1588  ax-ext 1865  ax-rep 3428  ax-sep 3438  ax-nul 3445  ax-pow 3481  ax-pr 3524  ax-un 3790  ax-inf2 5731
This theorem depends on definitions:  df-bi 164  df-or 241  df-an 242  df-3or 859  df-3an 860  df-ex 1327  df-sb 1536  df-eu 1775  df-mo 1776  df-clab 1872  df-cleq 1877  df-clel 1880  df-ne 2019  df-nel 2020  df-ral 2109  df-rex 2110  df-reu 2111  df-rab 2112  df-v 2294  df-sbc 2454  df-csb 2541  df-dif 2597  df-un 2600  df-in 2603  df-ss 2605  df-pss 2607  df-nul 2876  df-if 2983  df-pw 3035  df-sn 3049  df-pr 3050  df-tp 3052  df-op 3053  df-uni 3178  df-int 3215  df-iun 3257  df-br 3339  df-opab 3396  df-tr 3412  df-eprel 3583  df-id 3586  df-po 3591  df-so 3604  df-fr 3625  df-we 3644  df-ord 3660  df-on 3661  df-lim 3662  df-suc 3663  df-om 3950  df-xp 4000  df-rel 4001  df-cnv 4002  df-co 4003  df-dm 4004  df-rn 4005  df-res 4006  df-ima 4007  df-fun 4008  df-fn 4009  df-f 4010  df-f1 4011  df-fo 4012  df-f1o 4013  df-fv 4014  df-opr 4886  df-oprab 4887  df-mpt 5006  df-1st 5020  df-2nd 5021  df-iota 5089  df-rdg 5140  df-1o 5177  df-oadd 5179  df-omul 5180  df-er 5318  df-ec 5320  df-qs 5323  df-en 5427  df-dom 5428  df-sdom 5429  df-undef 5556  df-riota 5560  df-ni 6152  df-pli 6153  df-mi 6154  df-lti 6155  df-plpq 6187  df-mpq 6188  df-enq 6189  df-nq 6190  df-plq 6191  df-mq 6192  df-rq 6193  df-ltq 6194  df-1q 6195  df-np 6238  df-1p 6239  df-plp 6240  df-mp 6241  df-ltp 6242  df-plpr 6316  df-mpr 6317  df-enr 6318  df-nr 6319  df-plr 6320  df-mr 6321  df-ltr 6322  df-0r 6323  df-1r 6324  df-m1r 6325  df-c 6392  df-0 6393  df-1 6394  df-i 6395  df-r 6396  df-plus 6397  df-mul 6398  df-lt 6399  df-sub 6511  df-neg 6513  df-pnf 6654  df-mnf 6655  df-xr 6656  df-ltxr 6657  df-le 6658  df-div 6892  df-n 7108  df-2 7154  df-n0 7309  df-z 7345  df-seq1 7721  df-exp 7812
Copyright terms: Public domain