Metamath Proof Explorer


Theorem rababg

Description: Condition when restricted class is equal to unrestricted class. (Contributed by RP, 13-Aug-2020)

Ref Expression
Assertion rababg ( ∀ 𝑥 ( 𝜑𝑥𝐴 ) ↔ { 𝑥𝐴𝜑 } = { 𝑥𝜑 } )

Proof

Step Hyp Ref Expression
1 ancrb ( ( 𝜑𝑥𝐴 ) ↔ ( 𝜑 → ( 𝑥𝐴𝜑 ) ) )
2 1 albii ( ∀ 𝑥 ( 𝜑𝑥𝐴 ) ↔ ∀ 𝑥 ( 𝜑 → ( 𝑥𝐴𝜑 ) ) )
3 nfv 𝑦 ( 𝜑 → ( 𝑥𝐴𝜑 ) )
4 nfsab1 𝑥 𝑦 ∈ { 𝑥𝜑 }
5 nfrab1 𝑥 { 𝑥𝐴𝜑 }
6 5 nfcri 𝑥 𝑦 ∈ { 𝑥𝐴𝜑 }
7 4 6 nfim 𝑥 ( 𝑦 ∈ { 𝑥𝜑 } → 𝑦 ∈ { 𝑥𝐴𝜑 } )
8 abid ( 𝑥 ∈ { 𝑥𝜑 } ↔ 𝜑 )
9 eleq1w ( 𝑥 = 𝑦 → ( 𝑥 ∈ { 𝑥𝜑 } ↔ 𝑦 ∈ { 𝑥𝜑 } ) )
10 8 9 bitr3id ( 𝑥 = 𝑦 → ( 𝜑𝑦 ∈ { 𝑥𝜑 } ) )
11 rabid ( 𝑥 ∈ { 𝑥𝐴𝜑 } ↔ ( 𝑥𝐴𝜑 ) )
12 eleq1w ( 𝑥 = 𝑦 → ( 𝑥 ∈ { 𝑥𝐴𝜑 } ↔ 𝑦 ∈ { 𝑥𝐴𝜑 } ) )
13 11 12 bitr3id ( 𝑥 = 𝑦 → ( ( 𝑥𝐴𝜑 ) ↔ 𝑦 ∈ { 𝑥𝐴𝜑 } ) )
14 10 13 imbi12d ( 𝑥 = 𝑦 → ( ( 𝜑 → ( 𝑥𝐴𝜑 ) ) ↔ ( 𝑦 ∈ { 𝑥𝜑 } → 𝑦 ∈ { 𝑥𝐴𝜑 } ) ) )
15 3 7 14 cbvalv1 ( ∀ 𝑥 ( 𝜑 → ( 𝑥𝐴𝜑 ) ) ↔ ∀ 𝑦 ( 𝑦 ∈ { 𝑥𝜑 } → 𝑦 ∈ { 𝑥𝐴𝜑 } ) )
16 eqss ( { 𝑥𝐴𝜑 } = { 𝑥𝜑 } ↔ ( { 𝑥𝐴𝜑 } ⊆ { 𝑥𝜑 } ∧ { 𝑥𝜑 } ⊆ { 𝑥𝐴𝜑 } ) )
17 rabssab { 𝑥𝐴𝜑 } ⊆ { 𝑥𝜑 }
18 17 biantrur ( { 𝑥𝜑 } ⊆ { 𝑥𝐴𝜑 } ↔ ( { 𝑥𝐴𝜑 } ⊆ { 𝑥𝜑 } ∧ { 𝑥𝜑 } ⊆ { 𝑥𝐴𝜑 } ) )
19 dfss2 ( { 𝑥𝜑 } ⊆ { 𝑥𝐴𝜑 } ↔ ∀ 𝑦 ( 𝑦 ∈ { 𝑥𝜑 } → 𝑦 ∈ { 𝑥𝐴𝜑 } ) )
20 16 18 19 3bitr2ri ( ∀ 𝑦 ( 𝑦 ∈ { 𝑥𝜑 } → 𝑦 ∈ { 𝑥𝐴𝜑 } ) ↔ { 𝑥𝐴𝜑 } = { 𝑥𝜑 } )
21 2 15 20 3bitri ( ∀ 𝑥 ( 𝜑𝑥𝐴 ) ↔ { 𝑥𝐴𝜑 } = { 𝑥𝜑 } )