Composed according to an advanced poetic technique and complex metrical system, the Veda consists of four types of literature: Samhita, Brahmana, Aranyaka, and Upanishad. Most important are the four Samhitas, which are the basic Vedas. The earliest is the Rig-Veda ( rig = stanza of praise), a collection of 1,028 hymns. The Sama-Veda ( saman = chant) consists of stanzas taken from the Rig-Veda meant to be sung to fixed melodies. The Yajur-Veda ( yajus = sacrificial prayer), compiled a century or two later than the Rig-Veda, contains prose and verse formulas that were to be pronounced by the priest performing the manual part of the sacrifice. These three Vedas were recognized as canonical and called Trayi Vidya [the threefold knowledge]. The Atharva-Veda ( atharvan = charm), written at a later period, was included in the canon only after a long struggle. Influenced by popular religion, it included spells and incantations for the practice of magic. Each of these Vedas was taught in different schools, and each school produced commentarial literature. The Brahmanas are prose explanations of the sacrifice, while the Aranyakas, or forest treatises, give instruction for the mental performance of the sacrifice through meditation, thus forming a transition to the Upanishads, works of mysticism and speculation.