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

Theorem fnprb 7210
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.) Eliminate unnecessary antecedent 𝐴𝐵. (Revised by NM, 29-Dec-2018.)
Hypotheses
Ref Expression
fnprb.a 𝐴 ∈ V
fnprb.b 𝐵 ∈ V
Assertion
Ref Expression
fnprb (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})

Proof of Theorem fnprb
Dummy variable 𝑥 is distinct from all other variables.
StepHypRef Expression
1 fnprb.a . . . . . 6 𝐴 ∈ V
21fnsnb 7164 . . . . 5 (𝐹 Fn {𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩})
3 dfsn2 4642 . . . . . 6 {𝐴} = {𝐴, 𝐴}
43fneq2i 6648 . . . . 5 (𝐹 Fn {𝐴} ↔ 𝐹 Fn {𝐴, 𝐴})
5 dfsn2 4642 . . . . . 6 {⟨𝐴, (𝐹𝐴)⟩} = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩}
65eqeq2i 2746 . . . . 5 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩})
72, 4, 63bitr3i 301 . . . 4 (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩})
87a1i 11 . . 3 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩}))
9 preq2 4739 . . . 4 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
109fneq2d 6644 . . 3 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 Fn {𝐴, 𝐵}))
11 id 22 . . . . . 6 (𝐴 = 𝐵𝐴 = 𝐵)
12 fveq2 6892 . . . . . 6 (𝐴 = 𝐵 → (𝐹𝐴) = (𝐹𝐵))
1311, 12opeq12d 4882 . . . . 5 (𝐴 = 𝐵 → ⟨𝐴, (𝐹𝐴)⟩ = ⟨𝐵, (𝐹𝐵)⟩)
1413preq2d 4745 . . . 4 (𝐴 = 𝐵 → {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩} = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
1514eqeq2d 2744 . . 3 (𝐴 = 𝐵 → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
168, 10, 153bitr3d 309 . 2 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
17 fndm 6653 . . . . . 6 (𝐹 Fn {𝐴, 𝐵} → dom 𝐹 = {𝐴, 𝐵})
18 fvex 6905 . . . . . . 7 (𝐹𝐴) ∈ V
19 fvex 6905 . . . . . . 7 (𝐹𝐵) ∈ V
2018, 19dmprop 6217 . . . . . 6 dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵}
2117, 20eqtr4di 2791 . . . . 5 (𝐹 Fn {𝐴, 𝐵} → dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
2221adantl 483 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
2317adantl 483 . . . . . . 7 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → dom 𝐹 = {𝐴, 𝐵})
2423eleq2d 2820 . . . . . 6 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ dom 𝐹𝑥 ∈ {𝐴, 𝐵}))
25 vex 3479 . . . . . . . 8 𝑥 ∈ V
2625elpr 4652 . . . . . . 7 (𝑥 ∈ {𝐴, 𝐵} ↔ (𝑥 = 𝐴𝑥 = 𝐵))
271, 18fvpr1 7191 . . . . . . . . . . 11 (𝐴𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴) = (𝐹𝐴))
2827adantr 482 . . . . . . . . . 10 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴) = (𝐹𝐴))
2928eqcomd 2739 . . . . . . . . 9 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹𝐴) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴))
30 fveq2 6892 . . . . . . . . . 10 (𝑥 = 𝐴 → (𝐹𝑥) = (𝐹𝐴))
31 fveq2 6892 . . . . . . . . . 10 (𝑥 = 𝐴 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴))
3230, 31eqeq12d 2749 . . . . . . . . 9 (𝑥 = 𝐴 → ((𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) ↔ (𝐹𝐴) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴)))
3329, 32syl5ibrcom 246 . . . . . . . 8 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 = 𝐴 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
34 fnprb.b . . . . . . . . . . . 12 𝐵 ∈ V
3534, 19fvpr2 7193 . . . . . . . . . . 11 (𝐴𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵) = (𝐹𝐵))
3635adantr 482 . . . . . . . . . 10 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵) = (𝐹𝐵))
3736eqcomd 2739 . . . . . . . . 9 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹𝐵) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵))
38 fveq2 6892 . . . . . . . . . 10 (𝑥 = 𝐵 → (𝐹𝑥) = (𝐹𝐵))
39 fveq2 6892 . . . . . . . . . 10 (𝑥 = 𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵))
4038, 39eqeq12d 2749 . . . . . . . . 9 (𝑥 = 𝐵 → ((𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) ↔ (𝐹𝐵) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵)))
4137, 40syl5ibrcom 246 . . . . . . . 8 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 = 𝐵 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4233, 41jaod 858 . . . . . . 7 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ((𝑥 = 𝐴𝑥 = 𝐵) → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4326, 42biimtrid 241 . . . . . 6 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ {𝐴, 𝐵} → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4424, 43sylbid 239 . . . . 5 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ dom 𝐹 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4544ralrimiv 3146 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))
46 fnfun 6650 . . . . 5 (𝐹 Fn {𝐴, 𝐵} → Fun 𝐹)
471, 34, 18, 19funpr 6605 . . . . 5 (𝐴𝐵 → Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
48 eqfunfv 7038 . . . . 5 ((Fun 𝐹 ∧ Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}) → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ↔ (dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))))
4946, 47, 48syl2anr 598 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ↔ (dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))))
5022, 45, 49mpbir2and 712 . . 3 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
51 df-fn 6547 . . . . 5 ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵} ↔ (Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵}))
5247, 20, 51sylanblrc 591 . . . 4 (𝐴𝐵 → {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵})
53 fneq1 6641 . . . . 5 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} → (𝐹 Fn {𝐴, 𝐵} ↔ {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵}))
5453biimprd 247 . . . 4 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵} → 𝐹 Fn {𝐴, 𝐵}))
5552, 54mpan9 508 . . 3 ((𝐴𝐵𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}) → 𝐹 Fn {𝐴, 𝐵})
5650, 55impbida 800 . 2 (𝐴𝐵 → (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
5716, 56pm2.61ine 3026 1 (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
Colors of variables: wff setvar class
Syntax hints:  wb 205  wa 397  wo 846   = wceq 1542  wcel 2107  wne 2941  wral 3062  Vcvv 3475  {csn 4629  {cpr 4631  cop 4635  dom cdm 5677  Fun wfun 6538   Fn wfn 6539  cfv 6544
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1798  ax-4 1812  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2109  ax-9 2117  ax-10 2138  ax-11 2155  ax-12 2172  ax-ext 2704  ax-sep 5300  ax-nul 5307  ax-pr 5428
This theorem depends on definitions:  df-bi 206  df-an 398  df-or 847  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1783  df-nf 1787  df-sb 2069  df-mo 2535  df-eu 2564  df-clab 2711  df-cleq 2725  df-clel 2811  df-nfc 2886  df-ne 2942  df-ral 3063  df-rex 3072  df-reu 3378  df-rab 3434  df-v 3477  df-sbc 3779  df-csb 3895  df-dif 3952  df-un 3954  df-in 3956  df-ss 3966  df-nul 4324  df-if 4530  df-sn 4630  df-pr 4632  df-op 4636  df-uni 4910  df-br 5150  df-opab 5212  df-mpt 5233  df-id 5575  df-xp 5683  df-rel 5684  df-cnv 5685  df-co 5686  df-dm 5687  df-rn 5688  df-res 5689  df-ima 5690  df-iota 6496  df-fun 6546  df-fn 6547  df-f 6548  df-f1 6549  df-fo 6550  df-f1o 6551  df-fv 6552
This theorem is referenced by:  fntpb  7211  fnpr2g  7212  wrd2pr2op  14894
  Copyright terms: Public domain W3C validator