Even if animals are able categorize images in photographs and learn sign language, they are still phenomenally less intelligent than human beings. They will never study philosophy or perform brain surgery or even invent a wheel. Furthermore, intelligence does not prove the ability to self-actualise. Mourning others does not prove that animals value their own lives. Perhaps it implies that animals enjoy company but whether they consider the value of their companion's life and their future potential is questionable. Without the ability to value one's own life, life itself ceases to be intrinsically valuable.  The farming of animals does involve death but it is difficult to prove that death is intrinsically a harmful thing. Pain is certainly a harm for the living but animals are farmed are killed very quickly and they are stunned beforehand. Animals on farms do not know that they will be killed so there is no emotional harm caused by the anticipation of death.  There is no evidence that the painless killing of animals should carry any moral weight.