How is the sum_to_zero_vector implemented under the hood?

The easy way keeps the N total number of variables. It’s overparameterized but probably won’t be a problem.

data {
  int<lower=0> N;
}
parameters {
  ordered[N] x;
}
transformed parameters {
  vector[N] z = x - mean(x);
}
model {
  x ~ std_normal();
}

I’d have to think more about how to do this without the extra 1 parameter.