Section TM.
Hypothesis Σ:Set.
Hypothesis Σ0:Σ.
Definition HaltsAt(tm:TM Σ)(n:nat)(st:ExecState Σ): Prop :=
exists st', Steps Σ tm n st st' /\ step Σ tm st' = None.
Definition Halts(tm:TM Σ)(st:ExecState Σ): Prop :=
exists n, HaltsAt tm n st.
Definition HaltsFromInit(tm:TM Σ): Prop :=
Halts tm (InitES Σ Σ0).
Definition NonHalt tm st :=
forall n, exists st', Steps Σ tm n st st'.
Definition LE(tm tm':TM Σ): Prop :=
forall (s:St)(i:Σ),
tm s i = tm' s i \/
tm s i = None.
Hypothesis BB:nat.
Definition HaltTimeUpperBound(st:ExecState Σ)(P:TM Σ->Prop):Prop :=
forall (tm:TM Σ)(n0:nat), P tm -> HaltsAt tm n0 st -> n0<=BB.

Lemma HaltTimeUpperBound_LE_NonHalt {st tm}:
~Halts tm st ->
HaltTimeUpperBound st (LE tm).