proposition: Lemma count_occ_cons {X : Type} {D : forall x y : X, {x = y} + {x <> y}} {A a c} : count_occ D (a :: A) c = count_occ D (locked [a]) c + count_occ D A c.
proof: Proof. rewrite /count_occ /is_left -lock. by case: (D a c). Qed.
imports: ssreflect ssrbool ssrfun PeanoNat Lia Permutation List