The Logic of Legal Requirements