The Vatican Council
Fourth Session, Chapter 4
ON THE INFALLIBLE TEACHING AUTHORITY OF THE ROMAN PONTIFF
That apostolic primacy which the Roman pontiff possesses as successor of Peter, the prince of the apostles, includes also the supreme power of teaching. This holy see has always maintained this, the constant custom of the church demonstrates it, and the ecumenical councils, particularly those in which East and West met in the union of faith and charity, have declared it.
So the fathers of the fourth council of Constantinople, following the footsteps of their predecessors, published this solemn profession of faith: The first condition of salvation is to maintain the rule of the true faith. And since that saying of our lord Jesus Christ, You are Peter, and upon this rock I will build my church  , cannot fail of its effect, the words spoken are confirmed by their consequences. For in the apostolic see the catholic religion has always been preserved unblemished, and sacred doctrine been held in honour. Since it is our earnest desire to be in no way separated from this faith and doctrine, we hope that we may deserve to remain in that one communion which the apostolic see preaches, for in it is the whole and true strength of the christian religion  .
What is more, with the approval of the second council of Lyons, the Greeks made the following profession: "The holy Roman church possesses the supreme and full primacy and principality over the whole catholic church. She truly and humbly acknowledges that she received this from the Lord himself in blessed Peter, the prince and chief of the apostles, whose successor the Roman pontiff is, together with the fullness of power. And since before all others she has the duty of defending the truth of the faith, so if any questions arise concerning the faith, it is by her judgment that they must be settled." 
Then there is the definition of the council of Florence: "The Roman pontiff is the true vicar of Christ, the head of the whole church and the father and teacher of all Christians; and to him was committed in blessed Peter, by our lord Jesus Christ, the full power of tending, ruling and governing the whole church." 
To satisfy this pastoral office, our predecessors strove unwearyingly that the saving teaching of Christ should be spread among all the peoples of the world; and with equal care they made sure that it should be kept pure and uncontaminated wherever it was received.
It was for this reason that the bishops of the whole world, sometimes individually, sometimes gathered in synods, according to the long established custom of the churches and the pattern of ancient usage referred to this apostolic see those dangers especially which arose in matters concerning the faith. This was to ensure that any damage suffered by the faith should be repaired in that place above all where the faith can know no failing .
The Roman pontiffs, too, as the circumstances of the time or the state of affairs suggested, sometimes by summoning ecumenical councils or consulting the opinion of the churches scattered throughout the world, sometimes by special synods, sometimes by taking advantage of other useful means afforded by divine providence, defined as doctrines to be held those things which, by God's help, they knew to be in keeping with sacred scripture and the apostolic traditions.
For the Holy Spirit was promised to the successors of Peter not so that they might, by his revelation, make known some new doctrine, but that, by his assistance, they might religiously guard and faithfully expound the revelation or deposit of faith transmitted by the apostles.
Indeed, their apostolic teaching was embraced by all the venerable fathers and reverenced and followed by all the holy orthodox doctors, for they knew very well that this see of St. Peter always remains unblemished by any error, in accordance with the divine promise of our Lord and Saviour to the prince of his disciples: I have prayed for you that your faith may not fail; and when you have turned again, strengthen your brethren  .
This gift of truth and never-failing faith was therefore divinely conferred on Peter and his successors in this see so that they might discharge their exalted office for the salvation of all, and so that the whole flock of Christ might be kept away by them from the poisonous food of error and be nourished with the sustenance of heavenly doctrine. Thus the tendency to schism is removed and the whole church is preserved in unity, and, resting on its foundation, can stand firm against the gates of hell.
But since in this very age when the salutary effectiveness of the apostolic office is most especially needed, not a few are to be found who disparage its authority, we judge it absolutely necessary to affirm solemnly the prerogative which the only-begotten Son of God was pleased to attach to the supreme pastoral office.
Therefore, faithfully adhering to the tradition received from the beginning of the christian faith, to the glory of God our saviour, for the exaltation of the catholic religion and for the salvation of the christian people, with the approval of the sacred council, we teach and define as a divinely revealed dogma that when the Roman pontiff speaks EX CATHEDRA, that is, when, in the exercise of his office as shepherd and teacher of all Christians, in virtue of his supreme apostolic authority, he defines a doctrine concerning faith or morals to be held by the whole church, he possesses, by the divine assistance promised to him in blessed Peter, that infallibility which the divine Redeemer willed his church to enjoy in defining doctrine concerning faith or morals.
Therefore, such definitions of the Roman pontiff are of themselves, and not by the consent of the church, irreformable.
So then, should anyone, which God forbid, have the temerity to reject this definition of ours: let him be anathema.
55. Mt 16, 18.
56. From Pope Hormisdas's formula of the year 517 (D no. 171), see above p. 157 n. 1.
57. From Michael Palaeologus's profession of faith which was read out at the second council of Lyons (D no. 466).
58. Council of Florence, session 6 (see above p. 528). S Bernard, Ep. (Letters) 190 (PL 182, 1053).
59. Bernard, Ep. (Letters) 190 (PL 182, 1053).
60. Lk 22, 32.