Metamath Proof Explorer


Theorem pell1234qrreccl

Description: General solutions of the Pell equation are closed under reciprocals. (Contributed by Stefan O'Rear, 18-Sep-2014)

Ref Expression
Assertion pell1234qrreccl D A Pell1234QR D 1 A Pell1234QR D

Proof

Step Hyp Ref Expression
1 elpell1234qr D A Pell1234QR D A a b A = a + D b a 2 D b 2 = 1
2 1 biimpa D A Pell1234QR D A a b A = a + D b a 2 D b 2 = 1
3 pell1234qrre D A Pell1234QR D A
4 pell1234qrne0 D A Pell1234QR D A 0
5 3 4 rereccld D A Pell1234QR D 1 A
6 5 ad2antrr D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 1 A
7 simplrl D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a
8 simplrr D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 b
9 8 znegcld D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 b
10 5 recnd D A Pell1234QR D 1 A
11 10 ad2antrr D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 1 A
12 zcn a a
13 12 adantr a b a
14 13 ad2antlr D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a
15 eldifi D D
16 15 nncnd D D
17 16 ad3antrrr D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 D
18 17 sqrtcld D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 D
19 8 zcnd D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 b
20 19 negcld D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 b
21 18 20 mulcld D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 D b
22 14 21 addcld D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a + D b
23 3 recnd D A Pell1234QR D A
24 23 ad2antrr D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 A
25 4 ad2antrr D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 A 0
26 18 19 sqmuld D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 D b 2 = D 2 b 2
27 17 sqsqrtd D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 D 2 = D
28 27 oveq1d D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 D 2 b 2 = D b 2
29 26 28 eqtr2d D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 D b 2 = D b 2
30 29 oveq2d D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a 2 D b 2 = a 2 D b 2
31 simprr D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a 2 D b 2 = 1
32 18 19 mulcld D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 D b
33 subsq a D b a 2 D b 2 = a + D b a D b
34 14 32 33 syl2anc D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a 2 D b 2 = a + D b a D b
35 30 31 34 3eqtr3d D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 1 = a + D b a D b
36 24 25 recidd D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 A 1 A = 1
37 simprl D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 A = a + D b
38 18 19 mulneg2d D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 D b = D b
39 38 oveq2d D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a + D b = a + D b
40 14 32 negsubd D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a + D b = a D b
41 39 40 eqtrd D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a + D b = a D b
42 37 41 oveq12d D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 A a + D b = a + D b a D b
43 35 36 42 3eqtr4d D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 A 1 A = A a + D b
44 11 22 24 25 43 mulcanad D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 1 A = a + D b
45 sqneg b b 2 = b 2
46 19 45 syl D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 b 2 = b 2
47 46 oveq2d D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 D b 2 = D b 2
48 47 oveq2d D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a 2 D b 2 = a 2 D b 2
49 48 31 eqtrd D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 a 2 D b 2 = 1
50 oveq1 c = a c + D d = a + D d
51 50 eqeq2d c = a 1 A = c + D d 1 A = a + D d
52 oveq1 c = a c 2 = a 2
53 52 oveq1d c = a c 2 D d 2 = a 2 D d 2
54 53 eqeq1d c = a c 2 D d 2 = 1 a 2 D d 2 = 1
55 51 54 anbi12d c = a 1 A = c + D d c 2 D d 2 = 1 1 A = a + D d a 2 D d 2 = 1
56 oveq2 d = b D d = D b
57 56 oveq2d d = b a + D d = a + D b
58 57 eqeq2d d = b 1 A = a + D d 1 A = a + D b
59 oveq1 d = b d 2 = b 2
60 59 oveq2d d = b D d 2 = D b 2
61 60 oveq2d d = b a 2 D d 2 = a 2 D b 2
62 61 eqeq1d d = b a 2 D d 2 = 1 a 2 D b 2 = 1
63 58 62 anbi12d d = b 1 A = a + D d a 2 D d 2 = 1 1 A = a + D b a 2 D b 2 = 1
64 55 63 rspc2ev a b 1 A = a + D b a 2 D b 2 = 1 c d 1 A = c + D d c 2 D d 2 = 1
65 7 9 44 49 64 syl112anc D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 c d 1 A = c + D d c 2 D d 2 = 1
66 6 65 jca D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 1 A c d 1 A = c + D d c 2 D d 2 = 1
67 66 ex D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 1 A c d 1 A = c + D d c 2 D d 2 = 1
68 67 rexlimdvva D A Pell1234QR D a b A = a + D b a 2 D b 2 = 1 1 A c d 1 A = c + D d c 2 D d 2 = 1
69 68 adantld D A Pell1234QR D A a b A = a + D b a 2 D b 2 = 1 1 A c d 1 A = c + D d c 2 D d 2 = 1
70 2 69 mpd D A Pell1234QR D 1 A c d 1 A = c + D d c 2 D d 2 = 1
71 elpell1234qr D 1 A Pell1234QR D 1 A c d 1 A = c + D d c 2 D d 2 = 1
72 71 adantr D A Pell1234QR D 1 A Pell1234QR D 1 A c d 1 A = c + D d c 2 D d 2 = 1
73 70 72 mpbird D A Pell1234QR D 1 A Pell1234QR D