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

Theorem f1oprswap 6137
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 6134 . . . . 5 ((𝐴𝑉𝐴𝑉) → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
21anidms 676 . . . 4 (𝐴𝑉 → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
32ad2antrr 761 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
4 dfsn2 4161 . . . . . 6 {⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐴⟩}
5 opeq2 4371 . . . . . . 7 (𝐴 = 𝐵 → ⟨𝐴, 𝐴⟩ = ⟨𝐴, 𝐵⟩)
6 opeq1 4370 . . . . . . 7 (𝐴 = 𝐵 → ⟨𝐴, 𝐴⟩ = ⟨𝐵, 𝐴⟩)
75, 6preq12d 4246 . . . . . 6 (𝐴 = 𝐵 → {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
84, 7syl5eq 2667 . . . . 5 (𝐴 = 𝐵 → {⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
9 dfsn2 4161 . . . . . 6 {𝐴} = {𝐴, 𝐴}
10 preq2 4239 . . . . . 6 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
119, 10syl5eq 2667 . . . . 5 (𝐴 = 𝐵 → {𝐴} = {𝐴, 𝐵})
128, 11, 11f1oeq123d 6090 . . . 4 (𝐴 = 𝐵 → ({⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵}))
1312adantl 482 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → ({⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵}))
143, 13mpbid 222 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
15 simpll 789 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐴𝑉)
16 simplr 791 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐵𝑊)
17 simpr 477 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐴𝐵)
18 fnprg 5905 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ (𝐵𝑊𝐴𝑉) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
1915, 16, 16, 15, 17, 18syl221anc 1334 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
20 cnvsng 5580 . . . . . . . . 9 ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩} = {⟨𝐵, 𝐴⟩})
21 cnvsng 5580 . . . . . . . . . 10 ((𝐵𝑊𝐴𝑉) → {⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩})
2221ancoms 469 . . . . . . . . 9 ((𝐴𝑉𝐵𝑊) → {⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩})
2320, 22uneq12d 3746 . . . . . . . 8 ((𝐴𝑉𝐵𝑊) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐵, 𝐴⟩} ∪ {⟨𝐴, 𝐵⟩}))
24 uncom 3735 . . . . . . . 8 ({⟨𝐵, 𝐴⟩} ∪ {⟨𝐴, 𝐵⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
2523, 24syl6eq 2671 . . . . . . 7 ((𝐴𝑉𝐵𝑊) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}))
2625adantr 481 . . . . . 6 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}))
27 df-pr 4151 . . . . . . . 8 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
2827cnveqi 5257 . . . . . . 7 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
29 cnvun 5497 . . . . . . 7 ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
3028, 29eqtri 2643 . . . . . 6 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
3126, 30, 273eqtr4g 2680 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
3231fneq1d 5939 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵}))
3319, 32mpbird 247 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
34 dff1o4 6102 . . 3 ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵} ↔ ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵} ∧ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵}))
3519, 33, 34sylanbrc 697 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
3614, 35pm2.61dane 2877 1 ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 384   = wceq 1480  wcel 1987  wne 2790  cun 3553  {csn 4148  {cpr 4150  cop 4154  ccnv 5073   Fn wfn 5842  1-1-ontowf1o 5846
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-sep 4741  ax-nul 4749  ax-pr 4867
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3an 1038  df-tru 1483  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-ral 2912  df-rex 2913  df-rab 2916  df-v 3188  df-dif 3558  df-un 3560  df-in 3562  df-ss 3569  df-nul 3892  df-if 4059  df-sn 4149  df-pr 4151  df-op 4155  df-br 4614  df-opab 4674  df-id 4989  df-xp 5080  df-rel 5081  df-cnv 5082  df-co 5083  df-dm 5084  df-rn 5085  df-fun 5849  df-fn 5850  df-f 5851  df-f1 5852  df-fo 5853  df-f1o 5854
This theorem is referenced by:  fveqf1o  6511  symg2bas  17739  subfacp1lem2a  30870
  Copyright terms: Public domain W3C validator