Metamath Proof Explorer


Theorem bj-raldifsn

Description: All elements in a set satisfy a given property if and only if all but one satisfy that property and that one also does. Typically, this can be used for characterizations that are proved using different methods for a given element and for all others, for instance zero and nonzero numbers, or the empty set and nonempty sets. (Contributed by BJ, 7-Dec-2021)

Ref Expression
Hypothesis bj-raldifsn.is
|- ( x = B -> ( ph <-> ps ) )
Assertion bj-raldifsn
|- ( B e. A -> ( A. x e. A ph <-> ( A. x e. ( A \ { B } ) ph /\ ps ) ) )

Proof

Step Hyp Ref Expression
1 bj-raldifsn.is
 |-  ( x = B -> ( ph <-> ps ) )
2 difsnid
 |-  ( B e. A -> ( ( A \ { B } ) u. { B } ) = A )
3 2 eqcomd
 |-  ( B e. A -> A = ( ( A \ { B } ) u. { B } ) )
4 3 raleqdv
 |-  ( B e. A -> ( A. x e. A ph <-> A. x e. ( ( A \ { B } ) u. { B } ) ph ) )
5 ralunb
 |-  ( A. x e. ( ( A \ { B } ) u. { B } ) ph <-> ( A. x e. ( A \ { B } ) ph /\ A. x e. { B } ph ) )
6 5 a1i
 |-  ( B e. A -> ( A. x e. ( ( A \ { B } ) u. { B } ) ph <-> ( A. x e. ( A \ { B } ) ph /\ A. x e. { B } ph ) ) )
7 1 ralsng
 |-  ( B e. A -> ( A. x e. { B } ph <-> ps ) )
8 7 anbi2d
 |-  ( B e. A -> ( ( A. x e. ( A \ { B } ) ph /\ A. x e. { B } ph ) <-> ( A. x e. ( A \ { B } ) ph /\ ps ) ) )
9 4 6 8 3bitrd
 |-  ( B e. A -> ( A. x e. A ph <-> ( A. x e. ( A \ { B } ) ph /\ ps ) ) )