proposition: Lemma in_state_add p1 p2 i1 n2 bs2 st : in_state p1 i1 (add_state n2 p2 bs2 st) = ((p1 == p2) && (in_val i1 bs2)) || in_state p1 i1 st.
proof: Proof. elim: st => //= [] [[n3 p3] v3] st IH. case: leqP => Ln2n3 //=. rewrite IH. by do 2 case: eqP => //=; do 2 case: in_val. Qed.
imports: mathcomp(all_ssreflect) mathcomp(zify)