Let Y be any sentence.
Let X be the sentence "If this sentence is true, then Y". Then
1. X ? (X ? Y) [by definition]
2. X ? X [by identity]
3. X ? (X ? Y) [from 1 and 2 by substitution]
4. X ? Y [from 3 by contraction]
5. X [from 1 and 4 by substitution]
6. Y [from 4 and 5 by modus ponens]
Thus every sentence is true.
Let X be the sentence "If this sentence is true, then Y". Then
1. X ? (X ? Y) [by definition]
2. X ? X [by identity]
3. X ? (X ? Y) [from 1 and 2 by substitution]
4. X ? Y [from 3 by contraction]
5. X [from 1 and 4 by substitution]
6. Y [from 4 and 5 by modus ponens]
Thus every sentence is true.