"The Pope is infallible in matters of faith and morals; that is, when he defines a doctrine of faith or morals to be held by the whole Church, he speaks without error or the possibility of error."
"The Pope is preserved from error when he is acting as teacher and lawgiver for the whole Church, for then he is infallibly guided by the Holy Ghost, the Spirit of Truth, Who abides with the Church forever."
Quotes taken from, "The Visible Church" by Sullivan/Kenedy, Copyright, 1920, 1922 N.Y.
ECCLESIASTES 12:13-14
The last word, when all is heard: Fear God and keep His Commandments, for this is man's all, because God will bring to judgment every work, with all its hidden qualities, whether good or bad.
Sirach 43:35 It is the Lord who has made all things, and to those who fear Him, He gives wisdom.