proposition: Lemma fold_right_andb: forall (A : Type) (l : list A) f, fold_right (fun elem b => (f elem) && b) true l = true <-> (forall elem, In elem l -> f elem = true).
proof: Proof. split; intros. induction l. inversion H0. simpl in H0. simpl in H. rewrite andb_true_iff in H. destruct H. destruct H0. rewrite <- H0; trivial. apply IHl; trivial. induction l. simpl; trivial. simpl. rewrite andb_true_iff. split. apply H. auto with *. apply IHl. intros. apply H. auto with *. Qed.
imports: Coq(List) JML(Stack) Coq(ListSet) Coq(Bool) Coq(ZArith) Coq(Relation_Operators) JML(ListHelpers) Coq(Classical) Coq(DecidableType) Coq(FSetInterface) Coq(FSetProperties) Coq(FSetEqProperties) Coq(FSetFacts) Coq(Sumbool) Coq(Lia)