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

Theorem f1oprswap 6321
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 6318 . . . . 5 ((𝐴𝑉𝐴𝑉) → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
21anidms 556 . . . 4 (𝐴𝑉 → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
32ad2antrr 705 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
4 dfsn2 4329 . . . . . 6 {⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐴⟩}
5 opeq2 4540 . . . . . . 7 (𝐴 = 𝐵 → ⟨𝐴, 𝐴⟩ = ⟨𝐴, 𝐵⟩)
6 opeq1 4539 . . . . . . 7 (𝐴 = 𝐵 → ⟨𝐴, 𝐴⟩ = ⟨𝐵, 𝐴⟩)
75, 6preq12d 4412 . . . . . 6 (𝐴 = 𝐵 → {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
84, 7syl5eq 2817 . . . . 5 (𝐴 = 𝐵 → {⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
9 dfsn2 4329 . . . . . 6 {𝐴} = {𝐴, 𝐴}
10 preq2 4405 . . . . . 6 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
119, 10syl5eq 2817 . . . . 5 (𝐴 = 𝐵 → {𝐴} = {𝐴, 𝐵})
128, 11, 11f1oeq123d 6274 . . . 4 (𝐴 = 𝐵 → ({⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵}))
1312adantl 467 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → ({⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵}))
143, 13mpbid 222 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
15 simpll 750 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐴𝑉)
16 simplr 752 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐵𝑊)
17 simpr 471 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐴𝐵)
18 fnprg 6088 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ (𝐵𝑊𝐴𝑉) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
1915, 16, 16, 15, 17, 18syl221anc 1487 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
20 cnvsng 5758 . . . . . . . . 9 ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩} = {⟨𝐵, 𝐴⟩})
21 cnvsng 5758 . . . . . . . . . 10 ((𝐵𝑊𝐴𝑉) → {⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩})
2221ancoms 455 . . . . . . . . 9 ((𝐴𝑉𝐵𝑊) → {⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩})
2320, 22uneq12d 3919 . . . . . . . 8 ((𝐴𝑉𝐵𝑊) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐵, 𝐴⟩} ∪ {⟨𝐴, 𝐵⟩}))
24 uncom 3908 . . . . . . . 8 ({⟨𝐵, 𝐴⟩} ∪ {⟨𝐴, 𝐵⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
2523, 24syl6eq 2821 . . . . . . 7 ((𝐴𝑉𝐵𝑊) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}))
2625adantr 466 . . . . . 6 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}))
27 df-pr 4319 . . . . . . . 8 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
2827cnveqi 5435 . . . . . . 7 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
29 cnvun 5679 . . . . . . 7 ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
3028, 29eqtri 2793 . . . . . 6 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
3126, 30, 273eqtr4g 2830 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
3231fneq1d 6121 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵}))
3319, 32mpbird 247 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
34 dff1o4 6286 . . 3 ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵} ↔ ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵} ∧ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵}))
3519, 33, 34sylanbrc 572 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
3614, 35pm2.61dane 3030 1 ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wa 382   = wceq 1631  wcel 2145  wne 2943  cun 3721  {csn 4316  {cpr 4318  cop 4322  ccnv 5248   Fn wfn 6026  1-1-ontowf1o 6030
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1870  ax-4 1885  ax-5 1991  ax-6 2057  ax-7 2093  ax-9 2154  ax-10 2174  ax-11 2190  ax-12 2203  ax-13 2408  ax-ext 2751  ax-sep 4915  ax-nul 4923  ax-pr 5034
This theorem depends on definitions:  df-bi 197  df-an 383  df-or 835  df-3an 1073  df-tru 1634  df-ex 1853  df-nf 1858  df-sb 2050  df-eu 2622  df-mo 2623  df-clab 2758  df-cleq 2764  df-clel 2767  df-nfc 2902  df-ne 2944  df-ral 3066  df-rex 3067  df-rab 3070  df-v 3353  df-dif 3726  df-un 3728  df-in 3730  df-ss 3737  df-nul 4064  df-if 4226  df-sn 4317  df-pr 4319  df-op 4323  df-br 4787  df-opab 4847  df-id 5157  df-xp 5255  df-rel 5256  df-cnv 5257  df-co 5258  df-dm 5259  df-rn 5260  df-fun 6033  df-fn 6034  df-f 6035  df-f1 6036  df-fo 6037  df-f1o 6038
This theorem is referenced by:  fveqf1o  6700  symg2bas  18025  subfacp1lem2a  31500
  Copyright terms: Public domain W3C validator