proposition: Lemma filter_length_lt' : forall (X : Type) (f : X -> bool) (l : list X), (exists x : X, In x l /\ f x = false) -> length (filter f l) < length l.
proof: Proof. intros ? ? ? (? & ? & ?). induction l; intros. - inversion H. - cbn in *. destruct (f a) eqn:?. + inversion H. * subst. rewrite Heqb in H0. inversion H0. * cbn in *. apply PeanoNat.Nat.succ_lt_mono. intuition auto with *. + pose proof @filter_length_le _ l f. cbn. lia. Qed.
imports: Coq(Lia Lists.List) Equations(Equations)