# Formal notation for key value mapping with versioning and injective function for version

I would like to know what is a correct formal notation for representing a state where the state is defined by

$K \to (V x N)$

where K is the key, V is the value and N is the infinite ordered set of version numbers. An injective function f takes an element of N and returns the next version number.

• Might be just me, but I'm not really familiar with what you mean by 'state', 'version number' and 'key'? What's the context? Jul 7, 2017 at 22:26
• like dictionary but with versioned values. f returns the next version number. have it from here hyperledger-fabric.readthedocs.io/en/latest/… Jul 7, 2017 at 22:35
• Looks like more of a question for stackoverflow.com.
– Mark
Jul 7, 2017 at 22:46
• why stackoverflow? I want a formal math notation for this Jul 7, 2017 at 22:51

For formal notation, I'd probably use exactly what the source page uses, just written with standard mathematical typography instead of ASCII: A piece of state is modeled as an element of a mapping $K \to (V \times N)$. (Then explain what $K$, $V$, and $N$ are.)