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

Theorem wrd2f1tovbij 14684
Description: There is a bijection between words of length two with a fixed first symbol contained in a pair and the symbols contained in a pair together with the fixed symbol. (Contributed by Alexander van der Vekens, 28-Jul-2018.)
Assertion
Ref Expression
wrd2f1tovbij ((𝑉𝑌𝑃𝑉) → ∃𝑓 𝑓:{𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}–1-1-onto→{𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋})
Distinct variable groups:   𝑃,𝑓,𝑛,𝑤   𝑓,𝑉,𝑛,𝑤   𝑓,𝑋,𝑛,𝑤
Allowed substitution hints:   𝑌(𝑤,𝑓,𝑛)

Proof of Theorem wrd2f1tovbij
Dummy variables 𝑝 𝑡 𝑢 𝑥 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 wrdexg 14236 . . . 4 (𝑉𝑌 → Word 𝑉 ∈ V)
21adantr 481 . . 3 ((𝑉𝑌𝑃𝑉) → Word 𝑉 ∈ V)
3 rabexg 5256 . . 3 (Word 𝑉 ∈ V → {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ∈ V)
4 mptexg 7106 . . 3 ({𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ∈ V → (𝑥 ∈ {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ↦ (𝑥‘1)) ∈ V)
52, 3, 43syl 18 . 2 ((𝑉𝑌𝑃𝑉) → (𝑥 ∈ {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ↦ (𝑥‘1)) ∈ V)
6 fveqeq2 6792 . . . . . 6 (𝑤 = 𝑢 → ((♯‘𝑤) = 2 ↔ (♯‘𝑢) = 2))
7 fveq1 6782 . . . . . . 7 (𝑤 = 𝑢 → (𝑤‘0) = (𝑢‘0))
87eqeq1d 2741 . . . . . 6 (𝑤 = 𝑢 → ((𝑤‘0) = 𝑃 ↔ (𝑢‘0) = 𝑃))
9 fveq1 6782 . . . . . . . 8 (𝑤 = 𝑢 → (𝑤‘1) = (𝑢‘1))
107, 9preq12d 4678 . . . . . . 7 (𝑤 = 𝑢 → {(𝑤‘0), (𝑤‘1)} = {(𝑢‘0), (𝑢‘1)})
1110eleq1d 2824 . . . . . 6 (𝑤 = 𝑢 → ({(𝑤‘0), (𝑤‘1)} ∈ 𝑋 ↔ {(𝑢‘0), (𝑢‘1)} ∈ 𝑋))
126, 8, 113anbi123d 1435 . . . . 5 (𝑤 = 𝑢 → (((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋) ↔ ((♯‘𝑢) = 2 ∧ (𝑢‘0) = 𝑃 ∧ {(𝑢‘0), (𝑢‘1)} ∈ 𝑋)))
1312cbvrabv 3427 . . . 4 {𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)} = {𝑢 ∈ Word 𝑉 ∣ ((♯‘𝑢) = 2 ∧ (𝑢‘0) = 𝑃 ∧ {(𝑢‘0), (𝑢‘1)} ∈ 𝑋)}
14 preq2 4671 . . . . . 6 (𝑛 = 𝑝 → {𝑃, 𝑛} = {𝑃, 𝑝})
1514eleq1d 2824 . . . . 5 (𝑛 = 𝑝 → ({𝑃, 𝑛} ∈ 𝑋 ↔ {𝑃, 𝑝} ∈ 𝑋))
1615cbvrabv 3427 . . . 4 {𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋} = {𝑝𝑉 ∣ {𝑃, 𝑝} ∈ 𝑋}
17 fveqeq2 6792 . . . . . . 7 (𝑡 = 𝑤 → ((♯‘𝑡) = 2 ↔ (♯‘𝑤) = 2))
18 fveq1 6782 . . . . . . . 8 (𝑡 = 𝑤 → (𝑡‘0) = (𝑤‘0))
1918eqeq1d 2741 . . . . . . 7 (𝑡 = 𝑤 → ((𝑡‘0) = 𝑃 ↔ (𝑤‘0) = 𝑃))
20 fveq1 6782 . . . . . . . . 9 (𝑡 = 𝑤 → (𝑡‘1) = (𝑤‘1))
2118, 20preq12d 4678 . . . . . . . 8 (𝑡 = 𝑤 → {(𝑡‘0), (𝑡‘1)} = {(𝑤‘0), (𝑤‘1)})
2221eleq1d 2824 . . . . . . 7 (𝑡 = 𝑤 → ({(𝑡‘0), (𝑡‘1)} ∈ 𝑋 ↔ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋))
2317, 19, 223anbi123d 1435 . . . . . 6 (𝑡 = 𝑤 → (((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋) ↔ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)))
2423cbvrabv 3427 . . . . 5 {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} = {𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}
2524mpteq1i 5171 . . . 4 (𝑥 ∈ {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ↦ (𝑥‘1)) = (𝑥 ∈ {𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)} ↦ (𝑥‘1))
2613, 16, 25wwlktovf1o 14683 . . 3 (𝑃𝑉 → (𝑥 ∈ {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ↦ (𝑥‘1)):{𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}–1-1-onto→{𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋})
2726adantl 482 . 2 ((𝑉𝑌𝑃𝑉) → (𝑥 ∈ {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ↦ (𝑥‘1)):{𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}–1-1-onto→{𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋})
28 f1oeq1 6713 . 2 (𝑓 = (𝑥 ∈ {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ↦ (𝑥‘1)) → (𝑓:{𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}–1-1-onto→{𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋} ↔ (𝑥 ∈ {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ↦ (𝑥‘1)):{𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}–1-1-onto→{𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋}))
295, 27, 28spcedv 3538 1 ((𝑉𝑌𝑃𝑉) → ∃𝑓 𝑓:{𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}–1-1-onto→{𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 396  w3a 1086   = wceq 1539  wex 1782  wcel 2107  {crab 3069  Vcvv 3433  {cpr 4564  cmpt 5158  1-1-ontowf1o 6436  cfv 6437  0cc0 10880  1c1 10881  2c2 12037  chash 14053  Word cword 14226
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 1914  ax-6 1972  ax-7 2012  ax-8 2109  ax-9 2117  ax-10 2138  ax-11 2155  ax-12 2172  ax-ext 2710  ax-rep 5210  ax-sep 5224  ax-nul 5231  ax-pow 5289  ax-pr 5353  ax-un 7597  ax-cnex 10936  ax-resscn 10937  ax-1cn 10938  ax-icn 10939  ax-addcl 10940  ax-addrcl 10941  ax-mulcl 10942  ax-mulrcl 10943  ax-mulcom 10944  ax-addass 10945  ax-mulass 10946  ax-distr 10947  ax-i2m1 10948  ax-1ne0 10949  ax-1rid 10950  ax-rnegex 10951  ax-rrecex 10952  ax-cnre 10953  ax-pre-lttri 10954  ax-pre-lttrn 10955  ax-pre-ltadd 10956  ax-pre-mulgt0 10957
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 2069  df-mo 2541  df-eu 2570  df-clab 2717  df-cleq 2731  df-clel 2817  df-nfc 2890  df-ne 2945  df-nel 3051  df-ral 3070  df-rex 3071  df-reu 3073  df-rab 3074  df-v 3435  df-sbc 3718  df-csb 3834  df-dif 3891  df-un 3893  df-in 3895  df-ss 3905  df-pss 3907  df-nul 4258  df-if 4461  df-pw 4536  df-sn 4563  df-pr 4565  df-op 4569  df-uni 4841  df-int 4881  df-iun 4927  df-br 5076  df-opab 5138  df-mpt 5159  df-tr 5193  df-id 5490  df-eprel 5496  df-po 5504  df-so 5505  df-fr 5545  df-we 5547  df-xp 5596  df-rel 5597  df-cnv 5598  df-co 5599  df-dm 5600  df-rn 5601  df-res 5602  df-ima 5603  df-pred 6206  df-ord 6273  df-on 6274  df-lim 6275  df-suc 6276  df-iota 6395  df-fun 6439  df-fn 6440  df-f 6441  df-f1 6442  df-fo 6443  df-f1o 6444  df-fv 6445  df-riota 7241  df-ov 7287  df-oprab 7288  df-mpo 7289  df-om 7722  df-1st 7840  df-2nd 7841  df-frecs 8106  df-wrecs 8137  df-recs 8211  df-rdg 8250  df-1o 8306  df-oadd 8310  df-er 8507  df-map 8626  df-en 8743  df-dom 8744  df-sdom 8745  df-fin 8746  df-dju 9668  df-card 9706  df-pnf 11020  df-mnf 11021  df-xr 11022  df-ltxr 11023  df-le 11024  df-sub 11216  df-neg 11217  df-nn 11983  df-2 12045  df-n0 12243  df-z 12329  df-uz 12592  df-fz 13249  df-fzo 13392  df-hash 14054  df-word 14227
This theorem is referenced by:  rusgrnumwrdl2  27962
  Copyright terms: Public domain W3C validator