Metamath Proof Explorer


Theorem cgsex2g

Description: Implicit substitution inference for general classes. (Contributed by NM, 26-Jul-1995)

Ref Expression
Hypotheses cgsex2g.1 ( ( 𝑥 = 𝐴𝑦 = 𝐵 ) → 𝜒 )
cgsex2g.2 ( 𝜒 → ( 𝜑𝜓 ) )
Assertion cgsex2g ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃ 𝑥𝑦 ( 𝜒𝜑 ) ↔ 𝜓 ) )

Proof

Step Hyp Ref Expression
1 cgsex2g.1 ( ( 𝑥 = 𝐴𝑦 = 𝐵 ) → 𝜒 )
2 cgsex2g.2 ( 𝜒 → ( 𝜑𝜓 ) )
3 2 biimpa ( ( 𝜒𝜑 ) → 𝜓 )
4 3 exlimivv ( ∃ 𝑥𝑦 ( 𝜒𝜑 ) → 𝜓 )
5 elisset ( 𝐴𝑉 → ∃ 𝑥 𝑥 = 𝐴 )
6 elisset ( 𝐵𝑊 → ∃ 𝑦 𝑦 = 𝐵 )
7 5 6 anim12i ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃ 𝑥 𝑥 = 𝐴 ∧ ∃ 𝑦 𝑦 = 𝐵 ) )
8 exdistrv ( ∃ 𝑥𝑦 ( 𝑥 = 𝐴𝑦 = 𝐵 ) ↔ ( ∃ 𝑥 𝑥 = 𝐴 ∧ ∃ 𝑦 𝑦 = 𝐵 ) )
9 7 8 sylibr ( ( 𝐴𝑉𝐵𝑊 ) → ∃ 𝑥𝑦 ( 𝑥 = 𝐴𝑦 = 𝐵 ) )
10 1 2eximi ( ∃ 𝑥𝑦 ( 𝑥 = 𝐴𝑦 = 𝐵 ) → ∃ 𝑥𝑦 𝜒 )
11 9 10 syl ( ( 𝐴𝑉𝐵𝑊 ) → ∃ 𝑥𝑦 𝜒 )
12 2 biimprcd ( 𝜓 → ( 𝜒𝜑 ) )
13 12 ancld ( 𝜓 → ( 𝜒 → ( 𝜒𝜑 ) ) )
14 13 2eximdv ( 𝜓 → ( ∃ 𝑥𝑦 𝜒 → ∃ 𝑥𝑦 ( 𝜒𝜑 ) ) )
15 11 14 syl5com ( ( 𝐴𝑉𝐵𝑊 ) → ( 𝜓 → ∃ 𝑥𝑦 ( 𝜒𝜑 ) ) )
16 4 15 impbid2 ( ( 𝐴𝑉𝐵𝑊 ) → ( ∃ 𝑥𝑦 ( 𝜒𝜑 ) ↔ 𝜓 ) )