How to write a theory in CVC4