I´m having trouble proving that two sets have the same cardinality. All the following sets are finite.
First let´s assume we have set (M::b set) and a function foo :: "b set ⇒ b set ⇒ bool"
such that (foo A C = foo B C ⟷ A = B) and for every A in M there is in fact a C, such that foo A C.
I´m trying to show that card {S. ∃A∈M. (S = {C. foo A C}) } = card M. The informal proof for this is obvious, but I can´t seem to find an efficient proof in Isabelle; neither for the ≤ nor the ≥ part.