Users' Mathboxes Mathbox for Stefan O'Rear < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  pell1234qrdich Unicode version

Theorem pell1234qrdich 26269
Description: A general Pell solution is either a positive solution, or its negation is. (Contributed by Stefan O'Rear, 18-Sep-2014.)
Assertion
Ref Expression
pell1234qrdich  |-  ( ( D  e.  ( NN 
\NN )  /\  A  e.  (Pell1234QR `  D ) )  -> 
( A  e.  (Pell14QR `  D )  \/  -u A  e.  (Pell14QR `  D )
) )

Proof of Theorem pell1234qrdich
Dummy variables  a 
b  c  d are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 elpell1234qr 26259 . . 3  |-  ( D  e.  ( NN  \NN )  -> 
( A  e.  (Pell1234QR `  D )  <->  ( A  e.  RR  /\  E. a  e.  ZZ  E. b  e.  ZZ  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) ) ) )
2 simplr 731 . . . . . . . . . 10  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  A  e.  RR )
32ad2antrr 706 . . . . . . . . 9  |-  ( ( ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  a  e.  NN0 )  /\  E. b  e.  ZZ  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  A  e.  RR )
4 oveq1 5952 . . . . . . . . . . . . . 14  |-  ( c  =  a  ->  (
c  +  ( ( sqr `  D )  x.  b ) )  =  ( a  +  ( ( sqr `  D
)  x.  b ) ) )
54eqeq2d 2369 . . . . . . . . . . . . 13  |-  ( c  =  a  ->  ( A  =  ( c  +  ( ( sqr `  D )  x.  b
) )  <->  A  =  ( a  +  ( ( sqr `  D
)  x.  b ) ) ) )
6 oveq1 5952 . . . . . . . . . . . . . . 15  |-  ( c  =  a  ->  (
c ^ 2 )  =  ( a ^
2 ) )
76oveq1d 5960 . . . . . . . . . . . . . 14  |-  ( c  =  a  ->  (
( c ^ 2 )  -  ( D  x.  ( b ^
2 ) ) )  =  ( ( a ^ 2 )  -  ( D  x.  (
b ^ 2 ) ) ) )
87eqeq1d 2366 . . . . . . . . . . . . 13  |-  ( c  =  a  ->  (
( ( c ^
2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1  <->  (
( a ^ 2 )  -  ( D  x.  ( b ^
2 ) ) )  =  1 ) )
95, 8anbi12d 691 . . . . . . . . . . . 12  |-  ( c  =  a  ->  (
( A  =  ( c  +  ( ( sqr `  D )  x.  b ) )  /\  ( ( c ^ 2 )  -  ( D  x.  (
b ^ 2 ) ) )  =  1 )  <->  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) ) )
109rexbidv 2640 . . . . . . . . . . 11  |-  ( c  =  a  ->  ( E. b  e.  ZZ  ( A  =  (
c  +  ( ( sqr `  D )  x.  b ) )  /\  ( ( c ^ 2 )  -  ( D  x.  (
b ^ 2 ) ) )  =  1 )  <->  E. b  e.  ZZ  ( A  =  (
a  +  ( ( sqr `  D )  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  (
b ^ 2 ) ) )  =  1 ) ) )
1110rspcev 2960 . . . . . . . . . 10  |-  ( ( a  e.  NN0  /\  E. b  e.  ZZ  ( A  =  ( a  +  ( ( sqr `  D )  x.  b
) )  /\  (
( a ^ 2 )  -  ( D  x.  ( b ^
2 ) ) )  =  1 ) )  ->  E. c  e.  NN0  E. b  e.  ZZ  ( A  =  ( c  +  ( ( sqr `  D )  x.  b
) )  /\  (
( c ^ 2 )  -  ( D  x.  ( b ^
2 ) ) )  =  1 ) )
1211adantll 694 . . . . . . . . 9  |-  ( ( ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  a  e.  NN0 )  /\  E. b  e.  ZZ  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  E. c  e.  NN0  E. b  e.  ZZ  ( A  =  ( c  +  ( ( sqr `  D )  x.  b
) )  /\  (
( c ^ 2 )  -  ( D  x.  ( b ^
2 ) ) )  =  1 ) )
13 elpell14qr 26257 . . . . . . . . . . 11  |-  ( D  e.  ( NN  \NN )  -> 
( A  e.  (Pell14QR `  D )  <->  ( A  e.  RR  /\  E. c  e.  NN0  E. b  e.  ZZ  ( A  =  ( c  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( c ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) ) ) )
1413adantr 451 . . . . . . . . . 10  |-  ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  ->  ( A  e.  (Pell14QR `  D )  <->  ( A  e.  RR  /\  E. c  e.  NN0  E. b  e.  ZZ  ( A  =  ( c  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( c ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) ) ) )
1514ad3antrrr 710 . . . . . . . . 9  |-  ( ( ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  a  e.  NN0 )  /\  E. b  e.  ZZ  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( A  e.  (Pell14QR `  D )  <->  ( A  e.  RR  /\  E. c  e.  NN0  E. b  e.  ZZ  ( A  =  ( c  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( c ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) ) ) )
163, 12, 15mpbir2and 888 . . . . . . . 8  |-  ( ( ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  a  e.  NN0 )  /\  E. b  e.  ZZ  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  A  e.  (Pell14QR `  D
) )
1716orcd 381 . . . . . . 7  |-  ( ( ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  a  e.  NN0 )  /\  E. b  e.  ZZ  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( A  e.  (Pell14QR `  D )  \/  -u A  e.  (Pell14QR `  D )
) )
1817exp31 587 . . . . . 6  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  (
a  e.  NN0  ->  ( E. b  e.  ZZ  ( A  =  (
a  +  ( ( sqr `  D )  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  (
b ^ 2 ) ) )  =  1 )  ->  ( A  e.  (Pell14QR `  D )  \/  -u A  e.  (Pell14QR `  D ) ) ) ) )
192ad3antrrr 710 . . . . . . . . . . . 12  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  A  e.  RR )
2019renegcld 9300 . . . . . . . . . . 11  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  -u A  e.  RR )
21 simpllr 735 . . . . . . . . . . . 12  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  -u a  e.  NN0 )
22 znegcl 10147 . . . . . . . . . . . . 13  |-  ( b  e.  ZZ  ->  -u b  e.  ZZ )
2322ad2antlr 707 . . . . . . . . . . . 12  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  -u b  e.  ZZ )
24 simprl 732 . . . . . . . . . . . . . 14  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  A  =  ( a  +  ( ( sqr `  D )  x.  b
) ) )
2524negeqd 9136 . . . . . . . . . . . . 13  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  -u A  =  -u (
a  +  ( ( sqr `  D )  x.  b ) ) )
26 zcn 10121 . . . . . . . . . . . . . . . 16  |-  ( a  e.  ZZ  ->  a  e.  CC )
2726adantl 452 . . . . . . . . . . . . . . 15  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  a  e.  CC )
2827ad3antrrr 710 . . . . . . . . . . . . . 14  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
a  e.  CC )
29 eldifi 3374 . . . . . . . . . . . . . . . . . . 19  |-  ( D  e.  ( NN  \NN )  ->  D  e.  NN )
3029nncnd 9852 . . . . . . . . . . . . . . . . . 18  |-  ( D  e.  ( NN  \NN )  ->  D  e.  CC )
3130ad2antrr 706 . . . . . . . . . . . . . . . . 17  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  D  e.  CC )
3231ad3antrrr 710 . . . . . . . . . . . . . . . 16  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  D  e.  CC )
3332sqrcld 12015 . . . . . . . . . . . . . . 15  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( sqr `  D
)  e.  CC )
34 zcn 10121 . . . . . . . . . . . . . . . 16  |-  ( b  e.  ZZ  ->  b  e.  CC )
3534ad2antlr 707 . . . . . . . . . . . . . . 15  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
b  e.  CC )
3633, 35mulcld 8945 . . . . . . . . . . . . . 14  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( ( sqr `  D
)  x.  b )  e.  CC )
3728, 36negdid 9260 . . . . . . . . . . . . 13  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  -u ( a  +  ( ( sqr `  D
)  x.  b ) )  =  ( -u a  +  -u ( ( sqr `  D )  x.  b ) ) )
38 mulneg2 9307 . . . . . . . . . . . . . . . 16  |-  ( ( ( sqr `  D
)  e.  CC  /\  b  e.  CC )  ->  ( ( sqr `  D
)  x.  -u b
)  =  -u (
( sqr `  D
)  x.  b ) )
3938eqcomd 2363 . . . . . . . . . . . . . . 15  |-  ( ( ( sqr `  D
)  e.  CC  /\  b  e.  CC )  -> 
-u ( ( sqr `  D )  x.  b
)  =  ( ( sqr `  D )  x.  -u b ) )
4033, 35, 39syl2anc 642 . . . . . . . . . . . . . 14  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  -u ( ( sqr `  D
)  x.  b )  =  ( ( sqr `  D )  x.  -u b
) )
4140oveq2d 5961 . . . . . . . . . . . . 13  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( -u a  +  -u ( ( sqr `  D
)  x.  b ) )  =  ( -u a  +  ( ( sqr `  D )  x.  -u b ) ) )
4225, 37, 413eqtrd 2394 . . . . . . . . . . . 12  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  -u A  =  ( -u a  +  ( ( sqr `  D )  x.  -u b ) ) )
43 sqneg 11257 . . . . . . . . . . . . . . 15  |-  ( a  e.  CC  ->  ( -u a ^ 2 )  =  ( a ^
2 ) )
4428, 43syl 15 . . . . . . . . . . . . . 14  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( -u a ^ 2 )  =  ( a ^ 2 ) )
45 sqneg 11257 . . . . . . . . . . . . . . . 16  |-  ( b  e.  CC  ->  ( -u b ^ 2 )  =  ( b ^
2 ) )
4635, 45syl 15 . . . . . . . . . . . . . . 15  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( -u b ^ 2 )  =  ( b ^ 2 ) )
4746oveq2d 5961 . . . . . . . . . . . . . 14  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( D  x.  ( -u b ^ 2 ) )  =  ( D  x.  ( b ^
2 ) ) )
4844, 47oveq12d 5963 . . . . . . . . . . . . 13  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( ( -u a ^ 2 )  -  ( D  x.  ( -u b ^ 2 ) ) )  =  ( ( a ^ 2 )  -  ( D  x.  ( b ^
2 ) ) ) )
49 simprr 733 . . . . . . . . . . . . 13  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( ( a ^
2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 )
5048, 49eqtrd 2390 . . . . . . . . . . . 12  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( ( -u a ^ 2 )  -  ( D  x.  ( -u b ^ 2 ) ) )  =  1 )
51 oveq1 5952 . . . . . . . . . . . . . . 15  |-  ( c  =  -u a  ->  (
c  +  ( ( sqr `  D )  x.  d ) )  =  ( -u a  +  ( ( sqr `  D )  x.  d
) ) )
5251eqeq2d 2369 . . . . . . . . . . . . . 14  |-  ( c  =  -u a  ->  ( -u A  =  ( c  +  ( ( sqr `  D )  x.  d
) )  <->  -u A  =  ( -u a  +  ( ( sqr `  D
)  x.  d ) ) ) )
53 oveq1 5952 . . . . . . . . . . . . . . . 16  |-  ( c  =  -u a  ->  (
c ^ 2 )  =  ( -u a ^ 2 ) )
5453oveq1d 5960 . . . . . . . . . . . . . . 15  |-  ( c  =  -u a  ->  (
( c ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  ( ( -u a ^ 2 )  -  ( D  x.  (
d ^ 2 ) ) ) )
5554eqeq1d 2366 . . . . . . . . . . . . . 14  |-  ( c  =  -u a  ->  (
( ( c ^
2 )  -  ( D  x.  ( d ^ 2 ) ) )  =  1  <->  (
( -u a ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  1 ) )
5652, 55anbi12d 691 . . . . . . . . . . . . 13  |-  ( c  =  -u a  ->  (
( -u A  =  ( c  +  ( ( sqr `  D )  x.  d ) )  /\  ( ( c ^ 2 )  -  ( D  x.  (
d ^ 2 ) ) )  =  1 )  <->  ( -u A  =  ( -u a  +  ( ( sqr `  D )  x.  d
) )  /\  (
( -u a ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  1 ) ) )
57 oveq2 5953 . . . . . . . . . . . . . . . 16  |-  ( d  =  -u b  ->  (
( sqr `  D
)  x.  d )  =  ( ( sqr `  D )  x.  -u b
) )
5857oveq2d 5961 . . . . . . . . . . . . . . 15  |-  ( d  =  -u b  ->  ( -u a  +  ( ( sqr `  D )  x.  d ) )  =  ( -u a  +  ( ( sqr `  D )  x.  -u b
) ) )
5958eqeq2d 2369 . . . . . . . . . . . . . 14  |-  ( d  =  -u b  ->  ( -u A  =  ( -u a  +  ( ( sqr `  D )  x.  d ) )  <->  -u A  =  ( -u a  +  ( ( sqr `  D
)  x.  -u b
) ) ) )
60 oveq1 5952 . . . . . . . . . . . . . . . . 17  |-  ( d  =  -u b  ->  (
d ^ 2 )  =  ( -u b ^ 2 ) )
6160oveq2d 5961 . . . . . . . . . . . . . . . 16  |-  ( d  =  -u b  ->  ( D  x.  ( d ^ 2 ) )  =  ( D  x.  ( -u b ^ 2 ) ) )
6261oveq2d 5961 . . . . . . . . . . . . . . 15  |-  ( d  =  -u b  ->  (
( -u a ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  ( ( -u a ^ 2 )  -  ( D  x.  ( -u b ^ 2 ) ) ) )
6362eqeq1d 2366 . . . . . . . . . . . . . 14  |-  ( d  =  -u b  ->  (
( ( -u a ^ 2 )  -  ( D  x.  (
d ^ 2 ) ) )  =  1  <-> 
( ( -u a ^ 2 )  -  ( D  x.  ( -u b ^ 2 ) ) )  =  1 ) )
6459, 63anbi12d 691 . . . . . . . . . . . . 13  |-  ( d  =  -u b  ->  (
( -u A  =  (
-u a  +  ( ( sqr `  D
)  x.  d ) )  /\  ( (
-u a ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  1 )  <->  ( -u A  =  ( -u a  +  ( ( sqr `  D )  x.  -u b
) )  /\  (
( -u a ^ 2 )  -  ( D  x.  ( -u b ^ 2 ) ) )  =  1 ) ) )
6556, 64rspc2ev 2968 . . . . . . . . . . . 12  |-  ( (
-u a  e.  NN0  /\  -u b  e.  ZZ  /\  ( -u A  =  ( -u a  +  ( ( sqr `  D
)  x.  -u b
) )  /\  (
( -u a ^ 2 )  -  ( D  x.  ( -u b ^ 2 ) ) )  =  1 ) )  ->  E. c  e.  NN0  E. d  e.  ZZ  ( -u A  =  ( c  +  ( ( sqr `  D
)  x.  d ) )  /\  ( ( c ^ 2 )  -  ( D  x.  ( d ^ 2 ) ) )  =  1 ) )
6621, 23, 42, 50, 65syl112anc 1186 . . . . . . . . . . 11  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  E. c  e.  NN0  E. d  e.  ZZ  ( -u A  =  ( c  +  ( ( sqr `  D )  x.  d
) )  /\  (
( c ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  1 ) )
67 elpell14qr 26257 . . . . . . . . . . . . 13  |-  ( D  e.  ( NN  \NN )  -> 
( -u A  e.  (Pell14QR `  D )  <->  ( -u A  e.  RR  /\  E. c  e.  NN0  E. d  e.  ZZ  ( -u A  =  ( c  +  ( ( sqr `  D
)  x.  d ) )  /\  ( ( c ^ 2 )  -  ( D  x.  ( d ^ 2 ) ) )  =  1 ) ) ) )
6867ad2antrr 706 . . . . . . . . . . . 12  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  ( -u A  e.  (Pell14QR `  D
)  <->  ( -u A  e.  RR  /\  E. c  e.  NN0  E. d  e.  ZZ  ( -u A  =  ( c  +  ( ( sqr `  D
)  x.  d ) )  /\  ( ( c ^ 2 )  -  ( D  x.  ( d ^ 2 ) ) )  =  1 ) ) ) )
6968ad3antrrr 710 . . . . . . . . . . 11  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( -u A  e.  (Pell14QR `  D )  <->  ( -u A  e.  RR  /\  E. c  e.  NN0  E. d  e.  ZZ  ( -u A  =  ( c  +  ( ( sqr `  D
)  x.  d ) )  /\  ( ( c ^ 2 )  -  ( D  x.  ( d ^ 2 ) ) )  =  1 ) ) ) )
7020, 66, 69mpbir2and 888 . . . . . . . . . 10  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  ->  -u A  e.  (Pell14QR `  D
) )
7170olcd 382 . . . . . . . . 9  |-  ( ( ( ( ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  /\  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( A  e.  (Pell14QR `  D )  \/  -u A  e.  (Pell14QR `  D )
) )
7271ex 423 . . . . . . . 8  |-  ( ( ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  /\  b  e.  ZZ )  ->  ( ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 )  ->  ( A  e.  (Pell14QR `  D
)  \/  -u A  e.  (Pell14QR `  D )
) ) )
7372rexlimdva 2743 . . . . . . 7  |-  ( ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  /\  -u a  e.  NN0 )  ->  ( E. b  e.  ZZ  ( A  =  (
a  +  ( ( sqr `  D )  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  (
b ^ 2 ) ) )  =  1 )  ->  ( A  e.  (Pell14QR `  D )  \/  -u A  e.  (Pell14QR `  D ) ) ) )
7473ex 423 . . . . . 6  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  ( -u a  e.  NN0  ->  ( E. b  e.  ZZ  ( A  =  (
a  +  ( ( sqr `  D )  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  (
b ^ 2 ) ) )  =  1 )  ->  ( A  e.  (Pell14QR `  D )  \/  -u A  e.  (Pell14QR `  D ) ) ) ) )
75 elznn0 10130 . . . . . . . 8  |-  ( a  e.  ZZ  <->  ( a  e.  RR  /\  ( a  e.  NN0  \/  -u a  e.  NN0 ) ) )
7675simprbi 450 . . . . . . 7  |-  ( a  e.  ZZ  ->  (
a  e.  NN0  \/  -u a  e.  NN0 )
)
7776adantl 452 . . . . . 6  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  (
a  e.  NN0  \/  -u a  e.  NN0 )
)
7818, 74, 77mpjaod 370 . . . . 5  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  ( E. b  e.  ZZ  ( A  =  (
a  +  ( ( sqr `  D )  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  (
b ^ 2 ) ) )  =  1 )  ->  ( A  e.  (Pell14QR `  D )  \/  -u A  e.  (Pell14QR `  D ) ) ) )
7978rexlimdva 2743 . . . 4  |-  ( ( D  e.  ( NN 
\NN )  /\  A  e.  RR )  ->  ( E. a  e.  ZZ  E. b  e.  ZZ  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 )  ->  ( A  e.  (Pell14QR `  D
)  \/  -u A  e.  (Pell14QR `  D )
) ) )
8079expimpd 586 . . 3  |-  ( D  e.  ( NN  \NN )  -> 
( ( A  e.  RR  /\  E. a  e.  ZZ  E. b  e.  ZZ  ( A  =  ( a  +  ( ( sqr `  D
)  x.  b ) )  /\  ( ( a ^ 2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1 ) )  -> 
( A  e.  (Pell14QR `  D )  \/  -u A  e.  (Pell14QR `  D )
) ) )
811, 80sylbid 206 . 2  |-  ( D  e.  ( NN  \NN )  -> 
( A  e.  (Pell1234QR `  D )  ->  ( A  e.  (Pell14QR `  D
)  \/  -u A  e.  (Pell14QR `  D )
) ) )
8281imp 418 1  |-  ( ( D  e.  ( NN 
\NN )  /\  A  e.  (Pell1234QR `  D ) )  -> 
( A  e.  (Pell14QR `  D )  \/  -u A  e.  (Pell14QR `  D )
) )
Colors of variables: wff set class
Syntax hints:    -> wi 4    <-> wb 176    \/ wo 357    /\ wa 358    = wceq 1642    e. wcel 1710   E.wrex 2620    \ cdif 3225   ` cfv 5337  (class class class)co 5945   CCcc 8825   RRcr 8826   1c1 8828    + caddc 8830    x. cmul 8832    - cmin 9127   -ucneg 9128   NNcn 9836   2c2 9885   NN0cn0 10057   ZZcz 10116   ^cexp 11197   sqrcsqr 11814  ◻NNcsquarenn 26244  Pell1234QRcpell1234qr 26246  Pell14QRcpell14qr 26247
This theorem is referenced by:  elpell14qr2  26270
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1546  ax-5 1557  ax-17 1616  ax-9 1654  ax-8 1675  ax-13 1712  ax-14 1714  ax-6 1729  ax-7 1734  ax-11 1746  ax-12 1930  ax-ext 2339  ax-sep 4222  ax-nul 4230  ax-pow 4269  ax-pr 4295  ax-un 4594  ax-cnex 8883  ax-resscn 8884  ax-1cn 8885  ax-icn 8886  ax-addcl 8887  ax-addrcl 8888  ax-mulcl 8889  ax-mulrcl 8890  ax-mulcom 8891  ax-addass 8892  ax-mulass 8893  ax-distr 8894  ax-i2m1 8895  ax-1ne0 8896  ax-1rid 8897  ax-rnegex 8898  ax-rrecex 8899  ax-cnre 8900  ax-pre-lttri 8901  ax-pre-lttrn 8902  ax-pre-ltadd 8903  ax-pre-mulgt0 8904  ax-pre-sup 8905
This theorem depends on definitions:  df-bi 177  df-or 359  df-an 360  df-3or 935  df-3an 936  df-tru 1319  df-ex 1542  df-nf 1545  df-sb 1649  df-eu 2213  df-mo 2214  df-clab 2345  df-cleq 2351  df-clel 2354  df-nfc 2483  df-ne 2523  df-nel 2524  df-ral 2624  df-rex 2625  df-reu 2626  df-rmo 2627  df-rab 2628  df-v 2866  df-sbc 3068  df-csb 3158  df-dif 3231  df-un 3233  df-in 3235  df-ss 3242  df-pss 3244  df-nul 3532  df-if 3642  df-pw 3703  df-sn 3722  df-pr 3723  df-tp 3724  df-op 3725  df-uni 3909  df-iun 3988  df-br 4105  df-opab 4159  df-mpt 4160  df-tr 4195  df-eprel 4387  df-id 4391  df-po 4396  df-so 4397  df-fr 4434  df-we 4436  df-ord 4477  df-on 4478  df-lim 4479  df-suc 4480  df-om 4739  df-xp 4777  df-rel 4778  df-cnv 4779  df-co 4780  df-dm 4781  df-rn 4782  df-res 4783  df-ima 4784  df-iota 5301  df-fun 5339  df-fn 5340  df-f 5341  df-f1 5342  df-fo 5343  df-f1o 5344  df-fv 5345  df-ov 5948  df-oprab 5949  df-mpt2 5950  df-2nd 6210  df-riota 6391  df-recs 6475  df-rdg 6510  df-er 6747  df-en 6952  df-dom 6953  df-sdom 6954  df-sup 7284  df-pnf 8959  df-mnf 8960  df-xr 8961  df-ltxr 8962  df-le 8963  df-sub 9129  df-neg 9130  df-div 9514  df-nn 9837  df-2 9894  df-3 9895  df-n0 10058  df-z 10117  df-uz 10323  df-rp 10447  df-seq 11139  df-exp 11198  df-cj 11680  df-re 11681  df-im 11682  df-sqr 11816  df-abs 11817  df-pell14qr 26251  df-pell1234qr 26252
  Copyright terms: Public domain W3C validator