Question

I would like to reason about functions that choose one element from a finite set.

I tried to define a predicate that tells me whether some given function is such a “chooser” function:

definition chooser :: "('a set ⇒ 'a) ⇒ bool"
where "chooser f ⟷ (∀ A . finite A ⟶ f A ∈ A)"

Actually those finite sets from which I'd like to choose elements are of a concrete type, but putting a concrete type in 'a's place causes the same trouble.

I have also tried to omit finite A, but the sets I'm dealing with are finite, and I don't even want to think about the axiom of choice here.

Now this definition seems to be inconsistent:

lemma assumes "chooser f" shows "False" using assms chooser_def by force

How can I define chooser in a reasonable way? I would like to use it as follows:

assume "finite A"
moreover assume "chooser f"
moreover assume "choice = f A"
ultimately have "choice ∈ A" by ???

Most of the time it merely matters that a member of the set is chosen, not how it is chosen.


Background: I'd like to formalise tie-breakers in auctions (section 4 of this paper). Suppose there are two highest bids for the item being auctioned, we need to arbitrarily choose the one bidder who should win the auction.


Here is, BTW, a really minimal example (which is a bit harder to understand):

lemma "(∀ A . finite A ⟶ f A ∈ A) ⟹ False" by force
Was it helpful?

Solution

I merely provide the details based on Brian's comment that a choice function is defined only for a collection of non-empty sets.

From the Wikipedia entry on Choice_function:

A choice function (selector, selection) is a mathematical function f that is defined on some collection X of nonempty sets and assigns to each set S in that collection some element f(S) of S.

By now, you probably already have what you need from Brian's coment, but I do this anyway. The definition of chooser only needs the requirement that the set isn't empty:

definition chooser :: "('a set => 'a) => bool" where 
  "chooser f <-> (!A. A ~= {} --> f A ∈ A)"

theorem "(finite A & A ~= {} & chooser f) ==> (f A ∈ A)"
by(metis chooser_def)

theorem "(A ~= {} & chooser f) ==> (f A ∈ A)"
by(metis chooser_def)

You said that you don't want to use the Axiom of Choice, but a standard choice function demonstrates a good template to follow, not that you need it.

definition choice :: "'a set => 'a" where
  "choice T = (SOME x. x ∈ T)"

theorem "T ~= {} ==> choice T ∈ T"
  by(unfold choice_def, metis ex_in_conv someI

--GC

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top