Which element forms an ionic compound when it reacts with lithium?