Users' Mathboxes Mathbox for metakunt < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >   Mathboxes  >  sticksstones18 Structured version   Visualization version   GIF version

Theorem sticksstones18 40120
Description: Extend sticks and stones to finite sets, bijective builder. (Contributed by metakunt, 23-Oct-2024.)
Hypotheses
Ref Expression
sticksstones18.1 (𝜑𝑁 ∈ ℕ0)
sticksstones18.2 (𝜑𝐾 ∈ ℕ0)
sticksstones18.3 𝐴 = {𝑔 ∣ (𝑔:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑔𝑖) = 𝑁)}
sticksstones18.4 𝐵 = { ∣ (:𝑆⟶ℕ0 ∧ Σ𝑖𝑆 (𝑖) = 𝑁)}
sticksstones18.5 (𝜑𝑍:(1...𝐾)–1-1-onto𝑆)
sticksstones18.6 𝐹 = (𝑎𝐴 ↦ (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))))
Assertion
Ref Expression
sticksstones18 (𝜑𝐹:𝐴𝐵)
Distinct variable groups:   𝐴,𝑎,𝑖,𝑥   𝐵,𝑎   𝑔,𝐾,𝑖   𝑔,𝑁   ,𝑁   𝑆,,𝑖,𝑥   ,𝑍,𝑖,𝑥   𝑔,𝑎   ,𝑎   𝜑,𝑎,𝑖,𝑥
Allowed substitution hints:   𝜑(𝑔,)   𝐴(𝑔,)   𝐵(𝑥,𝑔,,𝑖)   𝑆(𝑔,𝑎)   𝐹(𝑥,𝑔,,𝑖,𝑎)   𝐾(𝑥,,𝑎)   𝑁(𝑥,𝑖,𝑎)   𝑍(𝑔,𝑎)

