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

Theorem nninfisol 7097
Description: Finite elements of ℕ are isolated. That is, given a natural number and any element of ℕ, it is decidable whether the natural number (when converted to an element of ℕ) is equal to the given element of ℕ. Stated in an online post by Martin Escardo. One way to understand this theorem is that you do not need to look at an unbounded number of elements of the sequence  X to decide whether it is equal to  N (in fact, you only need to look at two elements and  N tells you where to look). (Contributed by BJ and Jim Kingdon, 12-Sep-2024.)
Assertion
Ref Expression
nninfisol  |-  ( ( N  e.  om  /\  X  e. )  -> DECID  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
Distinct variable groups:    i, N    i, X

Proof of Theorem nninfisol
StepHypRef Expression
1 simpllr 524 . . . 4  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  N  =  (/) )  ->  X  e. )
2 simplr 520 . . . 4  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  N  =  (/) )  ->  ( X `  N )  =  (/) )
3 simplll 523 . . . 4  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  N  =  (/) )  ->  N  e.  om )
4 simpr 109 . . . 4  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  N  =  (/) )  ->  N  =  (/) )
51, 2, 3, 4nninfisollem0 7094 . . 3  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  N  =  (/) )  -> DECID  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
6 simp-4r 532 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  (/) )  ->  X  e. )
7 simpllr 524 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  (/) )  ->  ( X `  N )  =  (/) )
8 simp-4l 531 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  (/) )  ->  N  e.  om )
9 simpr 109 . . . . . . 7  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  ->  -.  N  =  (/) )
109neqned 2343 . . . . . 6  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  ->  N  =/=  (/) )
1110adantr 274 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  (/) )  ->  N  =/=  (/) )
12 simpr 109 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  (/) )  ->  ( X `  U. N )  =  (/) )
136, 7, 8, 11, 12nninfisollemne 7095 . . . 4  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  (/) )  -> DECID  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
14 simp-4r 532 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  1o )  ->  X  e. )
15 simpllr 524 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  1o )  -> 
( X `  N
)  =  (/) )
16 simp-4l 531 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  1o )  ->  N  e.  om )
1710adantr 274 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  1o )  ->  N  =/=  (/) )
18 simpr 109 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  1o )  -> 
( X `  U. N )  =  1o )
1914, 15, 16, 17, 18nninfisollemeq 7096 . . . 4  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  1o )  -> DECID  (
i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
20 nninff 7087 . . . . . . . . 9  |-  ( X  e.  ->  X : om --> 2o )
2120adantl 275 . . . . . . . 8  |-  ( ( N  e.  om  /\  X  e. )  ->  X : om
--> 2o )
22 nnpredcl 4600 . . . . . . . . 9  |-  ( N  e.  om  ->  U. N  e.  om )
2322adantr 274 . . . . . . . 8  |-  ( ( N  e.  om  /\  X  e. )  ->  U. N  e. 
om )
2421, 23ffvelrnd 5621 . . . . . . 7  |-  ( ( N  e.  om  /\  X  e. )  ->  ( X `  U. N )  e.  2o )
25 df2o3 6398 . . . . . . 7  |-  2o  =  { (/) ,  1o }
2624, 25eleqtrdi 2259 . . . . . 6  |-  ( ( N  e.  om  /\  X  e. )  ->  ( X `  U. N )  e. 
{ (/) ,  1o }
)
27 elpri 3599 . . . . . 6  |-  ( ( X `  U. N
)  e.  { (/) ,  1o }  ->  (
( X `  U. N )  =  (/)  \/  ( X `  U. N )  =  1o ) )
2826, 27syl 14 . . . . 5  |-  ( ( N  e.  om  /\  X  e. )  ->  ( ( X `  U. N )  =  (/)  \/  ( X `  U. N )  =  1o ) )
2928ad2antrr 480 . . . 4  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  -> 
( ( X `  U. N )  =  (/)  \/  ( X `  U. N )  =  1o ) )
3013, 19, 29mpjaodan 788 . . 3  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  -> DECID  (
i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
31 nndceq0 4595 . . . . 5  |-  ( N  e.  om  -> DECID  N  =  (/) )
32 exmiddc 826 . . . . 5  |-  (DECID  N  =  (/)  ->  ( N  =  (/)  \/  -.  N  =  (/) ) )
3331, 32syl 14 . . . 4  |-  ( N  e.  om  ->  ( N  =  (/)  \/  -.  N  =  (/) ) )
3433ad2antrr 480 . . 3  |-  ( ( ( N  e.  om  /\  X  e. )  /\  ( X `
 N )  =  (/) )  ->  ( N  =  (/)  \/  -.  N  =  (/) ) )
355, 30, 34mpjaodan 788 . 2  |-  ( ( ( N  e.  om  /\  X  e. )  /\  ( X `
 N )  =  (/) )  -> DECID  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
36 1n0 6400 . . . . . 6  |-  1o  =/=  (/)
3736neii 2338 . . . . 5  |-  -.  1o  =  (/)
38 simpr 109 . . . . . . . 8  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  1o )  /\  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )  -> 
( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
3938fveq1d 5488 . . . . . . 7  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  1o )  /\  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )  -> 
( ( i  e. 
om  |->  if ( i  e.  N ,  1o ,  (/) ) ) `  N )  =  ( X `  N ) )
40 eqid 2165 . . . . . . . . . 10  |-  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  ( i  e. 
om  |->  if ( i  e.  N ,  1o ,  (/) ) )
41 eleq1 2229 . . . . . . . . . . 11  |-  ( i  =  N  ->  (
i  e.  N  <->  N  e.  N ) )
4241ifbid 3541 . . . . . . . . . 10  |-  ( i  =  N  ->  if ( i  e.  N ,  1o ,  (/) )  =  if ( N  e.  N ,  1o ,  (/) ) )
43 id 19 . . . . . . . . . 10  |-  ( N  e.  om  ->  N  e.  om )
44 nnord 4589 . . . . . . . . . . . . 13  |-  ( N  e.  om  ->  Ord  N )
45 ordirr 4519 . . . . . . . . . . . . 13  |-  ( Ord 
N  ->  -.  N  e.  N )
4644, 45syl 14 . . . . . . . . . . . 12  |-  ( N  e.  om  ->  -.  N  e.  N )
4746iffalsed 3530 . . . . . . . . . . 11  |-  ( N  e.  om  ->  if ( N  e.  N ,  1o ,  (/) )  =  (/) )
48 peano1 4571 . . . . . . . . . . 11  |-  (/)  e.  om
4947, 48eqeltrdi 2257 . . . . . . . . . 10  |-  ( N  e.  om  ->  if ( N  e.  N ,  1o ,  (/) )  e. 
om )
5040, 42, 43, 49fvmptd3 5579 . . . . . . . . 9  |-  ( N  e.  om  ->  (
( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) ) `
 N )  =  if ( N  e.  N ,  1o ,  (/) ) )
5150, 47eqtrd 2198 . . . . . . . 8  |-  ( N  e.  om  ->  (
( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) ) `
 N )  =  (/) )
