public Expr MkAttr(params Expr[] fields)
{
var f = tt.Z.GetTupleConstructor(AttrSort);
if (tt.Z.GetTupleLength(AttrSort) != fields.Length)
throw new AutomataException(AutomataExceptionKind.RankedAlphabet_InvalidNrOfFields);
for(int i = 0; i < fields.Length; i++)
if (fields[i] == null || !tt.Z.GetSort(fields[i]).Equals(tt.Z.GetDomain(f)[i]))
throw new AutomataException(AutomataExceptionKind.RankedAlphabet_InvalidField);
var attr = tt.Z.MkApp(f, fields);
return attr;
}