Metamath Proof Explorer


Theorem elsetpreimafveq

Description: If two preimages of function values contain elements with identical function values, then both preimages are equal. (Contributed by AV, 8-Mar-2024)

Ref Expression
Hypothesis setpreimafvex.p P = z | x A z = F -1 F x
Assertion elsetpreimafveq F Fn A S P R P X S Y R F X = F Y S = R

Proof

Step Hyp Ref Expression
1 setpreimafvex.p P = z | x A z = F -1 F x
2 eqeq2 F X = F Y F x = F X F x = F Y
3 2 rabbidv F X = F Y x A | F x = F X = x A | F x = F Y
4 3 adantl F Fn A S P R P X S Y R F X = F Y x A | F x = F X = x A | F x = F Y
5 id F Fn A F Fn A
6 simpl S P R P S P
7 simpl X S Y R X S
8 5 6 7 3anim123i F Fn A S P R P X S Y R F Fn A S P X S
9 8 adantr F Fn A S P R P X S Y R F X = F Y F Fn A S P X S
10 1 elsetpreimafvrab F Fn A S P X S S = x A | F x = F X
11 9 10 syl F Fn A S P R P X S Y R F X = F Y S = x A | F x = F X
12 simpr S P R P R P
13 simpr X S Y R Y R
14 5 12 13 3anim123i F Fn A S P R P X S Y R F Fn A R P Y R
15 14 adantr F Fn A S P R P X S Y R F X = F Y F Fn A R P Y R
16 1 elsetpreimafvrab F Fn A R P Y R R = x A | F x = F Y
17 15 16 syl F Fn A S P R P X S Y R F X = F Y R = x A | F x = F Y
18 4 11 17 3eqtr4d F Fn A S P R P X S Y R F X = F Y S = R
19 18 ex F Fn A S P R P X S Y R F X = F Y S = R