adding injective instance for S
"f_equal" for matches.