let equal a1 a2 =
let n = Array.length a1 in
let n2 = Array.length a2 in
if n <> n2 then false
else
let res = ref true in
let i = ref 0 in
while !res && !i < n do
res := (Atom.compare a1.(!i) a2.(!i) = 0);
incr i
done;
!res