MPE Home Metamath Proof Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  MPE Home  >  Th. List  >  fnprb Structured version   Unicode version

Theorem fnprb 6110
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.) Revised to eliminate unnecessary antecedent  A  =/=  B. (Revised by NM, 29-Dec-2018.)
Hypotheses
Ref Expression
fnprb.1  |-  A  e. 
_V
fnprb.2  |-  B  e. 
_V
Assertion
Ref Expression
fnprb  |-  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )

Proof of Theorem fnprb
Dummy variable  x is distinct from all other variables.
StepHypRef Expression
1 fnprb.1 . . . . . 6  |-  A  e. 
_V
21fnsnb 6071 . . . . 5  |-  ( F  Fn  { A }  <->  F  =  { <. A , 
( F `  A
) >. } )
3 dfsn2 4033 . . . . . 6  |-  { A }  =  { A ,  A }
43fneq2i 5667 . . . . 5  |-  ( F  Fn  { A }  <->  F  Fn  { A ,  A } )
5 dfsn2 4033 . . . . . 6  |-  { <. A ,  ( F `  A ) >. }  =  { <. A ,  ( F `  A )
>. ,  <. A , 
( F `  A
) >. }
65eqeq2i 2478 . . . . 5  |-  ( F  =  { <. A , 
( F `  A
) >. }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. A , 
( F `  A
) >. } )
72, 4, 63bitr3i 275 . . . 4  |-  ( F  Fn  { A ,  A }  <->  F  =  { <. A ,  ( F `
 A ) >. ,  <. A ,  ( F `  A )
>. } )
87a1i 11 . . 3  |-  ( A  =  B  ->  ( F  Fn  { A ,  A }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. A , 
( F `  A
) >. } ) )
9 preq2 4100 . . . 4  |-  ( A  =  B  ->  { A ,  A }  =  { A ,  B }
)
109fneq2d 5663 . . 3  |-  ( A  =  B  ->  ( F  Fn  { A ,  A }  <->  F  Fn  { A ,  B }
) )
11 id 22 . . . . . 6  |-  ( A  =  B  ->  A  =  B )
12 fveq2 5857 . . . . . 6  |-  ( A  =  B  ->  ( F `  A )  =  ( F `  B ) )
1311, 12opeq12d 4214 . . . . 5  |-  ( A  =  B  ->  <. A , 
( F `  A
) >.  =  <. B , 
( F `  B
) >. )
1413preq2d 4106 . . . 4  |-  ( A  =  B  ->  { <. A ,  ( F `  A ) >. ,  <. A ,  ( F `  A ) >. }  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } )
1514eqeq2d 2474 . . 3  |-  ( A  =  B  ->  ( F  =  { <. A , 
( F `  A
) >. ,  <. A , 
( F `  A
) >. }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
168, 10, 153bitr3d 283 . 2  |-  ( A  =  B  ->  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
17 fndm 5671 . . . . . 6  |-  ( F  Fn  { A ,  B }  ->  dom  F  =  { A ,  B } )
18 fvex 5867 . . . . . . 7  |-  ( F `
 A )  e. 
_V
19 fvex 5867 . . . . . . 7  |-  ( F `
 B )  e. 
_V
2018, 19dmprop 5474 . . . . . 6  |-  dom  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. }  =  { A ,  B }
2117, 20syl6eqr 2519 . . . . 5  |-  ( F  Fn  { A ,  B }  ->  dom  F  =  dom  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } )
2221adantl 466 . . . 4  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  dom  F  =  dom  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
2317adantl 466 . . . . . . 7  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  dom  F  =  { A ,  B } )
2423eleq2d 2530 . . . . . 6  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  dom  F  <-> 
x  e.  { A ,  B } ) )
25 vex 3109 . . . . . . . 8  |-  x  e. 
_V
2625elpr 4038 . . . . . . 7  |-  ( x  e.  { A ,  B }  <->  ( x  =  A  \/  x  =  B ) )
271, 18fvpr1 6095 . . . . . . . . . . 11  |-  ( A  =/=  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  A
)  =  ( F `
 A ) )
2827adantr 465 . . . . . . . . . 10  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } `  A
)  =  ( F `
 A ) )
2928eqcomd 2468 . . . . . . . . 9  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F `  A
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) )
30 fveq2 5857 . . . . . . . . . 10  |-  ( x  =  A  ->  ( F `  x )  =  ( F `  A ) )
31 fveq2 5857 . . . . . . . . . 10  |-  ( x  =  A  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) )
3230, 31eqeq12d 2482 . . . . . . . . 9  |-  ( x  =  A  ->  (
( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x )  <-> 
( F `  A
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) ) )
3329, 32syl5ibrcom 222 . . . . . . . 8  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  =  A  ->  ( F `  x )  =  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
) ) )
34 fnprb.2 . . . . . . . . . . . 12  |-  B  e. 
_V
3534, 19fvpr2 6096 . . . . . . . . . . 11  |-  ( A  =/=  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  B
)  =  ( F `
 B ) )
