# explicit_indices used in two trace

In fact, there are two questions. First, for example,

{a,b,c,d}::Indices(vector).
tr{#}::Trace.
A::ImplicitIndex(A_{a b}).
B::ImplicitIndex(B_{a b}).
ex:=tr(c A B) tr(A B);
untrace(_);
explicit_indices(_);

A,B are not ImplicitIndex, is it a bug? Second, I rewrite the above code using

{a,b,c,d}::Indices(vector).
tr{#}::Trace.
{A,B}::ImplicitIndex.
ex:=tr(c A B) tr(A B);
untrace(_);
A::ImplicitIndex(A_{a b}).
B::ImplicitIndex(B_{a b}).
explicit_indices(_);

but it doesn't work. The error report is

{RuntimeError: Double index pair a inside a single factor found.

At:
<string>(9): <module>

Is this another bug?

The first problem arises because you did not tell tr over which indices it traces. If you have ImplicitIndex objects inside the trace which have an explicit form listed, then you also need to specify the indices on which tr acts, otherwise it takes those objects out. Perhaps the default is not entirely logical, apologies. So this is easily fixed by using
tr{#}::Trace(indices=vector).