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

Theorem smufval 15819
 Description: The multiplication of two bit sequences as repeated sequence addition. (Contributed by Mario Carneiro, 9-Sep-2016.)
Hypotheses
Ref Expression
smuval.a (𝜑𝐴 ⊆ ℕ0)
smuval.b (𝜑𝐵 ⊆ ℕ0)
smuval.p 𝑃 = seq0((𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝐴 ∧ (𝑛𝑚) ∈ 𝐵)})), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
Assertion
Ref Expression
smufval (𝜑 → (𝐴 smul 𝐵) = {𝑘 ∈ ℕ0𝑘 ∈ (𝑃‘(𝑘 + 1))})
Distinct variable groups:   𝑘,𝑚,𝑛,𝑝,𝐴   𝜑,𝑘,𝑛   𝐵,𝑘,𝑚,𝑛,𝑝   𝑃,𝑘
Allowed substitution hints:   𝜑(𝑚,𝑝)   𝑃(𝑚,𝑛,𝑝)

Proof of Theorem smufval
Dummy variables 𝑥 𝑦 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 smuval.a . . 3 (𝜑𝐴 ⊆ ℕ0)
2 nn0ex 11894 . . . 4 0 ∈ V
32elpw2 5213 . . 3 (𝐴 ∈ 𝒫 ℕ0𝐴 ⊆ ℕ0)
41, 3sylibr 237 . 2 (𝜑𝐴 ∈ 𝒫 ℕ0)
5 smuval.b . . 3 (𝜑𝐵 ⊆ ℕ0)
62elpw2 5213 . . 3 (𝐵 ∈ 𝒫 ℕ0𝐵 ⊆ ℕ0)
75, 6sylibr 237 . 2 (𝜑𝐵 ∈ 𝒫 ℕ0)
8 simp1l 1194 . . . . . . . . . . . . 13 (((𝑥 = 𝐴𝑦 = 𝐵) ∧ 𝑝 ∈ 𝒫 ℕ0𝑚 ∈ ℕ0) → 𝑥 = 𝐴)
98eleq2d 2875 . . . . . . . . . . . 12 (((𝑥 = 𝐴𝑦 = 𝐵) ∧ 𝑝 ∈ 𝒫 ℕ0𝑚 ∈ ℕ0) → (𝑚𝑥𝑚𝐴))
10 simp1r 1195 . . . . . . . . . . . . 13 (((𝑥 = 𝐴𝑦 = 𝐵) ∧ 𝑝 ∈ 𝒫 ℕ0𝑚 ∈ ℕ0) → 𝑦 = 𝐵)
1110eleq2d 2875 . . . . . . . . . . . 12 (((𝑥 = 𝐴𝑦 = 𝐵) ∧ 𝑝 ∈ 𝒫 ℕ0𝑚 ∈ ℕ0) → ((𝑛𝑚) ∈ 𝑦 ↔ (𝑛𝑚) ∈ 𝐵))
129, 11anbi12d 633 . . . . . . . . . . 11 (((𝑥 = 𝐴𝑦 = 𝐵) ∧ 𝑝 ∈ 𝒫 ℕ0𝑚 ∈ ℕ0) → ((𝑚𝑥 ∧ (𝑛𝑚) ∈ 𝑦) ↔ (𝑚𝐴 ∧ (𝑛𝑚) ∈ 𝐵)))
1312rabbidv 3427 . . . . . . . . . 10 (((𝑥 = 𝐴𝑦 = 𝐵) ∧ 𝑝 ∈ 𝒫 ℕ0𝑚 ∈ ℕ0) → {𝑛 ∈ ℕ0 ∣ (𝑚𝑥 ∧ (𝑛𝑚) ∈ 𝑦)} = {𝑛 ∈ ℕ0 ∣ (𝑚𝐴 ∧ (𝑛𝑚) ∈ 𝐵)})
1413oveq2d 7152 . . . . . . . . 9 (((𝑥 = 𝐴𝑦 = 𝐵) ∧ 𝑝 ∈ 𝒫 ℕ0𝑚 ∈ ℕ0) → (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝑥 ∧ (𝑛𝑚) ∈ 𝑦)}) = (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝐴 ∧ (𝑛𝑚) ∈ 𝐵)}))
1514mpoeq3dva 7211 . . . . . . . 8 ((𝑥 = 𝐴𝑦 = 𝐵) → (𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝑥 ∧ (𝑛𝑚) ∈ 𝑦)})) = (𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝐴 ∧ (𝑛𝑚) ∈ 𝐵)})))
1615seqeq2d 13374 . . . . . . 7 ((𝑥 = 𝐴𝑦 = 𝐵) → seq0((𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝑥 ∧ (𝑛𝑚) ∈ 𝑦)})), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = seq0((𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝐴 ∧ (𝑛𝑚) ∈ 𝐵)})), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))))
17 smuval.p . . . . . . 7 𝑃 = seq0((𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝐴 ∧ (𝑛𝑚) ∈ 𝐵)})), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))
1816, 17eqtr4di 2851 . . . . . 6 ((𝑥 = 𝐴𝑦 = 𝐵) → seq0((𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝑥 ∧ (𝑛𝑚) ∈ 𝑦)})), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1)))) = 𝑃)
1918fveq1d 6648 . . . . 5 ((𝑥 = 𝐴𝑦 = 𝐵) → (seq0((𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝑥 ∧ (𝑛𝑚) ∈ 𝑦)})), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))‘(𝑘 + 1)) = (𝑃‘(𝑘 + 1)))
2019eleq2d 2875 . . . 4 ((𝑥 = 𝐴𝑦 = 𝐵) → (𝑘 ∈ (seq0((𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝑥 ∧ (𝑛𝑚) ∈ 𝑦)})), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))‘(𝑘 + 1)) ↔ 𝑘 ∈ (𝑃‘(𝑘 + 1))))
2120rabbidv 3427 . . 3 ((𝑥 = 𝐴𝑦 = 𝐵) → {𝑘 ∈ ℕ0𝑘 ∈ (seq0((𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝑥 ∧ (𝑛𝑚) ∈ 𝑦)})), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))‘(𝑘 + 1))} = {𝑘 ∈ ℕ0𝑘 ∈ (𝑃‘(𝑘 + 1))})
22 df-smu 15818 . . 3 smul = (𝑥 ∈ 𝒫 ℕ0, 𝑦 ∈ 𝒫 ℕ0 ↦ {𝑘 ∈ ℕ0𝑘 ∈ (seq0((𝑝 ∈ 𝒫 ℕ0, 𝑚 ∈ ℕ0 ↦ (𝑝 sadd {𝑛 ∈ ℕ0 ∣ (𝑚𝑥 ∧ (𝑛𝑚) ∈ 𝑦)})), (𝑛 ∈ ℕ0 ↦ if(𝑛 = 0, ∅, (𝑛 − 1))))‘(𝑘 + 1))})
232rabex 5200 . . 3 {𝑘 ∈ ℕ0𝑘 ∈ (𝑃‘(𝑘 + 1))} ∈ V
2421, 22, 23ovmpoa 7286 . 2 ((𝐴 ∈ 𝒫 ℕ0𝐵 ∈ 𝒫 ℕ0) → (𝐴 smul 𝐵) = {𝑘 ∈ ℕ0𝑘 ∈ (𝑃‘(𝑘 + 1))})
254, 7, 24syl2anc 587 1 (𝜑 → (𝐴 smul 𝐵) = {𝑘 ∈ ℕ0𝑘 ∈ (𝑃‘(𝑘 + 1))})
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ∧ wa 399   ∧ w3a 1084   = wceq 1538   ∈ wcel 2111  {crab 3110   ⊆ wss 3881  ∅c0 4243  ifcif 4425  𝒫 cpw 4497   ↦ cmpt 5111  ‘cfv 6325  (class class class)co 7136   ∈ cmpo 7138  0cc0 10529  1c1 10530   + caddc 10532   − cmin 10862  ℕ0cn0 11888  seqcseq 13367   sadd csad 15762   smul csmu 15763 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1797  ax-4 1811  ax-5 1911  ax-6 1970  ax-7 2015  ax-8 2113  ax-9 2121  ax-10 2142  ax-11 2158  ax-12 2175  ax-ext 2770  ax-sep 5168  ax-nul 5175  ax-pow 5232  ax-pr 5296  ax-un 7444  ax-cnex 10585  ax-1cn 10587  ax-addcl 10589 This theorem depends on definitions:  df-bi 210  df-an 400  df-or 845  df-3or 1085  df-3an 1086  df-tru 1541  df-ex 1782  df-nf 1786  df-sb 2070  df-mo 2598  df-eu 2629  df-clab 2777  df-cleq 2791  df-clel 2870  df-nfc 2938  df-ne 2988  df-ral 3111  df-rex 3112  df-reu 3113  df-rab 3115  df-v 3443  df-sbc 3721  df-csb 3829  df-dif 3884  df-un 3886  df-in 3888  df-ss 3898  df-pss 3900  df-nul 4244  df-if 4426  df-pw 4499  df-sn 4526  df-pr 4528  df-tp 4530  df-op 4532  df-uni 4802  df-iun 4884  df-br 5032  df-opab 5094  df-mpt 5112  df-tr 5138  df-id 5426  df-eprel 5431  df-po 5439  df-so 5440  df-fr 5479  df-we 5481  df-xp 5526  df-rel 5527  df-cnv 5528  df-co 5529  df-dm 5530  df-rn 5531  df-res 5532  df-ima 5533  df-pred 6117  df-ord 6163  df-on 6164  df-lim 6165  df-suc 6166  df-iota 6284  df-fun 6327  df-fn 6328  df-f 6329  df-f1 6330  df-fo 6331  df-f1o 6332  df-fv 6333  df-ov 7139  df-oprab 7140  df-mpo 7141  df-om 7564  df-wrecs 7933  df-recs 7994  df-rdg 8032  df-nn 11629  df-n0 11889  df-seq 13368  df-smu 15818 This theorem is referenced by:  smuval  15823  smupvallem  15825  smucl  15826
 Copyright terms: Public domain W3C validator