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

Theorem fnprb 7066
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 7020 . . . . 5 (𝐹 Fn {𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩})
3 dfsn2 4571 . . . . . 6 {𝐴} = {𝐴, 𝐴}
43fneq2i 6515 . . . . 5 (𝐹 Fn {𝐴} ↔ 𝐹 Fn {𝐴, 𝐴})
5 dfsn2 4571 . . . . . 6 {⟨𝐴, (𝐹𝐴)⟩} = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩}
65eqeq2i 2751 . . . . 5 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩})
72, 4, 63bitr3i 300 . . . 4 (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩})
87a1i 11 . . 3 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩}))
9 preq2 4667 . . . 4 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
109fneq2d 6511 . . 3 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 Fn {𝐴, 𝐵}))
11 id 22 . . . . . 6 (𝐴 = 𝐵𝐴 = 𝐵)
12 fveq2 6756 . . . . . 6 (𝐴 = 𝐵 → (𝐹𝐴) = (𝐹𝐵))
1311, 12opeq12d 4809 . . . . 5 (𝐴 = 𝐵 → ⟨𝐴, (𝐹𝐴)⟩ = ⟨𝐵, (𝐹𝐵)⟩)
1413preq2d 4673 . . . 4 (𝐴 = 𝐵 → {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩} = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
1514eqeq2d 2749 . . 3 (𝐴 = 𝐵 → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
168, 10, 153bitr3d 308 . 2 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
17 fndm 6520 . . . . . 6 (𝐹 Fn {𝐴, 𝐵} → dom 𝐹 = {𝐴, 𝐵})
18 fvex 6769 . . . . . . 7 (𝐹𝐴) ∈ V
19 fvex 6769 . . . . . . 7 (𝐹𝐵) ∈ V
2018, 19dmprop 6109 . . . . . 6 dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵}
2117, 20eqtr4di 2797 . . . . 5 (𝐹 Fn {𝐴, 𝐵} → dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
2221adantl 481 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
2317adantl 481 . . . . . . 7 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → dom 𝐹 = {𝐴, 𝐵})
2423eleq2d 2824 . . . . . 6 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ dom 𝐹𝑥 ∈ {𝐴, 𝐵}))
25 vex 3426 . . . . . . . 8 𝑥 ∈ V
2625elpr 4581 . . . . . . 7 (𝑥 ∈ {𝐴, 𝐵} ↔ (𝑥 = 𝐴𝑥 = 𝐵))
271, 18fvpr1 7047 . . . . . . . . . . 11 (𝐴𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴) = (𝐹𝐴))
2827adantr 480 . . . . . . . . . 10 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴) = (𝐹𝐴))
2928eqcomd 2744 . . . . . . . . 9 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹𝐴) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴))
30 fveq2 6756 . . . . . . . . . 10 (𝑥 = 𝐴 → (𝐹𝑥) = (𝐹𝐴))
31 fveq2 6756 . . . . . . . . . 10 (𝑥 = 𝐴 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴))
3230, 31eqeq12d 2754 . . . . . . . . 9 (𝑥 = 𝐴 → ((𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) ↔ (𝐹𝐴) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴)))
3329, 32syl5ibrcom 246 . . . . . . . 8 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 = 𝐴 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
34 fnprb.b . . . . . . . . . . . 12 𝐵 ∈ V
3534, 19fvpr2 7049 . . . . . . . . . . 11 (𝐴𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵) = (𝐹𝐵))
3635adantr 480 . . . . . . . . . 10 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵) = (𝐹𝐵))
3736eqcomd 2744 . . . . . . . . 9 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹𝐵) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵))
38 fveq2 6756 . . . . . . . . . 10 (𝑥 = 𝐵 → (𝐹𝑥) = (𝐹𝐵))
39 fveq2 6756 . . . . . . . . . 10 (𝑥 = 𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵))
4038, 39eqeq12d 2754 . . . . . . . . 9 (𝑥 = 𝐵 → ((𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) ↔ (𝐹𝐵) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵)))
4137, 40syl5ibrcom 246 . . . . . . . 8 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 = 𝐵 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4233, 41jaod 855 . . . . . . 7 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ((𝑥 = 𝐴𝑥 = 𝐵) → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4326, 42syl5bi 241 . . . . . 6 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ {𝐴, 𝐵} → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4424, 43sylbid 239 . . . . 5 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ dom 𝐹 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4544ralrimiv 3106 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))
46 fnfun 6517 . . . . 5 (𝐹 Fn {𝐴, 𝐵} → Fun 𝐹)
471, 34, 18, 19funpr 6474 . . . . 5 (𝐴𝐵 → Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
48 eqfunfv 6896 . . . . 5 ((Fun 𝐹 ∧ Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}) → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ↔ (dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))))
4946, 47, 48syl2anr 596 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ↔ (dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))))
5022, 45, 49mpbir2and 709 . . 3 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
51 df-fn 6421 . . . . 5 ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵} ↔ (Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵}))
5247, 20, 51sylanblrc 589 . . . 4 (𝐴𝐵 → {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵})
53 fneq1 6508 . . . . 5 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} → (𝐹 Fn {𝐴, 𝐵} ↔ {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵}))
5453biimprd 247 . . . 4 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵} → 𝐹 Fn {𝐴, 𝐵}))
5552, 54mpan9 506 . . 3 ((𝐴𝐵𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}) → 𝐹 Fn {𝐴, 𝐵})
5650, 55impbida 797 . 2 (𝐴𝐵 → (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
5716, 56pm2.61ine 3027 1 (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
Colors of variables: wff setvar class
Syntax hints:  wb 205  wa 395  wo 843   = wceq 1539  wcel 2108  wne 2942  wral 3063  Vcvv 3422  {csn 4558  {cpr 4560  cop 4564  dom cdm 5580  Fun wfun 6412   Fn wfn 6413  cfv 6418
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1799  ax-4 1813  ax-5 1914  ax-6 1972  ax-7 2012  ax-8 2110  ax-9 2118  ax-10 2139  ax-11 2156  ax-12 2173  ax-ext 2709  ax-sep 5218  ax-nul 5225  ax-pr 5347
This theorem depends on definitions:  df-bi 206  df-an 396  df-or 844  df-3an 1087  df-tru 1542  df-fal 1552  df-ex 1784  df-nf 1788  df-sb 2069  df-mo 2540  df-eu 2569  df-clab 2716  df-cleq 2730  df-clel 2817  df-nfc 2888  df-ne 2943  df-ral 3068  df-rex 3069  df-reu 3070  df-rab 3072  df-v 3424  df-sbc 3712  df-csb 3829  df-dif 3886  df-un 3888  df-in 3890  df-ss 3900  df-nul 4254  df-if 4457  df-sn 4559  df-pr 4561  df-op 4565  df-uni 4837  df-br 5071  df-opab 5133  df-mpt 5154  df-id 5480  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-res 5592  df-ima 5593  df-iota 6376  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425  df-fv 6426
This theorem is referenced by:  fntpb  7067  fnpr2g  7068  wrd2pr2op  14584
  Copyright terms: Public domain W3C validator