ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  oddpwdclemxy Unicode version

Theorem oddpwdclemxy 11881
Description: Lemma for oddpwdc 11886. Another way of stating that decomposing a natural number into a power of two and an odd number is unique. (Contributed by Jim Kingdon, 16-Nov-2021.)
Assertion
Ref Expression
oddpwdclemxy  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( X  =  ( A  /  ( 2 ^ ( iota_ z  e. 
NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A ) ) ) )  /\  Y  =  ( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) ) ) )
Distinct variable groups:    z, A    z, Y
Allowed substitution hint:    X( z)

Proof of Theorem oddpwdclemxy
StepHypRef Expression
1 2nn 8904 . . . . . 6  |-  2  e.  NN
21a1i 9 . . . . 5  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
2  e.  NN )
3 simplll 523 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  X  e.  NN )
43nnzd 9195 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  X  e.  ZZ )
5 simplr 520 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  Y  e.  NN0 )
62, 5nnexpcld 10476 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  e.  NN )
76nnzd 9195 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  e.  ZZ )
8 simpr 109 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  A  =  ( (
2 ^ Y )  x.  X ) )
96, 3nnmulcld 8792 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ Y )  x.  X
)  e.  NN )
108, 9eqeltrd 2217 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  A  e.  NN )
1110nnzd 9195 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  A  e.  ZZ )
126nncnd 8757 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  e.  CC )
133nncnd 8757 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  X  e.  CC )
1412, 13mulcomd 7810 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ Y )  x.  X
)  =  ( X  x.  ( 2 ^ Y ) ) )
158, 14eqtr2d 2174 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( X  x.  (
2 ^ Y ) )  =  A )
16 dvds0lem 11537 . . . . . . . 8  |-  ( ( ( X  e.  ZZ  /\  ( 2 ^ Y
)  e.  ZZ  /\  A  e.  ZZ )  /\  ( X  x.  (
2 ^ Y ) )  =  A )  ->  ( 2 ^ Y )  ||  A
)
174, 7, 11, 15, 16syl31anc 1220 . . . . . . 7  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  ||  A )
18 simpllr 524 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  -.  2  ||  X )
198breq2d 3948 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( ( 2 ^ Y )  x.  2 )  ||  A  <->  ( ( 2 ^ Y
)  x.  2 ) 
||  ( ( 2 ^ Y )  x.  X ) ) )
202nnzd 9195 . . . . . . . . . . 11  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
2  e.  ZZ )
216nnne0d 8788 . . . . . . . . . . 11  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  =/=  0 )
22 dvdscmulr 11556 . . . . . . . . . . 11  |-  ( ( 2  e.  ZZ  /\  X  e.  ZZ  /\  (
( 2 ^ Y
)  e.  ZZ  /\  ( 2 ^ Y
)  =/=  0 ) )  ->  ( (
( 2 ^ Y
)  x.  2 ) 
||  ( ( 2 ^ Y )  x.  X )  <->  2  ||  X ) )
2320, 4, 7, 21, 22syl112anc 1221 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( ( 2 ^ Y )  x.  2 )  ||  (
( 2 ^ Y
)  x.  X )  <->  2  ||  X ) )
2419, 23bitrd 187 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( ( 2 ^ Y )  x.  2 )  ||  A  <->  2 
||  X ) )
2518, 24mtbird 663 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  -.  ( ( 2 ^ Y )  x.  2 )  ||  A )
262nncnd 8757 . . . . . . . . . 10  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
2  e.  CC )
2726, 5expp1d 10455 . . . . . . . . 9  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ ( Y  +  1 ) )  =  ( ( 2 ^ Y )  x.  2 ) )
2827breq1d 3946 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ ( Y  +  1 ) )  ||  A  <->  ( ( 2 ^ Y
)  x.  2 ) 
||  A ) )
2925, 28mtbird 663 . . . . . . 7  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  -.  ( 2 ^ ( Y  +  1 ) )  ||  A )
30 pw2dvdseu 11880 . . . . . . . . 9  |-  ( A  e.  NN  ->  E! z  e.  NN0  ( ( 2 ^ z ) 
||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) )
3110, 30syl 14 . . . . . . . 8  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  E! z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) )
32 oveq2 5789 . . . . . . . . . . 11  |-  ( z  =  Y  ->  (
2 ^ z )  =  ( 2 ^ Y ) )
3332breq1d 3946 . . . . . . . . . 10  |-  ( z  =  Y  ->  (
( 2 ^ z
)  ||  A  <->  ( 2 ^ Y )  ||  A ) )
34 oveq1 5788 . . . . . . . . . . . . 13  |-  ( z  =  Y  ->  (
z  +  1 )  =  ( Y  + 
1 ) )
3534oveq2d 5797 . . . . . . . . . . . 12  |-  ( z  =  Y  ->  (
2 ^ ( z  +  1 ) )  =  ( 2 ^ ( Y  +  1 ) ) )
3635breq1d 3946 . . . . . . . . . . 11  |-  ( z  =  Y  ->  (
( 2 ^ (
z  +  1 ) )  ||  A  <->  ( 2 ^ ( Y  + 
1 ) )  ||  A ) )
3736notbid 657 . . . . . . . . . 10  |-  ( z  =  Y  ->  ( -.  ( 2 ^ (
z  +  1 ) )  ||  A  <->  -.  (
2 ^ ( Y  +  1 ) ) 
||  A ) )
3833, 37anbi12d 465 . . . . . . . . 9  |-  ( z  =  Y  ->  (
( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
)  <->  ( ( 2 ^ Y )  ||  A  /\  -.  ( 2 ^ ( Y  + 
1 ) )  ||  A ) ) )
3938riota2 5759 . . . . . . . 8  |-  ( ( Y  e.  NN0  /\  E! z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) )  ->  (
( ( 2 ^ Y )  ||  A  /\  -.  ( 2 ^ ( Y  +  1 ) )  ||  A
)  <->  ( iota_ z  e. 
NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A ) )  =  Y ) )
405, 31, 39syl2anc 409 . . . . . . 7  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( ( 2 ^ Y )  ||  A  /\  -.  ( 2 ^ ( Y  + 
1 ) )  ||  A )  <->  ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) )  =  Y ) )
4117, 29, 40mpbi2and 928 . . . . . 6  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) )  =  Y )
4241, 5eqeltrd 2217 . . . . 5  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) )  e.  NN0 )
432, 42nnexpcld 10476 . . . 4  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) ) )  e.  NN )
4443nncnd 8757 . . 3  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) ) )  e.  CC )
4543nnap0d 8789 . . 3  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ ( iota_ z  e.  NN0  (
( 2 ^ z
)  ||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) ) ) #  0 )
4641eqcomd 2146 . . . . . 6  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  Y  =  ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) ) )
4746oveq2d 5797 . . . . 5  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( 2 ^ Y
)  =  ( 2 ^ ( iota_ z  e. 
NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A ) ) ) )
4847oveq1d 5796 . . . 4  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ Y )  x.  X
)  =  ( ( 2 ^ ( iota_ z  e.  NN0  ( (
2 ^ z ) 
||  A  /\  -.  ( 2 ^ (
z  +  1 ) )  ||  A ) ) )  x.  X
) )
498, 48eqtr2d 2174 . . 3  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( ( 2 ^ ( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) ) )  x.  X )  =  A )
5044, 13, 45, 49mvllmulapd 8624 . 2  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  ->  X  =  ( A  /  ( 2 ^ ( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) ) ) ) )
5150, 46jca 304 1  |-  ( ( ( ( X  e.  NN  /\  -.  2  ||  X )  /\  Y  e.  NN0 )  /\  A  =  ( ( 2 ^ Y )  x.  X ) )  -> 
( X  =  ( A  /  ( 2 ^ ( iota_ z  e. 
NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A ) ) ) )  /\  Y  =  ( iota_ z  e.  NN0  ( ( 2 ^ z )  ||  A  /\  -.  ( 2 ^ ( z  +  1 ) )  ||  A
) ) ) )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 103    <-> wb 104    = wceq 1332    e. wcel 1481    =/= wne 2309   E!wreu 2419   class class class wbr 3936   iota_crio 5736  (class class class)co 5781   0cc0 7643   1c1 7644    + caddc 7646    x. cmul 7648    / cdiv 8455   NNcn 8743   2c2 8794   NN0cn0 9000   ZZcz 9077   ^cexp 10322    || cdvds 11527
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 604  ax-in2 605  ax-io 699  ax-5 1424  ax-7 1425  ax-gen 1426  ax-ie1 1470  ax-ie2 1471  ax-8 1483  ax-10 1484  ax-11 1485  ax-i12 1486  ax-bndl 1487  ax-4 1488  ax-13 1492  ax-14 1493  ax-17 1507  ax-i9 1511  ax-ial 1515  ax-i5r 1516  ax-ext 2122  ax-coll 4050  ax-sep 4053  ax-nul 4061  ax-pow 4105  ax-pr 4138  ax-un 4362  ax-setind 4459  ax-iinf 4509  ax-cnex 7734  ax-resscn 7735  ax-1cn 7736  ax-1re 7737  ax-icn 7738  ax-addcl 7739  ax-addrcl 7740  ax-mulcl 7741  ax-mulrcl 7742  ax-addcom 7743  ax-mulcom 7744  ax-addass 7745  ax-mulass 7746  ax-distr 7747  ax-i2m1 7748  ax-0lt1 7749  ax-1rid 7750  ax-0id 7751  ax-rnegex 7752  ax-precex 7753  ax-cnre 7754  ax-pre-ltirr 7755  ax-pre-ltwlin 7756  ax-pre-lttrn 7757  ax-pre-apti 7758  ax-pre-ltadd 7759  ax-pre-mulgt0 7760  ax-pre-mulext 7761  ax-arch 7762
This theorem depends on definitions:  df-bi 116  df-dc 821  df-3or 964  df-3an 965  df-tru 1335  df-fal 1338  df-nf 1438  df-sb 1737  df-eu 2003  df-mo 2004  df-clab 2127  df-cleq 2133  df-clel 2136  df-nfc 2271  df-ne 2310  df-nel 2405  df-ral 2422  df-rex 2423  df-reu 2424  df-rmo 2425  df-rab 2426  df-v 2691  df-sbc 2913  df-csb 3007  df-dif 3077  df-un 3079  df-in 3081  df-ss 3088  df-nul 3368  df-if 3479  df-pw 3516  df-sn 3537  df-pr 3538  df-op 3540  df-uni 3744  df-int 3779  df-iun 3822  df-br 3937  df-opab 3997  df-mpt 3998  df-tr 4034  df-id 4222  df-po 4225  df-iso 4226  df-iord 4295  df-on 4297  df-ilim 4298  df-suc 4300  df-iom 4512  df-xp 4552  df-rel 4553  df-cnv 4554  df-co 4555  df-dm 4556  df-rn 4557  df-res 4558  df-ima 4559  df-iota 5095  df-fun 5132  df-fn 5133  df-f 5134  df-f1 5135  df-fo 5136  df-f1o 5137  df-fv 5138  df-riota 5737  df-ov 5784  df-oprab 5785  df-mpo 5786  df-1st 6045  df-2nd 6046  df-recs 6209  df-frec 6295  df-pnf 7825  df-mnf 7826  df-xr 7827  df-ltxr 7828  df-le 7829  df-sub 7958  df-neg 7959  df-reap 8360  df-ap 8367  df-div 8456  df-inn 8744  df-2 8802  df-n0 9001  df-z 9078  df-uz 9350  df-q 9438  df-rp 9470  df-fz 9821  df-fl 10073  df-mod 10126  df-seqfrec 10249  df-exp 10323  df-dvds 11528
This theorem is referenced by:  oddpwdclemdc  11885
  Copyright terms: Public domain W3C validator