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

Theorem f1oprswap 6743
Description: A two-element swap is a bijection on a pair. (Contributed by Mario Carneiro, 23-Jan-2015.)
Assertion
Ref Expression
f1oprswap ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})

Proof of Theorem f1oprswap
StepHypRef Expression
1 f1osng 6740 . . . . 5 ((𝐴𝑉𝐴𝑉) → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
21anidms 566 . . . 4 (𝐴𝑉 → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
32ad2antrr 722 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
4 dfsn2 4571 . . . . . 6 {⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐴⟩}
5 opeq2 4802 . . . . . . 7 (𝐴 = 𝐵 → ⟨𝐴, 𝐴⟩ = ⟨𝐴, 𝐵⟩)
6 opeq1 4801 . . . . . . 7 (𝐴 = 𝐵 → ⟨𝐴, 𝐴⟩ = ⟨𝐵, 𝐴⟩)
75, 6preq12d 4674 . . . . . 6 (𝐴 = 𝐵 → {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
84, 7eqtrid 2790 . . . . 5 (𝐴 = 𝐵 → {⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
9 dfsn2 4571 . . . . . 6 {𝐴} = {𝐴, 𝐴}
10 preq2 4667 . . . . . 6 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
119, 10eqtrid 2790 . . . . 5 (𝐴 = 𝐵 → {𝐴} = {𝐴, 𝐵})
128, 11, 11f1oeq123d 6694 . . . 4 (𝐴 = 𝐵 → ({⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵}))
1312adantl 481 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → ({⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵}))
143, 13mpbid 231 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
15 simpll 763 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐴𝑉)
16 simplr 765 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐵𝑊)
17 simpr 484 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐴𝐵)
18 fnprg 6477 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ (𝐵𝑊𝐴𝑉) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
1915, 16, 16, 15, 17, 18syl221anc 1379 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
20 cnvsng 6115 . . . . . . . . 9 ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩} = {⟨𝐵, 𝐴⟩})
21 cnvsng 6115 . . . . . . . . . 10 ((𝐵𝑊𝐴𝑉) → {⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩})
2221ancoms 458 . . . . . . . . 9 ((𝐴𝑉𝐵𝑊) → {⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩})
2320, 22uneq12d 4094 . . . . . . . 8 ((𝐴𝑉𝐵𝑊) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐵, 𝐴⟩} ∪ {⟨𝐴, 𝐵⟩}))
24 uncom 4083 . . . . . . . 8 ({⟨𝐵, 𝐴⟩} ∪ {⟨𝐴, 𝐵⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
2523, 24eqtrdi 2795 . . . . . . 7 ((𝐴𝑉𝐵𝑊) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}))
2625adantr 480 . . . . . 6 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}))
27 df-pr 4561 . . . . . . . 8 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
2827cnveqi 5772 . . . . . . 7 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
29 cnvun 6035 . . . . . . 7 ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
3028, 29eqtri 2766 . . . . . 6 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
3126, 30, 273eqtr4g 2804 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
3231fneq1d 6510 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵}))
3319, 32mpbird 256 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
34 dff1o4 6708 . . 3 ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵} ↔ ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵} ∧ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵}))
3519, 33, 34sylanbrc 582 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
3614, 35pm2.61dane 3031 1 ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 395   = wceq 1539  wcel 2108  wne 2942  cun 3881  {csn 4558  {cpr 4560  cop 4564  ccnv 5579   Fn wfn 6413  1-1-ontowf1o 6417
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-rab 3072  df-v 3424  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-br 5071  df-opab 5133  df-id 5480  df-xp 5586  df-rel 5587  df-cnv 5588  df-co 5589  df-dm 5590  df-rn 5591  df-fun 6420  df-fn 6421  df-f 6422  df-f1 6423  df-fo 6424  df-f1o 6425
This theorem is referenced by:  fveqf1o  7155  f1ofvswap  7158  symg2bas  18915  subfacp1lem2a  33042
  Copyright terms: Public domain W3C validator