Foundations of Digital Law