Metamath Proof Explorer


Theorem wrd2f1tovbij

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)

Ref Expression
Assertion wrd2f1tovbij VYPVff:wWordV|w=2w0=Pw0w1X1-1 ontonV|PnX

Proof

Step Hyp Ref Expression
1 wrdexg VYWordVV
2 1 adantr VYPVWordVV
3 rabexg WordVVtWordV|t=2t0=Pt0t1XV
4 mptexg tWordV|t=2t0=Pt0t1XVxtWordV|t=2t0=Pt0t1Xx1V
5 2 3 4 3syl VYPVxtWordV|t=2t0=Pt0t1Xx1V
6 fveqeq2 w=uw=2u=2
7 fveq1 w=uw0=u0
8 7 eqeq1d w=uw0=Pu0=P
9 fveq1 w=uw1=u1
10 7 9 preq12d w=uw0w1=u0u1
11 10 eleq1d w=uw0w1Xu0u1X
12 6 8 11 3anbi123d w=uw=2w0=Pw0w1Xu=2u0=Pu0u1X
13 12 cbvrabv wWordV|w=2w0=Pw0w1X=uWordV|u=2u0=Pu0u1X
14 preq2 n=pPn=Pp
15 14 eleq1d n=pPnXPpX
16 15 cbvrabv nV|PnX=pV|PpX
17 fveqeq2 t=wt=2w=2
18 fveq1 t=wt0=w0
19 18 eqeq1d t=wt0=Pw0=P
20 fveq1 t=wt1=w1
21 18 20 preq12d t=wt0t1=w0w1
22 21 eleq1d t=wt0t1Xw0w1X
23 17 19 22 3anbi123d t=wt=2t0=Pt0t1Xw=2w0=Pw0w1X
24 23 cbvrabv tWordV|t=2t0=Pt0t1X=wWordV|w=2w0=Pw0w1X
25 24 mpteq1i xtWordV|t=2t0=Pt0t1Xx1=xwWordV|w=2w0=Pw0w1Xx1
26 13 16 25 wwlktovf1o PVxtWordV|t=2t0=Pt0t1Xx1:wWordV|w=2w0=Pw0w1X1-1 ontonV|PnX
27 26 adantl VYPVxtWordV|t=2t0=Pt0t1Xx1:wWordV|w=2w0=Pw0w1X1-1 ontonV|PnX
28 f1oeq1 f=xtWordV|t=2t0=Pt0t1Xx1f:wWordV|w=2w0=Pw0w1X1-1 ontonV|PnXxtWordV|t=2t0=Pt0t1Xx1:wWordV|w=2w0=Pw0w1X1-1 ontonV|PnX
29 5 27 28 spcedv VYPVff:wWordV|w=2w0=Pw0w1X1-1 ontonV|PnX