The lines are:
“altar, sword, and pen,
Fireside, the heroic wealth of hall and bower
Have forfeited their ancient English dower
Of inward happiness.”
In these lines from the poem “London,” the word ‘pen’ stands for art and literature. Metonymy is the figure of speech which uses one word to explain and denote about a larger concept or idea related to it. Wordsworth uses ‘pen’ as a metonymy to refer to art and literature as England’s one of the great traditions. He adds that along with religion and military, England’s history is full of literary works too.