DEFINITION lweight()
TYPE =
       Anat
BODY =
FIXlweight{
         lweight:Anat
         :=λa:A
           .<λa1:A.nat>
             CASE a OF
               ASort  O
             | AHead a1 a2S (plus (lweight a1) (lweight a2))
         }