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

Theorem nninfisol 7109
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 529 . . . 4  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  N  =  (/) )  ->  X  e. )
2 simplr 525 . . . 4  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  N  =  (/) )  ->  ( X `  N )  =  (/) )
3 simplll 528 . . . 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 7106 . . 3  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  N  =  (/) )  -> DECID  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
6 simp-4r 537 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  (/) )  ->  X  e. )
7 simpllr 529 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  (/) )  ->  ( X `  N )  =  (/) )
8 simp-4l 536 . . . . 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 2347 . . . . . 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 7107 . . . 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 537 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  1o )  ->  X  e. )
15 simpllr 529 . . . . 5  |-  ( ( ( ( ( N  e.  om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  /\  ( X `  U. N )  =  1o )  -> 
( X `  N
)  =  (/) )
16 simp-4l 536 . . . . 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 7108 . . . 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 7099 . . . . . . . . 9  |-  ( X  e.  ->  X : om --> 2o )
2120adantl 275 . . . . . . . 8  |-  ( ( N  e.  om  /\  X  e. )  ->  X : om
--> 2o )
22 nnpredcl 4607 . . . . . . . . 9  |-  ( N  e.  om  ->  U. N  e.  om )
2322adantr 274 . . . . . . . 8  |-  ( ( N  e.  om  /\  X  e. )  ->  U. N  e. 
om )
2421, 23ffvelrnd 5632 . . . . . . 7  |-  ( ( N  e.  om  /\  X  e. )  ->  ( X `  U. N )  e.  2o )
25 df2o3 6409 . . . . . . 7  |-  2o  =  { (/) ,  1o }
2624, 25eleqtrdi 2263 . . . . . 6  |-  ( ( N  e.  om  /\  X  e. )  ->  ( X `  U. N )  e. 
{ (/) ,  1o }
)
27 elpri 3606 . . . . . 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 485 . . . 4  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  -> 
( ( X `  U. N )  =  (/)  \/  ( X `  U. N )  =  1o ) )
3013, 19, 29mpjaodan 793 . . 3  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  (/) )  /\  -.  N  =  (/) )  -> DECID  (
i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
31 nndceq0 4602 . . . . 5  |-  ( N  e.  om  -> DECID  N  =  (/) )
32 exmiddc 831 . . . . 5  |-  (DECID  N  =  (/)  ->  ( N  =  (/)  \/  -.  N  =  (/) ) )
3331, 32syl 14 . . . 4  |-  ( N  e.  om  ->  ( N  =  (/)  \/  -.  N  =  (/) ) )
3433ad2antrr 485 . . 3  |-  ( ( ( N  e.  om  /\  X  e. )  /\  ( X `
 N )  =  (/) )  ->  ( N  =  (/)  \/  -.  N  =  (/) ) )
355, 30, 34mpjaodan 793 . 2  |-  ( ( ( N  e.  om  /\  X  e. )  /\  ( X `
 N )  =  (/) )  -> DECID  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
36 1n0 6411 . . . . . 6  |-  1o  =/=  (/)
3736neii 2342 . . . . 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 5498 . . . . . . 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 2170 . . . . . . . . . 10  |-  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  ( i  e. 
om  |->  if ( i  e.  N ,  1o ,  (/) ) )
41 eleq1 2233 . . . . . . . . . . 11  |-  ( i  =  N  ->  (
i  e.  N  <->  N  e.  N ) )
4241ifbid 3547 . . . . . . . . . 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 4596 . . . . . . . . . . . . 13  |-  ( N  e.  om  ->  Ord  N )
45 ordirr 4526 . . . . . . . . . . . . 13  |-  ( Ord 
N  ->  -.  N  e.  N )
4644, 45syl 14 . . . . . . . . . . . 12  |-  ( N  e.  om  ->  -.  N  e.  N )
4746iffalsed 3536 . . . . . . . . . . 11  |-  ( N  e.  om  ->  if ( N  e.  N ,  1o ,  (/) )  =  (/) )
48 peano1 4578 . . . . . . . . . . 11  |-  (/)  e.  om
4947, 48eqeltrdi 2261 . . . . . . . . . 10  |-  ( N  e.  om  ->  if ( N  e.  N ,  1o ,  (/) )  e. 
om )
5040, 42, 43, 49fvmptd3 5589 . . . . . . . . 9  |-  ( N  e.  om  ->  (
( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) ) `
 N )  =  if ( N  e.  N ,  1o ,  (/) ) )
5150, 47eqtrd 2203 . . . . . . . 8  |-  ( N  e.  om  ->  (
( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) ) `
 N )  =  (/) )
5251ad3antrrr 489 . . . . . . 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 525 . . . . . . 7  |-  ( ( ( ( N  e. 
om  /\  X  e. )  /\  ( X `  N )  =  1o )  /\  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )  -> 
( X `  N
)  =  1o )
5439, 52, 533eqtr3rd 2212 . . . . . 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 659 . . . 4  |-  ( ( ( N  e.  om  /\  X  e. )  /\  ( X `
 N )  =  1o )  ->  -.  ( i  e.  om  |->  if ( i  e.  N ,  1o ,  (/) ) )  =  X )
5756olcd 729 . . 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 830 . . 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 5632 . . . 4  |-  ( ( N  e.  om  /\  X  e. )  ->  ( X `  N )  e.  2o )
6261, 25eleqtrdi 2263 . . 3  |-  ( ( N  e.  om  /\  X  e. )  ->  ( X `  N )  e.  { (/)
,  1o } )
63 elpri 3606 . . 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 793 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 703  DECID wdc 829    = wceq 1348    e. wcel 2141    =/= wne 2340   (/)c0 3414   ifcif 3526   {cpr 3584   U.cuni 3796    |-> cmpt 4050   Ord word 4347   omcom 4574   -->wf 5194   ` cfv 5198   1oc1o 6388   2oc2o 6389  ℕxnninf 7096
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 609  ax-in2 610  ax-io 704  ax-5 1440  ax-7 1441  ax-gen 1442  ax-ie1 1486  ax-ie2 1487  ax-8 1497  ax-10 1498  ax-11 1499  ax-i12 1500  ax-bndl 1502  ax-4 1503  ax-17 1519  ax-i9 1523  ax-ial 1527  ax-i5r 1528  ax-13 2143  ax-14 2144  ax-ext 2152  ax-sep 4107  ax-nul 4115  ax-pow 4160  ax-pr 4194  ax-un 4418  ax-setind 4521  ax-iinf 4572
This theorem depends on definitions:  df-bi 116  df-dc 830  df-3or 974  df-3an 975  df-tru 1351  df-fal 1354  df-nf 1454  df-sb 1756  df-eu 2022  df-mo 2023  df-clab 2157  df-cleq 2163  df-clel 2166  df-nfc 2301  df-ne 2341  df-ral 2453  df-rex 2454  df-rab 2457  df-v 2732  df-sbc 2956  df-csb 3050  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-nul 3415  df-if 3527  df-pw 3568  df-sn 3589  df-pr 3590  df-op 3592  df-uni 3797  df-int 3832  df-br 3990  df-opab 4051  df-mpt 4052  df-tr 4088  df-id 4278  df-iord 4351  df-on 4353  df-suc 4356  df-iom 4575  df-xp 4617  df-rel 4618  df-cnv 4619  df-co 4620  df-dm 4621  df-rn 4622  df-iota 5160  df-fun 5200  df-fn 5201  df-f 5202  df-fv 5206  df-ov 5856  df-oprab 5857  df-mpo 5858  df-1o 6395  df-2o 6396  df-map 6628  df-nninf 7097
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator