Metamath Proof Explorer


Theorem pell14qrdich

Description: A positive Pell solution is either in the first quadrant, or its reciprocal is. (Contributed by Stefan O'Rear, 18-Sep-2014)

Ref Expression
Assertion pell14qrdich D A Pell14QR D A Pell1QR D 1 A Pell1QR D

Proof

Step Hyp Ref Expression
1 elpell14qr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1
2 1 biimpa D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1
3 simplrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b
4 elznn0 b b b 0 b 0
5 3 4 sylib D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b b 0 b 0
6 5 simprd D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 b 0
7 simplr D A Pell14QR D A a 0 b A
8 7 ad2antrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 A
9 simprl D A Pell14QR D A a 0 b a 0
10 9 ad2antrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 a 0
11 simpr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 b 0
12 simplr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 A = a + D b a 2 D b 2 = 1
13 rsp2e a 0 b 0 A = a + D b a 2 D b 2 = 1 a 0 b 0 A = a + D b a 2 D b 2 = 1
14 10 11 12 13 syl3anc D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 a 0 b 0 A = a + D b a 2 D b 2 = 1
15 8 14 jca D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 A a 0 b 0 A = a + D b a 2 D b 2 = 1
16 15 ex D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 A a 0 b 0 A = a + D b a 2 D b 2 = 1
17 elpell1qr D A Pell1QR D A a 0 b 0 A = a + D b a 2 D b 2 = 1
18 17 ad4antr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 A Pell1QR D A a 0 b 0 A = a + D b a 2 D b 2 = 1
19 16 18 sylibrd D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 A Pell1QR D
20 7 ad2antrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 A
21 pell14qrne0 D A Pell14QR D A 0
22 21 ad4antr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 A 0
23 20 22 rereccld D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 1 A
24 9 ad2antrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 a 0
25 simpr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 b 0
26 pell14qrre D A Pell14QR D A
27 26 recnd D A Pell14QR D A
28 27 21 reccld D A Pell14QR D 1 A
29 28 ad3antrrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 1 A
30 nn0cn a 0 a
31 30 ad2antrl D A Pell14QR D A a 0 b a
32 eldifi D D
33 32 nncnd D D
34 33 ad3antrrr D A Pell14QR D A a 0 b D
35 34 sqrtcld D A Pell14QR D A a 0 b D
36 zcn b b
37 36 ad2antll D A Pell14QR D A a 0 b b
38 37 negcld D A Pell14QR D A a 0 b b
39 35 38 mulcld D A Pell14QR D A a 0 b D b
40 31 39 addcld D A Pell14QR D A a 0 b a + D b
41 40 adantr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 a + D b
42 27 ad3antrrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 A
43 21 ad3antrrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 A 0
44 27 21 recidd D A Pell14QR D A 1 A = 1
45 44 ad3antrrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 A 1 A = 1
46 simprr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 a 2 D b 2 = 1
47 45 46 eqtr4d D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 A 1 A = a 2 D b 2
48 31 adantr D A Pell14QR D A a 0 b A = a + D b a
49 35 37 mulcld D A Pell14QR D A a 0 b D b
50 49 adantr D A Pell14QR D A a 0 b A = a + D b D b
51 subsq a D b a 2 D b 2 = a + D b a D b
52 48 50 51 syl2anc D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = a + D b a D b
53 35 37 sqmuld D A Pell14QR D A a 0 b D b 2 = D 2 b 2
54 34 sqsqrtd D A Pell14QR D A a 0 b D 2 = D
55 54 oveq1d D A Pell14QR D A a 0 b D 2 b 2 = D b 2
56 53 55 eqtr2d D A Pell14QR D A a 0 b D b 2 = D b 2
57 56 oveq2d D A Pell14QR D A a 0 b a 2 D b 2 = a 2 D b 2
58 57 adantr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = a 2 D b 2
59 simpr D A Pell14QR D A a 0 b A = a + D b A = a + D b
60 35 37 mulneg2d D A Pell14QR D A a 0 b D b = D b
61 60 oveq2d D A Pell14QR D A a 0 b a + D b = a + D b
62 negsub a D b a + D b = a D b
63 62 eqcomd a D b a D b = a + D b
64 31 49 63 syl2anc D A Pell14QR D A a 0 b a D b = a + D b
65 61 64 eqtr4d D A Pell14QR D A a 0 b a + D b = a D b
66 65 adantr D A Pell14QR D A a 0 b A = a + D b a + D b = a D b
67 59 66 oveq12d D A Pell14QR D A a 0 b A = a + D b A a + D b = a + D b a D b
68 52 58 67 3eqtr4d D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = A a + D b
69 68 adantrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 a 2 D b 2 = A a + D b
70 47 69 eqtrd D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 A 1 A = A a + D b
71 29 41 42 43 70 mulcanad D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 1 A = a + D b
72 71 adantr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 1 A = a + D b
73 37 ad2antrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 b
74 sqneg b b 2 = b 2
75 73 74 syl D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 b 2 = b 2
76 75 oveq2d D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 D b 2 = D b 2
77 76 oveq2d D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 a 2 D b 2 = a 2 D b 2
78 simplrr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 a 2 D b 2 = 1
79 77 78 eqtrd D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 a 2 D b 2 = 1
80 72 79 jca D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 1 A = a + D b a 2 D b 2 = 1
81 oveq2 c = b D c = D b
82 81 oveq2d c = b a + D c = a + D b
83 82 eqeq2d c = b 1 A = a + D c 1 A = a + D b
84 oveq1 c = b c 2 = b 2
85 84 oveq2d c = b D c 2 = D b 2
86 85 oveq2d c = b a 2 D c 2 = a 2 D b 2
87 86 eqeq1d c = b a 2 D c 2 = 1 a 2 D b 2 = 1
88 83 87 anbi12d c = b 1 A = a + D c a 2 D c 2 = 1 1 A = a + D b a 2 D b 2 = 1
89 88 rspcev b 0 1 A = a + D b a 2 D b 2 = 1 c 0 1 A = a + D c a 2 D c 2 = 1
90 25 80 89 syl2anc D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 c 0 1 A = a + D c a 2 D c 2 = 1
91 rspe a 0 c 0 1 A = a + D c a 2 D c 2 = 1 a 0 c 0 1 A = a + D c a 2 D c 2 = 1
92 24 90 91 syl2anc D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 a 0 c 0 1 A = a + D c a 2 D c 2 = 1
93 23 92 jca D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 1 A a 0 c 0 1 A = a + D c a 2 D c 2 = 1
94 93 ex D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 1 A a 0 c 0 1 A = a + D c a 2 D c 2 = 1
95 elpell1qr D 1 A Pell1QR D 1 A a 0 c 0 1 A = a + D c a 2 D c 2 = 1
96 95 ad4antr D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 1 A Pell1QR D 1 A a 0 c 0 1 A = a + D c a 2 D c 2 = 1
97 94 96 sylibrd D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 1 A Pell1QR D
98 19 97 orim12d D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 b 0 b 0 A Pell1QR D 1 A Pell1QR D
99 6 98 mpd D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 A Pell1QR D 1 A Pell1QR D
100 99 ex D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 A Pell1QR D 1 A Pell1QR D
101 100 rexlimdvva D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 A Pell1QR D 1 A Pell1QR D
102 101 expimpd D A Pell14QR D A a 0 b A = a + D b a 2 D b 2 = 1 A Pell1QR D 1 A Pell1QR D
103 2 102 mpd D A Pell14QR D A Pell1QR D 1 A Pell1QR D