theorem Th46:
  p is x-context_including implies
  the_sort_of (x-context_in p) = (the_arity_of o).(x-context_pos_in p)
  proof
    assume p is x-context_including;
    then x-context_pos_in p in dom p = dom the_arity_of o &
    x-context_in p = p.(x-context_pos_in p) by Th71,MSUALG_3:6;
    then (the_arity_of o)/.(x-context_pos_in p) =
    (the_arity_of o).(x-context_pos_in p) & x-context_in p in
    (the Sorts of Free(S,X)).((the_arity_of o)/.(x-context_pos_in p))
    by PARTFUN1:def 6,MSUALG_6:2;
    hence the_sort_of (x-context_in p) = (the_arity_of o).(x-context_pos_in p)
    by SORT;
  end;
