Gottfried Leibniz developed a system of propositional logic in the late 1600's, which wasn't published until 1903, when it was discovered in the Royal Library of Hanover by Louis Couturat. How did this unpublished work end up in that particular library, where is it now, and did any of his work in this area influence other contemporary mathematicians?
Regarding Leibniz's unpublished papers in Hanover Library, see Gottfried Wilhelm Leibniz (July 1, 1646 – November 14, 1716) :
In 1673, the Duke of Brunswick offered him the post of Counsellor which Leibniz very reluctantly accepted two years later, only after it became clear that no employment in Paris, whose intellectual stimulation he relished, or with the Habsburg imperial court was forthcoming.
In 1677, he was promoted, at his request, to Privy Counselor of Justice, a post he held for the rest of his life. Leibniz served three consecutive rulers of the House of Brunswick as historian, political adviser, and most consequentially, as librarian of the ducal library. He thenceforth employed his pen on all the various political, historical, and theological matters involving the House of Brunswick; the resulting documents form a valuable part of the historical record for the period.
The Brunswicks tolerated the enormous effort Leibniz devoted to intellectual pursuits unrelated to his duties as a courtier, pursuits such as perfecting the calculus, writing about other mathematics, logic, physics, and philosophy, and keeping up a vast correspondence.
Leibniz is the most important logician between Aristotle and 1847, when George Boole and Augustus De Morgan each published books that began modern formal logic. [...] Leibniz published nothing on formal logic in his lifetime; most of what he wrote on the subject consists of working drafts. In his book History of Western Philosophy, Bertrand Russell went so far as to claim that Leibniz had developed logic in his unpublished writings to a level which was reached only 200 years later.
While serving as librarian of the ducal libraries in Hanover and Wolfenbuettel, Leibniz effectively became one of the founders of library science. The latter library was enormous for its day, as it contained more than 100,000 volumes, and Leibniz helped design a new building for it, believed to be the first building explicitly designed to be a library. He also designed a book indexing system in ignorance of the only other such system then extant, that of the Bodleian Library at Oxford University.
Leibniz mainly wrote in three languages: scholastic Latin, French and German. During his lifetime, he published many pamphlets and scholarly articles, but only two "philosophical" books, the Combinatorial Art and the Théodicée. (He published numerous pamphlets, often anonymous, on behalf of the House of Brunswick-Lüneburg, most notably the "De jure suprematum" a major consideration of the nature of sovereignty). One substantial book appeared posthumously, his Nouveaux essais sur l'entendement humain, which Leibniz had withheld from publication after the death of John Locke. Only in 1895, when Bodemann completed his catalogue of Leibniz's manuscripts and correspondence, did the enormous extent of Leibniz's Nachlass become clear: about 15,000 letters to more than 1000 recipients plus more than 40,000 other items. Moreover, quite a few of these letters are of essay length. Much of his vast correspondence, especially the letters dated after 1700, remains unpublished, and much of what is published has been so only in recent decades.
The systematic cataloguing of all of Leibniz's Nachlass began in 1901. It was hampered by two world wars and decades of German division in two states with the cold war's "iron curtain" in between, separating scholars, and also scattering portions of his literary estates. The ambitious project has had to deal with seven languages contained in some 200,000 pages of written and printed paper. In 1985 it was reorganized and included in a joint program of German federal and state (Länder) academies.