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

Theorem pell1234qrdich 26938
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 26928 . . 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 simp-4r 745 . . . . . . . . 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 )
3 oveq1 6091 . . . . . . . . . . . . . 14  |-  ( c  =  a  ->  (
c  +  ( ( sqr `  D )  x.  b ) )  =  ( a  +  ( ( sqr `  D
)  x.  b ) ) )
43eqeq2d 2449 . . . . . . . . . . . . 13  |-  ( c  =  a  ->  ( A  =  ( c  +  ( ( sqr `  D )  x.  b
) )  <->  A  =  ( a  +  ( ( sqr `  D
)  x.  b ) ) ) )
5 oveq1 6091 . . . . . . . . . . . . . . 15  |-  ( c  =  a  ->  (
c ^ 2 )  =  ( a ^
2 ) )
65oveq1d 6099 . . . . . . . . . . . . . 14  |-  ( c  =  a  ->  (
( c ^ 2 )  -  ( D  x.  ( b ^
2 ) ) )  =  ( ( a ^ 2 )  -  ( D  x.  (
b ^ 2 ) ) ) )
76eqeq1d 2446 . . . . . . . . . . . . 13  |-  ( c  =  a  ->  (
( ( c ^
2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1  <->  (
( a ^ 2 )  -  ( D  x.  ( b ^
2 ) ) )  =  1 ) )
84, 7anbi12d 693 . . . . . . . . . . . 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 ) ) )
98rexbidv 2728 . . . . . . . . . . 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 ) ) )
109rspcev 3054 . . . . . . . . . 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 ) )
1110adantll 696 . . . . . . . . 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 ) )
12 elpell14qr 26926 . . . . . . . . . 10  |-  ( 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 ) ) ) )
1312ad4antr 714 . . . . . . . . 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 ) ) ) )
142, 11, 13mpbir2and 890 . . . . . . . 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
) )
1514orcd 383 . . . . . . 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 )
) )
1615exp31 589 . . . . . 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 ) ) ) ) )
17 simp-5r 747 . . . . . . . . . . . 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 )
1817renegcld 9469 . . . . . . . . . . 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 )
19 simpllr 737 . . . . . . . . . . . 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 )
20 znegcl 10318 . . . . . . . . . . . . 13  |-  ( b  e.  ZZ  ->  -u b  e.  ZZ )
2120ad2antlr 709 . . . . . . . . . . . 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 )
22 simprl 734 . . . . . . . . . . . . . 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
) ) )
2322negeqd 9305 . . . . . . . . . . . . 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 ) ) )
24 zcn 10292 . . . . . . . . . . . . . . . 16  |-  ( a  e.  ZZ  ->  a  e.  CC )
2524adantl 454 . . . . . . . . . . . . . . 15  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  a  e.  CC )
2625ad3antrrr 712 . . . . . . . . . . . . . 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 )
27 eldifi 3471 . . . . . . . . . . . . . . . . . 18  |-  ( D  e.  ( NN  \NN )  ->  D  e.  NN )
2827nncnd 10021 . . . . . . . . . . . . . . . . 17  |-  ( D  e.  ( NN  \NN )  ->  D  e.  CC )
2928ad5antr 716 . . . . . . . . . . . . . . . 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 )
3029sqrcld 12244 . . . . . . . . . . . . . . 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 )
31 zcn 10292 . . . . . . . . . . . . . . . 16  |-  ( b  e.  ZZ  ->  b  e.  CC )
3231ad2antlr 709 . . . . . . . . . . . . . . 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 )
3330, 32mulcld 9113 . . . . . . . . . . . . . 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 )
3426, 33negdid 9429 . . . . . . . . . . . . 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 ) ) )
35 mulneg2 9476 . . . . . . . . . . . . . . . 16  |-  ( ( ( sqr `  D
)  e.  CC  /\  b  e.  CC )  ->  ( ( sqr `  D
)  x.  -u b
)  =  -u (
( sqr `  D
)  x.  b ) )
3635eqcomd 2443 . . . . . . . . . . . . . . 15  |-  ( ( ( sqr `  D
)  e.  CC  /\  b  e.  CC )  -> 
-u ( ( sqr `  D )  x.  b
)  =  ( ( sqr `  D )  x.  -u b ) )
3730, 32, 36syl2anc 644 . . . . . . . . . . . . . 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
) )
3837oveq2d 6100 . . . . . . . . . . . . 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 ) ) )
3923, 34, 383eqtrd 2474 . . . . . . . . . . . 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 ) ) )
40 sqneg 11447 . . . . . . . . . . . . . . 15  |-  ( a  e.  CC  ->  ( -u a ^ 2 )  =  ( a ^
2 ) )
4126, 40syl 16 . . . . . . . . . . . . . 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 ) )
42 sqneg 11447 . . . . . . . . . . . . . . . 16  |-  ( b  e.  CC  ->  ( -u b ^ 2 )  =  ( b ^
2 ) )
4332, 42syl 16 . . . . . . . . . . . . . . 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 ) )
4443oveq2d 6100 . . . . . . . . . . . . . 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 ) ) )
4541, 44oveq12d 6102 . . . . . . . . . . . . 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 ) ) ) )
46 simprr 735 . . . . . . . . . . . . 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 )
4745, 46eqtrd 2470 . . . . . . . . . . . 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 )
48 oveq1 6091 . . . . . . . . . . . . . . 15  |-  ( c  =  -u a  ->  (
c  +  ( ( sqr `  D )  x.  d ) )  =  ( -u a  +  ( ( sqr `  D )  x.  d
) ) )
4948eqeq2d 2449 . . . . . . . . . . . . . 14  |-  ( c  =  -u a  ->  ( -u A  =  ( c  +  ( ( sqr `  D )  x.  d
) )  <->  -u A  =  ( -u a  +  ( ( sqr `  D
)  x.  d ) ) ) )
50 oveq1 6091 . . . . . . . . . . . . . . . 16  |-  ( c  =  -u a  ->  (
c ^ 2 )  =  ( -u a ^ 2 ) )
5150oveq1d 6099 . . . . . . . . . . . . . . 15  |-  ( c  =  -u a  ->  (
( c ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  ( ( -u a ^ 2 )  -  ( D  x.  (
d ^ 2 ) ) ) )
5251eqeq1d 2446 . . . . . . . . . . . . . 14  |-  ( c  =  -u a  ->  (
( ( c ^
2 )  -  ( D  x.  ( d ^ 2 ) ) )  =  1  <->  (
( -u a ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  1 ) )
5349, 52anbi12d 693 . . . . . . . . . . . . 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 ) ) )
54 oveq2 6092 . . . . . . . . . . . . . . . 16  |-  ( d  =  -u b  ->  (
( sqr `  D
)  x.  d )  =  ( ( sqr `  D )  x.  -u b
) )
5554oveq2d 6100 . . . . . . . . . . . . . . 15  |-  ( d  =  -u b  ->  ( -u a  +  ( ( sqr `  D )  x.  d ) )  =  ( -u a  +  ( ( sqr `  D )  x.  -u b
) ) )
5655eqeq2d 2449 . . . . . . . . . . . . . 14  |-  ( d  =  -u b  ->  ( -u A  =  ( -u a  +  ( ( sqr `  D )  x.  d ) )  <->  -u A  =  ( -u a  +  ( ( sqr `  D
)  x.  -u b
) ) ) )
57 oveq1 6091 . . . . . . . . . . . . . . . . 17  |-  ( d  =  -u b  ->  (
d ^ 2 )  =  ( -u b ^ 2 ) )
5857oveq2d 6100 . . . . . . . . . . . . . . . 16  |-  ( d  =  -u b  ->  ( D  x.  ( d ^ 2 ) )  =  ( D  x.  ( -u b ^ 2 ) ) )
5958oveq2d 6100 . . . . . . . . . . . . . . 15  |-  ( d  =  -u b  ->  (
( -u a ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  ( ( -u a ^ 2 )  -  ( D  x.  ( -u b ^ 2 ) ) ) )
6059eqeq1d 2446 . . . . . . . . . . . . . 14  |-  ( d  =  -u b  ->  (
( ( -u a ^ 2 )  -  ( D  x.  (
d ^ 2 ) ) )  =  1  <-> 
( ( -u a ^ 2 )  -  ( D  x.  ( -u b ^ 2 ) ) )  =  1 ) )
6156, 60anbi12d 693 . . . . . . . . . . . . 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 ) ) )
6253, 61rspc2ev 3062 . . . . . . . . . . . 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 ) )
6319, 21, 39, 47, 62syl112anc 1189 . . . . . . . . . . 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 ) )
64 elpell14qr 26926 . . . . . . . . . . . 12  |-  ( 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 ) ) ) )
6564ad5antr 716 . . . . . . . . . . 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 ) ) ) )
6618, 63, 65mpbir2and 890 . . . . . . . . . 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
) )
6766olcd 384 . . . . . . . . 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 )
) )
6867ex 425 . . . . . . . 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 )
) ) )
6968rexlimdva 2832 . . . . . . 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 ) ) ) )
7069ex 425 . . . . . 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 ) ) ) ) )
71 elznn0 10301 . . . . . . . 8  |-  ( a  e.  ZZ  <->  ( a  e.  RR  /\  ( a  e.  NN0  \/  -u a  e.  NN0 ) ) )
7271simprbi 452 . . . . . . 7  |-  ( a  e.  ZZ  ->  (
a  e.  NN0  \/  -u a  e.  NN0 )
)
7372adantl 454 . . . . . 6  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  (
a  e.  NN0  \/  -u a  e.  NN0 )
)
7416, 70, 73mpjaod 372 . . . . 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 ) ) ) )
7574rexlimdva 2832 . . . 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 )
) ) )
7675expimpd 588 . . 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 )
) ) )
771, 76sylbid 208 . 2  |-  ( D  e.  ( NN  \NN )  -> 
( A  e.  (Pell1234QR `  D )  ->  ( A  e.  (Pell14QR `  D
)  \/  -u A  e.  (Pell14QR `  D )
) ) )
7877imp 420 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 178    \/ wo 359    /\ wa 360    = wceq 1653    e. wcel 1726   E.wrex 2708    \ cdif 3319   ` cfv 5457  (class class class)co 6084   CCcc 8993   RRcr 8994   1c1 8996    + caddc 8998    x. cmul 9000    - cmin 9296   -ucneg 9297   NNcn 10005   2c2 10054   NN0cn0 10226   ZZcz 10287   ^cexp 11387   sqrcsqr 12043  ◻NNcsquarenn 26913  Pell1234QRcpell1234qr 26915  Pell14QRcpell14qr 26916
This theorem is referenced by:  elpell14qr2  26939
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1556  ax-5 1567  ax-17 1627  ax-9 1667  ax-8 1688  ax-13 1728  ax-14 1730  ax-6 1745  ax-7 1750  ax-11 1762  ax-12 1951  ax-ext 2419  ax-sep 4333  ax-nul 4341  ax-pow 4380  ax-pr 4406  ax-un 4704  ax-cnex 9051  ax-resscn 9052  ax-1cn 9053  ax-icn 9054  ax-addcl 9055  ax-addrcl 9056  ax-mulcl 9057  ax-mulrcl 9058  ax-mulcom 9059  ax-addass 9060  ax-mulass 9061  ax-distr 9062  ax-i2m1 9063  ax-1ne0 9064  ax-1rid 9065  ax-rnegex 9066  ax-rrecex 9067  ax-cnre 9068  ax-pre-lttri 9069  ax-pre-lttrn 9070  ax-pre-ltadd 9071  ax-pre-mulgt0 9072  ax-pre-sup 9073
This theorem depends on definitions:  df-bi 179  df-or 361  df-an 362  df-3or 938  df-3an 939  df-tru 1329  df-ex 1552  df-nf 1555  df-sb 1660  df-eu 2287  df-mo 2288  df-clab 2425  df-cleq 2431  df-clel 2434  df-nfc 2563  df-ne 2603  df-nel 2604  df-ral 2712  df-rex 2713  df-reu 2714  df-rmo 2715  df-rab 2716  df-v 2960  df-sbc 3164  df-csb 3254  df-dif 3325  df-un 3327  df-in 3329  df-ss 3336  df-pss 3338  df-nul 3631  df-if 3742  df-pw 3803  df-sn 3822  df-pr 3823  df-tp 3824  df-op 3825  df-uni 4018  df-iun 4097  df-br 4216  df-opab 4270  df-mpt 4271  df-tr 4306  df-eprel 4497  df-id 4501  df-po 4506  df-so 4507  df-fr 4544  df-we 4546  df-ord 4587  df-on 4588  df-lim 4589  df-suc 4590  df-om 4849  df-xp 4887  df-rel 4888  df-cnv 4889  df-co 4890  df-dm 4891  df-rn 4892  df-res 4893  df-ima 4894  df-iota 5421  df-fun 5459  df-fn 5460  df-f 5461  df-f1 5462  df-fo 5463  df-f1o 5464  df-fv 5465  df-ov 6087  df-oprab 6088  df-mpt2 6089  df-2nd 6353  df-riota 6552  df-recs 6636  df-rdg 6671  df-er 6908  df-en 7113  df-dom 7114  df-sdom 7115  df-sup 7449  df-pnf 9127  df-mnf 9128  df-xr 9129  df-ltxr 9130  df-le 9131  df-sub 9298  df-neg 9299  df-div 9683  df-nn 10006  df-2 10063  df-3 10064  df-n0 10227  df-z 10288  df-uz 10494  df-rp 10618  df-seq 11329  df-exp 11388  df-cj 11909  df-re 11910  df-im 11911  df-sqr 12045  df-abs 12046  df-pell14qr 26920  df-pell1234qr 26921
  Copyright terms: Public domain W3C validator