static Exp nlLogic_and(Exp a, Exp b) {
  ret a == null ? b : b == null ? a : And(a, b);
}

static Exp nlLogic_and(L<Exp> l) {
  if (empty(l)) null;
  Exp e = last(l);
  for (int i = l(l)-2; i >= 0; i--)
    e = And(l.get(i), e);
  ret e;
}