BRACKET-CONTEXT TREE FUNCTIONS