Conversation
hcWang942
left a comment
There was a problem hiding this comment.
This is the mastered version for PR and Merging. Kindly please review the code. Feel free to leave feedback. ; )
eric-wieser
left a comment
There was a problem hiding this comment.
Thanks for the PR! Some general lean advice to start you off, though I haven't reviewed this mathematically yet.
|
I have also copied over the |
|
Latest version of code is updated, Kindly please review the code. Feel free to leave feedback. ; ) |
tb65536
left a comment
There was a problem hiding this comment.
There are a bunch of slight spacing issues. I've pointed out a few, but can you go through the file and fix them? Thanks!
|
|
These are completely different sorts of games. |
|
|
|
Would it be possible to add more pointers to the reference, linking the results that you prove in this file to what is to be found in the book you quote? |
I agree. As On the other hand, |
Actually For instance, For more of our plan, we have tried to 'sell' the plan formalised economic-related theorems to economist. I think we should spend more effort to address their attention and interests. |
Hi, Filippo. It's great see you view our PR. I have attached the main reference of mine to the description of this PR. Since we are a group of students contributing to formalising |
In my personal view, |
We were discussing namespaces, not file paths. |
|
I suggest that you start with defining a game as something like namespace GameTheory
universe u -- or should we drop universe polymorphism in this theory?
structure Game (Player : Type u) where
/-- The type of possible strategies of a player. -/
Strategy : Player → Type u
/-- If each player chooses a strategy, then player `p` wins `payout f p`. -/
payout : ((p : Player) → Strategy p) → Player → ℝThen you can define auction as /-- Scheme of an auction with a single prize.
This formalization assumes that only the winner pays a price,
i.e., there are no entrance fees etc. -/
structure AuctionScheme (Player : Type u) where
/-- Who gets the prize. -/
winner (bid : Player → ℝ) : Player
/-- How much does the winner pay for the prize. -/
price (bid : Player → ℝ) : ℝ
def AuctionScheme.toGame {Player : Type u} (scheme : AuctionScheme Player)
(utility : Player → ℝ) : Game Player where
Strategy _ := ℝ
payout (bid : Player → ℝ) (p : Player) := Pi.single (scheme.winner bid) (utility p - scheme.price p)The first price auction and the second price auction can be defined as specific |
|
@urkud : although dominant strategy is a common concept, it's definitions vary depending on the ambient context. I think having a common namespace called |
Could you please provide more details? What example doesn't agree with this? def Game.Strategy.IsDominant {Player : Type} (g : Game Player) (p : Player) (s : g.Strategy p) : Prop :=
∀ s' t, g.payout t p ≤ g.payout (Function.update t p s') p |
I claim that |
I think it is too deeply tied to a specific kind of normal form game. In an extensive form game or an iterated game, players could have perfect or imperfect information about the previous actions of the other players. This definition of domination is too tightly coupled with one form of games. Generalising the definition of games too much might make it clunky to work. I would put your definitions under a namespace called |
|
Any game with multiple states, imperfect information etc can be represented as a |
But even in an iterated game or a game with imperfect information about previous actions, there is still the notion of a "strategy". Each player picks a strategy, and then you play out the game and see what valuations result. So I think this still fits into @urkud's framework. |
I am a bit short of time. @urkud I looked at your definitions and I can see that the definitions could be generalised like this. But it is hard to be certain that this generality is convenient and covers everything, since the field is vast and studied by different departments. Changing it later can be a headache because all theorems would have to be fixed. Therefore, I request that the PR include good instantiations of different kinds of games and auctions before it is accepted. In other words, I think the definitions need to be battle-tested first. Since I don't have the time to do this, I recommend the following highly regarded books, one from Econ people and one from TCS people:
The AGT book (2) is more extensive and treats combinatorial auctions in Chapter 11 |
|
Given that other parts of the library will probably never depend on this, I suggest that we create a new repository instead of pushing it to Mathlib right away. I can create Of course, "pure math" results that are useful for game theory/auction theory (e.g., Brouwer fixed-point theorem) should go to Mathlib. |
I like this idea. If @hcWang942 agrees, my fair division PR could also go to this new repository. |
I agree, creating a new repo to store the theorems is not a bad idea. As you mentioned, other parts of the Mathlib probably won't depend on this, at least in the near future. However, we still hope to create relevant dependencies within the repository. Our team recently recruited five new undergraduates to focus their Final Year Project on I believe that many theories in |
Sure! It's great to see that we can make |
|
By the way, one more question is do I need to fix the entire structure before the maintainer adds it to the new repo? Moreover, may I have the maintaining rights to the new |
|
Let's discuss the editorial policy of the new repo early next week. I'm busy at my day job right now. |
YaelDillies
left a comment
There was a problem hiding this comment.
Just to slightly push back on the new repo idea, I think that this material could definitely belong to mathlib, but eg...
| /-!### Helper Functions and Definitions -/ | ||
| /-- Computes the highest bid given a bidding function `b`. -/ | ||
| @[simp] | ||
| def maxBid : ℝ := Finset.sup' Finset.univ Finset.univ_nonempty b |
There was a problem hiding this comment.
... this is a bit idiosyncratic and if you are to include this in mathlib then you shouldn't make this definition
| /-- winner: The participant with the highest bid. -/ | ||
| noncomputable def winner : I := Classical.choose (exists_maxBid b) |
There was a problem hiding this comment.
Relating to @YaelDillies' comment: I think the crux of the difficulty of this PR is that it introduces new definitions like maxBid and winner which are really just unusual names for functions which could be called max and someArgMax.
Yury's suggestion to abstract further provides another solution to this issue.
There was a problem hiding this comment.
These names are absolutely not unusual in the field.
There was a problem hiding this comment.
Sure but mathlib is not meant to be super-tailored to a specific field. In particular, we definitely don't want to have a differently-named-but-otherwise-identical function for each field that uses it! One solution here is to use notation instead.
Also note that this is basically the only problem with this PR, so I think it is worth solving this way.
There was a problem hiding this comment.
Three points:
-
Notation that looks like a def name could result people applying tactics with that name and failing.
-
I see a lot of value in developing this theory and a lot of TCS, econ, physics etc in lean (and this is definitely TCS). However, we are not accustomed to the whole "generalise as much as possible" philosophy of math and thus don't have standard battle tested definitions. In a way this works better for us as these abstractions only add a layer of unnecessary and uninsightful jargon. Thus rushing a definition that may or may not be ergonomic into mathlib might result in a suboptimal outcome.
-
As Yury points out, there are likely to be no downstream dependencies of these files outside the folder, and even inside them, some experimentation is going to be needed, and different areas of game theory are going to use different variations of the same conceptual definition.
There was a problem hiding this comment.
To give a few examples, I am quite certain that utility functions are going to have a multitude of definitions. Preference relations are going to be totally ordered or partially ordered depending on the concept under development.
There was a problem hiding this comment.
A similar opinion has been expressed by Kim for another TCS formalisation: https://leanprover.zulipchat.com/#narrow/stream/252551-graph-theory/topic/Labeled.20Transition.20Systems/near/472581943
|
Well I am actually agree that creating a separate repository for One reason mentioned by Yael is that the content of Gametheory is not 'abstract' enough, also we need the flexibility for experimentation and iteration as we formalize different areas of game theory, we can avoids prematurely generalizing or abstracting concepts before we have a good understanding of how they will be used across different game theoretic models. Furthermore, it allows us to develop and refine these formalizations independently, while still enrich mathlib's core libraries. We can always revisit incorporating parts into mathlib later if generally useful abstractions emerge. For now, a repo gives us the freedom to focus on formalizing game theory concepts. I appreciate the suggestions to improve integration with mathlib, but I think the separate repo approach strikes a good balance between mathlib and developing specialized game theory formalizations. I think if @Shreyas4991 agree we may contribute the Gametheory repo together. And the standard might be slightly off a little bit. For instance, only pass the lint and CI? I am not so sure about this standard, maintainer might have a more expertise suggestion on it. |
|
For the plan, we still exploring to do more things in mechanism design and auctions in game theory. One key theorem we could focus on is the affiliated signal version of Myerson's revenue equivalence theorem, proven by Paul Klemperer and his collaborators in 1989. This theorem, which essentially shows how bidders' mutual influence can drive up prices, is a good example of monotone comparative analysis, an area of particular interest to many theoretical economists. Regarding equilibrium refinement, Selten's trembling hand equilibrium is a widely used method for eliminating equilibria in complete information settings. This concept, which earned Selten a Nobel Prize, aims to remove less ‘plausible’ Nash equilibria by considering the stability of equilibria under small mistakes by players. In incomplete information settings, we might look at refining perfect Bayesian Nash equilibria using the incentive compatible condition proposed by Milgrom and Weber. Using Lean for these proofs could be particularly valuable. It could ensure that we don't overlook any possibilities when solving for equilibria and performing equilibrium deletion. This rigorous proof process could also provide insights for designing experiments to validate how these mechanisms operate in practice. The logic behind Myerson's equivalence theorem might follow a similar approach:
Formalizing these processes with Lean could allow us to avoid relying on specific parameter values, potentially leading to more general and convincing results. The challenge lies in clearly describing these problems within Lean's framework. This approach could be particularly powerful for comparing mechanisms. For instance, to show that mechanism A is at least as good as mechanism B, we could use Lean to systematically work through the steps of finding equilibria, refining them, and comparing outcomes. This could provide a more comprehensive and reliable analysis than traditional methods that often rely on specific numerical examples. The main challenge will likely be in translating these game-theoretic concepts and processes into Lean's formal language. However, once accomplished, this could open up new possibilities for automated checking and verification of game-theoretic results. To date, we have contacted two economists in Singapore to help us confirm the applicability and feasibility of our theoretical approach. We are also actively advancing our project with the aim of 'selling' our ideas to a broader group of economists once we have made further progress. This might presents a good opportunity to show to the economics of the potential of formalization methods in economic theory research. |
|
It looks like this PR is not ready for merging and might soon to be made redundant by the creation of a new game theory repo. Tagging |
Description
Formalise some core concepts and results in auction theory: this includes definitions for first-price and second-price auctions, as well as several fundamental results and helping lemmas.
This is the very first PR of the project formalizing core concepts and results in auction theory.
Our group is working on more contributions on the formalization of game theory prefix.
Co-authored-by: Ma Jiajun hoxide@gmail.com
Reference
Roughgarden, Tim. Twenty Lectures on Algorithmic Game Theory. Cambridge University Press, 2020. Link
Current plan for formalization of Game Theory
The current plan for the formalizing of Game Theory include:
1. Auction Theory. 🎉 (200+ lines, this PR)
2. Mechanism design & Myerson's Lemma. 🎉 (400+ lines, pending for modification to Mathlib Standard)
An allocation rule is implementable if there exists
- Dominant Strategy Incentive Compatible (DSIC) payment rule
- An allocation rule is monotone if for every bidder’s gain is nondecreasing w.r.t. her/his bid
Implementable ⇔ Monotone
In the above case, the DSIC payment rule is unique.
3. von Neumann‘s Minimax Theorem. 🎉 (800+ lines, pending for modification to Mathlib Standard)
4. Nash Equilibrium. 🎉 (pending for modification to Mathlib Standard)
5. Brouwer fixed-point theorem. (Work in Progress)
6. More Mechanism design. (Planning)