Some appear to argue that much of the Elements by Euclid is a compilation of knowledge handed down to Euclid from his predecessors. On the other hand, some credit the proof, of the Pythagorean theorem in particular, that appears in the Elements to Euclid himself. How do we know that the proof is due to Euclid and not to a predecessor? More generally, is there anything in the Elements that we know originates with Euclid?
We do not know for sure, but most of them probably not, the proof of the Pythagorean theorem included. The current consensus on the priority of the results in Euclid's Elements is summarized by Lambek in The Heritage of Thales:
"None of the theorems contained in the 13 books can with certainty be ascribed to Euclid himself. It is believed that the Pythagoreans, including Archytas, were responsible for much of what appears in Books I, II, VI, VII, VIII, IX and XI and that Hippocrates was behind Books III and IV. For Books V and XII we are to thank Eudoxus, and Books X and XIII are said to be based on the work of Theaetetus. However, the logical organization of the Elements is undoubtedly Euclid's contribution."
We know from Proclus (who quotes Eudemus's historical survey) that a number of authors wrote Elements before Euclid. Unfortunately, he is not very informative as to their content. Hippocrates of Chios was the first, then Leon "was able to compile a book of elements more carefully designed to take account of the number of propositions and of their utility", then Eudoxus of Cnidus "was the first to increase the number of the so-called general theorems", then Theudius of Magnesia "produced an admirable arrangement of the elements and made many partial theorems more general", then Hermotimus of Colophon "discovered many propositions in the elements", and so on. Finally, "came Euclid, who brought together the elements". This confirms the attribution of logical organization to Euclid.
Speculations about Euclid's priority, or lack thereof, have a venerable history, but there was always little firm basis in evidence for them. For example, it is visible in the text that the author tries hard to avoid using congruence, which leads to proliferation of auxiliary triangles in the proofs. The bride's chair proof of the Pythagorean theorem I.47 is a particularly vivid illustration. Presumably, this has something to do with Parmenides's and Plato's qualms about the use of motion in "true science". But that does not mean that the effort is due to Euclid, several prior Elements' authors were Plato's students and/or associates, including Leon, Eudoxus and Theudius.
Euclid also avoids using the parallel postulate as far as possible in book 1. This is probably our best bet on ascribing a group of results to Euclid himself, but how scant the basis for it is can be seen from Heath's commentary:
"Although Aristotle gives a clear idea of what he understood by a postulate, he does not give any instances from geometry; still less has he any allusion recalling the particular postulates found in Euclid. We naturally infer that the formulation of these postulates was Euclid's own work. There is a more positive indication of the originality of Postulate 5, since in the passage (Anal.pnor. II: 16, 65 a 4) quoted above in the note on the definition of parallels he alludes to some petitio principii involved in the theory of parallels current in his time."
"Naturally". The aforementioned Theudius and Hermotimus were Aristotle's contemporaries.
Modern scholars in the subsequent decades studied at length the text and the deductive structure of the Elements. Aside from the above, in books 1-4 Euclid avoids using proportions. Presumably, because Eudoxian treatment of them is very non-elementary, and elementary Pythagorean treatment relied on commensurability and was logically flawed. This block is termed "proportion free Elements", and it likely predates Euclid. Pythagorean theorem and application of areas from book 2 are instrumental in this avoidance, just as auxiliary triangles are in the avoidance of congruence. But identifying individual contributors and their contributions remains highly circumstantial and speculative. Artmann in Euclid's Elements and its Prehistory speculates that it is due to Theudius, but admits that his arguments are "not conclusive":
"Because Euclid defines proportions and studies their properties for the first time in Book V, he cannot use proportions in the first four books. However, these books include some theorems with curiously involved proofs, which could be proved much more simply using proportion. Closer inspection reveals a standard way of transforming statements about proportions into statements about areas using VI.16... A clever combination of II.5 or 6 with the theorem of Pythagoras gives the desired result without invoking proportionality.
In Artmann (1985) I present a detailed study of the Books I- IV, based on the investigations of Neuenschwander (1972) and Mueller (1981). Logical and stylistic observations confirm the conclusion that, essentially, Euclid's Books I - IV are the 'Proportion Free Elements' mentioned by Proclus. However, these Elements were probably altered in at least two ways before being incorporated in Euclid's work. The first is the addition of the theory of parallels and the consequent modifications of the beginning of Book I. The second is the treatment of parallelograms, also in Book I. In Artmann (1985) I tentatively identified Theudius as the author of the 'Proportion Free Elements', but the arguments for this identification are not conclusive. Whoever the author of the 'Proportion Free Elements' was, his aim was to go as far as possible in geometry without proportions. There is no reason to think that he added new theorems; he merely gave new proofs for known results. That this was no mean achievement can be seen, for instance, in 111.35 or in the construction of the regular pentagon in IV.10 and II.27."
Unfortunately, Artmann's Über voreuklidische „Elemente“, deren Autor Proportionen vermied (1985) and Neuenschwander's Die ersten vier Bücher der Elemente Euklids (1972) are not translated from German. Mueller's Philosophy of Mathematics and Deductive Structure in Euclid's Elements (1981) is also a classic.