The properties of RBT are.
- Every node is either red or black.
- The root and leaves (NIL’s) are black.
- If a node is red, then its parent is black.
- All simple paths from any node x to a descendant leaf have the same number of black nodes = black-height(x).
So if 7 is red and and when 6 is added its also red this violates the 3rd property hence the rotation and changes to remove the violations.