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

Theorem fnprb 6134
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 6094 . . . . 5  |-  ( F  Fn  { A }  <->  F  =  { <. A , 
( F `  A
) >. } )
3 dfsn2 4009 . . . . . 6  |-  { A }  =  { A ,  A }
43fneq2i 5685 . . . . 5  |-  ( F  Fn  { A }  <->  F  Fn  { A ,  A } )
5 dfsn2 4009 . . . . . 6  |-  { <. A ,  ( F `  A ) >. }  =  { <. A ,  ( F `  A )
>. ,  <. A , 
( F `  A
) >. }
65eqeq2i 2440 . . . . 5  |-  ( F  =  { <. A , 
( F `  A
) >. }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. A , 
( F `  A
) >. } )
72, 4, 63bitr3i 278 . . . 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 4077 . . . 4  |-  ( A  =  B  ->  { A ,  A }  =  { A ,  B }
)
109fneq2d 5681 . . 3  |-  ( A  =  B  ->  ( F  Fn  { A ,  A }  <->  F  Fn  { A ,  B }
) )
11 id 23 . . . . . 6  |-  ( A  =  B  ->  A  =  B )
12 fveq2 5877 . . . . . 6  |-  ( A  =  B  ->  ( F `  A )  =  ( F `  B ) )
1311, 12opeq12d 4192 . . . . 5  |-  ( A  =  B  ->  <. A , 
( F `  A
) >.  =  <. B , 
( F `  B
) >. )
1413preq2d 4083 . . . 4  |-  ( A  =  B  ->  { <. A ,  ( F `  A ) >. ,  <. A ,  ( F `  A ) >. }  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } )
1514eqeq2d 2436 . . 3  |-  ( A  =  B  ->  ( F  =  { <. A , 
( F `  A
) >. ,  <. A , 
( F `  A
) >. }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
168, 10, 153bitr3d 286 . 2  |-  ( A  =  B  ->  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
17 fndm 5689 . . . . . 6  |-  ( F  Fn  { A ,  B }  ->  dom  F  =  { A ,  B } )
18 fvex 5887 . . . . . . 7  |-  ( F `
 A )  e. 
_V
19 fvex 5887 . . . . . . 7  |-  ( F `
 B )  e. 
_V
2018, 19dmprop 5326 . . . . . 6  |-  dom  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. }  =  { A ,  B }
2117, 20syl6eqr 2481 . . . . 5  |-  ( F  Fn  { A ,  B }  ->  dom  F  =  dom  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } )
2221adantl 467 . . . 4  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  dom  F  =  dom  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
2317adantl 467 . . . . . . 7  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  dom  F  =  { A ,  B } )
2423eleq2d 2492 . . . . . 6  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  dom  F  <-> 
x  e.  { A ,  B } ) )
25 vex 3084 . . . . . . . 8  |-  x  e. 
_V
2625elpr 4014 . . . . . . 7  |-  ( x  e.  { A ,  B }  <->  ( x  =  A  \/  x  =  B ) )
271, 18fvpr1 6118 . . . . . . . . . . 11  |-  ( A  =/=  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  A
)  =  ( F `
 A ) )
2827adantr 466 . . . . . . . . . 10  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } `  A
)  =  ( F `
 A ) )
2928eqcomd 2430 . . . . . . . . 9  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F `  A
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) )
30 fveq2 5877 . . . . . . . . . 10  |-  ( x  =  A  ->  ( F `  x )  =  ( F `  A ) )
31 fveq2 5877 . . . . . . . . . 10  |-  ( x  =  A  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) )
3230, 31eqeq12d 2444 . . . . . . . . 9  |-  ( x  =  A  ->  (
( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x )  <-> 
( F `  A
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) ) )
3329, 32syl5ibrcom 225 . . . . . . . 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 6119 . . . . . . . . . . 11  |-  ( A  =/=  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  B
)  =  ( F `
 B ) )
3635adantr 466 . . . . . . . . . 10  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } `  B
)  =  ( F `
 B ) )
