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

Theorem wrd2f1tovbij 14416
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 13968 . . . 4 (𝑉𝑌 → Word 𝑉 ∈ V)
21adantr 484 . . 3 ((𝑉𝑌𝑃𝑉) → Word 𝑉 ∈ V)
3 rabexg 5200 . . 3 (Word 𝑉 ∈ V → {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ∈ V)
4 mptexg 6997 . . 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 6686 . . . . . 6 (𝑤 = 𝑢 → ((♯‘𝑤) = 2 ↔ (♯‘𝑢) = 2))
7 fveq1 6676 . . . . . . 7 (𝑤 = 𝑢 → (𝑤‘0) = (𝑢‘0))
87eqeq1d 2741 . . . . . 6 (𝑤 = 𝑢 → ((𝑤‘0) = 𝑃 ↔ (𝑢‘0) = 𝑃))
9 fveq1 6676 . . . . . . . 8 (𝑤 = 𝑢 → (𝑤‘1) = (𝑢‘1))
107, 9preq12d 4633 . . . . . . 7 (𝑤 = 𝑢 → {(𝑤‘0), (𝑤‘1)} = {(𝑢‘0), (𝑢‘1)})
1110eleq1d 2818 . . . . . 6 (𝑤 = 𝑢 → ({(𝑤‘0), (𝑤‘1)} ∈ 𝑋 ↔ {(𝑢‘0), (𝑢‘1)} ∈ 𝑋))
126, 8, 113anbi123d 1437 . . . . 5 (𝑤 = 𝑢 → (((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋) ↔ ((♯‘𝑢) = 2 ∧ (𝑢‘0) = 𝑃 ∧ {(𝑢‘0), (𝑢‘1)} ∈ 𝑋)))
1312cbvrabv 3394 . . . 4 {𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)} = {𝑢 ∈ Word 𝑉 ∣ ((♯‘𝑢) = 2 ∧ (𝑢‘0) = 𝑃 ∧ {(𝑢‘0), (𝑢‘1)} ∈ 𝑋)}
14 preq2 4626 . . . . . 6 (𝑛 = 𝑝 → {𝑃, 𝑛} = {𝑃, 𝑝})
1514eleq1d 2818 . . . . 5 (𝑛 = 𝑝 → ({𝑃, 𝑛} ∈ 𝑋 ↔ {𝑃, 𝑝} ∈ 𝑋))
1615cbvrabv 3394 . . . 4 {𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋} = {𝑝𝑉 ∣ {𝑃, 𝑝} ∈ 𝑋}
17 fveqeq2 6686 . . . . . . 7 (𝑡 = 𝑤 → ((♯‘𝑡) = 2 ↔ (♯‘𝑤) = 2))
18 fveq1 6676 . . . . . . . 8 (𝑡 = 𝑤 → (𝑡‘0) = (𝑤‘0))
1918eqeq1d 2741 . . . . . . 7 (𝑡 = 𝑤 → ((𝑡‘0) = 𝑃 ↔ (𝑤‘0) = 𝑃))
20 fveq1 6676 . . . . . . . . 9 (𝑡 = 𝑤 → (𝑡‘1) = (𝑤‘1))
2118, 20preq12d 4633 . . . . . . . 8 (𝑡 = 𝑤 → {(𝑡‘0), (𝑡‘1)} = {(𝑤‘0), (𝑤‘1)})
2221eleq1d 2818 . . . . . . 7 (𝑡 = 𝑤 → ({(𝑡‘0), (𝑡‘1)} ∈ 𝑋 ↔ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋))
2317, 19, 223anbi123d 1437 . . . . . 6 (𝑡 = 𝑤 → (((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋) ↔ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)))
2423cbvrabv 3394 . . . . 5 {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} = {𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}
2524mpteq1i 5121 . . . 4 (𝑥 ∈ {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ↦ (𝑥‘1)) = (𝑥 ∈ {𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)} ↦ (𝑥‘1))
2613, 16, 25wwlktovf1o 14415 . . 3 (𝑃𝑉 → (𝑥 ∈ {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ↦ (𝑥‘1)):{𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}–1-1-onto→{𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋})
2726adantl 485 . 2 ((𝑉𝑌𝑃𝑉) → (𝑥 ∈ {𝑡 ∈ Word 𝑉 ∣ ((♯‘𝑡) = 2 ∧ (𝑡‘0) = 𝑃 ∧ {(𝑡‘0), (𝑡‘1)} ∈ 𝑋)} ↦ (𝑥‘1)):{𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}–1-1-onto→{𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋})
28 f1oeq1 6609 . 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 3503 1 ((𝑉𝑌𝑃𝑉) → ∃𝑓 𝑓:{𝑤 ∈ Word 𝑉 ∣ ((♯‘𝑤) = 2 ∧ (𝑤‘0) = 𝑃 ∧ {(𝑤‘0), (𝑤‘1)} ∈ 𝑋)}–1-1-onto→{𝑛𝑉 ∣ {𝑃, 𝑛} ∈ 𝑋})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wa 399  w3a 1088   = wceq 1542  wex 1786  wcel 2114  {crab 3058  Vcvv 3399  {cpr 4519  cmpt 5111  1-1-ontowf1o 6339  cfv 6340  0cc0 10618  1c1 10619  2c2 11774  chash 13785  Word cword 13958
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1917  ax-6 1975  ax-7 2020  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2162  ax-12 2179  ax-ext 2711  ax-rep 5155  ax-sep 5168  ax-nul 5175  ax-pow 5233  ax-pr 5297  ax-un 7482  ax-cnex 10674  ax-resscn 10675  ax-1cn 10676  ax-icn 10677  ax-addcl 10678  ax-addrcl 10679  ax-mulcl 10680  ax-mulrcl 10681  ax-mulcom 10682  ax-addass 10683  ax-mulass 10684  ax-distr 10685  ax-i2m1 10686  ax-1ne0 10687  ax-1rid 10688  ax-rnegex 10689  ax-rrecex 10690  ax-cnre 10691  ax-pre-lttri 10692  ax-pre-lttrn 10693  ax-pre-ltadd 10694  ax-pre-mulgt0 10695
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 847  df-3or 1089  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1787  df-nf 1791  df-sb 2075  df-mo 2541  df-eu 2571  df-clab 2718  df-cleq 2731  df-clel 2812  df-nfc 2882  df-ne 2936  df-nel 3040  df-ral 3059  df-rex 3060  df-reu 3061  df-rab 3063  df-v 3401  df-sbc 3682  df-csb 3792  df-dif 3847  df-un 3849  df-in 3851  df-ss 3861  df-pss 3863  df-nul 4213  df-if 4416  df-pw 4491  df-sn 4518  df-pr 4520  df-tp 4522  df-op 4524  df-uni 4798  df-int 4838  df-iun 4884  df-br 5032  df-opab 5094  df-mpt 5112  df-tr 5138  df-id 5430  df-eprel 5435  df-po 5443  df-so 5444  df-fr 5484  df-we 5486  df-xp 5532  df-rel 5533  df-cnv 5534  df-co 5535  df-dm 5536  df-rn 5537  df-res 5538  df-ima 5539  df-pred 6130  df-ord 6176  df-on 6177  df-lim 6178  df-suc 6179  df-iota 6298  df-fun 6342  df-fn 6343  df-f 6344  df-f1 6345  df-fo 6346  df-f1o 6347  df-fv 6348  df-riota 7130  df-ov 7176  df-oprab 7177  df-mpo 7178  df-om 7603  df-1st 7717  df-2nd 7718  df-wrecs 7979  df-recs 8040  df-rdg 8078  df-1o 8134  df-oadd 8138  df-er 8323  df-map 8442  df-en 8559  df-dom 8560  df-sdom 8561  df-fin 8562  df-dju 9406  df-card 9444  df-pnf 10758  df-mnf 10759  df-xr 10760  df-ltxr 10761  df-le 10762  df-sub 10953  df-neg 10954  df-nn 11720  df-2 11782  df-n0 11980  df-z 12066  df-uz 12328  df-fz 12985  df-fzo 13128  df-hash 13786  df-word 13959
This theorem is referenced by:  rusgrnumwrdl2  27531
  Copyright terms: Public domain W3C validator