@DavidDouwe hi david please refer to the documentation: yes sample statements encode prior information.
viewed operationally, HMC is an algorithm that takes a (possibly unnormalized) log density and generates approximate samples from the corresponding density. so for example the log density -0.5 x ** 2
corresponds to a unit normal gaussian distribution. each sample statement essentially encodes part of the log density. using a factor
statement is another way to add additional terms to the log density of a model.