The caterpillar thinks that both she and the lizard are crazy. If what the sane believes is always true and what the madman believes is always false,
Is the lizard sane or crazy?
The caterpillar cannot be sane because it thinks it is crazy and the ropes do not lie. Therefore she is crazy and if the lizard were too, the caterpillar would think what is true, which contradicts the definition of madmen who always believe what is false.
Then if the caterpillar is crazy and lies, the lizard must be sane.