The propositions-as-types interpretation states that proofs are programs. The meaning of this applies principally to functional programming, so let's first limit the python-space with constraints.
- We will deal with total functions, meaning if I say
def f(x: float) -> float:, what I mean is that you can givefany float. A vocabulary I might use is "signature", in this case,f's "signature" (or its "type signature" or just "type") isfloat -> float, meaning it's input or argument type isfloatand its output or return type isfloat. - We will deal with pure functions, meaning if I say that
fis a function, what I mean is that its behavior is constrained entirely by its signature, and I can test it by supplying inputs and doing nothing else. If I need to test it by mocking up state or running a headless browser, then it is not pure. - Functions that are total and pure are deterministic, meaning for every state from which anybody could call
