right click on any field, go to its properties, there will be Fx button click that and you can see buttons like insert function..
you can explore the functions from there.
to use these functions for comparing stuff, right click any field click rules click add
click set condition there u can set the conditions, also u can use formulas there
note these rules apply on individual field.
alternatively if you want to set rules for the form go, to tools -> form option -> rules and set your rules there