Lemma
math, backwards
journey · 4 days · finance → ml

Working Backward

Forward, the formulas on Lemma are trivial. Plug in PP, rr, tt and out comes F=P(1+r)tF = P(1+r)^t. Plug in a temperature and softmax produces probabilities. Plug in cash flows and the integral produces present value. Every textbook exercise runs that direction. But almost every practical question is the opposite direction — given the answer, what input produced it? How long until my money doubles? What rate makes today’s price match these future cash flows? What temperature setting makes the model’s confidence match observed frequency?

The inverse problem in Lemma is a shape — three steps (forward model → mark known and unknown → invert) that recur, under different vocabularies, in finance and ML. This path opens with the logarithm — the canonical inverter — and walks three pages that each apply a different kind of inverse: algebraic, integrated, numerical.

the path · 0/4 · 0%
  1. 1
    module·day 1·next
    /modules/log
    Open with the canonical inverter. Logarithm is what undoes exponentiation — *the* tool for inverting compound-growth equations algebraically. Every page on this path uses it, in one form or another. Read with one question in mind: *when does log give a closed-form inverse, and when do you have to solve numerically instead?*
    open →
  2. 2
    application·day 2
    /finance/bitcoin-pizza
    First instance — algebraic inversion. Forward: $F = P(1+r)^t$ — plug in price, rate, time, get future value. Backward: *given the 10,000-BTC pizza's 2010 price and today's price, what compound annual growth rate connects them?* Take logs of both sides; the unknown drops out of the exponent. One line of algebra, one historical fact about the most expensive meal in history.
    open →
  3. 3
    application·day 3
    /finance/present-value
    Second instance — same family, integrated. Compounding *forward* multiplies by $(1+r)^t$; *discounting* — the inverse — divides by the same factor. Present value *is* the inverse-direction calculation: future cash flows are observed, today's price is the unknown to solve for. The integral of $c(t) · e^{-rt}$ is one inversion machine running continuously.
    open →
  4. 4
    application·day 4
    /ml/model-calibration
    Third instance — numerical inversion. Now there is no closed-form inverse. Forward: a temperature value $T$ produces softmax probabilities. Observed: a held-out set of correctness frequencies. Unknown: *which $T$ makes the forward pass match reality?* Algebra cannot answer; the inverse is found by *minimising log-loss over $T$* — an optimization, exactly the kind day 1's module hinted you'd need when log alone runs out.
    open →