Metamath Proof Explorer


Theorem wl-sbcom2d

Description: Version of sbcom2 with a context, and distinct variable conditions replaced with distinctors. (Contributed by Wolf Lammen, 4-Aug-2019)

Ref Expression
Hypotheses wl-sbcom2d.1
|- ( ph -> -. A. x x = w )
wl-sbcom2d.2
|- ( ph -> -. A. x x = z )
wl-sbcom2d.3
|- ( ph -> -. A. z z = y )
Assertion wl-sbcom2d
|- ( ph -> ( [ w / z ] [ y / x ] ps <-> [ y / x ] [ w / z ] ps ) )

Proof

Step Hyp Ref Expression
1 wl-sbcom2d.1
 |-  ( ph -> -. A. x x = w )
2 wl-sbcom2d.2
 |-  ( ph -> -. A. x x = z )
3 wl-sbcom2d.3
 |-  ( ph -> -. A. z z = y )
4 ax6ev
 |-  E. u u = y
5 ax6ev
 |-  E. v v = w
6 wl-sbcom2d-lem2
 |-  ( -. A. z z = x -> ( [ u / x ] [ v / z ] ps <-> A. x A. z ( ( x = u /\ z = v ) -> ps ) ) )
7 alcom
 |-  ( A. x A. z ( ( x = u /\ z = v ) -> ps ) <-> A. z A. x ( ( x = u /\ z = v ) -> ps ) )
8 ancomst
 |-  ( ( ( x = u /\ z = v ) -> ps ) <-> ( ( z = v /\ x = u ) -> ps ) )
9 8 2albii
 |-  ( A. z A. x ( ( x = u /\ z = v ) -> ps ) <-> A. z A. x ( ( z = v /\ x = u ) -> ps ) )
10 7 9 bitri
 |-  ( A. x A. z ( ( x = u /\ z = v ) -> ps ) <-> A. z A. x ( ( z = v /\ x = u ) -> ps ) )
11 6 10 bitrdi
 |-  ( -. A. z z = x -> ( [ u / x ] [ v / z ] ps <-> A. z A. x ( ( z = v /\ x = u ) -> ps ) ) )
12 11 naecoms
 |-  ( -. A. x x = z -> ( [ u / x ] [ v / z ] ps <-> A. z A. x ( ( z = v /\ x = u ) -> ps ) ) )
13 wl-sbcom2d-lem2
 |-  ( -. A. x x = z -> ( [ v / z ] [ u / x ] ps <-> A. z A. x ( ( z = v /\ x = u ) -> ps ) ) )
14 12 13 bitr4d
 |-  ( -. A. x x = z -> ( [ u / x ] [ v / z ] ps <-> [ v / z ] [ u / x ] ps ) )
15 2 14 syl
 |-  ( ph -> ( [ u / x ] [ v / z ] ps <-> [ v / z ] [ u / x ] ps ) )
16 15 adantl
 |-  ( ( ( u = y /\ v = w ) /\ ph ) -> ( [ u / x ] [ v / z ] ps <-> [ v / z ] [ u / x ] ps ) )
17 wl-sbcom2d-lem1
 |-  ( ( u = y /\ v = w ) -> ( -. A. x x = w -> ( [ u / x ] [ v / z ] ps <-> [ y / x ] [ w / z ] ps ) ) )
18 1 17 syl5
 |-  ( ( u = y /\ v = w ) -> ( ph -> ( [ u / x ] [ v / z ] ps <-> [ y / x ] [ w / z ] ps ) ) )
19 18 imp
 |-  ( ( ( u = y /\ v = w ) /\ ph ) -> ( [ u / x ] [ v / z ] ps <-> [ y / x ] [ w / z ] ps ) )
20 wl-sbcom2d-lem1
 |-  ( ( v = w /\ u = y ) -> ( -. A. z z = y -> ( [ v / z ] [ u / x ] ps <-> [ w / z ] [ y / x ] ps ) ) )
21 3 20 syl5
 |-  ( ( v = w /\ u = y ) -> ( ph -> ( [ v / z ] [ u / x ] ps <-> [ w / z ] [ y / x ] ps ) ) )
22 21 ancoms
 |-  ( ( u = y /\ v = w ) -> ( ph -> ( [ v / z ] [ u / x ] ps <-> [ w / z ] [ y / x ] ps ) ) )
23 22 imp
 |-  ( ( ( u = y /\ v = w ) /\ ph ) -> ( [ v / z ] [ u / x ] ps <-> [ w / z ] [ y / x ] ps ) )
24 16 19 23 3bitr3rd
 |-  ( ( ( u = y /\ v = w ) /\ ph ) -> ( [ w / z ] [ y / x ] ps <-> [ y / x ] [ w / z ] ps ) )
25 24 exp31
 |-  ( u = y -> ( v = w -> ( ph -> ( [ w / z ] [ y / x ] ps <-> [ y / x ] [ w / z ] ps ) ) ) )
26 25 exlimdv
 |-  ( u = y -> ( E. v v = w -> ( ph -> ( [ w / z ] [ y / x ] ps <-> [ y / x ] [ w / z ] ps ) ) ) )
27 26 exlimiv
 |-  ( E. u u = y -> ( E. v v = w -> ( ph -> ( [ w / z ] [ y / x ] ps <-> [ y / x ] [ w / z ] ps ) ) ) )
28 4 5 27 mp2
 |-  ( ph -> ( [ w / z ] [ y / x ] ps <-> [ y / x ] [ w / z ] ps ) )