I have seen two proofs of Hammersley-Clifford theorem:
The first proof comes from the book Probabilistic Graphical Models Principles and Techniques (p129 – p132), this link is the screenshot: https://i.stack.imgur.com/dgTz8.png
The second proof comes from this link: http://www.stat.yale.edu/~pollard/Courses/251.spring04/Handouts/Hammersley-Clifford.pdf
For both proofs:
Firstly, they rewrite the probability distribution function P(X) as the multiplication of energy functions.
Secondly, they validate the values of some specific energy functions are constantly 0 if those funxtions containing variables that do not constitute clique in graph H.
I was confused by the second step, which seems complex and unnecessary.
Here is my proof to circumvent the second step: (Signs are consistent with the second proof)
Following the same first step, P(X) can be written as:
T is the collection of all the combinations of variables x1, x2, x3…, A is one of these combinations.
In the book Probabilistic Graphical Models Principles and Techniques (p39), according to Exercise 2.5, P(X) satisfies the following form when two sets of variables are conditionally independent:
Hence, in (EQ.A), if x1 and x2 do not constitute a clique in H, namely they are independent when conditioning on some other variables, then any A containing both x1 and x2 will lead to f(A)=CONSTANT to ensure P(X) can be written as the form of Exercise 2.5.
Hence, if some A does not result f(A)=CONSTANT, then it is the clique of H (except those A's that contain only one variable or nothing), so P(X) is the Gibbs distribution of H.

