Question: Eliminating unwanted sets within a list

I have a list of relationships between variables, in this example there are three. The second of these requires one of the parameters to have a relationshipo that is not allowed with one of the other parmaters i.e. k[d2] = k[d1]; the rule is a parameter without h in its name can only be equated to itself or an expression with at least one parameter with h in its name.

How can I eliminate sets with relationships that break this rule?



Sa1 := [{R = R, Rh = R, C[T] = Ch[T]*kh[a1]/k[a2], Ch[T] = Ch[T], k[a1] = kh[a2]*k[a2]/kh[a1], k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d2], kh[a1] = kh[a1], kh[a2] = kh[a2]}, {R = R, Rh = R, C[T] = C[T], Ch[T] = Ch[T], k[a1] = -(C[T]*k[a2]-Ch[T]*kh[a1]-Ch[T]*kh[a2])/C[T], k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d1], kh[a1] = kh[a1], kh[a2] = kh[a2]}, {R = R, Rh = Rh, C[T] = C[T], Ch[T] = Ch[T], k[a1] = -k[a2], k[a2] = k[a2], k[d1] = k[d1], k[d2] = k[d1], kh[a1] = -kh[a2], kh[a2] = kh[a2]}]

Please Wait...