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

Theorem fnprb 7084
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 7038 . . . . 5 (𝐹 Fn {𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩})
3 dfsn2 4574 . . . . . 6 {𝐴} = {𝐴, 𝐴}
43fneq2i 6531 . . . . 5 (𝐹 Fn {𝐴} ↔ 𝐹 Fn {𝐴, 𝐴})
5 dfsn2 4574 . . . . . 6 {⟨𝐴, (𝐹𝐴)⟩} = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩}
65eqeq2i 2751 . . . . 5 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩})
72, 4, 63bitr3i 301 . . . 4 (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩})
87a1i 11 . . 3 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩}))
9 preq2 4670 . . . 4 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
109fneq2d 6527 . . 3 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 Fn {𝐴, 𝐵}))
11 id 22 . . . . . 6 (𝐴 = 𝐵𝐴 = 𝐵)
12 fveq2 6774 . . . . . 6 (𝐴 = 𝐵 → (𝐹𝐴) = (𝐹𝐵))
1311, 12opeq12d 4812 . . . . 5 (𝐴 = 𝐵 → ⟨𝐴, (𝐹𝐴)⟩ = ⟨𝐵, (𝐹𝐵)⟩)
1413preq2d 4676 . . . 4 (𝐴 = 𝐵 → {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩} = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
1514eqeq2d 2749 . . 3 (𝐴 = 𝐵 → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
168, 10, 153bitr3d 309 . 2 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
17 fndm 6536 . . . . . 6 (𝐹 Fn {𝐴, 𝐵} → dom 𝐹 = {𝐴, 𝐵})
18 fvex 6787 . . . . . . 7 (𝐹𝐴) ∈ V
19 fvex 6787 . . . . . . 7 (𝐹𝐵) ∈ V
2018, 19dmprop 6120 . . . . . 6 dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵}
2117, 20eqtr4di 2796 . . . . 5 (𝐹 Fn {𝐴, 𝐵} → dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
2221adantl 482 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
2317adantl 482 . . . . . . 7 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → dom 𝐹 = {𝐴, 𝐵})
2423eleq2d 2824 . . . . . 6 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ dom 𝐹𝑥 ∈ {𝐴, 𝐵}))
25 vex 3436 . . . . . . . 8 𝑥 ∈ V
2625elpr 4584 . . . . . . 7 (𝑥 ∈ {𝐴, 𝐵} ↔ (𝑥 = 𝐴𝑥 = 𝐵))
271, 18fvpr1 7065 . . . . . . . . . . 11 (𝐴𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴) = (𝐹𝐴))
2827adantr 481 . . . . . . . . . 10 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴) = (𝐹𝐴))
2928eqcomd 2744 . . . . . . . . 9 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹𝐴) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴))
30 fveq2 6774 . . . . . . . . . 10 (𝑥 = 𝐴 → (𝐹𝑥) = (𝐹𝐴))
31 fveq2 6774 . . . . . . . . . 10 (𝑥 = 𝐴 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴))
3230, 31eqeq12d 2754 . . . . . . . . 9 (𝑥 = 𝐴 → ((𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) ↔ (𝐹𝐴) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴)))
3329, 32syl5ibrcom 246 . . . . . . . 8 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 = 𝐴 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
34 fnprb.b . . . . . . . . . . . 12 𝐵 ∈ V
3534, 19fvpr2 7067 . . . . . . . . . . 11 (𝐴𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵) = (𝐹𝐵))
3635adantr 481 . . . . . . . . . 10 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵) = (𝐹𝐵))
3736eqcomd 2744 . . . . . . . . 9 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹𝐵) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵))
38 fveq2 6774 . . . . . . . . . 10 (𝑥 = 𝐵 → (𝐹𝑥) = (𝐹𝐵))
39 fveq2 6774 . . . . . . . . . 10 (𝑥 = 𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵))
4038, 39eqeq12d 2754 . . . . . . . . 9 (𝑥 = 𝐵 → ((𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) ↔ (𝐹𝐵) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵)))
4137, 40syl5ibrcom 246 . . . . . . . 8 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 = 𝐵 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4233, 41jaod 856 . . . . . . 7 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ((𝑥 = 𝐴𝑥 = 𝐵) → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4326, 42syl5bi 241 . . . . . 6 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ {𝐴, 𝐵} → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4424, 43sylbid 239 . . . . 5 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ dom 𝐹 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4544ralrimiv 3102 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))
46 fnfun 6533 . . . . 5 (𝐹 Fn {𝐴, 𝐵} → Fun 𝐹)
471, 34, 18, 19funpr 6490 . . . . 5 (𝐴𝐵 → Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
48 eqfunfv 6914 . . . . 5 ((Fun 𝐹 ∧ Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}) → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ↔ (dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))))
4946, 47, 48syl2anr 597 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ↔ (dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))))
5022, 45, 49mpbir2and 710 . . 3 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
51 df-fn 6436 . . . . 5 ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵} ↔ (Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵}))
5247, 20, 51sylanblrc 590 . . . 4 (𝐴𝐵 → {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵})
53 fneq1 6524 . . . . 5 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} → (𝐹 Fn {𝐴, 𝐵} ↔ {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵}))
5453biimprd 247 . . . 4 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵} → 𝐹 Fn {𝐴, 𝐵}))
5552, 54mpan9 507 . . 3 ((𝐴𝐵𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}) → 𝐹 Fn {𝐴, 𝐵})
5650, 55impbida 798 . 2 (𝐴𝐵 → (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
5716, 56pm2.61ine 3028 1 (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
Colors of variables: wff setvar class
Syntax hints:  wb 205  wa 396  wo 844   = wceq 1539  wcel 2106  wne 2943  wral 3064  Vcvv 3432  {csn 4561  {cpr 4563  cop 4567  dom cdm 5589  Fun wfun 6427   Fn wfn 6428  cfv 6433
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 1913  ax-6 1971  ax-7 2011  ax-8 2108  ax-9 2116  ax-10 2137  ax-11 2154  ax-12 2171  ax-ext 2709  ax-sep 5223  ax-nul 5230  ax-pr 5352
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3an 1088  df-tru 1542  df-fal 1552  df-ex 1783  df-nf 1787  df-sb 2068  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2816  df-nfc 2889  df-ne 2944  df-ral 3069  df-rex 3070  df-reu 3072  df-rab 3073  df-v 3434  df-sbc 3717  df-csb 3833  df-dif 3890  df-un 3892  df-in 3894  df-ss 3904  df-nul 4257  df-if 4460  df-sn 4562  df-pr 4564  df-op 4568  df-uni 4840  df-br 5075  df-opab 5137  df-mpt 5158  df-id 5489  df-xp 5595  df-rel 5596  df-cnv 5597  df-co 5598  df-dm 5599  df-rn 5600  df-res 5601  df-ima 5602  df-iota 6391  df-fun 6435  df-fn 6436  df-f 6437  df-f1 6438  df-fo 6439  df-f1o 6440  df-fv 6441
This theorem is referenced by:  fntpb  7085  fnpr2g  7086  wrd2pr2op  14656
  Copyright terms: Public domain W3C validator