Proof of Theorem sticksstones18
Dummy variable 𝑛 is distinct from all other variables.
StepHypRef Expression
1 sticksstones18.3 . . . . . . . . . . . . . 14 𝐴 = {𝑔 ∣ (𝑔:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑔𝑖) = 𝑁)}
21eqimssi 3979 . . . . . . . . . . . . 13 𝐴 ⊆ {𝑔 ∣ (𝑔:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑔𝑖) = 𝑁)}
32a1i 11 . . . . . . . . . . . 12 (𝜑𝐴 ⊆ {𝑔 ∣ (𝑔:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑔𝑖) = 𝑁)})
43sseld 3920 . . . . . . . . . . 11 (𝜑 → (𝑎𝐴𝑎 ∈ {𝑔 ∣ (𝑔:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑔𝑖) = 𝑁)}))
54imp 407 . . . . . . . . . 10 ((𝜑𝑎𝐴) → 𝑎 ∈ {𝑔 ∣ (𝑔:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑔𝑖) = 𝑁)})
6 vex 3436 . . . . . . . . . . 11 𝑎 ∈ V
7 feq1 6581 . . . . . . . . . . . 12 (𝑔 = 𝑎 → (𝑔:(1...𝐾)⟶ℕ0𝑎:(1...𝐾)⟶ℕ0))
8 simpl 483 . . . . . . . . . . . . . . 15 ((𝑔 = 𝑎𝑖 ∈ (1...𝐾)) → 𝑔 = 𝑎)
98fveq1d 6776 . . . . . . . . . . . . . 14 ((𝑔 = 𝑎𝑖 ∈ (1...𝐾)) → (𝑔𝑖) = (𝑎𝑖))
109sumeq2dv 15415 . . . . . . . . . . . . 13 (𝑔 = 𝑎 → Σ𝑖 ∈ (1...𝐾)(𝑔𝑖) = Σ𝑖 ∈ (1...𝐾)(𝑎𝑖))
1110eqeq1d 2740 . . . . . . . . . . . 12 (𝑔 = 𝑎 → (Σ𝑖 ∈ (1...𝐾)(𝑔𝑖) = 𝑁 ↔ Σ𝑖 ∈ (1...𝐾)(𝑎𝑖) = 𝑁))
127, 11anbi12d 631 . . . . . . . . . . 11 (𝑔 = 𝑎 → ((𝑔:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑔𝑖) = 𝑁) ↔ (𝑎:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑎𝑖) = 𝑁)))
136, 12elab 3609 . . . . . . . . . 10 (𝑎 ∈ {𝑔 ∣ (𝑔:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑔𝑖) = 𝑁)} ↔ (𝑎:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑎𝑖) = 𝑁))
145, 13sylib 217 . . . . . . . . 9 ((𝜑𝑎𝐴) → (𝑎:(1...𝐾)⟶ℕ0 ∧ Σ𝑖 ∈ (1...𝐾)(𝑎𝑖) = 𝑁))
1514simpld 495 . . . . . . . 8 ((𝜑𝑎𝐴) → 𝑎:(1...𝐾)⟶ℕ0)
1615adantr 481 . . . . . . 7 (((𝜑𝑎𝐴) ∧ 𝑥𝑆) → 𝑎:(1...𝐾)⟶ℕ0)
17 sticksstones18.5 . . . . . . . . . . 11 (𝜑𝑍:(1...𝐾)–1-1-onto𝑆)
18 f1ocnv 6728 . . . . . . . . . . 11 (𝑍:(1...𝐾)–1-1-onto𝑆𝑍:𝑆1-1-onto→(1...𝐾))
1917, 18syl 17 . . . . . . . . . 10 (𝜑𝑍:𝑆1-1-onto→(1...𝐾))
20 f1of 6716 . . . . . . . . . 10 (𝑍:𝑆1-1-onto→(1...𝐾) → 𝑍:𝑆⟶(1...𝐾))
2119, 20syl 17 . . . . . . . . 9 (𝜑𝑍:𝑆⟶(1...𝐾))
2221adantr 481 . . . . . . . 8 ((𝜑𝑎𝐴) → 𝑍:𝑆⟶(1...𝐾))
2322ffvelrnda 6961 . . . . . . 7 (((𝜑𝑎𝐴) ∧ 𝑥𝑆) → (𝑍𝑥) ∈ (1...𝐾))
2416, 23ffvelrnd 6962 . . . . . 6 (((𝜑𝑎𝐴) ∧ 𝑥𝑆) → (𝑎‘(𝑍𝑥)) ∈ ℕ0)
2524fmpttd 6989 . . . . 5 ((𝜑𝑎𝐴) → (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))):𝑆⟶ℕ0)
26 eqidd 2739 . . . . . . . 8 (((𝜑𝑎𝐴) ∧ 𝑖𝑆) → (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) = (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))))
27 simpr 485 . . . . . . . . . 10 ((((𝜑𝑎𝐴) ∧ 𝑖𝑆) ∧ 𝑥 = 𝑖) → 𝑥 = 𝑖)
2827fveq2d 6778 . . . . . . . . 9 ((((𝜑𝑎𝐴) ∧ 𝑖𝑆) ∧ 𝑥 = 𝑖) → (𝑍𝑥) = (𝑍𝑖))
2928fveq2d 6778 . . . . . . . 8 ((((𝜑𝑎𝐴) ∧ 𝑖𝑆) ∧ 𝑥 = 𝑖) → (𝑎‘(𝑍𝑥)) = (𝑎‘(𝑍𝑖)))
30 simpr 485 . . . . . . . 8 (((𝜑𝑎𝐴) ∧ 𝑖𝑆) → 𝑖𝑆)
31 fvexd 6789 . . . . . . . 8 (((𝜑𝑎𝐴) ∧ 𝑖𝑆) → (𝑎‘(𝑍𝑖)) ∈ V)
3226, 29, 30, 31fvmptd 6882 . . . . . . 7 (((𝜑𝑎𝐴) ∧ 𝑖𝑆) → ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥)))‘𝑖) = (𝑎‘(𝑍𝑖)))
3332sumeq2dv 15415 . . . . . 6 ((𝜑𝑎𝐴) → Σ𝑖𝑆 ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥)))‘𝑖) = Σ𝑖𝑆 (𝑎‘(𝑍𝑖)))
34 fveq2 6774 . . . . . . . . 9 (𝑛 = (𝑍𝑖) → (𝑎𝑛) = (𝑎‘(𝑍𝑖)))
35 fzfid 13693 . . . . . . . . . 10 ((𝜑𝑎𝐴) → (1...𝐾) ∈ Fin)
3617adantr 481 . . . . . . . . . . . 12 ((𝜑𝑎𝐴) → 𝑍:(1...𝐾)–1-1-onto𝑆)
37 f1oenfi 8965 . . . . . . . . . . . 12 (((1...𝐾) ∈ Fin ∧ 𝑍:(1...𝐾)–1-1-onto𝑆) → (1...𝐾) ≈ 𝑆)
3835, 36, 37syl2anc 584 . . . . . . . . . . 11 ((𝜑𝑎𝐴) → (1...𝐾) ≈ 𝑆)
3938ensymd 8791 . . . . . . . . . 10 ((𝜑𝑎𝐴) → 𝑆 ≈ (1...𝐾))
40 enfii 8972 . . . . . . . . . 10 (((1...𝐾) ∈ Fin ∧ 𝑆 ≈ (1...𝐾)) → 𝑆 ∈ Fin)
4135, 39, 40syl2anc 584 . . . . . . . . 9 ((𝜑𝑎𝐴) → 𝑆 ∈ Fin)
4219adantr 481 . . . . . . . . 9 ((𝜑𝑎𝐴) → 𝑍:𝑆1-1-onto→(1...𝐾))
43 eqidd 2739 . . . . . . . . 9 (((𝜑𝑎𝐴) ∧ 𝑖𝑆) → (𝑍𝑖) = (𝑍𝑖))
44 nn0sscn 12238 . . . . . . . . . . . 12 0 ⊆ ℂ
4544a1i 11 . . . . . . . . . . 11 ((𝜑𝑎𝐴) → ℕ0 ⊆ ℂ)
46 fss 6617 . . . . . . . . . . 11 ((𝑎:(1...𝐾)⟶ℕ0 ∧ ℕ0 ⊆ ℂ) → 𝑎:(1...𝐾)⟶ℂ)
4715, 45, 46syl2anc 584 . . . . . . . . . 10 ((𝜑𝑎𝐴) → 𝑎:(1...𝐾)⟶ℂ)
4847ffvelrnda 6961 . . . . . . . . 9 (((𝜑𝑎𝐴) ∧ 𝑛 ∈ (1...𝐾)) → (𝑎𝑛) ∈ ℂ)
4934, 41, 42, 43, 48fsumf1o 15435 . . . . . . . 8 ((𝜑𝑎𝐴) → Σ𝑛 ∈ (1...𝐾)(𝑎𝑛) = Σ𝑖𝑆 (𝑎‘(𝑍𝑖)))
5049eqcomd 2744 . . . . . . 7 ((𝜑𝑎𝐴) → Σ𝑖𝑆 (𝑎‘(𝑍𝑖)) = Σ𝑛 ∈ (1...𝐾)(𝑎𝑛))
51 fveq2 6774 . . . . . . . . . 10 (𝑛 = 𝑖 → (𝑎𝑛) = (𝑎𝑖))
5251cbvsumv 15408 . . . . . . . . 9 Σ𝑛 ∈ (1...𝐾)(𝑎𝑛) = Σ𝑖 ∈ (1...𝐾)(𝑎𝑖)
5352a1i 11 . . . . . . . 8 ((𝜑𝑎𝐴) → Σ𝑛 ∈ (1...𝐾)(𝑎𝑛) = Σ𝑖 ∈ (1...𝐾)(𝑎𝑖))
5414simprd 496 . . . . . . . 8 ((𝜑𝑎𝐴) → Σ𝑖 ∈ (1...𝐾)(𝑎𝑖) = 𝑁)
5553, 54eqtrd 2778 . . . . . . 7 ((𝜑𝑎𝐴) → Σ𝑛 ∈ (1...𝐾)(𝑎𝑛) = 𝑁)
5650, 55eqtrd 2778 . . . . . 6 ((𝜑𝑎𝐴) → Σ𝑖𝑆 (𝑎‘(𝑍𝑖)) = 𝑁)
5733, 56eqtrd 2778 . . . . 5 ((𝜑𝑎𝐴) → Σ𝑖𝑆 ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥)))‘𝑖) = 𝑁)
5825, 57jca 512 . . . 4 ((𝜑𝑎𝐴) → ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))):𝑆⟶ℕ0 ∧ Σ𝑖𝑆 ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥)))‘𝑖) = 𝑁))
59 fzfid 13693 . . . . . . . 8 (𝜑 → (1...𝐾) ∈ Fin)
6059adantr 481 . . . . . . 7 ((𝜑𝑎𝐴) → (1...𝐾) ∈ Fin)
6159, 17, 37syl2anc 584 . . . . . . . . 9 (𝜑 → (1...𝐾) ≈ 𝑆)
6261ensymd 8791 . . . . . . . 8 (𝜑𝑆 ≈ (1...𝐾))
6362adantr 481 . . . . . . 7 ((𝜑𝑎𝐴) → 𝑆 ≈ (1...𝐾))
6460, 63, 40syl2anc 584 . . . . . 6 ((𝜑𝑎𝐴) → 𝑆 ∈ Fin)
6564mptexd 7100 . . . . 5 ((𝜑𝑎𝐴) → (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) ∈ V)
66 feq1 6581 . . . . . . 7 ( = (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) → (:𝑆⟶ℕ0 ↔ (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))):𝑆⟶ℕ0))
67 simpl 483 . . . . . . . . . 10 (( = (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) ∧ 𝑖𝑆) → = (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))))
6867fveq1d 6776 . . . . . . . . 9 (( = (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) ∧ 𝑖𝑆) → (𝑖) = ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥)))‘𝑖))
6968sumeq2dv 15415 . . . . . . . 8 ( = (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) → Σ𝑖𝑆 (𝑖) = Σ𝑖𝑆 ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥)))‘𝑖))
7069eqeq1d 2740 . . . . . . 7 ( = (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) → (Σ𝑖𝑆 (𝑖) = 𝑁 ↔ Σ𝑖𝑆 ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥)))‘𝑖) = 𝑁))
7166, 70anbi12d 631 . . . . . 6 ( = (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) → ((:𝑆⟶ℕ0 ∧ Σ𝑖𝑆 (𝑖) = 𝑁) ↔ ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))):𝑆⟶ℕ0 ∧ Σ𝑖𝑆 ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥)))‘𝑖) = 𝑁)))
7271elabg 3607 . . . . 5 ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) ∈ V → ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) ∈ { ∣ (:𝑆⟶ℕ0 ∧ Σ𝑖𝑆 (𝑖) = 𝑁)} ↔ ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))):𝑆⟶ℕ0 ∧ Σ𝑖𝑆 ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥)))‘𝑖) = 𝑁)))
7365, 72syl 17 . . . 4 ((𝜑𝑎𝐴) → ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) ∈ { ∣ (:𝑆⟶ℕ0 ∧ Σ𝑖𝑆 (𝑖) = 𝑁)} ↔ ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))):𝑆⟶ℕ0 ∧ Σ𝑖𝑆 ((𝑥𝑆 ↦ (𝑎‘(𝑍𝑥)))‘𝑖) = 𝑁)))
7458, 73mpbird 256 . . 3 ((𝜑𝑎𝐴) → (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) ∈ { ∣ (:𝑆⟶ℕ0 ∧ Σ𝑖𝑆 (𝑖) = 𝑁)})
75 sticksstones18.4 . . . 4 𝐵 = { ∣ (:𝑆⟶ℕ0 ∧ Σ𝑖𝑆 (𝑖) = 𝑁)}
7675a1i 11 . . 3 ((𝜑𝑎𝐴) → 𝐵 = { ∣ (:𝑆⟶ℕ0 ∧ Σ𝑖𝑆 (𝑖) = 𝑁)})
7774, 76eleqtrrd 2842 . 2 ((𝜑𝑎𝐴) → (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))) ∈ 𝐵)
78 sticksstones18.6 . 2 𝐹 = (𝑎𝐴 ↦ (𝑥𝑆 ↦ (𝑎‘(𝑍𝑥))))
7977, 78fmptd 6988 1 (𝜑𝐹:𝐴𝐵)
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 396   = wceq 1539  wcel 2106  {cab 2715  Vcvv 3432  wss 3887   class class class wbr 5074  cmpt 5157  ccnv 5588  wf 6429  1-1-ontowf1o 6432  cfv 6433  (class class class)co 7275  cen 8730  Fincfn 8733  cc 10869  1c1 10872  0cn0 12233  ...cfz 13239  Σcsu 15397
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709  ax-rep 5209  ax-sep 5223  ax-nul 5230  ax-pow 5288  ax-pr 5352  ax-un 7588  ax-inf2 9399  ax-cnex 10927  ax-resscn 10928  ax-1cn 10929  ax-icn 10930  ax-addcl 10931  ax-addrcl 10932  ax-mulcl 10933  ax-mulrcl 10934  ax-mulcom 10935  ax-addass 10936  ax-mulass 10937  ax-distr 10938  ax-i2m1 10939  ax-1ne0 10940  ax-1rid 10941  ax-rnegex 10942  ax-rrecex 10943  ax-cnre 10944  ax-pre-lttri 10945  ax-pre-lttrn 10946  ax-pre-ltadd 10947  ax-pre-mulgt0 10948  ax-pre-sup 10949
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3or 1087  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-ne 2944  df-nel 3050  df-ral 3069  df-rex 3070  df-rmo 3071  df-reu 3072  df-rab 3073  df-v 3434  df-sbc 3717  df-csb 3833  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-pss 3906  df-nul 4257  df-if 4460  df-pw 4535  df-sn 4562  df-pr 4564  df-op 4568  df-uni 4840  df-int 4880  df-iun 4926  df-br 5075  df-opab 5137  df-mpt 5158  df-tr 5192  df-id 5489  df-eprel 5495  df-po 5503  df-so 5504  df-fr 5544  df-se 5545  df-we 5546  df-xp 5595  df-rel 5596  df-cnv 5597  df-co 5598  df-dm 5599  df-rn 5600  df-res 5601  df-ima 5602  df-pred 6202  df-ord 6269  df-on 6270  df-lim 6271  df-suc 6272  df-iota 6391  df-fun 6435  df-fn 6436  df-f 6437  df-f1 6438  df-fo 6439  df-f1o 6440  df-fv 6441  df-isom 6442  df-riota 7232  df-ov 7278  df-oprab 7279  df-mpo 7280  df-om 7713  df-1st 7831  df-2nd 7832  df-frecs 8097  df-wrecs 8128  df-recs 8202  df-rdg 8241  df-1o 8297  df-er 8498  df-en 8734  df-dom 8735  df-sdom 8736  df-fin 8737  df-sup 9201  df-oi 9269  df-card 9697  df-pnf 11011  df-mnf 11012  df-xr 11013  df-ltxr 11014  df-le 11015  df-sub 11207  df-neg 11208  df-div 11633  df-nn 11974  df-2 12036  df-3 12037  df-n0 12234  df-z 12320  df-uz 12583  df-rp 12731  df-fz 13240  df-fzo 13383  df-seq 13722  df-exp 13783  df-hash 14045  df-cj 14810  df-re 14811  df-im 14812  df-sqrt 14946  df-abs 14947  df-clim 15197  df-sum 15398
This theorem is referenced by:  sticksstones19  40121
  Copyright terms: Public domain W3C validator