Jensen-Shannon divergence is compositional [jsd-as-enrichment]

Let \mathsf {FinStoch} be the category of finite sets and stochastic matrices. Given two stochastic matrices, f_1,f_2: X \to Y, we can define their **Jensen-Shannon distance** as d(f_1,f_2) := \sup _x \sqrt {\operatorname {JSD}(f_1(x),f_2(x))}, where JSD is the Jensen-Shannon divergence. It's a standard result that the root of JSD defines a metric on the space of probability measures - hence the above defines a metric on the set \mathsf {FinStoch}(X,Y). My aim here is to show that _this gives an enrichment of \mathsf {FinStoch} in the category \mathsf {Met} of metric spaces and **short**, i.e distance nonincreasing, maps_

The content of this statement is that the composition map

\mathsf {FinStoch}(X,Y) \otimes \mathsf {FinStoch}(Y,Z) \to \mathsf {FinStoch}(X,Z) is a short map. The monoidal structure on \mathsf {Met} that we're considering is given by the "1-metric", i.e

d_{X \otimes Y}((x,y),(x',y')) = d_X(x,x') + d_Y(y,y')

This has the convenient property that a map is short if and only if it's "short in each variable separately". In other words, we must show that the map

f \circ - :\mathsf {FinStoch}(X,Y) \to \mathsf {FinStoch}(X,Z)

is short for each f, and that the map

- \circ f : \mathsf {FinStoch}(Y,Z) \to \mathsf {FinStoch}(X,Z)

is short for each f.