Taris Henrique, we don't have exact information if the tire was changed in xml. We only have wear as a float at the end of the lap. One way to determine if the tire was changed would be if wear value at the end of the lap after pit stop is bigger then wear a lap before pit stop. But it will not work in corner cases like changing tires at the end of first lap (no previous lap to compare to) and tires that for any reason did not have wear during pit out lap (hard compound, no tire wear in options). There are also difficulties to this because depending on pit stall place it can be before start finish line or after it on some circuits, that adds confusion to lap numbers. This all will lead to tire change info not being reliable and I will end explaining why it works or does not work in some cases. I don't want to give unreliable info.