This ruler used bribery to net himself four votes for the title of Holy Roman Emperor, which he claimed by descent from Philip of Swabia, over the three garnered by Richard of Cornwall, but the election was vetoed by Alexander IV. James the Conqueror helped this man suppress a rebellion.  Under this ruler's supervision, a legal code called the Seven Divisions of the Law was assembled. It was for this king that Jehuda ben Moses Cohen and Isaac ben Sid assembled namesake (*) astronomical tables. This king legally recognized the sheep ranching society called the Mesta, and his court scholars produced the history Premera cronica general.  Succeeded by his son Sancho IV, 
This ruler used bribery to net himself four votes for the title of Holy Roman Emperor, which he claimed by descent from Philip of Swabia, over the three garnered by Richard of Cornwall, but the election was vetoed by Alexander IV. James the Conqueror helped this man suppress a rebellion.  Under this ruler's supervision, a legal code called the Seven Divisions of the Law was assembled. It was for this king that Jehuda ben Moses Cohen and Isaac ben Sid assembled namesake (*) astronomical tables. This king legally recognized the sheep ranching society called the Mesta, and his court scholars produced the history Premera cronica general.  Succeeded by his son Sancho IV, for 10 points, identify this ruler of Castile and Leon from 1252 to 1284, renowned for his alleged sagacity.
This ruler used bribery to net himself four votes for the title of Holy Roman Emperor, which he claimed by descent from Philip of Swabia, over the three garnered by Richard of Cornwall, but the election was vetoed by Alexander IV.
Alfonso X [or Alfonso the Wise or Alfonso the Learned or Alfonso el Sabio; prmpt on Alfonso]