Documentation

Solanalib.Finance.MonotoneSequence

MonotoneSequence: unbounded discrete monotone growth #

A bundled structure for a function NatNat that is monotone non-decreasing — the canonical shape for unbounded discrete-time processes that only ever increase (compound interest, accrued fees, cumulative supply, slot counters that never roll back).

Companion to WindowedDecay and GrowthCurve:

Compound interest is the headline example: balance after n periods never decreases as n grows, and there's no a-priori upper bound.

Main definitions #

These are inherited by every constructor (e.g. CompoundInterest.toMonotoneSequence) without re-proof.

An unbounded monotone-non-decreasing sequence of Nats.

Construct via a domain-specific helper (e.g. CompoundInterest.toMonotoneSequence). The single monotone obligation is what every consumer needs in order to reason about "value at later step ≥ value at earlier step".

  • apply : NatNat

    The sequence's value at step n.

  • monotone {n m : Nat} : n mself.apply n self.apply m

    The sequence is monotone non-decreasing.

Instances For

    Inherited: every term of the sequence is at least the initial term. Direct corollary of monotonicity from step 0.

    Inherited: explicit form of monotonicity, useful when you have named indices n and m rather than an order hypothesis.