Chiasmus is a rhetorical figure in which:
Words, grammatical structures, or ideas are repeated in reverse order
The emphasis is on contrast and transformation
The meaning is strengthened by symmetry
Classic formula: AB --> BA
This reversal of grammatical structure and ideas is exactly what defines chiasmus.