Repetitions and Boxes in Words and Pictures

Boxes of a word w are suitable factors of w which allow one to reconstruct the entire word. The initial (resp. terminal) box h w (resp. k w ) is the shortest unrepeated prefix (resp. suffix) of w. A proper box is any factor of the kind asb, where a, b are letters and s is a bispecial factor of w, i.e. there exist letters x, x 1 , y, y 1 ,x ≠ x 1 , y ≠ y 1 for which sx,sx 1 ,ys and y 1 s are factors of w. In a previous paper we proved that any word is uniquely determined by hw, k w and the set of proper boxes. In this paper we extend this theorem to the case of any language. Moreover, a further extension is made to the case of two-dimensional languages (picture languages).