advancedresearch / path_semantics

A research project in path semantics, a re-interpretation of functions for expressing mathematics
MIT License
160 stars 13 forks source link

Generalize to non-determinism #201

Open bvssvni opened 6 years ago

bvssvni commented 6 years ago

I thought this was impossible.

Path semantics is supposed to be about predictability, but it seems that non-determinism is not the same as non-predictability. You can have predictable non-determinism.

Path semantics might be generalized to non-determinism. The simplest form is one that allows functions to use an internal source of randomness.

Change the interpretation of normal paths to correlated predictions and use the sample limit for existential paths. Probabilistic paths use the limit, because it uses probabilistic existential paths, that also take the limit.

Deterministic existential paths are just repeating their values in the limit, so you can unify non-determinism with determinism and keeping the consistency of double-existential paths being 1 of 4 functions of type bool -> bool.

A correlated prediction is a function predicting another, but only if you run them enough times. The precise semantics here need a closer look, but roughly, for all a given input, the set of output values are equal in the limit. Normal deterministic paths have 100% correlation. Not sure yet how to assign the correlation, and whether you can use partial predictors.

The funny thing here is that probabilistic paths "bake in" the correlations, so you get just probabilities in and probabilities out. This matches the intuition that you don't know what happens inside the function, but you know the probability distribution.

The only difference is that the size of the output sub-type can be larger than the size of the input sub-type. Need to check my notes on structure preserving functions, which is the only place this is used, I think.

When the path of a non-deterministic function is non-deterministic, it can still be 100% correlated, which is a kind of entanglement. Their internal source of randomness can be synchronized.

bvssvni commented 6 years ago

Wait, does this mean that if you have a bunch of non-deterministic functions in path semantical space that are all entangled, it looks like a deterministic universe?

Hmm... that would only work in the direction of computation. The source of randomness does not affect the input.