I get the warning "Undefined control sequence" with \mathbb
Load the package
\usepackage{amssymb}
to enable the macro \mathbb
.
Loading the amsmath
package too is always a good idea:
\usepackage{amsmath}
Here you'll find some more information.