Metamath Proof Explorer


Theorem gausslemma2dlem3

Description: Lemma 3 for gausslemma2d . (Contributed by AV, 4-Jul-2021)

Ref Expression
Hypotheses gausslemma2d.p φ P 2
gausslemma2d.h H = P 1 2
gausslemma2d.r R = x 1 H if x 2 < P 2 x 2 P x 2
gausslemma2d.m M = P 4
Assertion gausslemma2dlem3 φ k M + 1 H R k = P k 2

Proof

Step Hyp Ref Expression
1 gausslemma2d.p φ P 2
2 gausslemma2d.h H = P 1 2
3 gausslemma2d.r R = x 1 H if x 2 < P 2 x 2 P x 2
4 gausslemma2d.m M = P 4
5 oveq1 x = k x 2 = k 2
6 5 breq1d x = k x 2 < P 2 k 2 < P 2
7 5 oveq2d x = k P x 2 = P k 2
8 6 5 7 ifbieq12d x = k if x 2 < P 2 x 2 P x 2 = if k 2 < P 2 k 2 P k 2
9 8 adantl φ k M + 1 H x = k if x 2 < P 2 x 2 P x 2 = if k 2 < P 2 k 2 P k 2
10 1 gausslemma2dlem0a φ P
11 elfz2 k M + 1 H M + 1 H k M + 1 k k H
12 4 oveq1i M + 1 = P 4 + 1
13 12 breq1i M + 1 k P 4 + 1 k
14 nnre P P
15 4re 4
16 15 a1i P 4
17 4ne0 4 0
18 17 a1i P 4 0
19 14 16 18 redivcld P P 4
20 19 adantl k P P 4
21 fllelt P 4 P 4 P 4 P 4 < P 4 + 1
22 20 21 syl k P P 4 P 4 P 4 < P 4 + 1
23 19 flcld P P 4
24 23 zred P P 4
25 peano2re P 4 P 4 + 1
26 24 25 syl P P 4 + 1
27 26 adantl k P P 4 + 1
28 zre k k
29 28 adantr k P k
30 ltleletr P 4 P 4 + 1 k P 4 < P 4 + 1 P 4 + 1 k P 4 k
31 20 27 29 30 syl3anc k P P 4 < P 4 + 1 P 4 + 1 k P 4 k
32 31 expd k P P 4 < P 4 + 1 P 4 + 1 k P 4 k
33 32 adantld k P P 4 P 4 P 4 < P 4 + 1 P 4 + 1 k P 4 k
34 22 33 mpd k P P 4 + 1 k P 4 k
35 34 imp k P P 4 + 1 k P 4 k
36 14 rehalfcld P P 2
37 36 adantl k P P 2
38 2re 2
39 38 a1i k 2
40 28 39 remulcld k k 2
41 40 adantr k P k 2
42 2pos 0 < 2
43 38 42 pm3.2i 2 0 < 2
44 43 a1i k P 2 0 < 2
45 lediv1 P 2 k 2 2 0 < 2 P 2 k 2 P 2 2 k 2 2
46 37 41 44 45 syl3anc k P P 2 k 2 P 2 2 k 2 2
47 nncn P P
48 2cnne0 2 2 0
49 48 a1i P 2 2 0
50 divdiv1 P 2 2 0 2 2 0 P 2 2 = P 2 2
51 47 49 49 50 syl3anc P P 2 2 = P 2 2
52 2t2e4 2 2 = 4
53 52 oveq2i P 2 2 = P 4
54 51 53 eqtrdi P P 2 2 = P 4
55 zcn k k
56 2cnd k 2
57 2ne0 2 0
58 57 a1i k 2 0
59 55 56 58 divcan4d k k 2 2 = k
60 54 59 breqan12rd k P P 2 2 k 2 2 P 4 k
61 46 60 bitrd k P P 2 k 2 P 4 k
62 61 adantr k P P 4 + 1 k P 2 k 2 P 4 k
63 35 62 mpbird k P P 4 + 1 k P 2 k 2
64 63 exp31 k P P 4 + 1 k P 2 k 2
65 64 com23 k P 4 + 1 k P P 2 k 2
66 13 65 syl5bi k M + 1 k P P 2 k 2
67 66 3ad2ant3 M + 1 H k M + 1 k P P 2 k 2
68 67 com12 M + 1 k M + 1 H k P P 2 k 2
69 68 adantr M + 1 k k H M + 1 H k P P 2 k 2
70 69 impcom M + 1 H k M + 1 k k H P P 2 k 2
71 11 70 sylbi k M + 1 H P P 2 k 2
72 71 impcom P k M + 1 H P 2 k 2
73 elfzelz k M + 1 H k
74 73 zred k M + 1 H k
75 38 a1i k M + 1 H 2
76 74 75 remulcld k M + 1 H k 2
77 lenlt P 2 k 2 P 2 k 2 ¬ k 2 < P 2
78 36 76 77 syl2an P k M + 1 H P 2 k 2 ¬ k 2 < P 2
79 72 78 mpbid P k M + 1 H ¬ k 2 < P 2
80 10 79 sylan φ k M + 1 H ¬ k 2 < P 2
81 80 adantr φ k M + 1 H x = k ¬ k 2 < P 2
82 81 iffalsed φ k M + 1 H x = k if k 2 < P 2 k 2 P k 2 = P k 2
83 9 82 eqtrd φ k M + 1 H x = k if x 2 < P 2 x 2 P x 2 = P k 2
84 1 4 gausslemma2dlem0d φ M 0
85 nn0p1nn M 0 M + 1
86 nnuz = 1
87 85 86 eleqtrdi M 0 M + 1 1
88 84 87 syl φ M + 1 1
89 fzss1 M + 1 1 M + 1 H 1 H
90 88 89 syl φ M + 1 H 1 H
91 90 sselda φ k M + 1 H k 1 H
92 ovexd φ k M + 1 H P k 2 V
93 3 83 91 92 fvmptd2 φ k M + 1 H R k = P k 2
94 93 ralrimiva φ k M + 1 H R k = P k 2