Fixpoint rev {A} (l : list A) : list A :=
match l with
| [] => []
| x :: xs => rev xs ++ [x]
end.
Fixpoint rev_tail' {A} (l : list A) (acc : list A) : list A :=
match l with
| [] => acc
| x :: l' => rev_tail' l' (x :: acc)
end.
Definition rev_tail {A} (l : list A) : list A := rev_tail' l [].

Theorem negb_involutive : forall b : bool,
negb (negb b) = b.