dharmādharmopadeśo 'yam upadeśaś ca tat kṛtaḥ / tadīyajñānapūrvatvaṃ tasmād asyānumīyate
This teaching about dharma and adharma is [also] a teaching and was given by him [Buddha]; therefore it is inferred that it was preceded by his knowledge [of these matters]