(ט) ובאת, לרבות בית דין שביבנה. (Devarim 17:9) "And you shall come": to include the beth-din in Yavneh.
אל הכהנים הלוים, מצוה בבית דין שיהיו בו כהנים ולוים "to the Cohanim, the Levites": It is a mitzvah that there be Cohanim and Levites in the beth-din.
יכול מצוה ואם אין בו יהא פסול תלמוד לומר ואל השופט, אף על פי שאין בו כהנים ולוים כשר. I might think that if there are none, it is invalidated; it is, therefore, written "and to the judge": Though there be no Cohanim or Levites, it is a bona fide beth-din.
אשר יהיה בימים ההם, אמר רבי יוסי הגלילי וכי עלת על דעתך שתלך אצל שופט שאינו בימיך אלא שופט שהוא כשר ומוחזק באותם הימים היה קרוב ונתרחק כשר וכן הוא אומר (קהלת ז י) אל תאמר מה היה שהימים הראשונים היו טובים מאלה כי לא מחכמה שאלת על זה. "and to the judge that shall be in those days": Now would it enter your mind that one should go to a judge who is not in his days?! (The reference is to) one who was related (to the judge by marriage), and whose relationship was subsequently dissolved, in which instance he may be judged (in "those days" following the dissolution of the relationship). Variantly: Do not say (I must have a judge) like Moses and Aaron, but (go to) "the judge that shall be in those days." As it is written (Koheleth 7:10) "Do not say: 'What has happened that the earlier days were better than these?' For it is not from wisdom that you ask this."
ודרשת והגידו לך את דבר המשפט, אלו דקדוקי משפט סליק פיסקא "and they shall tell you the things of the judgment": the fine points.