<P> Jains and Hindus have coexisted in Tamil country since at least the second century BCE . </P> <P> Competition between Jains and Brahmans, between Jains and Shaivas, is a frequent motif of all medieval western Indian narratives, but the two communities for the most part coexisted and coprospered . Shaiva kings patronised Jain mendicants, and Jain officials patronised Brahmana poets . </P> <P> Around the 8th century CE, Hindu philosopher Ādi Śaṅkarācārya tried to restore the Vedic religion . Śaṅkarācārya brought forward the doctrine of Advaita . The Vaishnavism and Shaivism also began to rise . This was particularly in the southern Indian states . </P> <P> According to a Saivite legend, the Pandya king Koon Pandiyan ordered a massacre of 8,000 Jain monks . This event is depicted graphically in walls of Tivatur in North Arcot . However, this legend is not found in any Jain text, and is believed to be a fabrication made up by the Saivites to prove their dominance . </P>

What are the similarities between hinduism and jainism