It has come to my attention that the folktale I translated, 'The smart boy and the smarter girl' is very similar to an Arabic mithal (example, similar to a proverb in English) reported by Ibn al-Jawzi (a Hanbali jurist and descendent of Abu Bakr) in his 6th century AD book Al-Adhkiya', 'The smart ones' (you can read the whole thing in Arabic here). It appears that the tale 'The smart boy' is a variant of Ibn Jawziya's story 'وافق شن طبقة', 'Toboqa is right for Shin' and may have originally came from it, or maybe they have both been around for a long time.
The proverb 'Toboqa is right for Shin' is said when someone has found their match, or when two things are similar.
At any rate, here is 'Toboqa is right for Shin':
قال الشرقي بن فطامي كان شن من دهاة العرب فقال والله لأطوفن حتى أجد امرأة مثلي فأتزوجها فسار حتى لقي رجلاً يريد قرية يريدها شن فصحبه فلما انطلقا قال له شن أتحملني أم أحملك فقال الرجل يا جاهل كيف يحمل الراكب الراكب فسارا حتى رأيا زرعاً قد استحصد فقال شن: أترى هذا الزرع قد أكل أم لا فقال يا جاهل أما تراه قائماً فمرا بجنازة فقال أترى صاحبها حياً أو ميتاً فقال ما رأيت أجهل منك أتراهم حملوا إلى القبور حياً ثم سار به الرجل إلى منزله وكانت له ابنة تسمى طبقة فقص عليها القصة فقالت أما قوله أتحملني أم أحملك فأراد تحدثني أم أحدثك حتى تقطع طريقنا وأما قوله أترى هذا الزرع قد أكل أم لا فأراد باعه أهله فأكلوا ثمنه أم لا وأما قوله في الميت فإنه أراد اترك عقبا يحيا به ذكره أم لا فخرج الرجل فحادثه ثم أخبره بقول ابنته فخطبها إليه فزوجه إياها فحملها إلى أهله فلما عرفوا عقلها ودهاءها قالوا وافق شن طبقة
Ash-Sharqi bin Fatami said: Shin was one of the clever Arabs, and he said: Wallahi I will walk until I find a woman like me and marry her. So he walked until he met a man who was going to the same village Shin was and became his companion. When they started walking, Shin said to him: Will you carry me or shall I carry you, and the man said: O ignorant one how can a passenger carry a passenger. They walked until they saw a farm with ripe crops, and Shin said: Do you see this crop, has it been eaten or not? And the man said: O ignorant one, do you not see it standing there. And they passed a funeral and Shin said: Do you think the one the funeral's for is alive or dead. The man said: I have never seen one more ignorant than you, do you think they would carry him to his grave alive. Then the man took Shin to his house, where he had a daughter named Toboqa, and he told her the story of what happened on the trip. She said: as for when he said 'will you carry me or shall I carry you', he meant, will you speak to me or shall I speak to you, so as to shorten our road. As for when he said 'do you think this crop has been eaten or not', he meant, had its owners already sold it and eaten up its price or not. As for what he said about the dead person, he meant did he leave a descendant and so his memory lives through him or not. The man went out and talked to Shin and then told Shin what his daughter had said and Shin proposed to her and married her and took her to his family. When they realised her intelligence and cleverness they said, Toboqa is right for Shin.