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

Theorem fnprb 6128
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 6088 . . . . 5  |-  ( F  Fn  { A }  <->  F  =  { <. A , 
( F `  A
) >. } )
3 dfsn2 3983 . . . . . 6  |-  { A }  =  { A ,  A }
43fneq2i 5676 . . . . 5  |-  ( F  Fn  { A }  <->  F  Fn  { A ,  A } )
5 dfsn2 3983 . . . . . 6  |-  { <. A ,  ( F `  A ) >. }  =  { <. A ,  ( F `  A )
>. ,  <. A , 
( F `  A
) >. }
65eqeq2i 2465 . . . . 5  |-  ( F  =  { <. A , 
( F `  A
) >. }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. A , 
( F `  A
) >. } )
72, 4, 63bitr3i 279 . . . 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 4055 . . . 4  |-  ( A  =  B  ->  { A ,  A }  =  { A ,  B }
)
109fneq2d 5672 . . 3  |-  ( A  =  B  ->  ( F  Fn  { A ,  A }  <->  F  Fn  { A ,  B }
) )
11 id 22 . . . . . 6  |-  ( A  =  B  ->  A  =  B )
12 fveq2 5870 . . . . . 6  |-  ( A  =  B  ->  ( F `  A )  =  ( F `  B ) )
1311, 12opeq12d 4177 . . . . 5  |-  ( A  =  B  ->  <. A , 
( F `  A
) >.  =  <. B , 
( F `  B
) >. )
1413preq2d 4061 . . . 4  |-  ( A  =  B  ->  { <. A ,  ( F `  A ) >. ,  <. A ,  ( F `  A ) >. }  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } )
1514eqeq2d 2463 . . 3  |-  ( A  =  B  ->  ( F  =  { <. A , 
( F `  A
) >. ,  <. A , 
( F `  A
) >. }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
168, 10, 153bitr3d 287 . 2  |-  ( A  =  B  ->  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
17 fndm 5680 . . . . . 6  |-  ( F  Fn  { A ,  B }  ->  dom  F  =  { A ,  B } )
18 fvex 5880 . . . . . . 7  |-  ( F `
 A )  e. 
_V
19 fvex 5880 . . . . . . 7  |-  ( F `
 B )  e. 
_V
2018, 19dmprop 5314 . . . . . 6  |-  dom  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. }  =  { A ,  B }
2117, 20syl6eqr 2505 . . . . 5  |-  ( F  Fn  { A ,  B }  ->  dom  F  =  dom  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } )
2221adantl 468 . . . 4  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  dom  F  =  dom  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
2317adantl 468 . . . . . . 7  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  dom  F  =  { A ,  B } )
2423eleq2d 2516 . . . . . 6  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  dom  F  <-> 
x  e.  { A ,  B } ) )
25 vex 3050 . . . . . . . 8  |-  x  e. 
_V
2625elpr 3988 . . . . . . 7  |-  ( x  e.  { A ,  B }  <->  ( x  =  A  \/  x  =  B ) )
271, 18fvpr1 6112 . . . . . . . . . . 11  |-  ( A  =/=  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  A
)  =  ( F `
 A ) )
2827adantr 467 . . . . . . . . . 10  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } `  A
)  =  ( F `
 A ) )
2928eqcomd 2459 . . . . . . . . 9  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F `  A
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) )
30 fveq2 5870 . . . . . . . . . 10  |-  ( x  =  A  ->  ( F `  x )  =  ( F `  A ) )
31 fveq2 5870 . . . . . . . . . 10  |-  ( x  =  A  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) )
3230, 31eqeq12d 2468 . . . . . . . . 9  |-  ( x  =  A  ->  (
( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x )  <-> 
( F `  A
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) ) )
3329, 32syl5ibrcom 226 . . . . . . . 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 6113 . . . . . . . . . . 11  |-  ( A  =/=  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  B
)  =  ( F `
 B ) )
3635adantr 467 . . . . . . . . . 10  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } `  B
)  =  ( F `
 B ) )
