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 𝑃 = { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) }
Assertion elsetpreimafveq ( ( 𝐹 Fn 𝐴 ∧ ( 𝑆𝑃𝑅𝑃 ) ∧ ( 𝑋𝑆𝑌𝑅 ) ) → ( ( 𝐹𝑋 ) = ( 𝐹𝑌 ) → 𝑆 = 𝑅 ) )

Proof

Step Hyp Ref Expression
1 setpreimafvex.p 𝑃 = { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) }
2 eqeq2 ( ( 𝐹𝑋 ) = ( 𝐹𝑌 ) → ( ( 𝐹𝑥 ) = ( 𝐹𝑋 ) ↔ ( 𝐹𝑥 ) = ( 𝐹𝑌 ) ) )
3 2 rabbidv ( ( 𝐹𝑋 ) = ( 𝐹𝑌 ) → { 𝑥𝐴 ∣ ( 𝐹𝑥 ) = ( 𝐹𝑋 ) } = { 𝑥𝐴 ∣ ( 𝐹𝑥 ) = ( 𝐹𝑌 ) } )
4 3 adantl ( ( ( 𝐹 Fn 𝐴 ∧ ( 𝑆𝑃𝑅𝑃 ) ∧ ( 𝑋𝑆𝑌𝑅 ) ) ∧ ( 𝐹𝑋 ) = ( 𝐹𝑌 ) ) → { 𝑥𝐴 ∣ ( 𝐹𝑥 ) = ( 𝐹𝑋 ) } = { 𝑥𝐴 ∣ ( 𝐹𝑥 ) = ( 𝐹𝑌 ) } )
5 id ( 𝐹 Fn 𝐴𝐹 Fn 𝐴 )
6 simpl ( ( 𝑆𝑃𝑅𝑃 ) → 𝑆𝑃 )
7 simpl ( ( 𝑋𝑆𝑌𝑅 ) → 𝑋𝑆 )
8 5 6 7 3anim123i ( ( 𝐹 Fn 𝐴 ∧ ( 𝑆𝑃𝑅𝑃 ) ∧ ( 𝑋𝑆𝑌𝑅 ) ) → ( 𝐹 Fn 𝐴𝑆𝑃𝑋𝑆 ) )
9 8 adantr ( ( ( 𝐹 Fn 𝐴 ∧ ( 𝑆𝑃𝑅𝑃 ) ∧ ( 𝑋𝑆𝑌𝑅 ) ) ∧ ( 𝐹𝑋 ) = ( 𝐹𝑌 ) ) → ( 𝐹 Fn 𝐴𝑆𝑃𝑋𝑆 ) )
10 1 elsetpreimafvrab ( ( 𝐹 Fn 𝐴𝑆𝑃𝑋𝑆 ) → 𝑆 = { 𝑥𝐴 ∣ ( 𝐹𝑥 ) = ( 𝐹𝑋 ) } )
11 9 10 syl ( ( ( 𝐹 Fn 𝐴 ∧ ( 𝑆𝑃𝑅𝑃 ) ∧ ( 𝑋𝑆𝑌𝑅 ) ) ∧ ( 𝐹𝑋 ) = ( 𝐹𝑌 ) ) → 𝑆 = { 𝑥𝐴 ∣ ( 𝐹𝑥 ) = ( 𝐹𝑋 ) } )
12 simpr ( ( 𝑆𝑃𝑅𝑃 ) → 𝑅𝑃 )
13 simpr ( ( 𝑋𝑆𝑌𝑅 ) → 𝑌𝑅 )
14 5 12 13 3anim123i ( ( 𝐹 Fn 𝐴 ∧ ( 𝑆𝑃𝑅𝑃 ) ∧ ( 𝑋𝑆𝑌𝑅 ) ) → ( 𝐹 Fn 𝐴𝑅𝑃𝑌𝑅 ) )
15 14 adantr ( ( ( 𝐹 Fn 𝐴 ∧ ( 𝑆𝑃𝑅𝑃 ) ∧ ( 𝑋𝑆𝑌𝑅 ) ) ∧ ( 𝐹𝑋 ) = ( 𝐹𝑌 ) ) → ( 𝐹 Fn 𝐴𝑅𝑃𝑌𝑅 ) )
16 1 elsetpreimafvrab ( ( 𝐹 Fn 𝐴𝑅𝑃𝑌𝑅 ) → 𝑅 = { 𝑥𝐴 ∣ ( 𝐹𝑥 ) = ( 𝐹𝑌 ) } )
17 15 16 syl ( ( ( 𝐹 Fn 𝐴 ∧ ( 𝑆𝑃𝑅𝑃 ) ∧ ( 𝑋𝑆𝑌𝑅 ) ) ∧ ( 𝐹𝑋 ) = ( 𝐹𝑌 ) ) → 𝑅 = { 𝑥𝐴 ∣ ( 𝐹𝑥 ) = ( 𝐹𝑌 ) } )
18 4 11 17 3eqtr4d ( ( ( 𝐹 Fn 𝐴 ∧ ( 𝑆𝑃𝑅𝑃 ) ∧ ( 𝑋𝑆𝑌𝑅 ) ) ∧ ( 𝐹𝑋 ) = ( 𝐹𝑌 ) ) → 𝑆 = 𝑅 )
19 18 ex ( ( 𝐹 Fn 𝐴 ∧ ( 𝑆𝑃𝑅𝑃 ) ∧ ( 𝑋𝑆𝑌𝑅 ) ) → ( ( 𝐹𝑋 ) = ( 𝐹𝑌 ) → 𝑆 = 𝑅 ) )