Skip to content

Instantly share code, notes, and snippets.

@nkaretnikov
Created April 28, 2015 19:51
Show Gist options
  • Select an option

  • Save nkaretnikov/8305b7022a5e74a8e404 to your computer and use it in GitHub Desktop.

Select an option

Save nkaretnikov/8305b7022a5e74a8e404 to your computer and use it in GitHub Desktop.
forallb
(** Recall the function [forallb], from the exercise
[forall_exists_challenge] in chapter [Poly]: *)
Fixpoint forallb {X : Type} (test : X -> bool) (l : list X) : bool :=
match l with
| [] => true
| x :: l' => andb (test x) (forallb test l')
end.
(** Using the property [all], write down a specification for [forallb],
and prove that it satisfies the specification. Try to make your
specification as precise as possible. *)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment