Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(SetTheory/Game/PGame): dicotic pregames #19433

Closed
wants to merge 2 commits into from

Conversation

LeoDog896
Copy link
Collaborator

Adds the definition of dicotic pregames and that star is a dicotic pregame. A second pull request may introduce the lawnmower theorem for long and short games.


Open in Gitpod

@LeoDog896 LeoDog896 added the t-set-theory Set theory label Nov 24, 2024
Copy link

github-actions bot commented Nov 24, 2024

PR summary a2264a14b3

Import changes for modified files

No significant changes to the import graph

Import changes for all files
Files Import difference

Declarations diff

+ dicotic
+ star_dicotic

You can run this locally as follows
## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>

## more verbose report:
./scripts/declarations_diff.sh long <optional_commit>

The doc-module for script/declarations_diff.sh contains some details about this script.


No changes to technical debt.

You can run this locally as

./scripts/technical-debt-metrics.sh pr_summary
  • The relative value is the weighted sum of the differences with weight given by the inverse of the current value of the statistic.
  • The absolute value is the relative value divided by the total sum of the inverses of the current values (i.e. the weighted average of the differences).

@LeoDog896 LeoDog896 marked this pull request as draft November 26, 2024 04:43
Comment on lines +1883 to +1891
def dicotic (x : PGame) : Prop :=
(∀ (l : LeftMoves x),
(x.moveLeft l = 0) ∨
((LeftMoves (x.moveLeft l) ≠ PEmpty) ∧
(RightMoves (x.moveLeft l)) ≠ PEmpty)) ∧
(∀ (r : RightMoves x),
(x.moveRight r = 0) ∨
((LeftMoves (x.moveRight r) ≠ PEmpty) ∧
(RightMoves (x.moveRight r)) ≠ PEmpty))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This doesn't seem right; it's not even recursive, and you shouldn't use type equality since there are many types of the same cardinality. I think the following is correct:

/-- A game is dicotic if both players can move from every nonempty subposition of G. -/
def IsDicotic (x : PGame) : Prop :=
  (IsEmpty x.LeftMoves ∧ IsEmpty x.RightMoves) ∨
  (Nonempty x.LeftMoves ∧ Nonempty x.RightMoves ∧
    (∀ l : x.LeftMoves, IsDicotic (x.moveLeft l)) ∧
    ∀ r : x.RightMoves, IsDicotic (x.moveRight r))
termination_by x

and I think for a PR on dicotic games to be accepted it (or another PR depending on it) must prove this. This helps verify the definition is as intended.

Copy link
Collaborator Author

@LeoDog896 LeoDog896 Dec 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed! I noticed the lack of a recursive definition, but stopped on dicotic games to prove that the equivalence class of games is formed in context of a lack of reversible and dominated options. Thanks for the syntax for a recursive definition, though!

That goal to prove the class dicotic games were equivalent to the class of small games was my goal for this PR.

I also missed using Nonempty there. Comparing for PEmpty was a mistake.

@LeoDog896 LeoDog896 closed this Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
t-set-theory Set theory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants