Fully Homomorphic Boolean Gates

Dear community,
In the publication of I. Chillotti, N. Gama, M. Georgieva and M. Izabachene, “TFHE: fast fully homomorphic encryption over the torus” I found these gate descriptions that I would love to understand. I hope for your help in answering a few questions I have about them or mentioning materials that would help me.

– HomNOT(c) = (0, 1/4) - c
– HomAND(c1, c2) = Bootstrap ((0, -1/8) + c1 + c2)
– HomNAND(c1, c2) = Bootstrap ((0, 5/8) - c1 - c2)
– HomOR(c1, c2) = Bootstrap ((0, 1/8) + c1 + c2)
– HomXOR(c1, c2) = Bootstrap (2 · (c1 - c2 ))

I noticed that in the TFHE Library (TFHE Fast Fully Homomorphic Encryption over the Torus) the NAND and XOR gates are different:
– HomNAND(c1, c2) = Bootstrap ((0, 1/8) - c1 - c2)
– HomXOR(c1, c2) = Bootstrap ((0, 1/4) + 2*(c1 + c2))
also, the NOT gate seems to be just:
– HomNOT(c) = - c

  1. How do we derive that for example, NAND is (- c1 - c2) or OR is (+ c1 + c2)
  2. Where are the constants like -1/8 or 1/4 coming from?
  3. What is the reason for the differences between the gates in the publication and the library?

I understand that these are very specific questions, but maybe you can give me some clues.
Thank you!