MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch06.SearchContinuation

theorem MindFormal.signed_reserve_target {J L g need : ℝ} (hJ : 0 ≤ J) (hL : 0 < L) (hn : 0 < need) :
need < max (J / (J + L) - g) 0 ↔ 0 < (1 - (g + need)) * J - (g + need) * L

SW1 SW6, SB1 SB4, SI1 SI8: for nonnegative useful input J, positive rest load L and positive needed activity, the clipped target exceeds need exactly when its signed reserve is positive. Offset g is arbitrary. This proves the instantaneous algebra, including zero input, not native access.

theorem MindFormal.writer_upper_envelope {H rate forcing initial : ℝ} (hH : 0 ≤ H) (hr : 0 < rate) (W F μ : ℝ → ℝ) (hW : ∀ t ∈ Set.Icc 0 H, HasDerivAt W (F t - μ t * W t) t) (hF : ∀ t ∈ Set.Icc 0 H, F t ≤ forcing) (hμ : ∀ t ∈ Set.Icc 0 H, rate ≤ μ t) (hn : ∀ t ∈ Set.Icc 0 H, 0 ≤ W t) (h0 : W 0 ≤ initial) :
W H ≤ referenceActivity rate (forcing / rate) initial H

SW1 SW4: for H nonnegative and positive constant rate, a differentiable full writer W'=F-μW on [0,H] is below the constant-forcing reference when F is at most forcing, μ at least rate, W is nonnegative throughout and its start is at most initial. No sign on forcing or initial is required. This is the upper scalar envelope; coefficient certification and noise are external.

theorem MindFormal.reserve_zero_exists {H low high : ℝ} (hH : 0 ≤ H) (hl : 0 < low) (hu : 0 < high) (reserve rate : ℝ → ℝ) (hd : ∀ t ∈ Set.Icc 0 H, HasDerivAt reserve (rate t) t) (hb : ∀ t ∈ Set.Icc 0 H, -high ≤ rate t ∧ rate t ≤ -low) (h0 : 0 < reserve 0) (hlong : reserve 0 / low ≤ H) :
∃ t ∈ Set.Icc 0 H, reserve t = 0 ∧ reserve 0 / high ≤ t ∧ t ≤ reserve 0 / low

SW1 SW8, SI1 SI9: on [0,H] with H nonnegative, a differentiable reserve whose derivative lies between -high and -low, with both rates positive, positive entering reserve and H at least reserve(0)/low, has a zero in that interval and every supplied zero obeys the displayed bracket. This proves existence and brackets for one cue, not the finite-family last-zero construction.

theorem MindFormal.reserve_strict_decrease {H : ℝ} (reserve rate : ℝ → ℝ) (hd : ∀ t ∈ Set.Icc 0 H, HasDerivAt reserve (rate t) t) (hr : ∀ t ∈ Set.Icc 0 H, rate t < 0) :
StrictAntiOn reserve (Set.Icc 0 H)

SW1 SW8, SI1 SI9: on an arbitrary closed interval [0,H], a reserve differentiable at every point with strictly negative derivative there is strictly decreasing. This proves uniqueness and sign order of a supplied zero; the earlier existence theorem separately requires a long enough nonnegative horizon and positive entering reserve.

theorem MindFormal.constant_family_loss {I : Type u_1} (s : Finset I) (hs : s.Nonempty) (initial rate : I → ℝ) {t : ℝ} (ht : 0 ≤ t) (hr : ∀ i ∈ s, 0 < rate i) :
(∃ i ∈ s, 0 < initial i - rate i * t) ↔ t < s.sup' hs fun (i : I) => max (initial i) 0 / rate i

SW1 SW8, SI1 SI9: on a finite nonempty cue set s, for arbitrary initial reserves and strictly positive constant loss rates for its members, at nonnegative time t some reserve is positive exactly before the maximum of the positive-part initial-reserve/rate clocks. This proves the exact finite-family loss time in the constant-rate reference, including initially nonpositive cues. Variable rates and changing cue availability need envelopes.

theorem MindFormal.signed_reserve_envelope {q J L jlo jhi llo lhi : ℝ} (hq : 0 ≤ q) (hq1 : q ≤ 1) (hj : jlo ≤ J ∧ J ≤ jhi) (hl : llo ≤ L ∧ L ≤ lhi) :
(1 - q) * jlo - q * lhi ≤ (1 - q) * J - q * L ∧ (1 - q) * J - q * L ≤ (1 - q) * jhi - q * llo

SW1 SW10: for a needed share q in [0,1], supplied lower/upper bounds on useful input and rest load bound the signed reserve by the corresponding crossed endpoints. All six input bounds are at one time and may be signed. This proves the envelope algebra, not the source's first-return infimum.

theorem MindFormal.passage_midpoint_error {p lo hi : ℝ} (hl : lo ≤ p) (hu : p ≤ hi) :
|p - (lo + hi) / 2| ≤ (hi - lo) / 2

SW1 SW14: any real probability value p between supplied bounds lo and hi is within half their width of their midpoint. These two inequalities are the only hypotheses. This proves the error arithmetic; the Brownian passage bounds themselves are not constructed here.

theorem MindFormal.passage_midpoint_relative {p lo hi ε : ℝ} (hl : lo ≤ p) (hu : p ≤ hi) (he : 0 ≤ ε) (hw : (hi - lo) / 2 ≤ ε * lo) :
|p - (lo + hi) / 2| ≤ ε * p

SW1 SW14: if lo ≤ p ≤ hi, the error fraction ε is nonnegative and half the width is at most ε times lo, the midpoint error is at most ε times p. This is the sufficient relative-error certificate conditional on both passage bounds; it needs no independence premise and does not establish those bounds.