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

Theorem fnprb 6131
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 6091 . . . . 5  |-  ( F  Fn  { A }  <->  F  =  { <. A , 
( F `  A
) >. } )
3 dfsn2 4045 . . . . . 6  |-  { A }  =  { A ,  A }
43fneq2i 5682 . . . . 5  |-  ( F  Fn  { A }  <->  F  Fn  { A ,  A } )
5 dfsn2 4045 . . . . . 6  |-  { <. A ,  ( F `  A ) >. }  =  { <. A ,  ( F `  A )
>. ,  <. A , 
( F `  A
) >. }
65eqeq2i 2475 . . . . 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 4112 . . . 4  |-  ( A  =  B  ->  { A ,  A }  =  { A ,  B }
)
109fneq2d 5678 . . 3  |-  ( A  =  B  ->  ( F  Fn  { A ,  A }  <->  F  Fn  { A ,  B }
) )
11 id 22 . . . . . 6  |-  ( A  =  B  ->  A  =  B )
12 fveq2 5872 . . . . . 6  |-  ( A  =  B  ->  ( F `  A )  =  ( F `  B ) )
1311, 12opeq12d 4227 . . . . 5  |-  ( A  =  B  ->  <. A , 
( F `  A
) >.  =  <. B , 
( F `  B
) >. )
1413preq2d 4118 . . . 4  |-  ( A  =  B  ->  { <. A ,  ( F `  A ) >. ,  <. A ,  ( F `  A ) >. }  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } )
1514eqeq2d 2471 . . 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 5686 . . . . . 6  |-  ( F  Fn  { A ,  B }  ->  dom  F  =  { A ,  B } )
18 fvex 5882 . . . . . . 7  |-  ( F `
 A )  e. 
_V
19 fvex 5882 . . . . . . 7  |-  ( F `
 B )  e. 
_V
2018, 19dmprop 5489 . . . . . 6  |-  dom  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. }  =  { A ,  B }
2117, 20syl6eqr 2516 . . . . 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 2527 . . . . . 6  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  dom  F  <-> 
x  e.  { A ,  B } ) )
25 vex 3112 . . . . . . . 8  |-  x  e. 
_V
2625elpr 4050 . . . . . . 7  |-  ( x  e.  { A ,  B }  <->  ( x  =  A  \/  x  =  B ) )
271, 18fvpr1 6115 . . . . . . . . . . 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 2465 . . . . . . . . 9  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F `  A
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) )
30 fveq2 5872 . . . . . . . . . 10  |-  ( x  =  A  ->  ( F `  x )  =  ( F `  A ) )
31 fveq2 5872 . . . . . . . . . 10  |-  ( x  =  A  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) )
3230, 31eqeq12d 2479 . . . . . . . . 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 6116 . . . . . . . . . . 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 2465 . . . . . . . . 9  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F `  B
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) )
38 fveq2 5872 . . . . . . . . . 10  |-  ( x  =  B  ->  ( F `  x )  =  ( F `  B ) )
39 fveq2 5872 . . . . . . . . . 10  |-  ( x  =  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) )
4038, 39eqeq12d 2479 . . . . . . . . 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 5684 . . . . 5  |-  ( F  Fn  { A ,  B }  ->  Fun  F
)
471, 34, 18, 19funpr 5645 . . . . 5  |-  ( A  =/=  B  ->  Fun  {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
48 eqfunfv 5987 . . . . 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 922 . . 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 5597 . . . . 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 5675 . . . . 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 832 . 2  |-  ( A  =/=  B  ->  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
5816, 57pm2.61ine 2770 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 1395    e. wcel 1819    =/= wne 2652   A.wral 2807   _Vcvv 3109   {csn 4032   {cpr 4034   <.cop 4038   dom cdm 5008   Fun wfun 5588    Fn wfn 5589   ` cfv 5594
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1619  ax-4 1632  ax-5 1705  ax-6 1748  ax-7 1791  ax-8 1821  ax-9 1823  ax-10 1838  ax-11 1843  ax-12 1855  ax-13 2000  ax-ext 2435  ax-sep 4578  ax-nul 4586  ax-pow 4634  ax-pr 4695
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 975  df-tru 1398  df-ex 1614  df-nf 1618  df-sb 1741  df-eu 2287  df-mo 2288  df-clab 2443  df-cleq 2449  df-clel 2452  df-nfc 2607  df-ne 2654  df-ral 2812  df-rex 2813  df-reu 2814  df-rab 2816  df-v 3111  df-sbc 3328  df-csb 3431  df-dif 3474  df-un 3476  df-in 3478  df-ss 3485  df-nul 3794  df-if 3945  df-sn 4033  df-pr 4035  df-op 4039  df-uni 4252  df-br 4457  df-opab 4516  df-mpt 4517  df-id 4804  df-xp 5014  df-rel 5015  df-cnv 5016  df-co 5017  df-dm 5018  df-rn 5019  df-res 5020  df-ima 5021  df-iota 5557  df-fun 5596  df-fn 5597  df-f 5598  df-f1 5599  df-fo 5600  df-f1o 5601  df-fv 5602
This theorem is referenced by:  wrd2pr2op  12897
  Copyright terms: Public domain W3C validator