(Devarim 17:8) "If there be hidden ("ki yipale") from you a thing of judgment": "ki yipale": Scripture here speaks of the mufla (expert [similar to "yipale"])
2
מִמְּךָ – זוֹ עֵצָה.
"from you": This refers to counsel, viz. (Nachum 1:11) "From you has gone the counselor."
"and go up to the place, etc.": From here it was derived that there were three batei-din there: one at the entrance to the Temple mount, one at the entrance of the azarah (the Temple court), and one in the chamber of hewn stone (the seat of the great Sanhedrin).
They (the dissenting sage and his colleagues in the local court) come to the court at the entrance of the Temple mount, and he (the dissenting sage) says to them (the members of that court): Thus have I expounded, and thus have my colleagues expounded. If they (the latter) have heard (the ruling in that matter), they tell them; if not they (the dissenter and his colleagues) come to the one at the entrance of the azarah), and he (the dissenter) says (to them): Thus did I expound and thus did my colleagues expound; thus did I teach and thus did my colleagues teach. If they have heard, they tell them; if not, they all come to the great beth-din (the Sanhedrin) in the chamber of hewn stone, whence Torah goes forth to all of Israel, as it is written (Devarim, Ibid.) "to the place which the L-rd your G-d chooses."
"and you shall arise and you shall go up": We are hereby taught that Eretz Yisrael is higher than all of the lands, and the Temple higher than all of Eretz Yisrael.
(דברים יז ח) כִּי יִפָּלֵא – מְלַמֵּד שֶׁבְּמֻפְלָא הַכָּתוּב מְדַבֵּר.
(Devarim 17:8) "If there be hidden ("ki yipale") from you a thing of judgment": "ki yipale": Scripture here speaks of the mufla (expert [similar to "yipale"])
מִמְּךָ – זוֹ עֵצָה.
"from you": This refers to counsel, viz. (Nachum 1:11) "From you has gone the counselor."
דָּבָר – זוֹ הֲלָכָה.
"a thing": This is halachah.
לַמִּשְׁפָּט – זֶה הַדִּין.
"of judgment": This is (judicial) ruling.
בֵּין דָּם לְדָם – בֵּין דַּם נִדָּה לְדַם יוֹלֶדֶת לְדַם זִיבָה.
"between blood and blood": between the blood of niddah (menstruation), the blood of zivah (vaginal discharge) or the blood of childbirth.
בֵּין דִּין לְדִין – בֵּין דִּינֵי מָמוֹנוֹת לְדִינֵי נְפָשׁוֹת לְדִינֵי מַכּוֹת.
"between law and law": (questions of adjudication of) monetary laws, capital laws, and the laws of stripes.
בֵּין נֶגַע לָנֶגַע – בֵּין נִגְעֵי אָדָם לְנִגְעֵי בְגָדִים לְנִגְעֵי בָתִּים.
"between plague and plague": (questions concerning the cleanliness or uncleanliness of) plague-spots in men, houses, and clothing.
דִּבְרֵי – אֵלּוּ עֲרָכִים וַחֲרָמִים וְהֶקְדֵּשׁוֹת.
"things": These are (questions concerning) assessments, dedications, and consecrations.
רִיבוֹת – זוֹ הַשְׁקָיַת סוֹטָה וַעֲרִיפַת עֶגְלָה וְטָהֳרַת מְצוֹרָע.
"disputes": These are (questions concerning) the sotah's draught, the breaking of the heifer's neck, and the cleansing of the leper.
בִּשְׁעָרֶיךָ – זֶה לֶקֶט שִׁכְחָה וּפֵאָה.
"in your gates": These are (questions concerning) leket, shikchah, and peah.
וְקַמְתָּ – מִיָּד.
וְקַמְתָּ – בְּבֵית דִּין,
"then you shall arise": from beth-din.
מִכָּן אָמְרוּ (סנהדרין פי״א מ״ב): שְׁלֹשָׁה בָּתֵּי דִינִים הָיוּ שָׁם, אֶחָד עַל פֶּתַח הַר הַבַּיִת, וְאֶחָד עַל פֶּתַח הָעֲזָרָה, וְאֶחָד בְּלִשְׁכַּת הַגָּזִית.
"and go up to the place, etc.": From here it was derived that there were three batei-din there: one at the entrance to the Temple mount, one at the entrance of the azarah (the Temple court), and one in the chamber of hewn stone (the seat of the great Sanhedrin).
בָּאִים לָזֶה שֶׁל שַׁעַר הַר הַבַּיִת וְאוֹמֵר: ״כָּךְ דָּרַשְׁתִּי וְכָךְ דָּרְשׁוּ חֲבֵרַי, כָּךְ לִמַּדְתִּי וְכָךְ לִמְּדוּ חֲבֵרַי״. אִם שָׁמְעוּ, אָמְרוּ לָהֶם, וְאִם לָאו – בָּאִים לָזֶה שֶׁעַל פֶּתַח הָעֲזָרָה וְאוֹמֵר: ״כָּךְ דָּרַשְׁתִּי וְכָךְ דָּרְשׁוּ חֲבֵרַי, כָּךְ לִמַּדְתִּי וְכָךְ לִמְּדוּ חֲבֵרַי״. אִם שָׁמְעוּ, אָמְרוּ לָהֶם, וְאִם לָאו – אֵלּוּ וָאֵלּוּ בָּאִים לְבֵית דִּין הַגָּדוֹל שֶׁבְּלִשְׁכַּת הַגָּזִית, שֶׁמִּשָּׁם תּוֹרָה יוֹצְאָה לְכָל יִשְׂרָאֵל, שֶׁנֶּאֱמַר: מִן הַמָּקוֹם הַהוּא אֲשֶׁר יִבְחַר ה׳.
They (the dissenting sage and his colleagues in the local court) come to the court at the entrance of the Temple mount, and he (the dissenting sage) says to them (the members of that court): Thus have I expounded, and thus have my colleagues expounded. If they (the latter) have heard (the ruling in that matter), they tell them; if not they (the dissenter and his colleagues) come to the one at the entrance of the azarah), and he (the dissenter) says (to them): Thus did I expound and thus did my colleagues expound; thus did I teach and thus did my colleagues teach. If they have heard, they tell them; if not, they all come to the great beth-din (the Sanhedrin) in the chamber of hewn stone, whence Torah goes forth to all of Israel, as it is written (Devarim, Ibid.) "to the place which the L-rd your G-d chooses."
וְקַמְתָּ וְעָלִיתָ, מַגִּיד שֶׁאֶרֶץ יִשְׂרָאֵל גְּבוֹהָה מִכָּל הָאֲרָצוֹת וּבֵית הַמִּקְדָּשׁ גָּבוֹהַּ מִכָּל אֶרֶץ יִשְׂרָאֵל.
"and you shall arise and you shall go up": We are hereby taught that Eretz Yisrael is higher than all of the lands, and the Temple higher than all of Eretz Yisrael.