Metamath Proof Explorer


Theorem fundcmpsurinjpreimafv

Description: Every function F : A --> B can be decomposed into a surjective function onto P and an injective function from P . (Contributed by AV, 12-Mar-2024) (Proof shortened by AV, 22-Mar-2024)

Ref Expression
Hypothesis fundcmpsurinj.p 𝑃 = { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) }
Assertion fundcmpsurinjpreimafv ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ∃ 𝑔 ( 𝑔 : 𝐴onto𝑃 : 𝑃1-1𝐵𝐹 = ( 𝑔 ) ) )

Proof

Step Hyp Ref Expression
1 fundcmpsurinj.p 𝑃 = { 𝑧 ∣ ∃ 𝑥𝐴 𝑧 = ( 𝐹 “ { ( 𝐹𝑥 ) } ) }
2 1 fundcmpsurbijinjpreimafv ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ∃ 𝑔𝑓𝑗 ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) ∧ 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) )
3 vex 𝑗 ∈ V
4 vex 𝑓 ∈ V
5 3 4 coex ( 𝑗𝑓 ) ∈ V
6 simprl1 ( ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) ∧ ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) ∧ 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) ) → 𝑔 : 𝐴onto𝑃 )
7 simp3 ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) → 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 )
8 f1of1 ( 𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) → 𝑓 : 𝑃1-1→ ( 𝐹𝐴 ) )
9 8 3ad2ant2 ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) → 𝑓 : 𝑃1-1→ ( 𝐹𝐴 ) )
10 f1co ( ( 𝑗 : ( 𝐹𝐴 ) –1-1𝐵𝑓 : 𝑃1-1→ ( 𝐹𝐴 ) ) → ( 𝑗𝑓 ) : 𝑃1-1𝐵 )
11 7 9 10 syl2anc ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) → ( 𝑗𝑓 ) : 𝑃1-1𝐵 )
12 11 ad2antrl ( ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) ∧ ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) ∧ 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) ) → ( 𝑗𝑓 ) : 𝑃1-1𝐵 )
13 simprr ( ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) ∧ ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) ∧ 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) ) → 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) )
14 6 12 13 3jca ( ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) ∧ ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) ∧ 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) ) → ( 𝑔 : 𝐴onto𝑃 ∧ ( 𝑗𝑓 ) : 𝑃1-1𝐵𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) )
15 f1eq1 ( = ( 𝑗𝑓 ) → ( : 𝑃1-1𝐵 ↔ ( 𝑗𝑓 ) : 𝑃1-1𝐵 ) )
16 coeq1 ( = ( 𝑗𝑓 ) → ( 𝑔 ) = ( ( 𝑗𝑓 ) ∘ 𝑔 ) )
17 16 eqeq2d ( = ( 𝑗𝑓 ) → ( 𝐹 = ( 𝑔 ) ↔ 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) )
18 15 17 3anbi23d ( = ( 𝑗𝑓 ) → ( ( 𝑔 : 𝐴onto𝑃 : 𝑃1-1𝐵𝐹 = ( 𝑔 ) ) ↔ ( 𝑔 : 𝐴onto𝑃 ∧ ( 𝑗𝑓 ) : 𝑃1-1𝐵𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) ) )
19 18 spcegv ( ( 𝑗𝑓 ) ∈ V → ( ( 𝑔 : 𝐴onto𝑃 ∧ ( 𝑗𝑓 ) : 𝑃1-1𝐵𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) → ∃ ( 𝑔 : 𝐴onto𝑃 : 𝑃1-1𝐵𝐹 = ( 𝑔 ) ) ) )
20 5 14 19 mpsyl ( ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) ∧ ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) ∧ 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) ) → ∃ ( 𝑔 : 𝐴onto𝑃 : 𝑃1-1𝐵𝐹 = ( 𝑔 ) ) )
21 20 ex ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ( ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) ∧ 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) → ∃ ( 𝑔 : 𝐴onto𝑃 : 𝑃1-1𝐵𝐹 = ( 𝑔 ) ) ) )
22 21 exlimdvv ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ( ∃ 𝑓𝑗 ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) ∧ 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) → ∃ ( 𝑔 : 𝐴onto𝑃 : 𝑃1-1𝐵𝐹 = ( 𝑔 ) ) ) )
23 22 eximdv ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ( ∃ 𝑔𝑓𝑗 ( ( 𝑔 : 𝐴onto𝑃𝑓 : 𝑃1-1-onto→ ( 𝐹𝐴 ) ∧ 𝑗 : ( 𝐹𝐴 ) –1-1𝐵 ) ∧ 𝐹 = ( ( 𝑗𝑓 ) ∘ 𝑔 ) ) → ∃ 𝑔 ( 𝑔 : 𝐴onto𝑃 : 𝑃1-1𝐵𝐹 = ( 𝑔 ) ) ) )
24 2 23 mpd ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ∃ 𝑔 ( 𝑔 : 𝐴onto𝑃 : 𝑃1-1𝐵𝐹 = ( 𝑔 ) ) )