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

Theorem sticksstones15 42103
Description: Sticks and stones with almost collapsed definitions for positive integers. (Contributed by metakunt, 7-Oct-2024.)
Hypotheses
Ref Expression
sticksstones15.1 (𝜑𝑁 ∈ ℕ0)
sticksstones15.2 (𝜑𝐾 ∈ ℕ0)
sticksstones15.3 𝐴 = {𝑔 ∣ (𝑔:(1...(𝐾 + 1))⟶ℕ0 ∧ Σ𝑖 ∈ (1...(𝐾 + 1))(𝑔𝑖) = 𝑁)}
Assertion
Ref Expression
sticksstones15 (𝜑 → (♯‘𝐴) = ((𝑁 + 𝐾)C𝐾))
Distinct variable groups:   𝐴,𝑖   𝑔,𝐾,𝑖   𝑔,𝑁,𝑖   𝜑,𝑔,𝑖
Allowed substitution hint:   𝐴(𝑔)

Proof of Theorem sticksstones15
Dummy variables 𝑡 𝑢 𝑣 𝑤 𝑥 𝑦 𝑧 𝑓 𝑙 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 sticksstones15.1 . 2 (𝜑𝑁 ∈ ℕ0)
2 sticksstones15.2 . 2 (𝜑𝐾 ∈ ℕ0)
3 eqid 2734 . 2 (𝑣𝐴 ↦ (𝑧 ∈ (1...𝐾) ↦ (𝑧 + Σ𝑡 ∈ (1...𝑧)(𝑣𝑡)))) = (𝑣𝐴 ↦ (𝑧 ∈ (1...𝐾) ↦ (𝑧 + Σ𝑡 ∈ (1...𝑧)(𝑣𝑡))))
4 eqid 2734 . 2 (𝑢 ∈ {𝑙 ∣ (𝑙:(1...𝐾)⟶(1...(𝑁 + 𝐾)) ∧ ∀𝑥 ∈ (1...𝐾)∀𝑦 ∈ (1...𝐾)(𝑥 < 𝑦 → (𝑙𝑥) < (𝑙𝑦)))} ↦ if(𝐾 = 0, {⟨1, 𝑁⟩}, (𝑤 ∈ (1...(𝐾 + 1)) ↦ if(𝑤 = (𝐾 + 1), ((𝑁 + 𝐾) − (𝑢𝐾)), if(𝑤 = 1, ((𝑢‘1) − 1), (((𝑢𝑤) − (𝑢‘(𝑤 − 1))) − 1)))))) = (𝑢 ∈ {𝑙 ∣ (𝑙:(1...𝐾)⟶(1...(𝑁 + 𝐾)) ∧ ∀𝑥 ∈ (1...𝐾)∀𝑦 ∈ (1...𝐾)(𝑥 < 𝑦 → (𝑙𝑥) < (𝑙𝑦)))} ↦ if(𝐾 = 0, {⟨1, 𝑁⟩}, (𝑤 ∈ (1...(𝐾 + 1)) ↦ if(𝑤 = (𝐾 + 1), ((𝑁 + 𝐾) − (𝑢𝐾)), if(𝑤 = 1, ((𝑢‘1) − 1), (((𝑢𝑤) − (𝑢‘(𝑤 − 1))) − 1))))))
5 sticksstones15.3 . 2 𝐴 = {𝑔 ∣ (𝑔:(1...(𝐾 + 1))⟶ℕ0 ∧ Σ𝑖 ∈ (1...(𝐾 + 1))(𝑔𝑖) = 𝑁)}
6 feq1 6697 . . . 4 (𝑙 = 𝑓 → (𝑙:(1...𝐾)⟶(1...(𝑁 + 𝐾)) ↔ 𝑓:(1...𝐾)⟶(1...(𝑁 + 𝐾))))
7 fveq1 6886 . . . . . . 7 (𝑙 = 𝑓 → (𝑙𝑥) = (𝑓𝑥))
8 fveq1 6886 . . . . . . 7 (𝑙 = 𝑓 → (𝑙𝑦) = (𝑓𝑦))
97, 8breq12d 5138 . . . . . 6 (𝑙 = 𝑓 → ((𝑙𝑥) < (𝑙𝑦) ↔ (𝑓𝑥) < (𝑓𝑦)))
109imbi2d 340 . . . . 5 (𝑙 = 𝑓 → ((𝑥 < 𝑦 → (𝑙𝑥) < (𝑙𝑦)) ↔ (𝑥 < 𝑦 → (𝑓𝑥) < (𝑓𝑦))))
11102ralbidv 3208 . . . 4 (𝑙 = 𝑓 → (∀𝑥 ∈ (1...𝐾)∀𝑦 ∈ (1...𝐾)(𝑥 < 𝑦 → (𝑙𝑥) < (𝑙𝑦)) ↔ ∀𝑥 ∈ (1...𝐾)∀𝑦 ∈ (1...𝐾)(𝑥 < 𝑦 → (𝑓𝑥) < (𝑓𝑦))))
126, 11anbi12d 632 . . 3 (𝑙 = 𝑓 → ((𝑙:(1...𝐾)⟶(1...(𝑁 + 𝐾)) ∧ ∀𝑥 ∈ (1...𝐾)∀𝑦 ∈ (1...𝐾)(𝑥 < 𝑦 → (𝑙𝑥) < (𝑙𝑦))) ↔ (𝑓:(1...𝐾)⟶(1...(𝑁 + 𝐾)) ∧ ∀𝑥 ∈ (1...𝐾)∀𝑦 ∈ (1...𝐾)(𝑥 < 𝑦 → (𝑓𝑥) < (𝑓𝑦)))))
1312cbvabv 2804 . 2 {𝑙 ∣ (𝑙:(1...𝐾)⟶(1...(𝑁 + 𝐾)) ∧ ∀𝑥 ∈ (1...𝐾)∀𝑦 ∈ (1...𝐾)(𝑥 < 𝑦 → (𝑙𝑥) < (𝑙𝑦)))} = {𝑓 ∣ (𝑓:(1...𝐾)⟶(1...(𝑁 + 𝐾)) ∧ ∀𝑥 ∈ (1...𝐾)∀𝑦 ∈ (1...𝐾)(𝑥 < 𝑦 → (𝑓𝑥) < (𝑓𝑦)))}
141, 2, 3, 4, 5, 13sticksstones14 42102 1 (𝜑 → (♯‘𝐴) = ((𝑁 + 𝐾)C𝐾))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 395   = wceq 1539  wcel 2107  {cab 2712  wral 3050  ifcif 4507  {csn 4608  cop 4614   class class class wbr 5125  cmpt 5207  wf 6538  cfv 6542  (class class class)co 7414  0cc0 11138  1c1 11139   + caddc 11141   < clt 11278  cmin 11475  0cn0 12510  ...cfz 13530  Ccbc 14324  chash 14352  Σcsu 15705
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1794  ax-4 1808  ax-5 1909  ax-6 1966  ax-7 2006  ax-8 2109  ax-9 2117  ax-10 2140  ax-11 2156  ax-12 2176  ax-ext 2706  ax-rep 5261  ax-sep 5278  ax-nul 5288  ax-pow 5347  ax-pr 5414  ax-un 7738  ax-inf2 9664  ax-cnex 11194  ax-resscn 11195  ax-1cn 11196  ax-icn 11197  ax-addcl 11198  ax-addrcl 11199  ax-mulcl 11200  ax-mulrcl 11201  ax-mulcom 11202  ax-addass 11203  ax-mulass 11204  ax-distr 11205  ax-i2m1 11206  ax-1ne0 11207  ax-1rid 11208  ax-rnegex 11209  ax-rrecex 11210  ax-cnre 11211  ax-pre-lttri 11212  ax-pre-lttrn 11213  ax-pre-ltadd 11214  ax-pre-mulgt0 11215  ax-pre-sup 11216
This theorem depends on definitions:  df-bi 207  df-an 396  df-or 848  df-3or 1087  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1779  df-nf 1783  df-sb 2064  df-mo 2538  df-eu 2567  df-clab 2713  df-cleq 2726  df-clel 2808  df-nfc 2884  df-ne 2932  df-nel 3036  df-ral 3051  df-rex 3060  df-rmo 3364  df-reu 3365  df-rab 3421  df-v 3466  df-sbc 3773  df-csb 3882  df-dif 3936  df-un 3938  df-in 3940  df-ss 3950  df-pss 3953  df-nul 4316  df-if 4508  df-pw 4584  df-sn 4609  df-pr 4611  df-op 4615  df-uni 4890  df-int 4929  df-iun 4975  df-br 5126  df-opab 5188  df-mpt 5208  df-tr 5242  df-id 5560  df-eprel 5566  df-po 5574  df-so 5575  df-fr 5619  df-se 5620  df-we 5621  df-xp 5673  df-rel 5674  df-cnv 5675  df-co 5676  df-dm 5677  df-rn 5678  df-res 5679  df-ima 5680  df-pred 6303  df-ord 6368  df-on 6369  df-lim 6370  df-suc 6371  df-iota 6495  df-fun 6544  df-fn 6545  df-f 6546  df-f1 6547  df-fo 6548  df-f1o 6549  df-fv 6550  df-isom 6551  df-riota 7371  df-ov 7417  df-oprab 7418  df-mpo 7419  df-om 7871  df-1st 7997  df-2nd 7998  df-frecs 8289  df-wrecs 8320  df-recs 8394  df-rdg 8433  df-1o 8489  df-oadd 8493  df-er 8728  df-en 8969  df-dom 8970  df-sdom 8971  df-fin 8972  df-sup 9465  df-inf 9466  df-oi 9533  df-dju 9924  df-card 9962  df-pnf 11280  df-mnf 11281  df-xr 11282  df-ltxr 11283  df-le 11284  df-sub 11477  df-neg 11478  df-div 11904  df-nn 12250  df-2 12312  df-3 12313  df-n0 12511  df-z 12598  df-uz 12862  df-rp 13018  df-ico 13376  df-fz 13531  df-fzo 13678  df-seq 14026  df-exp 14086  df-fac 14296  df-bc 14325  df-hash 14353  df-cj 15121  df-re 15122  df-im 15123  df-sqrt 15257  df-abs 15258  df-clim 15507  df-sum 15706
This theorem is referenced by:  sticksstones16  42104
  Copyright terms: Public domain W3C validator