For this post, I will use the Von Neumann definition of the Natural numbers: \begin{align*}0&=\{\}\\1&=0\cup\{0\}=\{0\}\\2&=1\cup\{1\}=\{0,1\}\\&\cdots\\n&=\{0,1,2,\ldots,n-1\}\end{align*}
I will also make the identification that $\wp(X)=2^X=X\to2$. For example, the subset $\{0,2,3\}\subseteq4$ would correspond to the binary sequence $1011\leq1111$, whereas $\{0,4\}\subseteq 5$ would correspond to $10001\leq 11111$. So the number of bits in the binary sequence indicates which natural number we are considering it to be a subset of. [Side note: By properties of ordinals, $A\subseteq n\in \mathbb{N}\Longrightarrow A\subseteq \mathbb{N}$, so if we wanted we could consider everything to be a subset of $\mathbb{N}$ itself, and the corresponding binary sequence for finite subsets would eventually have an infinite tail of zeros.]
For $k,n\in \mathbb{N}$, a $k$-chain of $n$ is a set of $k+1$ nested subsets of $n$ (starting at $0$ and ending at $n$)$$0=x_0\subseteq x_1\subseteq x_2\subseteq\cdots\subseteq x_k=n$$
It turns out that the number of $k$-chains of $n$ is $k^n$. (For the cases $k<3$, this is easily seen. Then, the binomial theorem gives the inductive step. ) We also know that the number of functions $f:n\to k$ is also $k^n$, so there must be a bijection between them. Indeed, it's easy to construct using the correspondence with binary sequences.
Using the correspondence $\wp(n)=2^n$, a $k$-chain of $n$ is simply a weakly-increasing sequence of binary strings of length $n$ starting with all $0$'s and ending with all $1$'s. For example, there is the $4$-chain on $5$ defined by $0\subseteq \{2\}\subseteq\{0,2\}\subseteq \{0,1,2\}\subseteq \{0,1,2,3,4\}$. In binary this is \begin{align*}00000&\\00100&\\10100&\\11100&\\11111\end{align*}
Now, because 0 is always first, and $n$ is always last by definition, we may as well omit those since they do not change the information about the chain. Doing so and adding the rows termwise gives the corresponding function $n\to k$. In this example,\begin{align*}00100&\\10100&\\11100&\\\hline21300&\end{align*} In the same way that $\wp(n)=2^n$, we can interpret $21300$ as the function $f:5\to 4$ defined by \begin{align*}0&\mapsto 2\\1&\mapsto 1\\2&\mapsto 3\\3&\mapsto 0\\4&\mapsto 0\end{align*} One interesting case of this correspondence is that the $n$-chain of $n$ given by $0\subseteq 1\subseteq 2\subseteq\cdots \subseteq n$ corresponds to the "reversal map on $n$" given by $(k<n)\mapsto (n-1-k<n)$.
It's also easy to go the other way around. Given some specific $f:n\to k$, the value of $f(x)$ tells me how many times $x$ appears in the chain (except for the last term). For example suppose we pick $f:4\to 4$ defined by $f(x)=x+1$ (mod 4), aka $0 \mapsto 1,1\mapsto 2,2\mapsto 3,3\mapsto 0$. As a 4-term sequence, this is $1230$ and the associated binary chain would be (without the endpoints) \begin{align*} 0010&\\0110&\\1110\end{align*} which in turn corresponds to the chain of subsets $0\subseteq\{2\}\subseteq \{1,2\}\subseteq\{0,1,2\}\subseteq 4$
My question is: (A) Has this connection already been noticed? If so, what are some sources studying this? (B) Is this at all interesting/useful? I've shown that there exists this (somewhat surprising) bijection between chains and functions. Is there potentially something deep about this connection that is worth studying further, or is it perhaps just a recreational novelty without any potential applications? Here are a couple ideas I've had:
(1) Simplicial Complexes: Under the definition of an abstract simplicial complex, $2^n$ is an $n$-dimensional simplex, and so a $k$-chain of $n$ would be one of its $k$-dimensional faces (the inclusions are proper iff the simplex is non-degenerate). Perhaps one could explore how properties/applications of functions translate to the corresponding simplicies. Or vice versa: maybe results about simplicial complexes give a new perspective about the functions on finite sets to which they correspond?
(2) Linear Algebra: Instead of the literal ordinal $n\in\mathbb{N}$, I could consider an $n$-dimensional vector space $V$. Picking a basis $\{v_0,\ldots,v_{n-1}\}$, we can consider the subspace spanned by a subset of this basis e.g. $1011\leq 1111$ might correspond to $\mathbb{R}\times \{0\}\times \mathbb{R}\times \mathbb{R}\subseteq \mathbb{R}^4$. With this shift in interpretation, an $n$-chain of $n$ would be a flag of nested subspaces $\{0\}\subseteq V_1\subseteq\cdots \subseteq V_n\cong \mathbb{R}^n$.
(3) Group Theory Every finite group can be embedded in some symmetric group $S_n$. A function $f:n\to n$ has its corresponding $n$-chain $0=f_0\subseteq \cdots \subseteq f_n=n$, and $f$ being bijective means that each inclusion adds precisely one new element, i.e. the cardinality is $|f_i|=i$. This would give a map $\varphi:S_n\to S_n$ by asking which order this chain adds each element. In fact since the bijections are uniquely defined by which element is added at each step in the chain, this map is a bijection $\varphi\in S_{n!}$. For example, consider the cycle $f=(0 1 2)\in S_3$. The corresponding chain is $0\subseteq \{1\}\subseteq \{0,1\}\subseteq \{0,1,2\}$ which adds in order the element 1 then adds 0 then adds 2. This gives the permutation $\big(0\mapsto 1,1\mapsto 0,2\mapsto 2\big)$ which in cycle notation is $(0 1)(2)$, so $\varphi (012)=(01)(2)$. In particular, $\varphi$ always swaps the identity and the reverse map. For $n=2$, $\varphi$ swaps the elements and for $n=3$, the cycle type of $\varphi$ is (2,4), cycling the other elements besides the identity/reverse. In general, group multiplication (function composition) would then give a corresponding multiplication on chains which could be used in any of the other applications of chains. Similarly, pointwise addition/multiplication of functions (mod $n$) gives another way to combine chains.
(4) Manipulating Chains Themselves: If two chains are different lengths, we can always extend the smaller one by $\cdots\subseteq X\subseteq X\subseteq\cdots\subseteq X\subseteq n$ so that they are the same length. Given chains of the same length, we can take their term-wise union/intersection to obtain a new chain. Thus, chains of a fixed length form a lattice which could then be carried over to the corresponding functions. We could even concatenate two chains by re-indexing one by the top element of the other. e.g. $\big(0\subseteq\{1\}\subseteq 2\big)\big(0\subseteq\{0,2\}\subseteq 3\big)\Longrightarrow \big(0\subseteq\{1\}\subseteq 2\big)\big(2\cup 0\subseteq 2\cup\{2+2\}\subseteq 2\cup \{0+2,1+2,2+2\}\big)\Longrightarrow \big(0\subseteq\{1\}\subseteq 2\big)\big(2\subseteq\{0,1,4\}\subseteq 5\big)\Longrightarrow 0\subseteq\{1\}\subseteq 2\subseteq\{0,1,4\}\subseteq 5$.
Obviously, concatenation in this way would not be commuatative. However, it does correspond to the identity $(n^a)(n^b)=n^{a+b}$. One might also wonder how other exponential identities would be realized in terms of chains such as $(a^n)(b^n)=(ab)^n$ or "modes ponens" $a\times b^a\to b$.
I would appreciate any information regarding this topic. Thank you!
UPDATE: I tried considering a function $f:n\to k$ as $k$-colorings of the edgeless graph with $n$ vertices. One might ask about less trivial graphs and their $k$-colorings and what the corresponding functions are $n\to k$. After much thought, it seems like this correspondence is perhaps just an over complicated way to describe functions...