Metamath Proof Explorer


Theorem pellqrex

Description: There is a nontrivial solution of a Pell equation in the first quadrant. (Contributed by Stefan O'Rear, 18-Sep-2014)

Ref Expression
Assertion pellqrex D x Pell1QR D 1 < x

Proof

Step Hyp Ref Expression
1 eldifi D D
2 eldifn D ¬ D
3 1 anim1i D D D D
4 fveq2 a = D a = D
5 4 eleq1d a = D a D
6 df-squarenn = a | a
7 5 6 elrab2 D D D
8 3 7 sylibr D D D
9 2 8 mtand D ¬ D
10 pellex D ¬ D c d c 2 D d 2 = 1
11 1 9 10 syl2anc D c d c 2 D d 2 = 1
12 simpll D c d c 2 D d 2 = 1 D
13 nnnn0 c c 0
14 13 adantr c d c 0
15 14 ad2antlr D c d c 2 D d 2 = 1 c 0
16 nnnn0 d d 0
17 16 adantl c d d 0
18 17 ad2antlr D c d c 2 D d 2 = 1 d 0
19 simpr D c d c 2 D d 2 = 1 c 2 D d 2 = 1
20 pellqrexplicit D c 0 d 0 c 2 D d 2 = 1 c + D d Pell1QR D
21 12 15 18 19 20 syl31anc D c d c 2 D d 2 = 1 c + D d Pell1QR D
22 1re 1
23 22 a1i D c d 1
24 22 22 readdcli 1 + 1
25 24 a1i D c d 1 + 1
26 nnre c c
27 26 ad2antrl D c d c
28 1 adantr D c d D
29 28 nnrpd D c d D +
30 29 rpsqrtcld D c d D +
31 30 rpred D c d D
32 nnre d d
33 32 ad2antll D c d d
34 31 33 remulcld D c d D d
35 27 34 readdcld D c d c + D d
36 22 ltp1i 1 < 1 + 1
37 36 a1i D c d 1 < 1 + 1
38 nnge1 c 1 c
39 38 ad2antrl D c d 1 c
40 1t1e1 1 1 = 1
41 nnge1 D 1 D
42 sq1 1 2 = 1
43 42 a1i D 1 2 = 1
44 nncn D D
45 44 sqsqrtd D D 2 = D
46 41 43 45 3brtr4d D 1 2 D 2
47 22 a1i D 1
48 nnrp D D +
49 48 rpsqrtcld D D +
50 49 rpred D D
51 0le1 0 1
52 51 a1i D 0 1
53 49 rpge0d D 0 D
54 47 50 52 53 le2sqd D 1 D 1 2 D 2
55 46 54 mpbird D 1 D
56 28 55 syl D c d 1 D
57 nnge1 d 1 d
58 57 ad2antll D c d 1 d
59 23 51 jctir D c d 1 0 1
60 lemul12a 1 0 1 D 1 0 1 d 1 D 1 d 1 1 D d
61 59 31 59 33 60 syl22anc D c d 1 D 1 d 1 1 D d
62 56 58 61 mp2and D c d 1 1 D d
63 40 62 eqbrtrrid D c d 1 D d
64 23 23 27 34 39 63 le2addd D c d 1 + 1 c + D d
65 23 25 35 37 64 ltletrd D c d 1 < c + D d
66 65 adantr D c d c 2 D d 2 = 1 1 < c + D d
67 breq2 x = c + D d 1 < x 1 < c + D d
68 67 rspcev c + D d Pell1QR D 1 < c + D d x Pell1QR D 1 < x
69 21 66 68 syl2anc D c d c 2 D d 2 = 1 x Pell1QR D 1 < x
70 69 ex D c d c 2 D d 2 = 1 x Pell1QR D 1 < x
71 70 rexlimdvva D c d c 2 D d 2 = 1 x Pell1QR D 1 < x
72 11 71 mpd D x Pell1QR D 1 < x