MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  fzennn Structured version   Visualization version   GIF version

Theorem fzennn 12584
Description: The cardinality of a finite set of sequential integers. (See om2uz0i 12563 for a description of the hypothesis.) (Contributed by Mario Carneiro, 12-Feb-2013.) (Revised by Mario Carneiro, 7-Mar-2014.)
Hypothesis
Ref Expression
fzennn.1 𝐺 = (rec((𝑥 ∈ V ↦ (𝑥 + 1)), 0) ↾ ω)
Assertion
Ref Expression
fzennn (𝑁 ∈ ℕ0 → (1...𝑁) ≈ (𝐺𝑁))

Proof of Theorem fzennn
Dummy variables 𝑚 𝑛 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 oveq2 6535 . . 3 (𝑛 = 0 → (1...𝑛) = (1...0))
2 fveq2 6088 . . 3 (𝑛 = 0 → (𝐺𝑛) = (𝐺‘0))
31, 2breq12d 4590 . 2 (𝑛 = 0 → ((1...𝑛) ≈ (𝐺𝑛) ↔ (1...0) ≈ (𝐺‘0)))
4 oveq2 6535 . . 3 (𝑛 = 𝑚 → (1...𝑛) = (1...𝑚))
5 fveq2 6088 . . 3 (𝑛 = 𝑚 → (𝐺𝑛) = (𝐺𝑚))
64, 5breq12d 4590 . 2 (𝑛 = 𝑚 → ((1...𝑛) ≈ (𝐺𝑛) ↔ (1...𝑚) ≈ (𝐺𝑚)))
7 oveq2 6535 . . 3 (𝑛 = (𝑚 + 1) → (1...𝑛) = (1...(𝑚 + 1)))
8 fveq2 6088 . . 3 (𝑛 = (𝑚 + 1) → (𝐺𝑛) = (𝐺‘(𝑚 + 1)))
97, 8breq12d 4590 . 2 (𝑛 = (𝑚 + 1) → ((1...𝑛) ≈ (𝐺𝑛) ↔ (1...(𝑚 + 1)) ≈ (𝐺‘(𝑚 + 1))))
10 oveq2 6535 . . 3 (𝑛 = 𝑁 → (1...𝑛) = (1...𝑁))
11 fveq2 6088 . . 3 (𝑛 = 𝑁 → (𝐺𝑛) = (𝐺𝑁))
1210, 11breq12d 4590 . 2 (𝑛 = 𝑁 → ((1...𝑛) ≈ (𝐺𝑛) ↔ (1...𝑁) ≈ (𝐺𝑁)))
13 0ex 4713 . . . 4 ∅ ∈ V
1413enref 7851 . . 3 ∅ ≈ ∅
15 fz10 12188 . . 3 (1...0) = ∅
16 0z 11221 . . . . . 6 0 ∈ ℤ
17 fzennn.1 . . . . . 6 𝐺 = (rec((𝑥 ∈ V ↦ (𝑥 + 1)), 0) ↾ ω)
1816, 17om2uzf1oi 12569 . . . . 5 𝐺:ω–1-1-onto→(ℤ‘0)
19 peano1 6954 . . . . 5 ∅ ∈ ω
2018, 19pm3.2i 469 . . . 4 (𝐺:ω–1-1-onto→(ℤ‘0) ∧ ∅ ∈ ω)
2116, 17om2uz0i 12563 . . . 4 (𝐺‘∅) = 0
22 f1ocnvfv 6412 . . . 4 ((𝐺:ω–1-1-onto→(ℤ‘0) ∧ ∅ ∈ ω) → ((𝐺‘∅) = 0 → (𝐺‘0) = ∅))
2320, 21, 22mp2 9 . . 3 (𝐺‘0) = ∅
2414, 15, 233brtr4i 4607 . 2 (1...0) ≈ (𝐺‘0)
25 simpr 475 . . . . 5 ((𝑚 ∈ ℕ0 ∧ (1...𝑚) ≈ (𝐺𝑚)) → (1...𝑚) ≈ (𝐺𝑚))
26 ovex 6555 . . . . . . 7 (𝑚 + 1) ∈ V
27 fvex 6098 . . . . . . 7 (𝐺𝑚) ∈ V
28 en2sn 7899 . . . . . . 7 (((𝑚 + 1) ∈ V ∧ (𝐺𝑚) ∈ V) → {(𝑚 + 1)} ≈ {(𝐺𝑚)})
2926, 27, 28mp2an 703 . . . . . 6 {(𝑚 + 1)} ≈ {(𝐺𝑚)}
3029a1i 11 . . . . 5 ((𝑚 ∈ ℕ0 ∧ (1...𝑚) ≈ (𝐺𝑚)) → {(𝑚 + 1)} ≈ {(𝐺𝑚)})
31 fzp1disj 12224 . . . . . 6 ((1...𝑚) ∩ {(𝑚 + 1)}) = ∅
3231a1i 11 . . . . 5 ((𝑚 ∈ ℕ0 ∧ (1...𝑚) ≈ (𝐺𝑚)) → ((1...𝑚) ∩ {(𝑚 + 1)}) = ∅)
33 f1ocnvdm 6418 . . . . . . . . . 10 ((𝐺:ω–1-1-onto→(ℤ‘0) ∧ 𝑚 ∈ (ℤ‘0)) → (𝐺𝑚) ∈ ω)
3418, 33mpan 701 . . . . . . . . 9 (𝑚 ∈ (ℤ‘0) → (𝐺𝑚) ∈ ω)
35 nn0uz 11554 . . . . . . . . 9 0 = (ℤ‘0)
3634, 35eleq2s 2705 . . . . . . . 8 (𝑚 ∈ ℕ0 → (𝐺𝑚) ∈ ω)
37 nnord 6942 . . . . . . . 8 ((𝐺𝑚) ∈ ω → Ord (𝐺𝑚))
38 ordirr 5644 . . . . . . . 8 (Ord (𝐺𝑚) → ¬ (𝐺𝑚) ∈ (𝐺𝑚))
3936, 37, 383syl 18 . . . . . . 7 (𝑚 ∈ ℕ0 → ¬ (𝐺𝑚) ∈ (𝐺𝑚))
4039adantr 479 . . . . . 6 ((𝑚 ∈ ℕ0 ∧ (1...𝑚) ≈ (𝐺𝑚)) → ¬ (𝐺𝑚) ∈ (𝐺𝑚))
41 disjsn 4191 . . . . . 6 (((𝐺𝑚) ∩ {(𝐺𝑚)}) = ∅ ↔ ¬ (𝐺𝑚) ∈ (𝐺𝑚))
4240, 41sylibr 222 . . . . 5 ((𝑚 ∈ ℕ0 ∧ (1...𝑚) ≈ (𝐺𝑚)) → ((𝐺𝑚) ∩ {(𝐺𝑚)}) = ∅)
43 unen 7902 . . . . 5 ((((1...𝑚) ≈ (𝐺𝑚) ∧ {(𝑚 + 1)} ≈ {(𝐺𝑚)}) ∧ (((1...𝑚) ∩ {(𝑚 + 1)}) = ∅ ∧ ((𝐺𝑚) ∩ {(𝐺𝑚)}) = ∅)) → ((1...𝑚) ∪ {(𝑚 + 1)}) ≈ ((𝐺𝑚) ∪ {(𝐺𝑚)}))
4425, 30, 32, 42, 43syl22anc 1318 . . . 4 ((𝑚 ∈ ℕ0 ∧ (1...𝑚) ≈ (𝐺𝑚)) → ((1...𝑚) ∪ {(𝑚 + 1)}) ≈ ((𝐺𝑚) ∪ {(𝐺𝑚)}))
45 1z 11240 . . . . . 6 1 ∈ ℤ
46 1m1e0 10936 . . . . . . . . . 10 (1 − 1) = 0
4746fveq2i 6091 . . . . . . . . 9 (ℤ‘(1 − 1)) = (ℤ‘0)
4835, 47eqtr4i 2634 . . . . . . . 8 0 = (ℤ‘(1 − 1))
4948eleq2i 2679 . . . . . . 7 (𝑚 ∈ ℕ0𝑚 ∈ (ℤ‘(1 − 1)))
5049biimpi 204 . . . . . 6 (𝑚 ∈ ℕ0𝑚 ∈ (ℤ‘(1 − 1)))
51 fzsuc2 12223 . . . . . 6 ((1 ∈ ℤ ∧ 𝑚 ∈ (ℤ‘(1 − 1))) → (1...(𝑚 + 1)) = ((1...𝑚) ∪ {(𝑚 + 1)}))
5245, 50, 51sylancr 693 . . . . 5 (𝑚 ∈ ℕ0 → (1...(𝑚 + 1)) = ((1...𝑚) ∪ {(𝑚 + 1)}))
5352adantr 479 . . . 4 ((𝑚 ∈ ℕ0 ∧ (1...𝑚) ≈ (𝐺𝑚)) → (1...(𝑚 + 1)) = ((1...𝑚) ∪ {(𝑚 + 1)}))
54 peano2 6955 . . . . . . . . 9 ((𝐺𝑚) ∈ ω → suc (𝐺𝑚) ∈ ω)
5536, 54syl 17 . . . . . . . 8 (𝑚 ∈ ℕ0 → suc (𝐺𝑚) ∈ ω)
5655, 18jctil 557 . . . . . . 7 (𝑚 ∈ ℕ0 → (𝐺:ω–1-1-onto→(ℤ‘0) ∧ suc (𝐺𝑚) ∈ ω))
5716, 17om2uzsuci 12564 . . . . . . . . 9 ((𝐺𝑚) ∈ ω → (𝐺‘suc (𝐺𝑚)) = ((𝐺‘(𝐺𝑚)) + 1))
5836, 57syl 17 . . . . . . . 8 (𝑚 ∈ ℕ0 → (𝐺‘suc (𝐺𝑚)) = ((𝐺‘(𝐺𝑚)) + 1))
5935eleq2i 2679 . . . . . . . . . . 11 (𝑚 ∈ ℕ0𝑚 ∈ (ℤ‘0))
6059biimpi 204 . . . . . . . . . 10 (𝑚 ∈ ℕ0𝑚 ∈ (ℤ‘0))
61 f1ocnvfv2 6411 . . . . . . . . . 10 ((𝐺:ω–1-1-onto→(ℤ‘0) ∧ 𝑚 ∈ (ℤ‘0)) → (𝐺‘(𝐺𝑚)) = 𝑚)
6218, 60, 61sylancr 693 . . . . . . . . 9 (𝑚 ∈ ℕ0 → (𝐺‘(𝐺𝑚)) = 𝑚)
6362oveq1d 6542 . . . . . . . 8 (𝑚 ∈ ℕ0 → ((𝐺‘(𝐺𝑚)) + 1) = (𝑚 + 1))
6458, 63eqtrd 2643 . . . . . . 7 (𝑚 ∈ ℕ0 → (𝐺‘suc (𝐺𝑚)) = (𝑚 + 1))
65 f1ocnvfv 6412 . . . . . . 7 ((𝐺:ω–1-1-onto→(ℤ‘0) ∧ suc (𝐺𝑚) ∈ ω) → ((𝐺‘suc (𝐺𝑚)) = (𝑚 + 1) → (𝐺‘(𝑚 + 1)) = suc (𝐺𝑚)))
6656, 64, 65sylc 62 . . . . . 6 (𝑚 ∈ ℕ0 → (𝐺‘(𝑚 + 1)) = suc (𝐺𝑚))
6766adantr 479 . . . . 5 ((𝑚 ∈ ℕ0 ∧ (1...𝑚) ≈ (𝐺𝑚)) → (𝐺‘(𝑚 + 1)) = suc (𝐺𝑚))
68 df-suc 5632 . . . . 5 suc (𝐺𝑚) = ((𝐺𝑚) ∪ {(𝐺𝑚)})
6967, 68syl6eq 2659 . . . 4 ((𝑚 ∈ ℕ0 ∧ (1...𝑚) ≈ (𝐺𝑚)) → (𝐺‘(𝑚 + 1)) = ((𝐺𝑚) ∪ {(𝐺𝑚)}))
7044, 53, 693brtr4d 4609 . . 3 ((𝑚 ∈ ℕ0 ∧ (1...𝑚) ≈ (𝐺𝑚)) → (1...(𝑚 + 1)) ≈ (𝐺‘(𝑚 + 1)))
7170ex 448 . 2 (𝑚 ∈ ℕ0 → ((1...𝑚) ≈ (𝐺𝑚) → (1...(𝑚 + 1)) ≈ (𝐺‘(𝑚 + 1))))
723, 6, 9, 12, 24, 71nn0ind 11304 1 (𝑁 ∈ ℕ0 → (1...𝑁) ≈ (𝐺𝑁))
Colors of variables: wff setvar class
Syntax hints:  ¬ wn 3  wi 4  wa 382   = wceq 1474  wcel 1976  Vcvv 3172  cun 3537  cin 3538  c0 3873  {csn 4124   class class class wbr 4577  cmpt 4637  ccnv 5027  cres 5030  Ord word 5625  suc csuc 5628  1-1-ontowf1o 5789  cfv 5790  (class class class)co 6527  ωcom 6934  reccrdg 7369  cen 7815  0cc0 9792  1c1 9793   + caddc 9795  cmin 10117  0cn0 11139  cz 11210  cuz 11519  ...cfz 12152
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 2032  ax-13 2232  ax-ext 2589  ax-sep 4703  ax-nul 4712  ax-pow 4764  ax-pr 4828  ax-un 6824  ax-cnex 9848  ax-resscn 9849  ax-1cn 9850  ax-icn 9851  ax-addcl 9852  ax-addrcl 9853  ax-mulcl 9854  ax-mulrcl 9855  ax-mulcom 9856  ax-addass 9857  ax-mulass 9858  ax-distr 9859  ax-i2m1 9860  ax-1ne0 9861  ax-1rid 9862  ax-rnegex 9863  ax-rrecex 9864  ax-cnre 9865  ax-pre-lttri 9866  ax-pre-lttrn 9867  ax-pre-ltadd 9868  ax-pre-mulgt0 9869
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-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 6935  df-1st 7036  df-2nd 7037  df-wrecs 7271  df-recs 7332  df-rdg 7370  df-1o 7424  df-er 7606  df-en 7819  df-dom 7820  df-sdom 7821  df-pnf 9932  df-mnf 9933  df-xr 9934  df-ltxr 9935  df-le 9936  df-sub 10119  df-neg 10120  df-nn 10868  df-n0 11140  df-z 11211  df-uz 11520  df-fz 12153
This theorem is referenced by:  fzen2  12585  cardfz  12586
  Copyright terms: Public domain W3C validator