The oldest Zoroastrian material, the Gathas attributed to Zoroaster himself, presents Angra Mainyu in fairly abstract terms, as one of two primordial twin spirits who chose differently between truth and falsehood at the beginning of existence, a passage read by many scholars more as a statement about moral choice available to every person than as the introduction of a fully personified rival god. The much more vivid and systematic dualism familiar from popular accounts, Ahriman as an active, scheming, near equal counter creator locked in direct combat with Ahura Mazda across the whole of history, is developed at length in the Pahlavi Zoroastrian texts, above all the Bundahishn, which were compiled centuries later, during the Sasanian period and after, even though they claim to preserve much older material.
Because the Gathas are famously terse and open to multiple readings, and the Pahlavi texts are far more explicit but far later in date, scholars of Zoroastrianism disagree on how much of the fully developed dualist cosmology, with its detailed account of Ahriman's creations and his eventual defeat at the end of time, reflects the actual thought of the earliest tradition, and how much is later theological systematization responding to centuries of contact with other religious systems, including Judaism, Christianity, and Manichaeism.