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 36707
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 429 . . . 4 (𝐴 = ∅ ∨ ¬ 𝐴 = ∅)
21biantrur 525 . . 3 (𝐴 ∈ Fin ↔ ((𝐴 = ∅ ∨ ¬ 𝐴 = ∅) ∧ 𝐴 ∈ Fin))
3 andir 907 . . 3 (((𝐴 = ∅ ∨ ¬ 𝐴 = ∅) ∧ 𝐴 ∈ Fin) ↔ ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ∨ (¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin)))
42, 3bitri 262 . 2 (𝐴 ∈ Fin ↔ ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ∨ (¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin)))
5 simpl 471 . . . 4 ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) → 𝐴 = ∅)
6 0fin 8051 . . . . . 6 ∅ ∈ Fin
7 eleq1a 2682 . . . . . 6 (∅ ∈ Fin → (𝐴 = ∅ → 𝐴 ∈ Fin))
86, 7ax-mp 5 . . . . 5 (𝐴 = ∅ → 𝐴 ∈ Fin)
98ancli 571 . . . 4 (𝐴 = ∅ → (𝐴 = ∅ ∧ 𝐴 ∈ Fin))
105, 9impbii 197 . . 3 ((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ↔ 𝐴 = ∅)
11 rp-isfinite5 36706 . . . . . 6 (𝐴 ∈ Fin ↔ ∃𝑛 ∈ ℕ0 (1...𝑛) ≈ 𝐴)
12 df-rex 2901 . . . . . 6 (∃𝑛 ∈ ℕ0 (1...𝑛) ≈ 𝐴 ↔ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴))
1311, 12bitri 262 . . . . 5 (𝐴 ∈ Fin ↔ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴))
1413anbi2i 725 . . . 4 ((¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin) ↔ (¬ 𝐴 = ∅ ∧ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)))
15 df-rex 2901 . . . . 5 (∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴 ↔ ∃𝑛(𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
16 en0 7883 . . . . . . . . . . . . . . 15 (𝐴 ≈ ∅ ↔ 𝐴 = ∅)
1716bicomi 212 . . . . . . . . . . . . . 14 (𝐴 = ∅ ↔ 𝐴 ≈ ∅)
18 ensymb 7868 . . . . . . . . . . . . . 14 (𝐴 ≈ ∅ ↔ ∅ ≈ 𝐴)
1917, 18bitri 262 . . . . . . . . . . . . 13 (𝐴 = ∅ ↔ ∅ ≈ 𝐴)
2019notbii 308 . . . . . . . . . . . 12 𝐴 = ∅ ↔ ¬ ∅ ≈ 𝐴)
21 elnn0 11144 . . . . . . . . . . . . . 14 (𝑛 ∈ ℕ0 ↔ (𝑛 ∈ ℕ ∨ 𝑛 = 0))
2221anbi1i 726 . . . . . . . . . . . . 13 ((𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴) ↔ ((𝑛 ∈ ℕ ∨ 𝑛 = 0) ∧ (1...𝑛) ≈ 𝐴))
23 andir 907 . . . . . . . . . . . . 13 (((𝑛 ∈ ℕ ∨ 𝑛 = 0) ∧ (1...𝑛) ≈ 𝐴) ↔ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
2422, 23bitri 262 . . . . . . . . . . . 12 ((𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴) ↔ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
2520, 24anbi12i 728 . . . . . . . . . . 11 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ (¬ ∅ ≈ 𝐴 ∧ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
26 andi 906 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴 ∧ ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))) ↔ ((¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)) ∨ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
2725, 26bitri 262 . . . . . . . . . 10 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ((¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)) ∨ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
28 3anass 1034 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ↔ (¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)))
29 3anass 1034 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴) ↔ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
3028, 29orbi12i 541 . . . . . . . . . 10 (((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ((¬ ∅ ≈ 𝐴 ∧ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴)) ∨ (¬ ∅ ≈ 𝐴 ∧ (𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴))))
3127, 30sylbb2 226 . . . . . . . . 9 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → ((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)))
32 simp2 1054 . . . . . . . . . 10 ((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → 𝑛 ∈ ℕ)
33 oveq2 6535 . . . . . . . . . . . 12 (𝑛 = 0 → (1...𝑛) = (1...0))
34 fz10 12191 . . . . . . . . . . . 12 (1...0) = ∅
3533, 34syl6eq 2659 . . . . . . . . . . 11 (𝑛 = 0 → (1...𝑛) = ∅)
36 simp2 1054 . . . . . . . . . . . . 13 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → (1...𝑛) = ∅)
37 simp3 1055 . . . . . . . . . . . . 13 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → (1...𝑛) ≈ 𝐴)
3836, 37eqbrtrrd 4601 . . . . . . . . . . . 12 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → ∅ ≈ 𝐴)
39 simp1 1053 . . . . . . . . . . . 12 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → ¬ ∅ ≈ 𝐴)
4038, 39pm2.21dd 184 . . . . . . . . . . 11 ((¬ ∅ ≈ 𝐴 ∧ (1...𝑛) = ∅ ∧ (1...𝑛) ≈ 𝐴) → 𝑛 ∈ ℕ)
4135, 40syl3an2 1351 . . . . . . . . . 10 ((¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴) → 𝑛 ∈ ℕ)
4232, 41jaoi 392 . . . . . . . . 9 (((¬ ∅ ≈ 𝐴𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) ∨ (¬ ∅ ≈ 𝐴𝑛 = 0 ∧ (1...𝑛) ≈ 𝐴)) → 𝑛 ∈ ℕ)
4331, 42syl 17 . . . . . . . 8 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → 𝑛 ∈ ℕ)
44 simprr 791 . . . . . . . 8 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → (1...𝑛) ≈ 𝐴)
4543, 44jca 552 . . . . . . 7 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) → (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
46 nngt0 10899 . . . . . . . . . . . 12 (𝑛 ∈ ℕ → 0 < 𝑛)
47 hash0 12974 . . . . . . . . . . . . 13 (#‘∅) = 0
4847a1i 11 . . . . . . . . . . . 12 (𝑛 ∈ ℕ → (#‘∅) = 0)
49 nnnn0 11149 . . . . . . . . . . . . 13 (𝑛 ∈ ℕ → 𝑛 ∈ ℕ0)
50 hashfz1 12951 . . . . . . . . . . . . 13 (𝑛 ∈ ℕ0 → (#‘(1...𝑛)) = 𝑛)
5149, 50syl 17 . . . . . . . . . . . 12 (𝑛 ∈ ℕ → (#‘(1...𝑛)) = 𝑛)
5246, 48, 513brtr4d 4609 . . . . . . . . . . 11 (𝑛 ∈ ℕ → (#‘∅) < (#‘(1...𝑛)))
53 fzfi 12591 . . . . . . . . . . . 12 (1...𝑛) ∈ Fin
54 hashsdom 12986 . . . . . . . . . . . 12 ((∅ ∈ Fin ∧ (1...𝑛) ∈ Fin) → ((#‘∅) < (#‘(1...𝑛)) ↔ ∅ ≺ (1...𝑛)))
556, 53, 54mp2an 703 . . . . . . . . . . 11 ((#‘∅) < (#‘(1...𝑛)) ↔ ∅ ≺ (1...𝑛))
5652, 55sylib 206 . . . . . . . . . 10 (𝑛 ∈ ℕ → ∅ ≺ (1...𝑛))
5756anim1i 589 . . . . . . . . 9 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → (∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴))
58 sdomentr 7957 . . . . . . . . . . 11 ((∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴) → ∅ ≺ 𝐴)
59 sdomnen 7848 . . . . . . . . . . 11 (∅ ≺ 𝐴 → ¬ ∅ ≈ 𝐴)
6058, 59syl 17 . . . . . . . . . 10 ((∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴) → ¬ ∅ ≈ 𝐴)
61 ensymb 7868 . . . . . . . . . . . 12 (∅ ≈ 𝐴𝐴 ≈ ∅)
6261, 16bitri 262 . . . . . . . . . . 11 (∅ ≈ 𝐴𝐴 = ∅)
6362notbii 308 . . . . . . . . . 10 (¬ ∅ ≈ 𝐴 ↔ ¬ 𝐴 = ∅)
6460, 63sylib 206 . . . . . . . . 9 ((∅ ≺ (1...𝑛) ∧ (1...𝑛) ≈ 𝐴) → ¬ 𝐴 = ∅)
6557, 64syl 17 . . . . . . . 8 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → ¬ 𝐴 = ∅)
6649anim1i 589 . . . . . . . 8 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴))
6765, 66jca 552 . . . . . . 7 ((𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴) → (¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)))
6845, 67impbii 197 . . . . . 6 ((¬ 𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ (𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
6968exbii 1763 . . . . 5 (∃𝑛𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ∃𝑛(𝑛 ∈ ℕ ∧ (1...𝑛) ≈ 𝐴))
70 19.42v 1904 . . . . 5 (∃𝑛𝐴 = ∅ ∧ (𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ (¬ 𝐴 = ∅ ∧ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)))
7115, 69, 703bitr2ri 287 . . . 4 ((¬ 𝐴 = ∅ ∧ ∃𝑛(𝑛 ∈ ℕ0 ∧ (1...𝑛) ≈ 𝐴)) ↔ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴)
7214, 71bitri 262 . . 3 ((¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin) ↔ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴)
7310, 72orbi12i 541 . 2 (((𝐴 = ∅ ∧ 𝐴 ∈ Fin) ∨ (¬ 𝐴 = ∅ ∧ 𝐴 ∈ Fin)) ↔ (𝐴 = ∅ ∨ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴))
744, 73bitri 262 1 (𝐴 ∈ Fin ↔ (𝐴 = ∅ ∨ ∃𝑛 ∈ ℕ (1...𝑛) ≈ 𝐴))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wb 194  wo 381  wa 382  w3a 1030   = wceq 1474  wex 1694  wcel 1976  wrex 2896  c0 3873   class class class wbr 4577  cfv 5790  (class class class)co 6527  cen 7816  csdm 7818  Fincfn 7819  0cc0 9793  1c1 9794   < clt 9931  cn 10870  0cn0 11142  ...cfz 12155  #chash 12937
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1712  ax-4 1727  ax-5 1826  ax-6 1874  ax-7 1921  ax-8 1978  ax-9 1985  ax-10 2005  ax-11 2020  ax-12 2033  ax-13 2233  ax-ext 2589  ax-sep 4703  ax-nul 4712  ax-pow 4764  ax-pr 4828  ax-un 6825  ax-cnex 9849  ax-resscn 9850  ax-1cn 9851  ax-icn 9852  ax-addcl 9853  ax-addrcl 9854  ax-mulcl 9855  ax-mulrcl 9856  ax-mulcom 9857  ax-addass 9858  ax-mulass 9859  ax-distr 9860  ax-i2m1 9861  ax-1ne0 9862  ax-1rid 9863  ax-rnegex 9864  ax-rrecex 9865  ax-cnre 9866  ax-pre-lttri 9867  ax-pre-lttrn 9868  ax-pre-ltadd 9869  ax-pre-mulgt0 9870
This theorem depends on definitions:  df-bi 195  df-or 383  df-an 384  df-3or 1031  df-3an 1032  df-tru 1477  df-ex 1695  df-nf 1700  df-sb 1867  df-eu 2461  df-mo 2462  df-clab 2596  df-cleq 2602  df-clel 2605  df-nfc 2739  df-ne 2781  df-nel 2782  df-ral 2900  df-rex 2901  df-reu 2902  df-rab 2904  df-v 3174  df-sbc 3402  df-csb 3499  df-dif 3542  df-un 3544  df-in 3546  df-ss 3553  df-pss 3555  df-nul 3874  df-if 4036  df-pw 4109  df-sn 4125  df-pr 4127  df-tp 4129  df-op 4131  df-uni 4367  df-int 4405  df-iun 4451  df-br 4578  df-opab 4638  df-mpt 4639  df-tr 4675  df-eprel 4939  df-id 4943  df-po 4949  df-so 4950  df-fr 4987  df-we 4989  df-xp 5034  df-rel 5035  df-cnv 5036  df-co 5037  df-dm 5038  df-rn 5039  df-res 5040  df-ima 5041  df-pred 5583  df-ord 5629  df-on 5630  df-lim 5631  df-suc 5632  df-iota 5754  df-fun 5792  df-fn 5793  df-f 5794  df-f1 5795  df-fo 5796  df-f1o 5797  df-fv 5798  df-riota 6489  df-ov 6530  df-oprab 6531  df-mpt2 6532  df-om 6936  df-1st 7037  df-2nd 7038  df-wrecs 7272  df-recs 7333  df-rdg 7371  df-1o 7425  df-oadd 7429  df-er 7607  df-en 7820  df-dom 7821  df-sdom 7822  df-fin 7823  df-card 8626  df-pnf 9933  df-mnf 9934  df-xr 9935  df-ltxr 9936  df-le 9937  df-sub 10120  df-neg 10121  df-nn 10871  df-n0 11143  df-z 11214  df-uz 11523  df-fz 12156  df-hash 12938
This theorem is referenced by: (None)
  Copyright terms: Public domain W3C validator