Mathematical structures of quantum theories