bifunctor
A bifunctor is a functor of two variables in category theory. Given categories C, D, and E, a bifunctor F: C × D → E assigns to each pair (X, Y) with X in C and Y in D an object F(X, Y) in E, and to each pair of morphisms f: X → X' in C and g: Y → Y' in D a morphism F(f, g): F(X, Y) → F(X', Y') in E, such that F preserves identities and composition in each variable. Equivalently, F is covariant in both arguments. If one or both arguments should be contravariant, one can pass to opposite categories; for example, Hom: Cᵒᵖ × C → Set is contravariant in the first argument and covariant in the second.
Common examples include the cartesian product functor ×: Set × Set → Set, which is covariant in
Properties and related notions: A bifunctor preserves identities and composition separately in each argument. A natural
In summary, a bifunctor generalizes the idea of a functor to two inputs, ensuring functorial behavior with