public override Expression Visit(Expression E) { E = base.Visit(E); Expression S = E.AlgebraicEquivalents().ToList().ArgMin(i => cost.Visit(i)); if (!ReferenceEquals(S, E)) { S = Visit(S); } return(S); }