The only things you do in the castle dungeon (under the library) are pick up the cheese and throw the switch.
(see related question)
You go into Mordreds lab and grab a paper and turn it into her.
you have to get the paper with the dates and sttuff on it and on top it says mcm and you go to the library and there is a small sign with the same thng click on it and then you'll go into te dungeon and get the cheese and give it to the mouse in the prinesses sister {i think}
It's downstairs. Press one of the stacked books with a paper on it, and it should get you the library card.
you click on the paper under mcm
You go to the castle then you go into the library (far right ) to the nonfiction and look for the green tile with a book and a wad of paper click on that and a thing of stairs should open go down and your in the dungeon.
To open the staircase in the castle library, you need the Library Slip from the Mordred Museum. Use the gold coin from the fountain to pay your admission, and you will find the Slip in a stack of books. Once you have it, clicking the McM shelf in the lower aisle of the library will open a passage to the castle dungeon.
you will get a scrap of paper that will have the code from under ground under hay. then go to the fountian and push them in order. then go down in the fountian and click on the people.
Once you have the Secret Message from the Maid's room (castle 1st floor left), go to the mill and up into the loft to get the Password from the girl there.
You have to first get the coin in the fountin at astro knights then go in the museum and click use on the coin you found and then you can look around then click on the guy in there then he will give you a paper then click the books then the guy will give you another paper then go to the castle library then click on the rolled up paper in there then a staircase will appear then go down it then you are there.
The rolled up paper is on the shelf in "Non-Fiction McM". This is written on the library slip found at the Mordred Museum. (Get the shiny gold coin from the fountain and pay your admission.)
you trad a piece of paper for the password
You don't lose the Cosmic Symbols when you use them. Once you have the key to Mordred's laboratory, you don't have to go back down anyway. (see related question)