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

Theorem fnprb 6513
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 𝐴𝐵. (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 6473 . . . . 5 (𝐹 Fn {𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩})
3 dfsn2 4223 . . . . . 6 {𝐴} = {𝐴, 𝐴}
43fneq2i 6024 . . . . 5 (𝐹 Fn {𝐴} ↔ 𝐹 Fn {𝐴, 𝐴})
5 dfsn2 4223 . . . . . 6 {⟨𝐴, (𝐹𝐴)⟩} = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩}
65eqeq2i 2663 . . . . 5 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩})
72, 4, 63bitr3i 290 . . . 4 (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩})
87a1i 11 . . 3 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩}))
9 preq2 4301 . . . 4 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
109fneq2d 6020 . . 3 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐴} ↔ 𝐹 Fn {𝐴, 𝐵}))
11 id 22 . . . . . 6 (𝐴 = 𝐵𝐴 = 𝐵)
12 fveq2 6229 . . . . . 6 (𝐴 = 𝐵 → (𝐹𝐴) = (𝐹𝐵))
1311, 12opeq12d 4441 . . . . 5 (𝐴 = 𝐵 → ⟨𝐴, (𝐹𝐴)⟩ = ⟨𝐵, (𝐹𝐵)⟩)
1413preq2d 4307 . . . 4 (𝐴 = 𝐵 → {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩} = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
1514eqeq2d 2661 . . 3 (𝐴 = 𝐵 → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐴, (𝐹𝐴)⟩} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
168, 10, 153bitr3d 298 . 2 (𝐴 = 𝐵 → (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
17 fndm 6028 . . . . . 6 (𝐹 Fn {𝐴, 𝐵} → dom 𝐹 = {𝐴, 𝐵})
18 fvex 6239 . . . . . . 7 (𝐹𝐴) ∈ V
19 fvex 6239 . . . . . . 7 (𝐹𝐵) ∈ V
2018, 19dmprop 5646 . . . . . 6 dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵}
2117, 20syl6eqr 2703 . . . . 5 (𝐹 Fn {𝐴, 𝐵} → dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
2221adantl 481 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
2317adantl 481 . . . . . . 7 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → dom 𝐹 = {𝐴, 𝐵})
2423eleq2d 2716 . . . . . 6 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ dom 𝐹𝑥 ∈ {𝐴, 𝐵}))
25 vex 3234 . . . . . . . 8 𝑥 ∈ V
2625elpr 4231 . . . . . . 7 (𝑥 ∈ {𝐴, 𝐵} ↔ (𝑥 = 𝐴𝑥 = 𝐵))
271, 18fvpr1 6497 . . . . . . . . . . 11 (𝐴𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴) = (𝐹𝐴))
2827adantr 480 . . . . . . . . . 10 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴) = (𝐹𝐴))
2928eqcomd 2657 . . . . . . . . 9 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹𝐴) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴))
30 fveq2 6229 . . . . . . . . . 10 (𝑥 = 𝐴 → (𝐹𝑥) = (𝐹𝐴))
31 fveq2 6229 . . . . . . . . . 10 (𝑥 = 𝐴 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴))
3230, 31eqeq12d 2666 . . . . . . . . 9 (𝑥 = 𝐴 → ((𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) ↔ (𝐹𝐴) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐴)))
3329, 32syl5ibrcom 237 . . . . . . . 8 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 = 𝐴 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
34 fnprb.b . . . . . . . . . . . 12 𝐵 ∈ V
3534, 19fvpr2 6498 . . . . . . . . . . 11 (𝐴𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵) = (𝐹𝐵))
3635adantr 480 . . . . . . . . . 10 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵) = (𝐹𝐵))
3736eqcomd 2657 . . . . . . . . 9 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹𝐵) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵))
38 fveq2 6229 . . . . . . . . . 10 (𝑥 = 𝐵 → (𝐹𝑥) = (𝐹𝐵))
39 fveq2 6229 . . . . . . . . . 10 (𝑥 = 𝐵 → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵))
4038, 39eqeq12d 2666 . . . . . . . . 9 (𝑥 = 𝐵 → ((𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥) ↔ (𝐹𝐵) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝐵)))
4137, 40syl5ibrcom 237 . . . . . . . 8 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 = 𝐵 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4233, 41jaod 394 . . . . . . 7 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ((𝑥 = 𝐴𝑥 = 𝐵) → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4326, 42syl5bi 232 . . . . . 6 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ {𝐴, 𝐵} → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4424, 43sylbid 230 . . . . 5 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝑥 ∈ dom 𝐹 → (𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥)))
4544ralrimiv 2994 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))
46 fnfun 6026 . . . . 5 (𝐹 Fn {𝐴, 𝐵} → Fun 𝐹)
471, 34, 18, 19funpr 5982 . . . . 5 (𝐴𝐵 → Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
48 eqfunfv 6356 . . . . 5 ((Fun 𝐹 ∧ Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}) → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ↔ (dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))))
4946, 47, 48syl2anr 494 . . . 4 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ↔ (dom 𝐹 = dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ ∀𝑥 ∈ dom 𝐹(𝐹𝑥) = ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}‘𝑥))))
5022, 45, 49mpbir2and 977 . . 3 ((𝐴𝐵𝐹 Fn {𝐴, 𝐵}) → 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
5120a1i 11 . . . . 5 (𝐴𝐵 → dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵})
52 df-fn 5929 . . . . 5 ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵} ↔ (Fun {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} ∧ dom {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} = {𝐴, 𝐵}))
5347, 51, 52sylanbrc 699 . . . 4 (𝐴𝐵 → {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵})
54 fneq1 6017 . . . . 5 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} → (𝐹 Fn {𝐴, 𝐵} ↔ {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵}))
5554biimprd 238 . . . 4 (𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} → ({⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩} Fn {𝐴, 𝐵} → 𝐹 Fn {𝐴, 𝐵}))
5653, 55mpan9 485 . . 3 ((𝐴𝐵𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}) → 𝐹 Fn {𝐴, 𝐵})
5750, 56impbida 895 . 2 (𝐴𝐵 → (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩}))
5816, 57pm2.61ine 2906 1 (𝐹 Fn {𝐴, 𝐵} ↔ 𝐹 = {⟨𝐴, (𝐹𝐴)⟩, ⟨𝐵, (𝐹𝐵)⟩})
Colors of variables: wff setvar class
Syntax hints:  wb 196  wo 382  wa 383   = wceq 1523  wcel 2030  wne 2823  wral 2941  Vcvv 3231  {csn 4210  {cpr 4212  cop 4216  dom cdm 5143  Fun wfun 5920   Fn wfn 5921  cfv 5926
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1762  ax-4 1777  ax-5 1879  ax-6 1945  ax-7 1981  ax-8 2032  ax-9 2039  ax-10 2059  ax-11 2074  ax-12 2087  ax-13 2282  ax-ext 2631  ax-sep 4814  ax-nul 4822  ax-pow 4873  ax-pr 4936
This theorem depends on definitions:  df-bi 197  df-or 384  df-an 385  df-3an 1056  df-tru 1526  df-ex 1745  df-nf 1750  df-sb 1938  df-eu 2502  df-mo 2503  df-clab 2638  df-cleq 2644  df-clel 2647  df-nfc 2782  df-ne 2824  df-ral 2946  df-rex 2947  df-reu 2948  df-rab 2950  df-v 3233  df-sbc 3469  df-csb 3567  df-dif 3610  df-un 3612  df-in 3614  df-ss 3621  df-nul 3949  df-if 4120  df-sn 4211  df-pr 4213  df-op 4217  df-uni 4469  df-br 4686  df-opab 4746  df-mpt 4763  df-id 5053  df-xp 5149  df-rel 5150  df-cnv 5151  df-co 5152  df-dm 5153  df-rn 5154  df-res 5155  df-ima 5156  df-iota 5889  df-fun 5928  df-fn 5929  df-f 5930  df-f1 5931  df-fo 5932  df-f1o 5933  df-fv 5934
This theorem is referenced by:  fntpb  6514  fnpr2g  6515  wrd2pr2op  13733
  Copyright terms: Public domain W3C validator