Gunpowder is the first physical explosive and propellant. Before its invention, many incendiary and burning devices had been used, including Greek fire. The invention of gunpowder is usually attributed to experimentation in Chinese alchemy by Taoists in the pursuit of immortality, and is popularly listed as one of the "Four Great Inventions" of China. It was invented during the late Tang dynasty (9th century) but the earliest record of a written formula appeared in the Song dynasty (11th century). Knowledge of gunpowder spread rapidly throughout the Old World possibly as a result of the Mongol conquests during the 13th century, with the earliest written formula for it outside of China contained within the Opus Majus, a 1267 treatise by the English friar Roger Bacon. It was employed in warfare to some effect from at least the 12th century in weapons such as fire arrows, bombs, and the fire lance before the appearance of the gun. While the fire lance was eventually supplanted by the gun, other gunpowder weapons such as rockets continued to see use in China, Korea, India, and eventually Europe. Bombs too never ceased to develop and continued to progress into the modern day as grenades, mines, and other explosive implements. Gunpowder can also be used for non-military purposes such as fireworks for entertainment, or in explosives for mining and tunneling.