3736eqcomd 2430 . . . . . . . . 9  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F `  B
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) )
38 fveq2 5877 . . . . . . . . . 10  |-  ( x  =  B  ->  ( F `  x )  =  ( F `  B ) )
39 fveq2 5877 . . . . . . . . . 10  |-  ( x  =  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) )
4038, 39eqeq12d 2444 . . . . . . . . 9  |-  ( x  =  B  ->  (
( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x )  <-> 
( F `  B
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) ) )
4137, 40syl5ibrcom 225 . . . . . . . 8  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  =  B  ->  ( F `  x )  =  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
) ) )
4233, 41jaod 381 . . . . . . 7  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( ( x  =  A  \/  x  =  B )  ->  ( F `  x )  =  ( { <. A ,  ( F `  A ) >. ,  <. B ,  ( F `  B ) >. } `  x ) ) )
4326, 42syl5bi 220 . . . . . 6  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  { A ,  B }  ->  ( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x ) ) )
4424, 43sylbid 218 . . . . 5  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  dom  F  ->  ( F `  x )  =  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
) ) )
4544ralrimiv 2837 . . . 4  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  A. x  e.  dom  F ( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x ) )
46 fnfun 5687 . . . . 5  |-  ( F  Fn  { A ,  B }  ->  Fun  F
)
471, 34, 18, 19funpr 5648 . . . . 5  |-  ( A  =/=  B  ->  Fun  {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
48 eqfunfv 5992 . . . . 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 480 . . . 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 930 . . 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 5600 . . . . 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 668 . . . 4  |-  ( A  =/=  B  ->  { <. A ,  ( F `  A ) >. ,  <. B ,  ( F `  B ) >. }  Fn  { A ,  B }
)
54 fneq1 5678 . . . . 5  |-  ( F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  ->  ( F  Fn  { A ,  B }  <->  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  Fn  { A ,  B }
) )
5554biimprd 226 . . . 4  |-  ( F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. }  Fn  { A ,  B }  ->  F  Fn  { A ,  B } ) )
5653, 55mpan9 471 . . 3  |-  ( ( A  =/=  B  /\  F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } )  ->  F  Fn  { A ,  B } )
5750, 56impbida 840 . 2  |-  ( A  =/=  B  ->  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
5816, 57pm2.61ine 2737 1  |-  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
Colors of variables: wff setvar class
Syntax hints:    <-> wb 187    \/ wo 369    /\ wa 370    = wceq 1437    e. wcel 1868    =/= wne 2618   A.wral 2775   _Vcvv 3081   {csn 3996   {cpr 3998   <.cop 4002   dom cdm 4849   Fun wfun 5591    Fn wfn 5592   ` cfv 5597
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1665  ax-4 1678  ax-5 1748  ax-6 1794  ax-7 1839  ax-8 1870  ax-9 1872  ax-10 1887  ax-11 1892  ax-12 1905  ax-13 2053  ax-ext 2400  ax-sep 4543  ax-nul 4551  ax-pow 4598  ax-pr 4656
This theorem depends on definitions:  df-bi 188  df-or 371  df-an 372  df-3an 984  df-tru 1440  df-ex 1660  df-nf 1664  df-sb 1787  df-eu 2269  df-mo 2270  df-clab 2408  df-cleq 2414  df-clel 2417  df-nfc 2572  df-ne 2620  df-ral 2780  df-rex 2781  df-reu 2782  df-rab 2784  df-v 3083  df-sbc 3300  df-csb 3396  df-dif 3439  df-un 3441  df-in 3443  df-ss 3450  df-nul 3762  df-if 3910  df-sn 3997  df-pr 3999  df-op 4003  df-uni 4217  df-br 4421  df-opab 4480  df-mpt 4481  df-id 4764  df-xp 4855  df-rel 4856  df-cnv 4857  df-co 4858  df-dm 4859  df-rn 4860  df-res 4861  df-ima 4862  df-iota 5561  df-fun 5599  df-fn 5600  df-f 5601  df-f1 5602  df-fo 5603  df-f1o 5604  df-fv 5605
This theorem is referenced by:  fnpr2g  6135  wrd2pr2op  13010
  Copyright terms: Public domain W3C validator