E. O. Wilson, when he was young, ”…observed that when ants die — and if they’re not crushed and torn apart — they just lie there, sometimes upside down, feet in the air, while their sister ants (almost all ants in a colony are ladies) walk right by without a glance. That is until about two days after an ant’s passing, Ed discovered, when the corpse appears to emit a chemical signal that changes the living ants’ behavior dramatically.
”All of a sudden what was once a pile of gunk on the colony floor becomes a ‘Problem to Be Solved.’ Once the signal is in the air, any ant that happens by grabs the corpse and carries it through the colony to a refuse pile designated the graveyard and dumps it on a mound of also-dead ants.
”Finally, after much sifting and mixing, [he] discovered that oleic acid — just a teeny drop of it — was all the ants had to sniff to think “DEAD!” And, because he could — Ed had a colony parked in his Harvard lab so he could watch them endlessly — one day he took a drop of the chemical and gently deposited it on an ant that had the misfortune of walking by.”
——-
As for ants bringing dead ant bodies into the nest, it’s probably added to the food pile for the benefit of the colony, along with bits of grasshopper legs and moth wings. I think to an ant, “parts is parts.”