proposition: Corollary next_waypoint_a p a : terminating (p, (a, 0)) + { '(p', a') | forall n, reaches_plus (p, (n+a, 0)) (p', (n+a', 0)) } + { '(p', (a', b')) | reaches (p, (a, 0)) (p', (a', b')) /\ a' <= l /\ b' <= l }.
proof: Proof. have [[?|[[p' a'] Hp]]|[[p' b'] Hp]] := next_waypoint p a 0. - left. by left. - left. right. exists (p', a') => n. have [k [? Hk]] := Hp n. exists k. split; [lia|done]. - right. exists (p', (0, b')). have [k [? Hk]] := Hp 0. have ? := steps_bound Hk. split; [by exists k|lia]. Qed.
imports: List ssrfun List PeanoNat Lia Operators_Properties ssreflect ssrbool ssrfun