Metamath Proof Explorer


Theorem elabgt

Description: Membership in a class abstraction, using implicit substitution. (Closed theorem version of elabg .) (Contributed by NM, 7-Nov-2005) (Proof shortened by Andrew Salmon, 8-Jun-2011) Reduce axiom usage. (Revised by Gino Giotto, 12-Oct-2024)

Ref Expression
Assertion elabgt ( ( 𝐴𝐵 ∧ ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) ) → ( 𝐴 ∈ { 𝑥𝜑 } ↔ 𝜓 ) )

Proof

Step Hyp Ref Expression
1 elab6g ( 𝐴𝐵 → ( 𝐴 ∈ { 𝑥𝜑 } ↔ ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) ) )
2 1 adantr ( ( 𝐴𝐵 ∧ ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) ) → ( 𝐴 ∈ { 𝑥𝜑 } ↔ ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) ) )
3 elisset ( 𝐴𝐵 → ∃ 𝑥 𝑥 = 𝐴 )
4 biimp ( ( 𝜑𝜓 ) → ( 𝜑𝜓 ) )
5 4 imim3i ( ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) → ( ( 𝑥 = 𝐴𝜑 ) → ( 𝑥 = 𝐴𝜓 ) ) )
6 5 al2imi ( ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) → ( ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) → ∀ 𝑥 ( 𝑥 = 𝐴𝜓 ) ) )
7 19.23v ( ∀ 𝑥 ( 𝑥 = 𝐴𝜓 ) ↔ ( ∃ 𝑥 𝑥 = 𝐴𝜓 ) )
8 6 7 syl6ib ( ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) → ( ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) → ( ∃ 𝑥 𝑥 = 𝐴𝜓 ) ) )
9 8 com3r ( ∃ 𝑥 𝑥 = 𝐴 → ( ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) → ( ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) → 𝜓 ) ) )
10 biimpr ( ( 𝜑𝜓 ) → ( 𝜓𝜑 ) )
11 10 imim2i ( ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) → ( 𝑥 = 𝐴 → ( 𝜓𝜑 ) ) )
12 11 alimi ( ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) → ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜓𝜑 ) ) )
13 bi2.04 ( ( 𝑥 = 𝐴 → ( 𝜓𝜑 ) ) ↔ ( 𝜓 → ( 𝑥 = 𝐴𝜑 ) ) )
14 13 albii ( ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜓𝜑 ) ) ↔ ∀ 𝑥 ( 𝜓 → ( 𝑥 = 𝐴𝜑 ) ) )
15 19.21v ( ∀ 𝑥 ( 𝜓 → ( 𝑥 = 𝐴𝜑 ) ) ↔ ( 𝜓 → ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) ) )
16 14 15 sylbb ( ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜓𝜑 ) ) → ( 𝜓 → ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) ) )
17 12 16 syl ( ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) → ( 𝜓 → ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) ) )
18 17 a1i ( ∃ 𝑥 𝑥 = 𝐴 → ( ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) → ( 𝜓 → ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) ) ) )
19 9 18 impbidd ( ∃ 𝑥 𝑥 = 𝐴 → ( ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) → ( ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) ↔ 𝜓 ) ) )
20 3 19 syl ( 𝐴𝐵 → ( ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) → ( ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) ↔ 𝜓 ) ) )
21 20 imp ( ( 𝐴𝐵 ∧ ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) ) → ( ∀ 𝑥 ( 𝑥 = 𝐴𝜑 ) ↔ 𝜓 ) )
22 2 21 bitrd ( ( 𝐴𝐵 ∧ ∀ 𝑥 ( 𝑥 = 𝐴 → ( 𝜑𝜓 ) ) ) → ( 𝐴 ∈ { 𝑥𝜑 } ↔ 𝜓 ) )