The median time past is one of the window's times
ProvedBitcoinHeader.mtp_mem_windowFor every non-empty chain of times, : the median is an element of the (at most eleven) most recent block times, not an average or an interpolation.
import Definitions.Def_BitcoinHeader
theorem BitcoinHeader.mtp_mem_window (times : List Int) (h : times ≠ []) :
BitcoinHeader.medianTimePast times ∈ BitcoinHeader.timeWindow times := by sorryRead-back
What the Lean code literally says, in plain math · claude-fable-5-1 (independent sub-agent, blind: Lean code + auditor instructions only)
For every finite list of integers , under the single hypothesis that is not the empty list (so ), the statement asserts that the integer is a member of the list , i.e. it is equal to at least one of the entries . Here is the list of the first entries of in their given order (all of when ), and is defined as follows: let (so under the hypothesis), sort those entries into non-decreasing order , and take (zero-based position , natural-number division rounding down; this is the unique middle element when is odd and the upper of the two middle elements when is even, e.g. when ). The definition would return the fallback value if the window were empty, but the hypothesis excludes that case, so the fallback never arises here. The conclusion is about membership as a value: it says the computed number occurs somewhere among the first entries of ; it does not say at which position, and it does not say anything about entries beyond the window. The statement makes no claim for .
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.