Forms of productive complexity as criteria for educational reconstruction: the design of a teaching proposal on thermodynamics