5251ad3antrrr 484 . . . . . . 7  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  1o )  /\  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )  -> 
( ( i  e. 
om  |->  if ( i  e.  N ,  1o ,  (/) ) ) `  N )  =  (/) )
53 simplr 520 . . . . . . 7  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  1o )  /\  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )  -> 
( X `  N
)  =  1o )
5439, 52, 533eqtr3rd 2207 . . . . . 6  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  1o )  /\  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )  ->  1o  =  (/) )
5554ex 114 . . . . 5  |-  ( ( ( N  e.  om  /\  X  e. )  /\  ( X `
 N )  =  1o )  ->  (
( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X  ->  1o  =  (/) ) )
5637, 55mtoi 654 . . . 4  |-  ( ( ( N  e.  om  /\  X  e. )  /\  ( X `
 N )  =  1o )  ->  -.  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
5756olcd 724 . . 3  |-  ( ( ( N  e.  om  /\  X  e. )  /\  ( X `
 N )  =  1o )  ->  (
( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X  \/  -.  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X ) )
58 df-dc 825 . . 3  |-  (DECID  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X  <->  ( (
i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X  \/  -.  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X ) )
5957, 58sylibr 133 . 2  |-  ( ( ( N  e.  om  /\  X  e. )  /\  ( X `
 N )  =  1o )  -> DECID  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
60 simpl 108 . . . . 5  |-  ( ( N  e.  om  /\  X  e. )  ->  N  e.  om )
6121, 60ffvelrnd 5621 . . . 4  |-  ( ( N  e.  om  /\  X  e. )  ->  ( X `  N )  e.  2o )
6261, 25eleqtrdi 2259 . . 3  |-  ( ( N  e.  om  /\  X  e. )  ->  ( X `  N )  e.  { (/)
,  1o } )
63 elpri 3599 . . 3  |-  ( ( X `  N )  e.  { (/) ,  1o }  ->  ( ( X `
 N )  =  (/)  \/  ( X `  N )  =  1o ) )
6462, 63syl 14 . 2  |-  ( ( N  e.  om  /\  X  e. )  ->  ( ( X `  N )  =  (/)  \/  ( X `
 N )  =  1o ) )
6535, 59, 64mpjaodan 788 1  |-  ( ( N  e.  om  /\  X  e. )  -> DECID  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 103    \/ wo 698  DECID wdc 824    = wceq 1343    e. wcel 2136    =/= wne 2336   (/)c0 3409   ifcif 3520   {cpr 3577   U.cuni 3789    |-> cmpt 4043   Ord word 4340   omcom 4567   -->wf 5184   ` cfv 5188   1oc1o 6377   2oc2o 6378  ℕxnninf 7084
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 1435  ax-7 1436  ax-gen 1437  ax-ie1 1481  ax-ie2 1482  ax-8 1492  ax-10 1493  ax-11 1494  ax-i12 1495  ax-bndl 1497  ax-4 1498  ax-17 1514  ax-i9 1518  ax-ial 1522  ax-i5r 1523  ax-13 2138  ax-14 2139  ax-ext 2147  ax-sep 4100  ax-nul 4108  ax-pow 4153  ax-pr 4187  ax-un 4411  ax-setind 4514  ax-iinf 4565
This theorem depends on definitions:  df-bi 116  df-dc 825  df-3or 969  df-3an 970  df-tru 1346  df-fal 1349  df-nf 1449  df-sb 1751  df-eu 2017  df-mo 2018  df-clab 2152  df-cleq 2158  df-clel 2161  df-nfc 2297  df-ne 2337  df-ral 2449  df-rex 2450  df-rab 2453  df-v 2728  df-sbc 2952  df-csb 3046  df-dif 3118  df-un 3120  df-in 3122  df-ss 3129  df-nul 3410  df-if 3521  df-pw 3561  df-sn 3582  df-pr 3583  df-op 3585  df-uni 3790  df-int 3825  df-br 3983  df-opab 4044  df-mpt 4045  df-tr 4081  df-id 4271  df-iord 4344  df-on 4346  df-suc 4349  df-iom 4568  df-xp 4610  df-rel 4611  df-cnv 4612  df-co 4613  df-dm 4614  df-rn 4615  df-iota 5153  df-fun 5190  df-fn 5191  df-f 5192  df-fv 5196  df-ov 5845  df-oprab 5846  df-mpo 5847  df-1o 6384  df-2o 6385  df-map 6616  df-nninf 7085
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator