I can speak to the tax definition of “residency”. The other programs might have different definitions of residency, perhaps based on citizenship rules or what have you. Under our domestic rules, tax residency—the concept of where you are resident, fundamentally—looks to where your ties are. That could be where your house is, where your family is, where your bank accounts are and things like that. It's a bit of a factual determination.
There are also rules in the Income Tax Act that can deem you resident in Canada, for example, if you sojourn in Canada for more than 183 days. Layered on that, there are rules in our tax treaties whereby you could be resident in Canada under Canada's law and resident in another country under its law. Our treaties often provide rules for tie-breakers to determine where somebody actually is resident. In the international context in particular, it can be a difficult determination. However, for tax purposes fundamentally, it looks to where your domestic ties are located.