Metamath Proof Explorer


Theorem cgsex4g

Description: An implicit substitution inference for 4 general classes. (Contributed by NM, 5-Aug-1995) Avoid ax-10 , ax-11 . (Revised by Gino Giotto, 28-Jun-2024)

Ref Expression
Hypotheses cgsex4g.1 x = A y = B z = C w = D χ
cgsex4g.2 χ φ ψ
Assertion cgsex4g A R B S C R D S x y z w χ φ ψ

Proof

Step Hyp Ref Expression
1 cgsex4g.1 x = A y = B z = C w = D χ
2 cgsex4g.2 χ φ ψ
3 2 biimpa χ φ ψ
4 3 exlimivv z w χ φ ψ
5 4 exlimivv x y z w χ φ ψ
6 elisset A R x x = A
7 elisset B S y y = B
8 6 7 anim12i A R B S x x = A y y = B
9 exdistrv x y x = A y = B x x = A y y = B
10 8 9 sylibr A R B S x y x = A y = B
11 elisset C R z z = C
12 elisset D S w w = D
13 11 12 anim12i C R D S z z = C w w = D
14 exdistrv z w z = C w = D z z = C w w = D
15 13 14 sylibr C R D S z w z = C w = D
16 10 15 anim12i A R B S C R D S x y x = A y = B z w z = C w = D
17 eqeq1 z = v z = C v = C
18 17 anbi1d z = v z = C w = D v = C w = D
19 18 anbi2d z = v x = A y = B z = C w = D x = A y = B v = C w = D
20 19 exbidv z = v w x = A y = B z = C w = D w x = A y = B v = C w = D
21 20 notbid z = v ¬ w x = A y = B z = C w = D ¬ w x = A y = B v = C w = D
22 21 alcomiw y z ¬ w x = A y = B z = C w = D z y ¬ w x = A y = B z = C w = D
23 eqeq1 y = v y = B v = B
24 23 anbi2d y = v x = A y = B x = A v = B
25 24 anbi1d y = v x = A y = B z = C w = D x = A v = B z = C w = D
26 25 exbidv y = v w x = A y = B z = C w = D w x = A v = B z = C w = D
27 26 notbid y = v ¬ w x = A y = B z = C w = D ¬ w x = A v = B z = C w = D
28 27 alcomiw z y ¬ w x = A y = B z = C w = D y z ¬ w x = A y = B z = C w = D
29 22 28 impbii y z ¬ w x = A y = B z = C w = D z y ¬ w x = A y = B z = C w = D
30 29 notbii ¬ y z ¬ w x = A y = B z = C w = D ¬ z y ¬ w x = A y = B z = C w = D
31 2exnaln y z w x = A y = B z = C w = D ¬ y z ¬ w x = A y = B z = C w = D
32 2exnaln z y w x = A y = B z = C w = D ¬ z y ¬ w x = A y = B z = C w = D
33 30 31 32 3bitr4i y z w x = A y = B z = C w = D z y w x = A y = B z = C w = D
34 33 exbii x y z w x = A y = B z = C w = D x z y w x = A y = B z = C w = D
35 4exdistrv x z y w x = A y = B z = C w = D x y x = A y = B z w z = C w = D
36 34 35 bitri x y z w x = A y = B z = C w = D x y x = A y = B z w z = C w = D
37 16 36 sylibr A R B S C R D S x y z w x = A y = B z = C w = D
38 1 2eximi z w x = A y = B z = C w = D z w χ
39 38 2eximi x y z w x = A y = B z = C w = D x y z w χ
40 37 39 syl A R B S C R D S x y z w χ
41 2 biimprcd ψ χ φ
42 41 ancld ψ χ χ φ
43 42 2eximdv ψ z w χ z w χ φ
44 43 2eximdv ψ x y z w χ x y z w χ φ
45 40 44 syl5com A R B S C R D S ψ x y z w χ φ
46 5 45 impbid2 A R B S C R D S x y z w χ φ ψ