let e_shared pool tau term f =
  if is_atomic term then f term else
    let x = fresh pool tau in
    e_let x term (f (e_var x))