Mathematical Foundation for Dialectical logic