Section SMX_facts.
Context {State Symbol : Set}.
Local Definition Config := @Config State Symbol.
(* reachable in at most n steps *)
Inductive reachable_n (M: SMX) : nat -> Config -> Config -> Prop :=
| reach_refl (n: nat) (X: Config) : reachable_n M n X X
| reach_step (n: nat) (X Y Z: Config) : step M X Y -> reachable_n M n Y Z -> reachable_n M (1+n) X Z.
Definition terminal (M: SMX) (X: Config) : Prop :=
forall (Y: Config), not (step M X Y).
(* terminating or reachable in at most n steps *)
Definition maybe_reachable (M: SMX) (n: nat) (X Y: Config) : Prop :=
reachable_n M n X Y \/ (exists Z, reachable_n M n X Z /\ terminal M Z).

Lemma maybe_reachable_trans' {M} n {m k X X' Y Z} :
m + n <= k -> X = X' -> maybe_reachable M n Y Z -> maybe_reachable M m X Y -> maybe_reachable M k X' Z.