Gibbs Free Energy and Phase Rule on the Tech Tree