3736eqcomd 2459 . . . . . . . . 9  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F `  B
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) )
38 fveq2 5870 . . . . . . . . . 10  |-  ( x  =  B  ->  ( F `  x )  =  ( F `  B ) )
39 fveq2 5870 . . . . . . . . . 10  |-  ( x  =  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) )
4038, 39eqeq12d 2468 . . . . . . . . 9  |-  ( x  =  B  ->  (
( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x )  <-> 
( F `  B
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) ) )
4137, 40syl5ibrcom 226 . . . . . . . 8  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  =  B  ->  ( F `  x )  =  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
) ) )
4233, 41jaod 382 . . . . . . 7  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( ( x  =  A  \/  x  =  B )  ->  ( F `  x )  =  ( { <. A ,  ( F `  A ) >. ,  <. B ,  ( F `  B ) >. } `  x ) ) )
4326, 42syl5bi 221 . . . . . 6  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  { A ,  B }  ->  ( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x ) ) )
4424, 43sylbid 219 . . . . 5  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  dom  F  ->  ( F `  x )  =  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
) ) )
4544ralrimiv 2802 . . . 4  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  A. x  e.  dom  F ( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x ) )
46 fnfun 5678 . . . . 5  |-  ( F  Fn  { A ,  B }  ->  Fun  F
)
471, 34, 18, 19funpr 5636 . . . . 5  |-  ( A  =/=  B  ->  Fun  {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
48 eqfunfv 5986 . . . . 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 481 . . . 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 934 . . 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 5588 . . . . 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 671 . . . 4  |-  ( A  =/=  B  ->  { <. A ,  ( F `  A ) >. ,  <. B ,  ( F `  B ) >. }  Fn  { A ,  B }
)
54 fneq1 5669 . . . . 5  |-  ( F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  ->  ( F  Fn  { A ,  B }  <->  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  Fn  { A ,  B }
) )
5554biimprd 227 . . . 4  |-  ( F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. }  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. }  Fn  { A ,  B }  ->  F  Fn  { A ,  B } ) )
5653, 55mpan9 472 . . 3  |-  ( ( A  =/=  B  /\  F  =  { <. A , 
( F `  A
) >. ,  <. B , 
( F `  B
) >. } )  ->  F  Fn  { A ,  B } )
5750, 56impbida 844 . 2  |-  ( A  =/=  B  ->  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
5816, 57pm2.61ine 2709 1  |-  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
Colors of variables: wff setvar class
Syntax hints:    <-> wb 188    \/ wo 370    /\ wa 371    = wceq 1446    e. wcel 1889    =/= wne 2624   A.wral 2739   _Vcvv 3047   {csn 3970   {cpr 3972   <.cop 3976   dom cdm 4837   Fun wfun 5579    Fn wfn 5580   ` cfv 5585
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1671  ax-4 1684  ax-5 1760  ax-6 1807  ax-7 1853  ax-8 1891  ax-9 1898  ax-10 1917  ax-11 1922  ax-12 1935  ax-13 2093  ax-ext 2433  ax-sep 4528  ax-nul 4537  ax-pow 4584  ax-pr 4642
This theorem depends on definitions:  df-bi 189  df-or 372  df-an 373  df-3an 988  df-tru 1449  df-ex 1666  df-nf 1670  df-sb 1800  df-eu 2305  df-mo 2306  df-clab 2440  df-cleq 2446  df-clel 2449  df-nfc 2583  df-ne 2626  df-ral 2744  df-rex 2745  df-reu 2746  df-rab 2748  df-v 3049  df-sbc 3270  df-csb 3366  df-dif 3409  df-un 3411  df-in 3413  df-ss 3420  df-nul 3734  df-if 3884  df-sn 3971  df-pr 3973  df-op 3977  df-uni 4202  df-br 4406  df-opab 4465  df-mpt 4466  df-id 4752  df-xp 4843  df-rel 4844  df-cnv 4845  df-co 4846  df-dm 4847  df-rn 4848  df-res 4849  df-ima 4850  df-iota 5549  df-fun 5587  df-fn 5588  df-f 5589  df-f1 5590  df-fo 5591  df-f1o 5592  df-fv 5593
This theorem is referenced by:  fnpr2g  6129  wrd2pr2op  13034
  Copyright terms: Public domain W3C validator