Metamath Proof Explorer


Theorem fnprb

Description: A function whose domain has at most two elements can be represented as a set of at most two ordered pairs. (Contributed by FL, 26-Jun-2011) (Proof shortened by Scott Fenton, 12-Oct-2017) Eliminate unnecessary antecedent A =/= B . (Revised by NM, 29-Dec-2018)

Ref Expression
Hypotheses fnprb.a AV
fnprb.b BV
Assertion fnprb FFnABF=AFABFB

Proof

Step Hyp Ref Expression
1 fnprb.a AV
2 fnprb.b BV
3 1 fnsnb FFnAF=AFA
4 dfsn2 A=AA
5 4 fneq2i FFnAFFnAA
6 dfsn2 AFA=AFAAFA
7 6 eqeq2i F=AFAF=AFAAFA
8 3 5 7 3bitr3i FFnAAF=AFAAFA
9 8 a1i A=BFFnAAF=AFAAFA
10 preq2 A=BAA=AB
11 10 fneq2d A=BFFnAAFFnAB
12 id A=BA=B
13 fveq2 A=BFA=FB
14 12 13 opeq12d A=BAFA=BFB
15 14 preq2d A=BAFAAFA=AFABFB
16 15 eqeq2d A=BF=AFAAFAF=AFABFB
17 9 11 16 3bitr3d A=BFFnABF=AFABFB
18 fndm FFnABdomF=AB
19 fvex FAV
20 fvex FBV
21 19 20 dmprop domAFABFB=AB
22 18 21 eqtr4di FFnABdomF=domAFABFB
23 22 adantl ABFFnABdomF=domAFABFB
24 18 adantl ABFFnABdomF=AB
25 24 eleq2d ABFFnABxdomFxAB
26 vex xV
27 26 elpr xABx=Ax=B
28 1 19 fvpr1 ABAFABFBA=FA
29 28 adantr ABFFnABAFABFBA=FA
30 29 eqcomd ABFFnABFA=AFABFBA
31 fveq2 x=AFx=FA
32 fveq2 x=AAFABFBx=AFABFBA
33 31 32 eqeq12d x=AFx=AFABFBxFA=AFABFBA
34 30 33 syl5ibrcom ABFFnABx=AFx=AFABFBx
35 2 20 fvpr2 ABAFABFBB=FB
36 35 adantr ABFFnABAFABFBB=FB
37 36 eqcomd ABFFnABFB=AFABFBB
38 fveq2 x=BFx=FB
39 fveq2 x=BAFABFBx=AFABFBB
40 38 39 eqeq12d x=BFx=AFABFBxFB=AFABFBB
41 37 40 syl5ibrcom ABFFnABx=BFx=AFABFBx
42 34 41 jaod ABFFnABx=Ax=BFx=AFABFBx
43 27 42 biimtrid ABFFnABxABFx=AFABFBx
44 25 43 sylbid ABFFnABxdomFFx=AFABFBx
45 44 ralrimiv ABFFnABxdomFFx=AFABFBx
46 fnfun FFnABFunF
47 1 2 19 20 funpr ABFunAFABFB
48 eqfunfv FunFFunAFABFBF=AFABFBdomF=domAFABFBxdomFFx=AFABFBx
49 46 47 48 syl2anr ABFFnABF=AFABFBdomF=domAFABFBxdomFFx=AFABFBx
50 23 45 49 mpbir2and ABFFnABF=AFABFB
51 df-fn AFABFBFnABFunAFABFBdomAFABFB=AB
52 47 21 51 sylanblrc ABAFABFBFnAB
53 fneq1 F=AFABFBFFnABAFABFBFnAB
54 53 biimprd F=AFABFBAFABFBFnABFFnAB
55 52 54 mpan9 ABF=AFABFBFFnAB
56 50 55 impbida ABFFnABF=AFABFB
57 17 56 pm2.61ine FFnABF=AFABFB