adding validation code to doc/udoc

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>