# Simplifying the values in an association

How can I simplify the expressions of the values in an association in a simple way?

For example,

as = <|c1 -> x, c2 -> y x + y x + x x + y y , c3 -> z|> ;

as// Simplify


does not give the result

<|c1 -> x, c2 -> (x + y)^2, c3 -> z|>

in Ver 11.0.

• AssociationThread[Keys[as], Simplify[Values[as]]], among others... – ciao Mar 3 '17 at 1:28
• In version 10.1 Simplify /@ as returns <|c1 -> x, c2 -> (x + y)^2, c3 -> z|> -- what do you get? – Mr.Wizard Mar 3 '17 at 1:31
• @Mr.Wizard - beat me to it, you sly fox. Same in 10.3 – ciao Mar 3 '17 at 1:32
• @ciao I am wondering how mathematica.stackexchange.com/q/124603/121 affects this, or if it does at all. – Mr.Wizard Mar 3 '17 at 1:34

Simplify threads over lists, but not over associations, so

as // Normal // Simplify


{c1 -> x, c2 -> (x + y)^2, c3 -> z}

works, but

as // Simplify


doesn't. Recommend using Map

Simplify /@ as


Association[c1 -> x, c2 -> (x + y)^2, c3 -> z]

AssociationMap[Simplify][as]

<|c1 -> x, c2 -> (x + y)^2, c3 -> z|>