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

Theorem f1oprswap 6769
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 6766 . . . . 5 ((𝐴𝑉𝐴𝑉) → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
21anidms 567 . . . 4 (𝐴𝑉 → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
32ad2antrr 723 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
4 dfsn2 4575 . . . . . 6 {⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐴⟩}
5 opeq2 4806 . . . . . . 7 (𝐴 = 𝐵 → ⟨𝐴, 𝐴⟩ = ⟨𝐴, 𝐵⟩)
6 opeq1 4805 . . . . . . 7 (𝐴 = 𝐵 → ⟨𝐴, 𝐴⟩ = ⟨𝐵, 𝐴⟩)
75, 6preq12d 4678 . . . . . 6 (𝐴 = 𝐵 → {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
84, 7eqtrid 2791 . . . . 5 (𝐴 = 𝐵 → {⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
9 dfsn2 4575 . . . . . 6 {𝐴} = {𝐴, 𝐴}
10 preq2 4671 . . . . . 6 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
119, 10eqtrid 2791 . . . . 5 (𝐴 = 𝐵 → {𝐴} = {𝐴, 𝐵})
128, 11, 11f1oeq123d 6719 . . . 4 (𝐴 = 𝐵 → ({⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵}))
1312adantl 482 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → ({⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵}))
143, 13mpbid 231 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
15 simpll 764 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐴𝑉)
16 simplr 766 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐵𝑊)
17 simpr 485 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐴𝐵)
18 fnprg 6500 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ (𝐵𝑊𝐴𝑉) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
1915, 16, 16, 15, 17, 18syl221anc 1380 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
20 cnvsng 6131 . . . . . . . . 9 ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩} = {⟨𝐵, 𝐴⟩})
21 cnvsng 6131 . . . . . . . . . 10 ((𝐵𝑊𝐴𝑉) → {⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩})
2221ancoms 459 . . . . . . . . 9 ((𝐴𝑉𝐵𝑊) → {⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩})
2320, 22uneq12d 4099 . . . . . . . 8 ((𝐴𝑉𝐵𝑊) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐵, 𝐴⟩} ∪ {⟨𝐴, 𝐵⟩}))
24 uncom 4088 . . . . . . . 8 ({⟨𝐵, 𝐴⟩} ∪ {⟨𝐴, 𝐵⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
2523, 24eqtrdi 2795 . . . . . . 7 ((𝐴𝑉𝐵𝑊) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}))
2625adantr 481 . . . . . 6 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}))
27 df-pr 4565 . . . . . . . 8 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
2827cnveqi 5786 . . . . . . 7 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
29 cnvun 6051 . . . . . . 7 ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
3028, 29eqtri 2767 . . . . . 6 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
3126, 30, 273eqtr4g 2804 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
3231fneq1d 6535 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵}))
3319, 32mpbird 256 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
34 dff1o4 6733 . . 3 ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵} ↔ ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵} ∧ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵}))
3519, 33, 34sylanbrc 583 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
3614, 35pm2.61dane 3033 1 ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 205  wa 396   = wceq 1539  wcel 2107  wne 2944  cun 3886  {csn 4562  {cpr 4564  cop 4568  ccnv 5589   Fn wfn 6432  1-1-ontowf1o 6436
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 1914  ax-6 1972  ax-7 2012  ax-8 2109  ax-9 2117  ax-10 2138  ax-11 2155  ax-12 2172  ax-ext 2710  ax-sep 5224  ax-nul 5231  ax-pr 5353
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 2069  df-mo 2541  df-clab 2717  df-cleq 2731  df-clel 2817  df-ne 2945  df-ral 3070  df-rex 3071  df-rab 3074  df-v 3435  df-dif 3891  df-un 3893  df-in 3895  df-ss 3905  df-nul 4258  df-if 4461  df-sn 4563  df-pr 4565  df-op 4569  df-br 5076  df-opab 5138  df-id 5490  df-xp 5596  df-rel 5597  df-cnv 5598  df-co 5599  df-dm 5600  df-rn 5601  df-fun 6439  df-fn 6440  df-f 6441  df-f1 6442  df-fo 6443  df-f1o 6444
This theorem is referenced by:  fveqf1o  7184  f1ofvswap  7187  symg2bas  19009  subfacp1lem2a  33151
  Copyright terms: Public domain W3C validator