D4 at rate one: a continuous trace whose increments integrate x - r is the exponential
average of its activity, so activity envelopes give two-sided trace envelopes.
theorem
MindFormal.A705SupportPrograms.trace_between
{x r lo hi : ℝ → ℝ}
(hx : Continuous x)
(hr : Continuous r)
(hlo : Continuous lo)
(hhi : Continuous hi)
{a t : ℝ}
(hat : a ≤ t)
(he : ∀ s ∈ Set.Icc a t, r s - r a = ∫ (u : ℝ) in a..s, x u - r u)
(hb : ∀ s ∈ Set.Icc a t, lo s ≤ x s ∧ x s ≤ hi s)
:
Two-sided D4 envelope: activity between two continuous envelopes on [a, t] keeps the
trace between their exponential averages.
The exponential average of a rising activity envelope c(1 - e^{-ν(s-a)}) + e.