Do you need to recursively include equality of relationships (i.e. relationships point to destinations that are equal by your definition)? Do you need to test equality across managed object models? Do you need to test uncommitted values? Assuming the answer is "no" to all these, the solution isn't too hard...
instance1
is equal to instance2
by your definition if:
NSArray *allAttributeKeys = [[[instance1 entity] attributesByName] allKeys];
if([[instance1 entity] isEqual:[instance2 entity]]
&& [[instance1 commitedValuesForKeys:allAttributeKeys] isEqual:[instance2 commitedValuesForKeys:allAttributeKeys]]) {
// instance1 "==" instance2
}
If the answer to any of the above questions is "yes", the solution is significantly more complex.
Caveat
I'm not sure any of this is a good idea. You probably want to rethink your design if you need to use the solution above. There are almost certainly better ways to do what you're trying to do that don't run the risk of running afoul of Core Data's intentions.