Metamath Proof Explorer


Theorem elsetpreimafvbi

Description: An element of the preimage of a function value is an element of the domain of the function with the same value as another element of the preimage. (Contributed by AV, 9-Mar-2024)

Ref Expression
Hypothesis setpreimafvex.p 𝑃 = { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) }
Assertion elsetpreimafvbi ( ( 𝐹 Fn 𝐴𝑆𝑃𝑋𝑆 ) → ( 𝑌𝑆 ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) )

Proof

Step Hyp Ref Expression
1 setpreimafvex.p 𝑃 = { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) }
2 fniniseg ( 𝐹 Fn 𝐴 → ( 𝑋 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) ↔ ( 𝑋𝐴 ∧ ( 𝐹𝑋 ) = ( 𝐹𝑥 ) ) ) )
3 fniniseg ( 𝐹 Fn 𝐴 → ( 𝑌 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑥 ) ) ) )
4 eqeq2 ( ( 𝐹𝑥 ) = ( 𝐹𝑋 ) → ( ( 𝐹𝑌 ) = ( 𝐹𝑥 ) ↔ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) )
5 4 anbi2d ( ( 𝐹𝑥 ) = ( 𝐹𝑋 ) → ( ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑥 ) ) ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) )
6 5 eqcoms ( ( 𝐹𝑋 ) = ( 𝐹𝑥 ) → ( ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑥 ) ) ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) )
7 3 6 sylan9bb ( ( 𝐹 Fn 𝐴 ∧ ( 𝐹𝑋 ) = ( 𝐹𝑥 ) ) → ( 𝑌 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) )
8 7 ex ( 𝐹 Fn 𝐴 → ( ( 𝐹𝑋 ) = ( 𝐹𝑥 ) → ( 𝑌 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) ) )
9 8 adantld ( 𝐹 Fn 𝐴 → ( ( 𝑋𝐴 ∧ ( 𝐹𝑋 ) = ( 𝐹𝑥 ) ) → ( 𝑌 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) ) )
10 2 9 sylbid ( 𝐹 Fn 𝐴 → ( 𝑋 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) → ( 𝑌 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) ) )
11 eleq2 ( 𝑆 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) → ( 𝑋𝑆𝑋 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) ) )
12 eleq2 ( 𝑆 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) → ( 𝑌𝑆𝑌 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) ) )
13 12 bibi1d ( 𝑆 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) → ( ( 𝑌𝑆 ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) ↔ ( 𝑌 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) ) )
14 11 13 imbi12d ( 𝑆 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) → ( ( 𝑋𝑆 → ( 𝑌𝑆 ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) ) ↔ ( 𝑋 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) → ( 𝑌 ∈ ( 𝐹 “ { ( 𝐹𝑥 ) } ) ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) ) ) )
15 10 14 syl5ibr ( 𝑆 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) → ( 𝐹 Fn 𝐴 → ( 𝑋𝑆 → ( 𝑌𝑆 ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) ) ) )
16 15 rexlimivw ( ∃ 𝑥𝐴 𝑆 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) → ( 𝐹 Fn 𝐴 → ( 𝑋𝑆 → ( 𝑌𝑆 ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) ) ) )
17 1 elsetpreimafv ( 𝑆𝑃 → ∃ 𝑥𝐴 𝑆 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) )
18 16 17 syl11 ( 𝐹 Fn 𝐴 → ( 𝑆𝑃 → ( 𝑋𝑆 → ( 𝑌𝑆 ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) ) ) )
19 18 3imp ( ( 𝐹 Fn 𝐴𝑆𝑃𝑋𝑆 ) → ( 𝑌𝑆 ↔ ( 𝑌𝐴 ∧ ( 𝐹𝑌 ) = ( 𝐹𝑋 ) ) ) )