nogoods_of_lp :: [Rule] -> [CClause]
nogoods_of_lp p =
  let a   = (atoms_p p)Prelude.++[__conflict]
      b   = bodies_p p
      ng1 = Prelude.map get_ng1 b           -- body is true if all lits of it are true -- not ( body=false and all lits=true)
      ng2 = Prelude.concatMap get_ng2 b     -- body is true if all lits of it are true -- not ( body=true and one lit=false)
      ng3 = Prelude.concatMap (get_ng3 p) a -- a head is true if one body is true -- not ( head=false and one body=true)
      ng4 = Prelude.map (get_ng4 p) a       -- a head is true if one body is true -- not ( head=true and all bodies=false)
      ngx = [([__bottom],[])]       -- no conflict literal
  in
  ng1 Prelude.++ ng2 Prelude.++ ng3 Prelude.++ ng4 Prelude.++ ngx
nogoods_of_lp :: [Rule] -> [CClause]
nogoods_of_lp p =
  let a   = (atoms_p p)Prelude.++[__conflict]
      b   = bodies_p p
      ng1 = Prelude.map get_ng1 b           -- body is true if all lits of it are true -- not ( body=false and all lits=true)
      ng2 = Prelude.concatMap get_ng2 b     -- body is true if all lits of it are true -- not ( body=true and one lit=false)
      ng3 = Prelude.concatMap (get_ng3 p) a -- a head is true if one body is true -- not ( head=false and one body=true)
      ng4 = Prelude.map (get_ng4 p) a       -- a head is true if one body is true -- not ( head=true and all bodies=false)
      ngx = [([__bottom],[])]       -- no conflict literal
  in
  ng1 Prelude.++ ng2 Prelude.++ ng3 Prelude.++ ng4 Prelude.++ ngx
nogoods_of_lp p =
  let a   = (atoms_p p)Prelude.++[__conflict]
      b   = bodies_p p
      ng1 = Prelude.map get_ng1 b           -- body is true if all lits of it are true -- not ( body=false and all lits=true)
      ng2 = Prelude.concatMap get_ng2 b     -- body is true if all lits of it are true -- not ( body=true and one lit=false)
      ng3 = Prelude.concatMap (get_ng3 p) a -- a head is true if one body is true -- not ( head=false and one body=true)
      ng4 = Prelude.map (get_ng4 p) a       -- a head is true if one body is true -- not ( head=true and all bodies=false)
      ngx = [([__bottom],[])]       -- no conflict literal
  in
  ng1 Prelude.++ ng2 Prelude.++ ng3 Prelude.++ ng4 Prelude.++ ngx