try minpoly when in equals testing
Merge pull request #2867 from smichr/equals

use minpoly in equals testing