A Calculus of Group Membership