Metamath Proof Explorer


Theorem elpreq

Description: Equality wihin a pair. (Contributed by Thierry Arnoux, 23-Aug-2017)

Ref Expression
Hypotheses elpreq.1 φXAB
elpreq.2 φYAB
elpreq.3 φX=AY=A
Assertion elpreq φX=Y

Proof

Step Hyp Ref Expression
1 elpreq.1 φXAB
2 elpreq.2 φYAB
3 elpreq.3 φX=AY=A
4 simpr φX=AX=A
5 3 biimpa φX=AY=A
6 4 5 eqtr4d φX=AX=Y
7 elpri XABX=AX=B
8 1 7 syl φX=AX=B
9 8 orcanai φ¬X=AX=B
10 simpl φ¬X=Aφ
11 3 notbid φ¬X=A¬Y=A
12 11 biimpa φ¬X=A¬Y=A
13 elpri YABY=AY=B
14 pm2.53 Y=AY=B¬Y=AY=B
15 2 13 14 3syl φ¬Y=AY=B
16 10 12 15 sylc φ¬X=AY=B
17 9 16 eqtr4d φ¬X=AX=Y
18 6 17 pm2.61dan φX=Y