let literal_to_string ?(pretty:bool = true) (literal: literal) : string =
(* replace diff by -equal *)
let literal =
match literal.atom with
| Func func when pretty && Symbol.equal Symbol.diff func.symbol ->
request_literal
(not literal.sign)
(request_func (Symbol.equality, func.subterms))
| _ ->
literal
in
let prefix =
if literal.sign then
"+" (* " *)
else
"-" (* " *)
in
let term =
term_to_string ~pretty:pretty literal.atom
in
prefix ^ term