3635adantr 465 . . . . . . . . . 10  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } `  B
)  =  ( F `
 B ) )
3736eqcomd 2468 . . . . . . . . 9  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F `  B
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) )
38 fveq2 5857 . . . . . . . . . 10  |-  ( x  =  B  ->  ( F `  x )  =  ( F `  B ) )
39 fveq2 5857 . . . . . . . . . 10  |-  ( x  =  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) )
4038, 39eqeq12d 2482 . . . . . . . . 9  |-  ( x  =  B  ->  (
( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x )  <-> 
( F `  B
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) ) )
4137, 40syl5ibrcom 222 . . . . . . . 8  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  =  B  ->  ( F `  x )  =  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
) ) )
4233, 41jaod 380 . . . . . . 7  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( ( x  =  A  \/  x  =  B )  ->  ( F `  x )  =  ( { <. A ,  ( F `  A ) >. ,  <. B ,  ( F `  B ) >. } `  x ) ) )
4326, 42syl5bi 217 . . . . . 6  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  { A ,  B }  ->  ( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x ) ) )
4424, 43sylbid 215 . . . . 5  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  dom  F  ->  ( F `  x )  =  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
) ) )
4544ralrimiv 2869 . . . 4  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  A. x  e.  dom  F ( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x ) )
46 fnfun 5669 . . . . 5  |-  ( F  Fn  { A ,  B }  ->  Fun  F
)
471, 34, 18, 19funpr 5630 . . . . 5  |-  ( A  =/=  B  ->  Fun  {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
48 eqfunfv 5971 . . . . 5  |-  ( ( Fun  F  /\  Fun  {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )  ->  ( F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  <->  ( dom  F  =  dom  { <. A ,  ( F `  A ) >. ,  <. B ,  ( F `  B ) >. }  /\  A. x  e.  dom  F
( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x ) ) ) )
4946, 47, 48syl2anr 478 . . . 4  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F  =  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. }  <->  ( dom  F  =  dom  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  /\  A. x  e.  dom  F ( F `  x )  =  ( { <. A ,  ( F `  A ) >. ,  <. B ,  ( F `  B ) >. } `  x ) ) ) )
5022, 45, 49mpbir2and 915 . . 3  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } )
5120a1i 11 . . . . 5  |-  ( A  =/=  B  ->  dom  {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. }  =  { A ,  B } )
52 df-fn 5582 . . . . 5  |-  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. }  Fn  { A ,  B }  <->  ( Fun  {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. }  /\  dom  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. }  =  { A ,  B } ) )
5347, 51, 52sylanbrc 664 . . . 4  |-  ( A  =/=  B  ->  { <. A ,  ( F `  A ) >. ,  <. B ,  ( F `  B ) >. }  Fn  { A ,  B }
)
54 fneq1 5660 . . . . 5  |-  ( F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  ->  ( F  Fn  { A ,  B }  <->  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  Fn  { A ,  B }
) )
5554biimprd 223 . . . 4  |-  ( F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. }  Fn  { A ,  B }  ->  F  Fn  { A ,  B } ) )
5653, 55mpan9 469 . . 3  |-  ( ( A  =/=  B  /\  F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } )  ->  F  Fn  { A ,  B } )
5750, 56impbida 829 . 2  |-  ( A  =/=  B  ->  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
5816, 57pm2.61ine 2773 1  |-  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
Colors of variables: wff setvar class
Syntax hints:    <-> wb 184    \/ wo 368    /\ wa 369    = wceq 1374    e. wcel 1762    =/= wne 2655   A.wral 2807   _Vcvv 3106   {csn 4020   {cpr 4022   <.cop 4026   dom cdm 4992   Fun wfun 5573    Fn wfn 5574   ` cfv 5579
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1596  ax-4 1607  ax-5 1675  ax-6 1714  ax-7 1734  ax-8 1764  ax-9 1766  ax-10 1781  ax-11 1786  ax-12 1798  ax-13 1961  ax-ext 2438  ax-sep 4561  ax-nul 4569  ax-pow 4618  ax-pr 4679
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 970  df-tru 1377  df-ex 1592  df-nf 1595  df-sb 1707  df-eu 2272  df-mo 2273  df-clab 2446  df-cleq 2452  df-clel 2455  df-nfc 2610  df-ne 2657  df-ral 2812  df-rex 2813  df-reu 2814  df-rab 2816  df-v 3108  df-sbc 3325  df-csb 3429  df-dif 3472  df-un 3474  df-in 3476  df-ss 3483  df-nul 3779  df-if 3933  df-sn 4021  df-pr 4023  df-op 4027  df-uni 4239  df-br 4441  df-opab 4499  df-mpt 4500  df-id 4788  df-xp 4998  df-rel 4999  df-cnv 5000  df-co 5001  df-dm 5002  df-rn 5003  df-res 5004  df-ima 5005  df-iota 5542  df-fun 5581  df-fn 5582  df-f 5583  df-f1 5584  df-fo 5585  df-f1o 5586  df-fv 5587
This theorem is referenced by:  wrd2pr2op  12835
  Copyright terms: Public domain W3C validator