We prove the simple, standard bijection between functions f : A → B and sections of the projection π A : A × B → A . We write π A (or simply π ) for the first projection and π B for the second projection.

1. From a function to a section

Given any function f : A → B , define s f : A ⟶ A × B , s f ( a ) := ( a , f ( a ) ) . For every a ∈ A we have π A ( s f ( a ) ) = π A ( a , f ( a ) ) = a . Hence π A ˆ s f = id A , so s f is a section of π A .

2. From a section to a function

Conversely, suppose s : A → A × B is a section of π A ; i.e. π A ˆ s = id A . Compose s with the second projection to get a function f s := π B ˆ s : A ⟶ B . Thus s determines a function f s .

3. These constructions are inverse

We check the two assignments are inverse to each other.

Hence the map f ↦ s f is a bijection between Hom ( A , B ) and the set of sections of π A .

4. Conclusion

We have shown canonically and explicitly that every function A → B corresponds exactly to a section of the trivial product bundle A × B → A ; the correspondence is f ⟷ s f = ⟨ id A , f ⟩ .

(If ( A , B ) lie in a category with products—e.g. Set , Top , a topos—exactly the same argument holds, with the extra requirement that functions/sections be morphisms in that category.)