ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  dcdifsnid Unicode version

Theorem dcdifsnid 6354
Description: If we remove a single element from a set with decidable equality then put it back in, we end up with the original set. This strengthens difsnss 3632 from subset to equality but the proof relies on equality being decidable. (Contributed by Jim Kingdon, 17-Jun-2022.)
Assertion
Ref Expression
dcdifsnid  |-  ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  ->  (
( A  \  { B } )  u.  { B } )  =  A )
Distinct variable groups:    x, A, y   
x, B, y

Proof of Theorem dcdifsnid
Dummy variable  z is distinct from all other variables.
StepHypRef Expression
1 difsnss 3632 . . 3  |-  ( B  e.  A  ->  (
( A  \  { B } )  u.  { B } )  C_  A
)
21adantl 273 . 2  |-  ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  ->  (
( A  \  { B } )  u.  { B } )  C_  A
)
3 simpr 109 . . . . . . 7  |-  ( ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A
)  /\  z  e.  A )  /\  z  =  B )  ->  z  =  B )
4 velsn 3510 . . . . . . 7  |-  ( z  e.  { B }  <->  z  =  B )
53, 4sylibr 133 . . . . . 6  |-  ( ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A
)  /\  z  e.  A )  /\  z  =  B )  ->  z  e.  { B } )
6 elun2 3210 . . . . . 6  |-  ( z  e.  { B }  ->  z  e.  ( ( A  \  { B } )  u.  { B } ) )
75, 6syl 14 . . . . 5  |-  ( ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A
)  /\  z  e.  A )  /\  z  =  B )  ->  z  e.  ( ( A  \  { B } )  u. 
{ B } ) )
8 simplr 502 . . . . . . 7  |-  ( ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A
)  /\  z  e.  A )  /\  -.  z  =  B )  ->  z  e.  A )
9 simpr 109 . . . . . . . 8  |-  ( ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A
)  /\  z  e.  A )  /\  -.  z  =  B )  ->  -.  z  =  B )
109, 4sylnibr 649 . . . . . . 7  |-  ( ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A
)  /\  z  e.  A )  /\  -.  z  =  B )  ->  -.  z  e.  { B } )
118, 10eldifd 3047 . . . . . 6  |-  ( ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A
)  /\  z  e.  A )  /\  -.  z  =  B )  ->  z  e.  ( A 
\  { B }
) )
12 elun1 3209 . . . . . 6  |-  ( z  e.  ( A  \  { B } )  -> 
z  e.  ( ( A  \  { B } )  u.  { B } ) )
1311, 12syl 14 . . . . 5  |-  ( ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A
)  /\  z  e.  A )  /\  -.  z  =  B )  ->  z  e.  ( ( A  \  { B } )  u.  { B } ) )
14 simpll 501 . . . . . . 7  |-  ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  /\  z  e.  A
)  ->  A. x  e.  A  A. y  e.  A DECID  x  =  y
)
15 simpr 109 . . . . . . . 8  |-  ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  /\  z  e.  A
)  ->  z  e.  A )
16 simplr 502 . . . . . . . 8  |-  ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  /\  z  e.  A
)  ->  B  e.  A )
17 equequ1 1671 . . . . . . . . . 10  |-  ( x  =  z  ->  (
x  =  y  <->  z  =  y ) )
1817dcbid 806 . . . . . . . . 9  |-  ( x  =  z  ->  (DECID  x  =  y  <-> DECID  z  =  y )
)
19 eqeq2 2124 . . . . . . . . . 10  |-  ( y  =  B  ->  (
z  =  y  <->  z  =  B ) )
2019dcbid 806 . . . . . . . . 9  |-  ( y  =  B  ->  (DECID  z  =  y  <-> DECID  z  =  B )
)
2118, 20rspc2v 2772 . . . . . . . 8  |-  ( ( z  e.  A  /\  B  e.  A )  ->  ( A. x  e.  A  A. y  e.  A DECID  x  =  y  -> DECID  z  =  B ) )
2215, 16, 21syl2anc 406 . . . . . . 7  |-  ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  /\  z  e.  A
)  ->  ( A. x  e.  A  A. y  e.  A DECID  x  =  y  -> DECID 
z  =  B ) )
2314, 22mpd 13 . . . . . 6  |-  ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  /\  z  e.  A
)  -> DECID  z  =  B
)
24 exmiddc 804 . . . . . 6  |-  (DECID  z  =  B  ->  ( z  =  B  \/  -.  z  =  B )
)
2523, 24syl 14 . . . . 5  |-  ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  /\  z  e.  A
)  ->  ( z  =  B  \/  -.  z  =  B )
)
267, 13, 25mpjaodan 770 . . . 4  |-  ( ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  /\  z  e.  A
)  ->  z  e.  ( ( A  \  { B } )  u. 
{ B } ) )
2726ex 114 . . 3  |-  ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  ->  (
z  e.  A  -> 
z  e.  ( ( A  \  { B } )  u.  { B } ) ) )
2827ssrdv 3069 . 2  |-  ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  ->  A  C_  ( ( A  \  { B } )  u. 
{ B } ) )
292, 28eqssd 3080 1  |-  ( ( A. x  e.  A  A. y  e.  A DECID  x  =  y  /\  B  e.  A )  ->  (
( A  \  { B } )  u.  { B } )  =  A )
Colors of variables: wff set class
Syntax hints:   -. wn 3    -> wi 4    /\ wa 103    \/ wo 680  DECID wdc 802    = wceq 1314    e. wcel 1463   A.wral 2390    \ cdif 3034    u. cun 3035    C_ wss 3037   {csn 3493
This theorem was proved from axioms:  ax-1 5  ax-2 6  ax-mp 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 586  ax-in2 587  ax-io 681  ax-5 1406  ax-7 1407  ax-gen 1408  ax-ie1 1452  ax-ie2 1453  ax-8 1465  ax-10 1466  ax-11 1467  ax-i12 1468  ax-bndl 1469  ax-4 1470  ax-17 1489  ax-i9 1493  ax-ial 1497  ax-i5r 1498  ax-ext 2097
This theorem depends on definitions:  df-bi 116  df-dc 803  df-tru 1317  df-nf 1420  df-sb 1719  df-clab 2102  df-cleq 2108  df-clel 2111  df-nfc 2244  df-ral 2395  df-v 2659  df-dif 3039  df-un 3041  df-in 3043  df-ss 3050  df-sn 3499
This theorem is referenced by:  fnsnsplitdc  6355  nndifsnid  6357  fidifsnid  6718  undifdc  6765
  Copyright terms: Public domain W3C validator