MindFormal v1.0.0One Mind

MindFormal.Chapters.Ch15.PriceBracketAlgebra

theorem MindFormal.Transactions.half_price_upper {p p0 intercept slope spread error epsilon actual : ℝ} (hs : 0 < slope) (hv : 0 < spread) (he : 0 ≤ epsilon) (hh : epsilon < 1 / 2) (upper : actual ≤ normalCDF ((intercept - slope * (p - p0) + error) / spread) + epsilon) (side : 1 / 2 ≤ actual) :
p - affinePriceZero p0 intercept slope ≤ (error + spread * normalQuantile (1 / 2 + epsilon)) / slope

L55: a response probability above one half bounds the price on one side. The other endpoint of a grid bracket need not have probability exactly one half.

theorem MindFormal.Transactions.half_price_lower {p p0 intercept slope spread error epsilon actual : ℝ} (hs : 0 < slope) (hv : 0 < spread) (he : 0 ≤ epsilon) (hh : epsilon < 1 / 2) (lower : normalCDF ((intercept - slope * (p - p0) - error) / spread) - epsilon ≤ actual) (side : actual ≤ 1 / 2) :
affinePriceZero p0 intercept slope - p ≤ (error + spread * normalQuantile (1 / 2 + epsilon)) / slope

L55: the below-half endpoint gives the complementary price bound. Only the original Gaussian probability enclosure and its source side are used.

theorem MindFormal.Transactions.price_bracket_error {left right reported center rleft rright : ℝ} (hl : left - center ≤ rleft) (hr : center - right ≤ rright) (reported_mem : reported ∈ Set.Icc left right) :
|reported - center| ≤ max rleft rright + (right - left)

L55: an actual finite bracket bounds every reported price in it. Both native endpoint errors and the genuine endpoint spacing are retained.