Metamath Proof Explorer


Theorem fundcmpsurinjALT

Description: Alternate proof of fundcmpsurinj , based on fundcmpsurinjimaid : Every function F : A --> B can be decomposed into a surjective and an injective function. (Proof modification is discouraged.) (New usage is discouraged.) (Contributed by AV, 13-Mar-2024)

Ref Expression
Assertion fundcmpsurinjALT ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ∃ 𝑔𝑝 ( 𝑔 : 𝐴onto𝑝 : 𝑝1-1𝐵𝐹 = ( 𝑔 ) ) )

Proof

Step Hyp Ref Expression
1 mptexg ( 𝐴𝑉 → ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∈ V )
2 1 adantl ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∈ V )
3 ffun ( 𝐹 : 𝐴𝐵 → Fun 𝐹 )
4 funimaexg ( ( Fun 𝐹𝐴𝑉 ) → ( 𝐹𝐴 ) ∈ V )
5 3 4 sylan ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ( 𝐹𝐴 ) ∈ V )
6 5 resiexd ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ( I ↾ ( 𝐹𝐴 ) ) ∈ V )
7 2 6 5 3jca ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ( ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∈ V ∧ ( I ↾ ( 𝐹𝐴 ) ) ∈ V ∧ ( 𝐹𝐴 ) ∈ V ) )
8 eqid ( 𝐹𝐴 ) = ( 𝐹𝐴 )
9 eqid ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) )
10 eqid ( I ↾ ( 𝐹𝐴 ) ) = ( I ↾ ( 𝐹𝐴 ) )
11 8 9 10 fundcmpsurinjimaid ( 𝐹 : 𝐴𝐵 → ( ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) : 𝐴onto→ ( 𝐹𝐴 ) ∧ ( I ↾ ( 𝐹𝐴 ) ) : ( 𝐹𝐴 ) –1-1𝐵𝐹 = ( ( I ↾ ( 𝐹𝐴 ) ) ∘ ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) ) )
12 11 adantr ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ( ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) : 𝐴onto→ ( 𝐹𝐴 ) ∧ ( I ↾ ( 𝐹𝐴 ) ) : ( 𝐹𝐴 ) –1-1𝐵𝐹 = ( ( I ↾ ( 𝐹𝐴 ) ) ∘ ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) ) )
13 simp1 ( ( 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∧ = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) )
14 eqidd ( ( 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∧ = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → 𝐴 = 𝐴 )
15 simp3 ( ( 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∧ = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → 𝑝 = ( 𝐹𝐴 ) )
16 13 14 15 foeq123d ( ( 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∧ = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → ( 𝑔 : 𝐴onto𝑝 ↔ ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) : 𝐴onto→ ( 𝐹𝐴 ) ) )
17 simpl ( ( = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → = ( I ↾ ( 𝐹𝐴 ) ) )
18 simpr ( ( = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → 𝑝 = ( 𝐹𝐴 ) )
19 eqidd ( ( = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → 𝐵 = 𝐵 )
20 17 18 19 f1eq123d ( ( = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → ( : 𝑝1-1𝐵 ↔ ( I ↾ ( 𝐹𝐴 ) ) : ( 𝐹𝐴 ) –1-1𝐵 ) )
21 20 3adant1 ( ( 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∧ = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → ( : 𝑝1-1𝐵 ↔ ( I ↾ ( 𝐹𝐴 ) ) : ( 𝐹𝐴 ) –1-1𝐵 ) )
22 simpl ( ( = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) → = ( I ↾ ( 𝐹𝐴 ) ) )
23 simpr ( ( = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) → 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) )
24 22 23 coeq12d ( ( = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) → ( 𝑔 ) = ( ( I ↾ ( 𝐹𝐴 ) ) ∘ ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) )
25 24 ancoms ( ( 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∧ = ( I ↾ ( 𝐹𝐴 ) ) ) → ( 𝑔 ) = ( ( I ↾ ( 𝐹𝐴 ) ) ∘ ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) )
26 25 3adant3 ( ( 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∧ = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → ( 𝑔 ) = ( ( I ↾ ( 𝐹𝐴 ) ) ∘ ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) )
27 26 eqeq2d ( ( 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∧ = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → ( 𝐹 = ( 𝑔 ) ↔ 𝐹 = ( ( I ↾ ( 𝐹𝐴 ) ) ∘ ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) ) )
28 16 21 27 3anbi123d ( ( 𝑔 = ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∧ = ( I ↾ ( 𝐹𝐴 ) ) ∧ 𝑝 = ( 𝐹𝐴 ) ) → ( ( 𝑔 : 𝐴onto𝑝 : 𝑝1-1𝐵𝐹 = ( 𝑔 ) ) ↔ ( ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) : 𝐴onto→ ( 𝐹𝐴 ) ∧ ( I ↾ ( 𝐹𝐴 ) ) : ( 𝐹𝐴 ) –1-1𝐵𝐹 = ( ( I ↾ ( 𝐹𝐴 ) ) ∘ ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) ) ) )
29 28 spc3egv ( ( ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ∈ V ∧ ( I ↾ ( 𝐹𝐴 ) ) ∈ V ∧ ( 𝐹𝐴 ) ∈ V ) → ( ( ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) : 𝐴onto→ ( 𝐹𝐴 ) ∧ ( I ↾ ( 𝐹𝐴 ) ) : ( 𝐹𝐴 ) –1-1𝐵𝐹 = ( ( I ↾ ( 𝐹𝐴 ) ) ∘ ( 𝑦𝐴 ↦ ( 𝐹𝑦 ) ) ) ) → ∃ 𝑔𝑝 ( 𝑔 : 𝐴onto𝑝 : 𝑝1-1𝐵𝐹 = ( 𝑔 ) ) ) )
30 7 12 29 sylc ( ( 𝐹 : 𝐴𝐵𝐴𝑉 ) → ∃ 𝑔𝑝 ( 𝑔 : 𝐴onto𝑝 : 𝑝1-1𝐵𝐹 = ( 𝑔 ) ) )