substitute v@(Variable x') x value 
    | x' == x   = (Constant value)
    | otherwise = v
substitute v@(Variable x') x value 
    | x' == x   = (Constant value)
    | otherwise = v
substitute v@(Variable x') x value 
    | x' == x   = (Constant value)
    | otherwise = v