Metamath Proof Explorer


Theorem rmxycomplete

Description: The X and Y sequences taken together enumerate all solutions to the corresponding Pell equation in the right half-plane. This is Metamath 100 proof #39. (Contributed by Stefan O'Rear, 22-Sep-2014)

Ref Expression
Assertion rmxycomplete A2X0YX2A21Y2=1nX=AXrmnY=AYrmn

Proof

Step Hyp Ref Expression
1 rmspecnonsq A2A21
2 1 3ad2ant1 A2X0YA21
3 pellfund14b A21X+A21YPell14QRA21nX+A21Y=PellFundA21n
4 2 3 syl A2X0YX+A21YPell14QRA21nX+A21Y=PellFundA21n
5 nn0re X0X
6 5 3ad2ant2 A2X0YX
7 rmspecpos A2A21+
8 7 rpsqrtcld A2A21+
9 8 rpred A2A21
10 9 3ad2ant1 A2X0YA21
11 zre YY
12 11 3ad2ant3 A2X0YY
13 10 12 remulcld A2X0YA21Y
14 6 13 readdcld A2X0YX+A21Y
15 14 biantrurd A2X0Yx0yX+A21Y=x+A21yx2A21y2=1X+A21Yx0yX+A21Y=x+A21yx2A21y2=1
16 simpl2 A2X0YX2A21Y2=1X0
17 simpl3 A2X0YX2A21Y2=1Y
18 eqidd A2X0YX2A21Y2=1X+A21Y=X+A21Y
19 simpr A2X0YX2A21Y2=1X2A21Y2=1
20 oveq1 x=Xx+A21y=X+A21y
21 20 eqeq2d x=XX+A21Y=x+A21yX+A21Y=X+A21y
22 oveq1 x=Xx2=X2
23 22 oveq1d x=Xx2A21y2=X2A21y2
24 23 eqeq1d x=Xx2A21y2=1X2A21y2=1
25 21 24 anbi12d x=XX+A21Y=x+A21yx2A21y2=1X+A21Y=X+A21yX2A21y2=1
26 oveq2 y=YA21y=A21Y
27 26 oveq2d y=YX+A21y=X+A21Y
28 27 eqeq2d y=YX+A21Y=X+A21yX+A21Y=X+A21Y
29 oveq1 y=Yy2=Y2
30 29 oveq2d y=YA21y2=A21Y2
31 30 oveq2d y=YX2A21y2=X2A21Y2
32 31 eqeq1d y=YX2A21y2=1X2A21Y2=1
33 28 32 anbi12d y=YX+A21Y=X+A21yX2A21y2=1X+A21Y=X+A21YX2A21Y2=1
34 25 33 rspc2ev X0YX+A21Y=X+A21YX2A21Y2=1x0yX+A21Y=x+A21yx2A21y2=1
35 16 17 18 19 34 syl112anc A2X0YX2A21Y2=1x0yX+A21Y=x+A21yx2A21y2=1
36 35 ex A2X0YX2A21Y2=1x0yX+A21Y=x+A21yx2A21y2=1
37 rmspecsqrtnq A2A21
38 37 3ad2ant1 A2X0YA21
39 38 adantr A2X0Yx0yA21
40 nn0ssq 0
41 simp2 A2X0YX0
42 40 41 sselid A2X0YX
43 42 adantr A2X0Yx0yX
44 zq YY
45 44 3ad2ant3 A2X0YY
46 45 adantr A2X0Yx0yY
47 40 sseli x0x
48 47 ad2antrl A2X0Yx0yx
49 zq yy
50 49 ad2antll A2X0Yx0yy
51 qirropth A21XYxyX+A21Y=x+A21yX=xY=y
52 39 43 46 48 50 51 syl122anc A2X0Yx0yX+A21Y=x+A21yX=xY=y
53 52 biimpd A2X0Yx0yX+A21Y=x+A21yX=xY=y
54 53 anim1d A2X0Yx0yX+A21Y=x+A21yx2A21y2=1X=xY=yx2A21y2=1
55 oveq1 X=xX2=x2
56 oveq1 Y=yY2=y2
57 56 oveq2d Y=yA21Y2=A21y2
58 55 57 oveqan12d X=xY=yX2A21Y2=x2A21y2
59 58 eqcomd X=xY=yx2A21y2=X2A21Y2
60 59 eqeq1d X=xY=yx2A21y2=1X2A21Y2=1
61 60 biimpa X=xY=yx2A21y2=1X2A21Y2=1
62 54 61 syl6 A2X0Yx0yX+A21Y=x+A21yx2A21y2=1X2A21Y2=1
63 62 rexlimdvva A2X0Yx0yX+A21Y=x+A21yx2A21y2=1X2A21Y2=1
64 36 63 impbid A2X0YX2A21Y2=1x0yX+A21Y=x+A21yx2A21y2=1
65 elpell14qr A21X+A21YPell14QRA21X+A21Yx0yX+A21Y=x+A21yx2A21y2=1
66 2 65 syl A2X0YX+A21YPell14QRA21X+A21Yx0yX+A21Y=x+A21yx2A21y2=1
67 15 64 66 3bitr4d A2X0YX2A21Y2=1X+A21YPell14QRA21
68 38 adantr A2X0YnA21
69 42 adantr A2X0YnX
70 45 adantr A2X0YnY
71 frmx Xrm:2×0
72 71 a1i A2X0YnXrm:2×0
73 simpl1 A2X0YnA2
74 simpr A2X0Ynn
75 72 73 74 fovcdmd A2X0YnAXrmn0
76 40 75 sselid A2X0YnAXrmn
77 zssq
78 frmy Yrm:2×
79 78 a1i A2X0YnYrm:2×
80 79 73 74 fovcdmd A2X0YnAYrmn
81 77 80 sselid A2X0YnAYrmn
82 qirropth A21XYAXrmnAYrmnX+A21Y=AXrmn+A21AYrmnX=AXrmnY=AYrmn
83 68 69 70 76 81 82 syl122anc A2X0YnX+A21Y=AXrmn+A21AYrmnX=AXrmnY=AYrmn
84 rmxyval A2nAXrmn+A21AYrmn=A+A21n
85 84 3ad2antl1 A2X0YnAXrmn+A21AYrmn=A+A21n
86 rmspecfund A2PellFundA21=A+A21
87 86 3ad2ant1 A2X0YPellFundA21=A+A21
88 87 adantr A2X0YnPellFundA21=A+A21
89 88 oveq1d A2X0YnPellFundA21n=A+A21n
90 85 89 eqtr4d A2X0YnAXrmn+A21AYrmn=PellFundA21n
91 90 eqeq2d A2X0YnX+A21Y=AXrmn+A21AYrmnX+A21Y=PellFundA21n
92 83 91 bitr3d A2X0YnX=AXrmnY=AYrmnX+A21Y=PellFundA21n
93 92 rexbidva A2X0YnX=AXrmnY=AYrmnnX+A21Y=PellFundA21n
94 4 67 93 3bitr4d A2X0YX2A21Y2=1nX=AXrmnY=AYrmn