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 38181
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 Richard Penner, 10-Mar-2020.)
Assertion
Ref Expression
rp-isfinite6 (𝐴 ∈ Fin ↔ (𝐴 = ∅ ∨ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴))
Distinct variable group:   𝐴,𝑛

Proof of Theorem rp-isfinite6
StepHypRef Expression
1 exmid 430 . . . 4 (𝐴 = ∅ ∨ ¬ 𝐴 = ∅)
21biantrur 526 . . 3 (𝐴 ∈ Fin ↔ ((𝐴 = ∅ ∨ ¬ 𝐴 = ∅) ∧ 𝐴 ∈ Fin))
3 andir 930 . . 3 (((𝐴 = ∅ ∨ ¬ 𝐴 = ∅) ∧ 𝐴 ∈ Fin) ↔ ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ∨ (¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin)))
42, 3bitri 264 . 2 (𝐴 ∈ Fin ↔ ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ∨ (¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin)))
5 simpl 472 . . . 4 ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) → 𝐴 = ∅)
6 0fin 8229 . . . . . 6 ∅ ∈ Fin
7 eleq1a 2725 . . . . . 6 (∅ ∈ Fin → (𝐴 = ∅ → 𝐴 ∈ Fin))
86, 7ax-mp 5 . . . . 5 (𝐴 = ∅ → 𝐴 ∈ Fin)
98ancli 573 . . . 4 (𝐴 = ∅ → (𝐴 = ∅ ∧ 𝐴 ∈ Fin))
105, 9impbii 199 . . 3 ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ↔ 𝐴 = ∅)
11 rp-isfinite5 38180 . . . . . 6 (𝐴 ∈ Fin ↔ ∃𝑛 ∈ ℕ0 (1...𝑛) ≈ 𝐴)
12 df-rex 2947 . . . . . 6 (∃𝑛 ∈ ℕ0 (1...𝑛) ≈ 𝐴 ↔ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴))
1311, 12bitri 264 . . . . 5 (𝐴 ∈ Fin ↔ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴))
1413anbi2i 730 . . . 4 ((¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin) ↔ (¬ 𝐴 = ∅ ∧ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)))
15 df-rex 2947 . . . . 5 (∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴 ↔ ∃𝑛(𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
16 en0 8060 . . . . . . . . . . . . . . 15 (𝐴 ≈ ∅ ↔ 𝐴 = ∅)
1716bicomi 214 . . . . . . . . . . . . . 14 (𝐴 = ∅ ↔ 𝐴 ≈ ∅)
18 ensymb 8045 . . . . . . . . . . . . . 14 (𝐴 ≈ ∅ ↔ ∅ ≈ 𝐴)
1917, 18bitri 264 . . . . . . . . . . . . 13 (𝐴 = ∅ ↔ ∅ ≈ 𝐴)
2019notbii 309 . . . . . . . . . . . 12 𝐴 = ∅ ↔ ¬ ∅ ≈ 𝐴)
21 elnn0 11332 . . . . . . . . . . . . . 14 (𝑛 ∈ ℕ0 ↔ (𝑛 ∈ ℕ ∨ 𝑛 = 0))
2221anbi1i 731 . . . . . . . . . . . . 13 ((𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴) ↔ ((𝑛 ∈ ℕ ∨ 𝑛 = 0) ∧ (1...𝑛) ≈ 𝐴))
23 andir 930 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∨ 𝑛 = 0) ∧ (1...𝑛) ≈ 𝐴) ↔ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
2422, 23bitri 264 . . . . . . . . . . . 12 ((𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴) ↔ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
2520, 24anbi12i 733 . . . . . . . . . . 11 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ (¬ ∅ ≈ 𝐴 ∧ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
26 andi 929 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴 ∧ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))) ↔ ((¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)) ∨ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
2725, 26bitri 264 . . . . . . . . . 10 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ((¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)) ∨ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
28 3anass 1059 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ↔ (¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)))
29 3anass 1059 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴) ↔ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
3028, 29orbi12i 542 . . . . . . . . . 10 (((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ((¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)) ∨ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
3127, 30sylbb2 228 . . . . . . . . 9 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → ((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
32 simp2 1082 . . . . . . . . . 10 ((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → 𝑛 ∈ ℕ)
33 oveq2 6698 . . . . . . . . . . . 12 (𝑛 = 0 → (1...𝑛) = (1...0))
34 fz10 12400 . . . . . . . . . . . 12 (1...0) = ∅
3533, 34syl6eq 2701 . . . . . . . . . . 11 (𝑛 = 0 → (1...𝑛) = ∅)
36 simp2 1082 . . . . . . . . . . . . 13 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → (1...𝑛) = ∅)
37 simp3 1083 . . . . . . . . . . . . 13 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → (1...𝑛) ≈ 𝐴)
3836, 37eqbrtrrd 4709 . . . . . . . . . . . 12 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → ∅ ≈ 𝐴)
39 simp1 1081 . . . . . . . . . . . 12 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → ¬ ∅ ≈ 𝐴)
4038, 39pm2.21dd 186 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → 𝑛 ∈ ℕ)
4135, 40syl3an2 1400 . . . . . . . . . 10 ((¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴) → 𝑛 ∈ ℕ)
4232, 41jaoi 393 . . . . . . . . 9 (((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)) → 𝑛 ∈ ℕ)
4331, 42syl 17 . . . . . . . 8 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → 𝑛 ∈ ℕ)
44 simprr 811 . . . . . . . 8 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → (1...𝑛) ≈ 𝐴)
4543, 44jca 553 . . . . . . 7 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
46 nngt0 11087 . . . . . . . . . . . 12 (𝑛 ∈ ℕ → 0 < 𝑛)
47 hash0 13196 . . . . . . . . . . . . 13 (#‘∅) = 0
4847a1i 11 . . . . . . . . . . . 12 (𝑛 ∈ ℕ → (#‘∅) = 0)
49 nnnn0 11337 . . . . . . . . . . . . 13 (𝑛 ∈ ℕ → 𝑛 ∈ ℕ0)
50 hashfz1 13174 . . . . . . . . . . . . 13 (𝑛 ∈ ℕ0 → (#‘(1...𝑛)) = 𝑛)
5149, 50syl 17 . . . . . . . . . . . 12 (𝑛 ∈ ℕ → (#‘(1...𝑛)) = 𝑛)
5246, 48, 513brtr4d 4717 . . . . . . . . . . 11 (𝑛 ∈ ℕ → (#‘∅) < (#‘(1...𝑛)))
53 fzfi 12811 . . . . . . . . . . . 12 (1...𝑛) ∈ Fin
54 hashsdom 13208 . . . . . . . . . . . 12 ((∅ ∈ Fin ∧ (1...𝑛) ∈ Fin) → ((#‘∅) < (#‘(1...𝑛)) ↔ ∅ ≺ (1...𝑛)))
556, 53, 54mp2an 708 . . . . . . . . . . 11 ((#‘∅) < (#‘(1...𝑛)) ↔ ∅ ≺ (1...𝑛))
5652, 55sylib 208 . . . . . . . . . 10 (𝑛 ∈ ℕ → ∅ ≺ (1...𝑛))
5756anim1i 591 . . . . . . . . 9 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → (∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴))
58 sdomentr 8135 . . . . . . . . . . 11 ((∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴) → ∅ ≺ 𝐴)
59 sdomnen 8026 . . . . . . . . . . 11 (∅ ≺ 𝐴 → ¬ ∅ ≈ 𝐴)
6058, 59syl 17 . . . . . . . . . 10 ((∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴) → ¬ ∅ ≈ 𝐴)
61 ensymb 8045 . . . . . . . . . . . 12 (∅ ≈ 𝐴𝐴 ≈ ∅)
6261, 16bitri 264 . . . . . . . . . . 11 (∅ ≈ 𝐴𝐴 = ∅)
6362notbii 309 . . . . . . . . . 10 (¬ ∅ ≈ 𝐴 ↔ ¬ 𝐴 = ∅)
6460, 63sylib 208 . . . . . . . . 9 ((∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴) → ¬ 𝐴 = ∅)
6557, 64syl 17 . . . . . . . 8 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → ¬ 𝐴 = ∅)
6649anim1i 591 . . . . . . . 8 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴))
6765, 66jca 553 . . . . . . 7 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → (¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)))
6845, 67impbii 199 . . . . . 6 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
6968exbii 1814 . . . . 5 (∃𝑛𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ∃𝑛(𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
70 19.42v 1921 . . . . 5 (∃𝑛𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ (¬ 𝐴 = ∅ ∧ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)))
7115, 69, 703bitr2ri 289 . . . 4 ((¬ 𝐴 = ∅ ∧ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴)
7214, 71bitri 264 . . 3 ((¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin) ↔ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴)
7310, 72orbi12i 542 . 2 (((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ∨ (¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin)) ↔ (𝐴 = ∅ ∨ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴))
744, 73bitri 264 1 (𝐴 ∈ Fin ↔ (𝐴 = ∅ ∨ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 196  wo 382  wa 383  w3a 1054   = wceq 1523  wex 1744  wcel 2030  wrex 2942  c0 3948   class class class wbr 4685  cfv 5926  (class class class)co 6690  cen 7994  csdm 7996  Fincfn 7997  0cc0 9974  1c1 9975   < clt 10112  cn 11058  0cn0 11330  ...cfz 12364  #chash 13157
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936  ax-un 6991  ax-cnex 10030  ax-resscn 10031  ax-1cn 10032  ax-icn 10033  ax-addcl 10034  ax-addrcl 10035  ax-mulcl 10036  ax-mulrcl 10037  ax-mulcom 10038  ax-addass 10039  ax-mulass 10040  ax-distr 10041  ax-i2m1 10042  ax-1ne0 10043  ax-1rid 10044  ax-rnegex 10045  ax-rrecex 10046  ax-cnre 10047  ax-pre-lttri 10048  ax-pre-lttrn 10049  ax-pre-ltadd 10050  ax-pre-mulgt0 10051
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3or 1055  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-nel 2927  df-ral 2946  df-rex 2947  df-reu 2948  df-rab 2950  df-v 3233  df-sbc 3469  df-csb 3567  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-pss 3623  df-nul 3949  df-if 4120  df-pw 4193  df-sn 4211  df-pr 4213  df-tp 4215  df-op 4217  df-uni 4469  df-int 4508  df-iun 4554  df-br 4686  df-opab 4746  df-mpt 4763  df-tr 4786  df-id 5053  df-eprel 5058  df-po 5064  df-so 5065  df-fr 5102  df-we 5104  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-pred 5718  df-ord 5764  df-on 5765  df-lim 5766  df-suc 5767  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-f1 5931  df-fo 5932  df-f1o 5933  df-fv 5934  df-riota 6651  df-ov 6693  df-oprab 6694  df-mpt2 6695  df-om 7108  df-1st 7210  df-2nd 7211  df-wrecs 7452  df-recs 7513  df-rdg 7551  df-1o 7605  df-oadd 7609  df-er 7787  df-en 7998  df-dom 7999  df-sdom 8000  df-fin 8001  df-card 8803  df-pnf 10114  df-mnf 10115  df-xr 10116  df-ltxr 10117  df-le 10118  df-sub 10306  df-neg 10307  df-nn 11059  df-n0 11331  df-xnn0 11402  df-z 11416  df-uz 11726  df-fz 12365  df-hash 13158
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator