Treatise on logic