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

Theorem fnprb 7081
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 7035 . . . . 5 (𝐹 Fn {𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩})
3 dfsn2 4580 . . . . . 6 {𝐴} = {𝐴, 𝐴}
43fneq2i 6529 . . . . 5 (𝐹 Fn {𝐴} ↔ 𝐹 Fn {𝐴, 𝐴})
5 dfsn2 4580 . . . . . 6 {⟨𝐴, (𝐹𝐴)⟩} = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩}
65eqeq2i 2753 . . . . 5 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩})
72, 4, 63bitr3i 301 . . . 4 (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩})
87a1i 11 . . 3 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩}))
9 preq2 4676 . . . 4 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
109fneq2d 6525 . . 3 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 Fn {𝐴, 𝐵}))
11 id 22 . . . . . 6 (𝐴 = 𝐵𝐴 = 𝐵)
12 fveq2 6771 . . . . . 6 (𝐴 = 𝐵 → (𝐹𝐴) = (𝐹𝐵))
1311, 12opeq12d 4818 . . . . 5 (𝐴 = 𝐵 → ⟨𝐴, (𝐹𝐴)⟩ = ⟨𝐵, (𝐹𝐵)⟩)
1413preq2d 4682 . . . 4 (𝐴 = 𝐵 → {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩} = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
1514eqeq2d 2751 . . 3 (𝐴 = 𝐵 → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
168, 10, 153bitr3d 309 . 2 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
17 fndm 6534 . . . . . 6 (𝐹 Fn {𝐴, 𝐵} → dom 𝐹 = {𝐴, 𝐵})
18 fvex 6784 . . . . . . 7 (𝐹𝐴) ∈ V
19 fvex 6784 . . . . . . 7 (𝐹𝐵) ∈ V
2018, 19dmprop 6119 . . . . . 6 dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵}
2117, 20eqtr4di 2798 . . . . 5 (𝐹 Fn {𝐴, 𝐵} → dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
2221adantl 482 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
2317adantl 482 . . . . . . 7 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → dom 𝐹 = {𝐴, 𝐵})
2423eleq2d 2826 . . . . . 6 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ dom 𝐹𝑥 ∈ {𝐴, 𝐵}))
25 vex 3435 . . . . . . . 8 𝑥 ∈ V
2625elpr 4590 . . . . . . 7 (𝑥 ∈ {𝐴, 𝐵} ↔ (𝑥 = 𝐴𝑥 = 𝐵))
271, 18fvpr1 7062 . . . . . . . . . . 11 (𝐴𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴) = (𝐹𝐴))
2827adantr 481 . . . . . . . . . 10 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴) = (𝐹𝐴))
2928eqcomd 2746 . . . . . . . . 9 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹𝐴) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴))
30 fveq2 6771 . . . . . . . . . 10 (𝑥 = 𝐴 → (𝐹𝑥) = (𝐹𝐴))
31 fveq2 6771 . . . . . . . . . 10 (𝑥 = 𝐴 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴))
3230, 31eqeq12d 2756 . . . . . . . . 9 (𝑥 = 𝐴 → ((𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) ↔ (𝐹𝐴) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴)))
3329, 32syl5ibrcom 246 . . . . . . . 8 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 = 𝐴 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
34 fnprb.b . . . . . . . . . . . 12 𝐵 ∈ V
3534, 19fvpr2 7064 . . . . . . . . . . 11 (𝐴𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵) = (𝐹𝐵))
3635adantr 481 . . . . . . . . . 10 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵) = (𝐹𝐵))
3736eqcomd 2746 . . . . . . . . 9 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹𝐵) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵))
38 fveq2 6771 . . . . . . . . . 10 (𝑥 = 𝐵 → (𝐹𝑥) = (𝐹𝐵))
39 fveq2 6771 . . . . . . . . . 10 (𝑥 = 𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵))
4038, 39eqeq12d 2756 . . . . . . . . 9 (𝑥 = 𝐵 → ((𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) ↔ (𝐹𝐵) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵)))
4137, 40syl5ibrcom 246 . . . . . . . 8 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 = 𝐵 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4233, 41jaod 856 . . . . . . 7 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ((𝑥 = 𝐴𝑥 = 𝐵) → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4326, 42syl5bi 241 . . . . . 6 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ {𝐴, 𝐵} → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4424, 43sylbid 239 . . . . 5 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ dom 𝐹 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4544ralrimiv 3109 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))
46 fnfun 6531 . . . . 5 (𝐹 Fn {𝐴, 𝐵} → Fun 𝐹)
471, 34, 18, 19funpr 6488 . . . . 5 (𝐴𝐵 → Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
48 eqfunfv 6911 . . . . 5 ((Fun 𝐹 ∧ Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}) → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ↔ (dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))))
4946, 47, 48syl2anr 597 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ↔ (dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))))
5022, 45, 49mpbir2and 710 . . 3 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
51 df-fn 6435 . . . . 5 ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵} ↔ (Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵}))
5247, 20, 51sylanblrc 590 . . . 4 (𝐴𝐵 → {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵})
53 fneq1 6522 . . . . 5 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} → (𝐹 Fn {𝐴, 𝐵} ↔ {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵}))
5453biimprd 247 . . . 4 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵} → 𝐹 Fn {𝐴, 𝐵}))
5552, 54mpan9 507 . . 3 ((𝐴𝐵𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}) → 𝐹 Fn {𝐴, 𝐵})
5650, 55impbida 798 . 2 (𝐴𝐵 → (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
5716, 56pm2.61ine 3030 1 (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
Colors of variables: wff setvar class
Syntax hints:  wb 205  wa 396  wo 844   = wceq 1542  wcel 2110  wne 2945  wral 3066  Vcvv 3431  {csn 4567  {cpr 4569  cop 4573  dom cdm 5590  Fun wfun 6426   Fn wfn 6427  cfv 6432
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1917  ax-6 1975  ax-7 2015  ax-8 2112  ax-9 2120  ax-10 2141  ax-11 2158  ax-12 2175  ax-ext 2711  ax-sep 5227  ax-nul 5234  ax-pr 5356
This theorem depends on definitions:  df-bi 206  df-an 397  df-or 845  df-3an 1088  df-tru 1545  df-fal 1555  df-ex 1787  df-nf 1791  df-sb 2072  df-mo 2542  df-eu 2571  df-clab 2718  df-cleq 2732  df-clel 2818  df-nfc 2891  df-ne 2946  df-ral 3071  df-rex 3072  df-reu 3073  df-rab 3075  df-v 3433  df-sbc 3721  df-csb 3838  df-dif 3895  df-un 3897  df-in 3899  df-ss 3909  df-nul 4263  df-if 4466  df-sn 4568  df-pr 4570  df-op 4574  df-uni 4846  df-br 5080  df-opab 5142  df-mpt 5163  df-id 5490  df-xp 5596  df-rel 5597  df-cnv 5598  df-co 5599  df-dm 5600  df-rn 5601  df-res 5602  df-ima 5603  df-iota 6390  df-fun 6434  df-fn 6435  df-f 6436  df-f1 6437  df-fo 6438  df-f1o 6439  df-fv 6440
This theorem is referenced by:  fntpb  7082  fnpr2g  7083  wrd2pr2op  14654
  Copyright terms: Public domain W3C validator