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

Theorem fnprb 5934
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 5896 . . . . 5  |-  ( F  Fn  { A }  <->  F  =  { <. A , 
( F `  A
) >. } )
3 dfsn2 3888 . . . . . 6  |-  { A }  =  { A ,  A }
43fneq2i 5504 . . . . 5  |-  ( F  Fn  { A }  <->  F  Fn  { A ,  A } )
5 dfsn2 3888 . . . . . 6  |-  { <. A ,  ( F `  A ) >. }  =  { <. A ,  ( F `  A )
>. ,  <. A , 
( F `  A
) >. }
65eqeq2i 2451 . . . . 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 3953 . . . 4  |-  ( A  =  B  ->  { A ,  A }  =  { A ,  B }
)
109fneq2d 5500 . . 3  |-  ( A  =  B  ->  ( F  Fn  { A ,  A }  <->  F  Fn  { A ,  B }
) )
11 id 22 . . . . . 6  |-  ( A  =  B  ->  A  =  B )
12 fveq2 5689 . . . . . 6  |-  ( A  =  B  ->  ( F `  A )  =  ( F `  B ) )
1311, 12opeq12d 4065 . . . . 5  |-  ( A  =  B  ->  <. A , 
( F `  A
) >.  =  <. B , 
( F `  B
) >. )
1413preq2d 3959 . . . 4  |-  ( A  =  B  ->  { <. A ,  ( F `  A ) >. ,  <. A ,  ( F `  A ) >. }  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } )
1514eqeq2d 2452 . . 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 5508 . . . . . 6  |-  ( F  Fn  { A ,  B }  ->  dom  F  =  { A ,  B } )
18 fvex 5699 . . . . . . 7  |-  ( F `
 A )  e. 
_V
19 fvex 5699 . . . . . . 7  |-  ( F `
 B )  e. 
_V
2018, 19dmprop 5312 . . . . . 6  |-  dom  { <. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. }  =  { A ,  B }
2117, 20syl6eqr 2491 . . . . 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 2508 . . . . . 6  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( x  e.  dom  F  <-> 
x  e.  { A ,  B } ) )
25 vex 2973 . . . . . . . 8  |-  x  e. 
_V
2625elpr 3893 . . . . . . 7  |-  ( x  e.  { A ,  B }  <->  ( x  =  A  \/  x  =  B ) )
271, 18fvpr1 5919 . . . . . . . . . . 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 2446 . . . . . . . . 9  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F `  A
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) )
30 fveq2 5689 . . . . . . . . . 10  |-  ( x  =  A  ->  ( F `  x )  =  ( F `  A ) )
31 fveq2 5689 . . . . . . . . . 10  |-  ( x  =  A  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  A ) )
3230, 31eqeq12d 2455 . . . . . . . . 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 5920 . . . . . . . . . . 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 2446 . . . . . . . . 9  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  -> 
( F `  B
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) )
38 fveq2 5689 . . . . . . . . . 10  |-  ( x  =  B  ->  ( F `  x )  =  ( F `  B ) )
39 fveq2 5689 . . . . . . . . . 10  |-  ( x  =  B  ->  ( { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  B ) )
4038, 39eqeq12d 2455 . . . . . . . . 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 2796 . . . 4  |-  ( ( A  =/=  B  /\  F  Fn  { A ,  B } )  ->  A. x  e.  dom  F ( F `  x
)  =  ( {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } `  x ) )
46 fnfun 5506 . . . . 5  |-  ( F  Fn  { A ,  B }  ->  Fun  F
)
471, 34, 18, 19funpr 5467 . . . . 5  |-  ( A  =/=  B  ->  Fun  {
<. A ,  ( F `
 A ) >. ,  <. B ,  ( F `  B )
>. } )
48 eqfunfv 5800 . . . . 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 913 . . 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 5419 . . . . 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 5497 . . . . 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 828 . 2  |-  ( A  =/=  B  ->  ( F  Fn  { A ,  B }  <->  F  =  { <. A ,  ( F `  A )
>. ,  <. B , 
( F `  B
) >. } ) )
5816, 57pm2.61ine 2685 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 1369    e. wcel 1756    =/= wne 2604   A.wral 2713   _Vcvv 2970   {csn 3875   {cpr 3877   <.cop 3881   dom cdm 4838   Fun wfun 5410    Fn wfn 5411   ` cfv 5416
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1591  ax-4 1602  ax-5 1670  ax-6 1708  ax-7 1728  ax-8 1758  ax-9 1760  ax-10 1775  ax-11 1780  ax-12 1792  ax-13 1943  ax-ext 2422  ax-sep 4411  ax-nul 4419  ax-pow 4468  ax-pr 4529
This theorem depends on definitions:  df-bi 185  df-or 370  df-an 371  df-3an 967  df-tru 1372  df-ex 1587  df-nf 1590  df-sb 1701  df-eu 2257  df-mo 2258  df-clab 2428  df-cleq 2434  df-clel 2437  df-nfc 2566  df-ne 2606  df-ral 2718  df-rex 2719  df-reu 2720  df-rab 2722  df-v 2972  df-sbc 3185  df-csb 3287  df-dif 3329  df-un 3331  df-in 3333  df-ss 3340  df-nul 3636  df-if 3790  df-sn 3876  df-pr 3878  df-op 3882  df-uni 4090  df-br 4291  df-opab 4349  df-mpt 4350  df-id 4634  df-xp 4844  df-rel 4845  df-cnv 4846  df-co 4847  df-dm 4848  df-rn 4849  df-res 4850  df-ima 4851  df-iota 5379  df-fun 5418  df-fn 5419  df-f 5420  df-f1 5421  df-fo 5422  df-f1o 5423  df-fv 5424
This theorem is referenced by:  wrd2pr2op  12545
  Copyright terms: Public domain W3C validator