Stokes equation programming help

Hello, I’m a new student of FreeFem++.Recently, I used this software to write stokes weak finite element program, but I encountered a problem. I don’t know how to write projection operators in the program, such as the space projection from L2 space to k-order polynomial. I hope I can get your advice. Thank you very much!