Users' Mathboxes Mathbox for Richard Penner < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  rp-isfinite6 Structured version   Visualization version   GIF version

Theorem rp-isfinite6 40818
Description: A set is said to be finite if it is either empty or it can be put in one-to-one correspondence with all the natural numbers between 1 and some 𝑛 ∈ ℕ. (Contributed by RP, 10-Mar-2020.)
Assertion
Ref Expression
rp-isfinite6 (𝐴 ∈ Fin ↔ (𝐴 = ∅ ∨ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴))
Distinct variable group:   𝐴,𝑛

Proof of Theorem rp-isfinite6
StepHypRef Expression
1 exmid 895 . . . 4 (𝐴 = ∅ ∨ ¬ 𝐴 = ∅)
21biantrur 534 . . 3 (𝐴 ∈ Fin ↔ ((𝐴 = ∅ ∨ ¬ 𝐴 = ∅) ∧ 𝐴 ∈ Fin))
3 andir 1009 . . 3 (((𝐴 = ∅ ∨ ¬ 𝐴 = ∅) ∧ 𝐴 ∈ Fin) ↔ ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ∨ (¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin)))
42, 3bitri 278 . 2 (𝐴 ∈ Fin ↔ ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ∨ (¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin)))
5 simpl 486 . . . 4 ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) → 𝐴 = ∅)
6 0fin 8854 . . . . . 6 ∅ ∈ Fin
7 eleq1a 2833 . . . . . 6 (∅ ∈ Fin → (𝐴 = ∅ → 𝐴 ∈ Fin))
86, 7ax-mp 5 . . . . 5 (𝐴 = ∅ → 𝐴 ∈ Fin)
98ancli 552 . . . 4 (𝐴 = ∅ → (𝐴 = ∅ ∧ 𝐴 ∈ Fin))
105, 9impbii 212 . . 3 ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ↔ 𝐴 = ∅)
11 rp-isfinite5 40817 . . . . . 6 (𝐴 ∈ Fin ↔ ∃𝑛 ∈ ℕ0 (1...𝑛) ≈ 𝐴)
12 df-rex 3067 . . . . . 6 (∃𝑛 ∈ ℕ0 (1...𝑛) ≈ 𝐴 ↔ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴))
1311, 12bitri 278 . . . . 5 (𝐴 ∈ Fin ↔ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴))
1413anbi2i 626 . . . 4 ((¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin) ↔ (¬ 𝐴 = ∅ ∧ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)))
15 df-rex 3067 . . . . 5 (∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴 ↔ ∃𝑛(𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
16 en0 8696 . . . . . . . . . . . . . 14 (𝐴 ≈ ∅ ↔ 𝐴 = ∅)
17 ensymb 8681 . . . . . . . . . . . . . 14 (𝐴 ≈ ∅ ↔ ∅ ≈ 𝐴)
1816, 17bitr3i 280 . . . . . . . . . . . . 13 (𝐴 = ∅ ↔ ∅ ≈ 𝐴)
1918notbii 323 . . . . . . . . . . . 12 𝐴 = ∅ ↔ ¬ ∅ ≈ 𝐴)
20 elnn0 12097 . . . . . . . . . . . . . 14 (𝑛 ∈ ℕ0 ↔ (𝑛 ∈ ℕ ∨ 𝑛 = 0))
2120anbi1i 627 . . . . . . . . . . . . 13 ((𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴) ↔ ((𝑛 ∈ ℕ ∨ 𝑛 = 0) ∧ (1...𝑛) ≈ 𝐴))
22 andir 1009 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∨ 𝑛 = 0) ∧ (1...𝑛) ≈ 𝐴) ↔ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
2321, 22bitri 278 . . . . . . . . . . . 12 ((𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴) ↔ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
2419, 23anbi12i 630 . . . . . . . . . . 11 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ (¬ ∅ ≈ 𝐴 ∧ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
25 andi 1008 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴 ∧ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))) ↔ ((¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)) ∨ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
2624, 25bitri 278 . . . . . . . . . 10 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ((¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)) ∨ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
27 3anass 1097 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ↔ (¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)))
28 3anass 1097 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴) ↔ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
2927, 28orbi12i 915 . . . . . . . . . 10 (((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ((¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)) ∨ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
3026, 29sylbb2 241 . . . . . . . . 9 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → ((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
31 simp2 1139 . . . . . . . . . 10 ((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → 𝑛 ∈ ℕ)
32 oveq2 7226 . . . . . . . . . . . 12 (𝑛 = 0 → (1...𝑛) = (1...0))
33 fz10 13138 . . . . . . . . . . . 12 (1...0) = ∅
3432, 33eqtrdi 2794 . . . . . . . . . . 11 (𝑛 = 0 → (1...𝑛) = ∅)
35 simp2 1139 . . . . . . . . . . . . 13 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → (1...𝑛) = ∅)
36 simp3 1140 . . . . . . . . . . . . 13 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → (1...𝑛) ≈ 𝐴)
3735, 36eqbrtrrd 5082 . . . . . . . . . . . 12 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → ∅ ≈ 𝐴)
38 simp1 1138 . . . . . . . . . . . 12 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → ¬ ∅ ≈ 𝐴)
3937, 38pm2.21dd 198 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → 𝑛 ∈ ℕ)
4034, 39syl3an2 1166 . . . . . . . . . 10 ((¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴) → 𝑛 ∈ ℕ)
4131, 40jaoi 857 . . . . . . . . 9 (((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)) → 𝑛 ∈ ℕ)
4230, 41syl 17 . . . . . . . 8 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → 𝑛 ∈ ℕ)
43 simprr 773 . . . . . . . 8 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → (1...𝑛) ≈ 𝐴)
4442, 43jca 515 . . . . . . 7 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
45 nngt0 11866 . . . . . . . . . . . 12 (𝑛 ∈ ℕ → 0 < 𝑛)
46 hash0 13939 . . . . . . . . . . . . 13 (♯‘∅) = 0
4746a1i 11 . . . . . . . . . . . 12 (𝑛 ∈ ℕ → (♯‘∅) = 0)
48 nnnn0 12102 . . . . . . . . . . . . 13 (𝑛 ∈ ℕ → 𝑛 ∈ ℕ0)
49 hashfz1 13917 . . . . . . . . . . . . 13 (𝑛 ∈ ℕ0 → (♯‘(1...𝑛)) = 𝑛)
5048, 49syl 17 . . . . . . . . . . . 12 (𝑛 ∈ ℕ → (♯‘(1...𝑛)) = 𝑛)
5145, 47, 503brtr4d 5090 . . . . . . . . . . 11 (𝑛 ∈ ℕ → (♯‘∅) < (♯‘(1...𝑛)))
52 fzfi 13550 . . . . . . . . . . . 12 (1...𝑛) ∈ Fin
53 hashsdom 13953 . . . . . . . . . . . 12 ((∅ ∈ Fin ∧ (1...𝑛) ∈ Fin) → ((♯‘∅) < (♯‘(1...𝑛)) ↔ ∅ ≺ (1...𝑛)))
546, 52, 53mp2an 692 . . . . . . . . . . 11 ((♯‘∅) < (♯‘(1...𝑛)) ↔ ∅ ≺ (1...𝑛))
5551, 54sylib 221 . . . . . . . . . 10 (𝑛 ∈ ℕ → ∅ ≺ (1...𝑛))
5655anim1i 618 . . . . . . . . 9 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → (∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴))
57 sdomentr 8785 . . . . . . . . . . 11 ((∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴) → ∅ ≺ 𝐴)
58 sdomnen 8662 . . . . . . . . . . 11 (∅ ≺ 𝐴 → ¬ ∅ ≈ 𝐴)
5957, 58syl 17 . . . . . . . . . 10 ((∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴) → ¬ ∅ ≈ 𝐴)
60 ensymb 8681 . . . . . . . . . . . 12 (∅ ≈ 𝐴𝐴 ≈ ∅)
6160, 16bitri 278 . . . . . . . . . . 11 (∅ ≈ 𝐴𝐴 = ∅)
6261notbii 323 . . . . . . . . . 10 (¬ ∅ ≈ 𝐴 ↔ ¬ 𝐴 = ∅)
6359, 62sylib 221 . . . . . . . . 9 ((∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴) → ¬ 𝐴 = ∅)
6456, 63syl 17 . . . . . . . 8 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → ¬ 𝐴 = ∅)
6548anim1i 618 . . . . . . . 8 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴))
6664, 65jca 515 . . . . . . 7 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → (¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)))
6744, 66impbii 212 . . . . . 6 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
6867exbii 1855 . . . . 5 (∃𝑛𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ∃𝑛(𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
69 19.42v 1962 . . . . 5 (∃𝑛𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ (¬ 𝐴 = ∅ ∧ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)))
7015, 68, 693bitr2ri 303 . . . 4 ((¬ 𝐴 = ∅ ∧ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴)
7114, 70bitri 278 . . 3 ((¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin) ↔ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴)
7210, 71orbi12i 915 . 2 (((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ∨ (¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin)) ↔ (𝐴 = ∅ ∨ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴))
734, 72bitri 278 1 (𝐴 ∈ Fin ↔ (𝐴 = ∅ ∨ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 209  wa 399  wo 847  w3a 1089   = wceq 1543  wex 1787  wcel 2110  wrex 3062  c0 4242   class class class wbr 5058  cfv 6385  (class class class)co 7218  cen 8628  csdm 8630  Fincfn 8631  0cc0 10734  1c1 10735   < clt 10872  cn 11835  0cn0 12095  ...cfz 13100  chash 13901
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1803  ax-4 1817  ax-5 1918  ax-6 1976  ax-7 2016  ax-8 2112  ax-9 2120  ax-10 2141  ax-11 2158  ax-12 2175  ax-ext 2708  ax-sep 5197  ax-nul 5204  ax-pow 5263  ax-pr 5327  ax-un 7528  ax-cnex 10790  ax-resscn 10791  ax-1cn 10792  ax-icn 10793  ax-addcl 10794  ax-addrcl 10795  ax-mulcl 10796  ax-mulrcl 10797  ax-mulcom 10798  ax-addass 10799  ax-mulass 10800  ax-distr 10801  ax-i2m1 10802  ax-1ne0 10803  ax-1rid 10804  ax-rnegex 10805  ax-rrecex 10806  ax-cnre 10807  ax-pre-lttri 10808  ax-pre-lttrn 10809  ax-pre-ltadd 10810  ax-pre-mulgt0 10811
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 848  df-3or 1090  df-3an 1091  df-tru 1546  df-fal 1556  df-ex 1788  df-nf 1792  df-sb 2071  df-mo 2539  df-eu 2568  df-clab 2715  df-cleq 2729  df-clel 2816  df-nfc 2886  df-ne 2941  df-nel 3047  df-ral 3066  df-rex 3067  df-reu 3068  df-rab 3070  df-v 3415  df-sbc 3700  df-csb 3817  df-dif 3874  df-un 3876  df-in 3878  df-ss 3888  df-pss 3890  df-nul 4243  df-if 4445  df-pw 4520  df-sn 4547  df-pr 4549  df-tp 4551  df-op 4553  df-uni 4825  df-int 4865  df-iun 4911  df-br 5059  df-opab 5121  df-mpt 5141  df-tr 5167  df-id 5460  df-eprel 5465  df-po 5473  df-so 5474  df-fr 5514  df-we 5516  df-xp 5562  df-rel 5563  df-cnv 5564  df-co 5565  df-dm 5566  df-rn 5567  df-res 5568  df-ima 5569  df-pred 6165  df-ord 6221  df-on 6222  df-lim 6223  df-suc 6224  df-iota 6343  df-fun 6387  df-fn 6388  df-f 6389  df-f1 6390  df-fo 6391  df-f1o 6392  df-fv 6393  df-riota 7175  df-ov 7221  df-oprab 7222  df-mpo 7223  df-om 7650  df-1st 7766  df-2nd 7767  df-wrecs 8052  df-recs 8113  df-rdg 8151  df-1o 8207  df-oadd 8211  df-er 8396  df-en 8632  df-dom 8633  df-sdom 8634  df-fin 8635  df-card 9560  df-pnf 10874  df-mnf 10875  df-xr 10876  df-ltxr 10877  df-le 10878  df-sub 11069  df-neg 11070  df-nn 11836  df-n0 12096  df-xnn0 12168  df-z 12182  df-uz 12444  df-fz 13101  df-hash 13902
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator