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

Theorem f1oprswap 6673
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 6670 . . . . 5 ((𝐴𝑉𝐴𝑉) → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
21anidms 570 . . . 4 (𝐴𝑉 → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
32ad2antrr 726 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → {⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴})
4 dfsn2 4539 . . . . . 6 {⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐴⟩}
5 opeq2 4771 . . . . . . 7 (𝐴 = 𝐵 → ⟨𝐴, 𝐴⟩ = ⟨𝐴, 𝐵⟩)
6 opeq1 4769 . . . . . . 7 (𝐴 = 𝐵 → ⟨𝐴, 𝐴⟩ = ⟨𝐵, 𝐴⟩)
75, 6preq12d 4642 . . . . . 6 (𝐴 = 𝐵 → {⟨𝐴, 𝐴⟩, ⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
84, 7syl5eq 2786 . . . . 5 (𝐴 = 𝐵 → {⟨𝐴, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
9 dfsn2 4539 . . . . . 6 {𝐴} = {𝐴, 𝐴}
10 preq2 4635 . . . . . 6 (𝐴 = 𝐵 → {𝐴, 𝐴} = {𝐴, 𝐵})
119, 10syl5eq 2786 . . . . 5 (𝐴 = 𝐵 → {𝐴} = {𝐴, 𝐵})
128, 11, 11f1oeq123d 6624 . . . 4 (𝐴 = 𝐵 → ({⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵}))
1312adantl 485 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → ({⟨𝐴, 𝐴⟩}:{𝐴}–1-1-onto→{𝐴} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵}))
143, 13mpbid 235 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴 = 𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
15 simpll 767 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐴𝑉)
16 simplr 769 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐵𝑊)
17 simpr 488 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → 𝐴𝐵)
18 fnprg 6408 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ (𝐵𝑊𝐴𝑉) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
1915, 16, 16, 15, 17, 18syl221anc 1382 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
20 cnvsng 6065 . . . . . . . . 9 ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩} = {⟨𝐵, 𝐴⟩})
21 cnvsng 6065 . . . . . . . . . 10 ((𝐵𝑊𝐴𝑉) → {⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩})
2221ancoms 462 . . . . . . . . 9 ((𝐴𝑉𝐵𝑊) → {⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩})
2320, 22uneq12d 4064 . . . . . . . 8 ((𝐴𝑉𝐵𝑊) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐵, 𝐴⟩} ∪ {⟨𝐴, 𝐵⟩}))
24 uncom 4053 . . . . . . . 8 ({⟨𝐵, 𝐴⟩} ∪ {⟨𝐴, 𝐵⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
2523, 24eqtrdi 2790 . . . . . . 7 ((𝐴𝑉𝐵𝑊) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}))
2625adantr 484 . . . . . 6 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}))
27 df-pr 4529 . . . . . . . 8 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
2827cnveqi 5727 . . . . . . 7 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
29 cnvun 5985 . . . . . . 7 ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩}) = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
3028, 29eqtri 2762 . . . . . 6 {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = ({⟨𝐴, 𝐵⟩} ∪ {⟨𝐵, 𝐴⟩})
3126, 30, 273eqtr4g 2799 . . . . 5 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} = {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩})
3231fneq1d 6441 . . . 4 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵} ↔ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵}))
3319, 32mpbird 260 . . 3 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵})
34 dff1o4 6638 . . 3 ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵} ↔ ({⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵} ∧ {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩} Fn {𝐴, 𝐵}))
3519, 33, 34sylanbrc 586 . 2 (((𝐴𝑉𝐵𝑊) ∧ 𝐴𝐵) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
3614, 35pm2.61dane 3022 1 ((𝐴𝑉𝐵𝑊) → {⟨𝐴, 𝐵⟩, ⟨𝐵, 𝐴⟩}:{𝐴, 𝐵}–1-1-onto→{𝐴, 𝐵})
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 209  wa 399   = wceq 1542  wcel 2114  wne 2935  cun 3851  {csn 4526  {cpr 4528  cop 4532  ccnv 5534   Fn wfn 6344  1-1-ontowf1o 6348
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1802  ax-4 1816  ax-5 1917  ax-6 1975  ax-7 2020  ax-8 2116  ax-9 2124  ax-10 2145  ax-11 2162  ax-12 2179  ax-ext 2711  ax-sep 5177  ax-nul 5184  ax-pr 5306
This theorem depends on definitions:  df-bi 210  df-an 400  df-or 847  df-3an 1090  df-tru 1545  df-fal 1555  df-ex 1787  df-nf 1791  df-sb 2075  df-mo 2541  df-eu 2571  df-clab 2718  df-cleq 2731  df-clel 2812  df-nfc 2882  df-ne 2936  df-ral 3059  df-rex 3060  df-rab 3063  df-v 3402  df-dif 3856  df-un 3858  df-in 3860  df-ss 3870  df-nul 4222  df-if 4425  df-sn 4527  df-pr 4529  df-op 4533  df-br 5041  df-opab 5103  df-id 5439  df-xp 5541  df-rel 5542  df-cnv 5543  df-co 5544  df-dm 5545  df-rn 5546  df-fun 6351  df-fn 6352  df-f 6353  df-f1 6354  df-fo 6355  df-f1o 6356
This theorem is referenced by:  fveqf1o  7082  f1ofvswap  7085  symg2bas  18651  subfacp1lem2a  32725
  Copyright terms: Public domain W3C validator