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

Theorem pell1234qrdich 26814
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 26804 . . 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 744 . . . . . . . . 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 6047 . . . . . . . . . . . . . 14  |-  ( c  =  a  ->  (
c  +  ( ( sqr `  D )  x.  b ) )  =  ( a  +  ( ( sqr `  D
)  x.  b ) ) )
43eqeq2d 2415 . . . . . . . . . . . . 13  |-  ( c  =  a  ->  ( A  =  ( c  +  ( ( sqr `  D )  x.  b
) )  <->  A  =  ( a  +  ( ( sqr `  D
)  x.  b ) ) ) )
5 oveq1 6047 . . . . . . . . . . . . . . 15  |-  ( c  =  a  ->  (
c ^ 2 )  =  ( a ^
2 ) )
65oveq1d 6055 . . . . . . . . . . . . . 14  |-  ( c  =  a  ->  (
( c ^ 2 )  -  ( D  x.  ( b ^
2 ) ) )  =  ( ( a ^ 2 )  -  ( D  x.  (
b ^ 2 ) ) ) )
76eqeq1d 2412 . . . . . . . . . . . . 13  |-  ( c  =  a  ->  (
( ( c ^
2 )  -  ( D  x.  ( b ^ 2 ) ) )  =  1  <->  (
( a ^ 2 )  -  ( D  x.  ( b ^
2 ) ) )  =  1 ) )
84, 7anbi12d 692 . . . . . . . . . . . 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 2687 . . . . . . . . . . 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 3012 . . . . . . . . . 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 695 . . . . . . . . 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 26802 . . . . . . . . . 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 713 . . . . . . . . 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 889 . . . . . . . 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 382 . . . . . . 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 588 . . . . . 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 746 . . . . . . . . . . . 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 9420 . . . . . . . . . . 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 736 . . . . . . . . . . . 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 10269 . . . . . . . . . . . . 13  |-  ( b  e.  ZZ  ->  -u b  e.  ZZ )
2120ad2antlr 708 . . . . . . . . . . . 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 733 . . . . . . . . . . . . . 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 9256 . . . . . . . . . . . . 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 10243 . . . . . . . . . . . . . . . 16  |-  ( a  e.  ZZ  ->  a  e.  CC )
2524adantl 453 . . . . . . . . . . . . . . 15  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  a  e.  CC )
2625ad3antrrr 711 . . . . . . . . . . . . . 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 3429 . . . . . . . . . . . . . . . . . 18  |-  ( D  e.  ( NN  \NN )  ->  D  e.  NN )
2827nncnd 9972 . . . . . . . . . . . . . . . . 17  |-  ( D  e.  ( NN  \NN )  ->  D  e.  CC )
2928ad5antr 715 . . . . . . . . . . . . . . . 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 12194 . . . . . . . . . . . . . . 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 10243 . . . . . . . . . . . . . . . 16  |-  ( b  e.  ZZ  ->  b  e.  CC )
3231ad2antlr 708 . . . . . . . . . . . . . . 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 9064 . . . . . . . . . . . . . 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 9380 . . . . . . . . . . . . 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 9427 . . . . . . . . . . . . . . . 16  |-  ( ( ( sqr `  D
)  e.  CC  /\  b  e.  CC )  ->  ( ( sqr `  D
)  x.  -u b
)  =  -u (
( sqr `  D
)  x.  b ) )
3635eqcomd 2409 . . . . . . . . . . . . . . 15  |-  ( ( ( sqr `  D
)  e.  CC  /\  b  e.  CC )  -> 
-u ( ( sqr `  D )  x.  b
)  =  ( ( sqr `  D )  x.  -u b ) )
3730, 32, 36syl2anc 643 . . . . . . . . . . . . . 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 6056 . . . . . . . . . . . . 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 2440 . . . . . . . . . . . 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 11397 . . . . . . . . . . . . . . 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 11397 . . . . . . . . . . . . . . . 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 6056 . . . . . . . . . . . . . 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 6058 . . . . . . . . . . . . 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 734 . . . . . . . . . . . . 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 2436 . . . . . . . . . . . 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 6047 . . . . . . . . . . . . . . 15  |-  ( c  =  -u a  ->  (
c  +  ( ( sqr `  D )  x.  d ) )  =  ( -u a  +  ( ( sqr `  D )  x.  d
) ) )
4948eqeq2d 2415 . . . . . . . . . . . . . 14  |-  ( c  =  -u a  ->  ( -u A  =  ( c  +  ( ( sqr `  D )  x.  d
) )  <->  -u A  =  ( -u a  +  ( ( sqr `  D
)  x.  d ) ) ) )
50 oveq1 6047 . . . . . . . . . . . . . . . 16  |-  ( c  =  -u a  ->  (
c ^ 2 )  =  ( -u a ^ 2 ) )
5150oveq1d 6055 . . . . . . . . . . . . . . 15  |-  ( c  =  -u a  ->  (
( c ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  ( ( -u a ^ 2 )  -  ( D  x.  (
d ^ 2 ) ) ) )
5251eqeq1d 2412 . . . . . . . . . . . . . 14  |-  ( c  =  -u a  ->  (
( ( c ^
2 )  -  ( D  x.  ( d ^ 2 ) ) )  =  1  <->  (
( -u a ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  1 ) )
5349, 52anbi12d 692 . . . . . . . . . . . . 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 6048 . . . . . . . . . . . . . . . 16  |-  ( d  =  -u b  ->  (
( sqr `  D
)  x.  d )  =  ( ( sqr `  D )  x.  -u b
) )
5554oveq2d 6056 . . . . . . . . . . . . . . 15  |-  ( d  =  -u b  ->  ( -u a  +  ( ( sqr `  D )  x.  d ) )  =  ( -u a  +  ( ( sqr `  D )  x.  -u b
) ) )
5655eqeq2d 2415 . . . . . . . . . . . . . 14  |-  ( d  =  -u b  ->  ( -u A  =  ( -u a  +  ( ( sqr `  D )  x.  d ) )  <->  -u A  =  ( -u a  +  ( ( sqr `  D
)  x.  -u b
) ) ) )
57 oveq1 6047 . . . . . . . . . . . . . . . . 17  |-  ( d  =  -u b  ->  (
d ^ 2 )  =  ( -u b ^ 2 ) )
5857oveq2d 6056 . . . . . . . . . . . . . . . 16  |-  ( d  =  -u b  ->  ( D  x.  ( d ^ 2 ) )  =  ( D  x.  ( -u b ^ 2 ) ) )
5958oveq2d 6056 . . . . . . . . . . . . . . 15  |-  ( d  =  -u b  ->  (
( -u a ^ 2 )  -  ( D  x.  ( d ^
2 ) ) )  =  ( ( -u a ^ 2 )  -  ( D  x.  ( -u b ^ 2 ) ) ) )
6059eqeq1d 2412 . . . . . . . . . . . . . 14  |-  ( d  =  -u b  ->  (
( ( -u a ^ 2 )  -  ( D  x.  (
d ^ 2 ) ) )  =  1  <-> 
( ( -u a ^ 2 )  -  ( D  x.  ( -u b ^ 2 ) ) )  =  1 ) )
6156, 60anbi12d 692 . . . . . . . . . . . . 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 3020 . . . . . . . . . . . 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 1188 . . . . . . . . . . 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 26802 . . . . . . . . . . . 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 715 . . . . . . . . . . 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 889 . . . . . . . . . 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 383 . . . . . . . . 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 424 . . . . . . . 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 2790 . . . . . . 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 424 . . . . . 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 10252 . . . . . . . 8  |-  ( a  e.  ZZ  <->  ( a  e.  RR  /\  ( a  e.  NN0  \/  -u a  e.  NN0 ) ) )
7271simprbi 451 . . . . . . 7  |-  ( a  e.  ZZ  ->  (
a  e.  NN0  \/  -u a  e.  NN0 )
)
7372adantl 453 . . . . . 6  |-  ( ( ( D  e.  ( NN  \NN )  /\  A  e.  RR )  /\  a  e.  ZZ )  ->  (
a  e.  NN0  \/  -u a  e.  NN0 )
)
7416, 70, 73mpjaod 371 . . . . 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 2790 . . . 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 587 . . 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 207 . 2  |-  ( D  e.  ( NN  \NN )  -> 
( A  e.  (Pell1234QR `  D )  ->  ( A  e.  (Pell14QR `  D
)  \/  -u A  e.  (Pell14QR `  D )
) ) )
7877imp 419 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 177    \/ wo 358    /\ wa 359    = wceq 1649    e. wcel 1721   E.wrex 2667    \ cdif 3277   ` cfv 5413  (class class class)co 6040   CCcc 8944   RRcr 8945   1c1 8947    + caddc 8949    x. cmul 8951    - cmin 9247   -ucneg 9248   NNcn 9956   2c2 10005   NN0cn0 10177   ZZcz 10238   ^cexp 11337   sqrcsqr 11993  ◻NNcsquarenn 26789  Pell1234QRcpell1234qr 26791  Pell14QRcpell14qr 26792
This theorem is referenced by:  elpell14qr2  26815
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-3 7  ax-mp 8  ax-gen 1552  ax-5 1563  ax-17 1623  ax-9 1662  ax-8 1683  ax-13 1723  ax-14 1725  ax-6 1740  ax-7 1745  ax-11 1757  ax-12 1946  ax-ext 2385  ax-sep 4290  ax-nul 4298  ax-pow 4337  ax-pr 4363  ax-un 4660  ax-cnex 9002  ax-resscn 9003  ax-1cn 9004  ax-icn 9005  ax-addcl 9006  ax-addrcl 9007  ax-mulcl 9008  ax-mulrcl 9009  ax-mulcom 9010  ax-addass 9011  ax-mulass 9012  ax-distr 9013  ax-i2m1 9014  ax-1ne0 9015  ax-1rid 9016  ax-rnegex 9017  ax-rrecex 9018  ax-cnre 9019  ax-pre-lttri 9020  ax-pre-lttrn 9021  ax-pre-ltadd 9022  ax-pre-mulgt0 9023  ax-pre-sup 9024
This theorem depends on definitions:  df-bi 178  df-or 360  df-an 361  df-3or 937  df-3an 938  df-tru 1325  df-ex 1548  df-nf 1551  df-sb 1656  df-eu 2258  df-mo 2259  df-clab 2391  df-cleq 2397  df-clel 2400  df-nfc 2529  df-ne 2569  df-nel 2570  df-ral 2671  df-rex 2672  df-reu 2673  df-rmo 2674  df-rab 2675  df-v 2918  df-sbc 3122  df-csb 3212  df-dif 3283  df-un 3285  df-in 3287  df-ss 3294  df-pss 3296  df-nul 3589  df-if 3700  df-pw 3761  df-sn 3780  df-pr 3781  df-tp 3782  df-op 3783  df-uni 3976  df-iun 4055  df-br 4173  df-opab 4227  df-mpt 4228  df-tr 4263  df-eprel 4454  df-id 4458  df-po 4463  df-so 4464  df-fr 4501  df-we 4503  df-ord 4544  df-on 4545  df-lim 4546  df-suc 4547  df-om 4805  df-xp 4843  df-rel 4844  df-cnv 4845  df-co 4846  df-dm 4847  df-rn 4848  df-res 4849  df-ima 4850  df-iota 5377  df-fun 5415  df-fn 5416  df-f 5417  df-f1 5418  df-fo 5419  df-f1o 5420  df-fv 5421  df-ov 6043  df-oprab 6044  df-mpt2 6045  df-2nd 6309  df-riota 6508  df-recs 6592  df-rdg 6627  df-er 6864  df-en 7069  df-dom 7070  df-sdom 7071  df-sup 7404  df-pnf 9078  df-mnf 9079  df-xr 9080  df-ltxr 9081  df-le 9082  df-sub 9249  df-neg 9250  df-div 9634  df-nn 9957  df-2 10014  df-3 10015  df-n0 10178  df-z 10239  df-uz 10445  df-rp 10569  df-seq 11279  df-exp 11338  df-cj 11859  df-re 11860  df-im 11861  df-sqr 11995  df-abs 11996  df-pell14qr 26796  df-pell1234qr 26797
  Copyright terms: Public domain W3C validator