# Remove inequalities from set of rules

I solved a set of equation and use reduce on the set of solutions. Changing the equal sign to arrows I get some set of rules but some of the entries are inequalities. E.g.

{\[ScriptA][2, 1] != 0,
0 -> \[ScriptA][2, 2] - Sqrt[\[ScriptA][2, 2]^2], \[ScriptA][4,
4] -> 1, \[ScriptA][4, 3] ->
0, \[ScriptA][3, 3] -> -1, \[ScriptA][1, 2] -> (
1 - \[ScriptA][2, 2]^2)/\[ScriptA][2, 1], \[ScriptA][1,
1] -> -\[ScriptA][2, 2]}


How can I remove in a systematic way the first kind of entries ($$\cal a[2,1]\neq 0)$$ for my rules? I tried Deletecase with several patterns but that does not seem to work.

Thanks!

• Select[{...}, #[[0]] == Rule &]? Cases[{...}, _Rule]? Aug 10, 2019 at 11:39
• FullForm of a != b is Unequal[a,b], so you should use DeleteCases with this head: DeleteCases[{<your set of rules>},_Unequal].
– Alx
Aug 10, 2019 at 12:42

DeleteCases[{\[ScriptA][2, 1] != 0,
0 -> \[ScriptA][2, 2] - Sqrt[\[ScriptA][2, 2]^2], \[ScriptA][4,4] -> 1,
\[ScriptA][4,3] -> 0, \[ScriptA][3, 3] -> -1,
\[ScriptA][1, 2] -> (1 - \[ScriptA][2, 2]^2)/\[ScriptA][2, 1],
\[ScriptA][1, 1] -> -\[ScriptA][2, 2]},_Unequal]


gives

{0 -> \[ScriptA][2, 2] - Sqrt[\[ScriptA][2, 2]^2], \[ScriptA][4,4] -> 1,
\[ScriptA][4,3] -> 0, \[ScriptA][3, 3] -> -1,
\[ScriptA][1, 2] -> (1 - \[ScriptA][2, 2]^2)/\[ScriptA][2, 1],
\[ScriptA][1, 1] -> -\[ScriptA][2, 2]}