trans env (Lam s t e) = do
  let env' = extend s t env
  (te, e') <- trans env' e
  let lt = Pi s t te
  (_, Pi _ t' _) <- trans env lt
  return (lt, Lam s t' e')
trans env (Lam s t e) = do
  let env' = extend s t env
  (te, e') <- trans env' e
  let lt = Pi s t te
  (_, Pi _ t' _) <- trans env lt
  return (lt, Lam s t' e')
trans env (Lam s t e) = do
  let env' = extend s t env
  (te, e') <- trans env' e
  let lt = Pi s t te
  (_, Pi _ t' _) <- trans env lt
  return (lt, Lam s t' e')