set_theory.game.short
⟷
Mathlib.SetTheory.Game.Short
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -201,15 +201,15 @@ attribute [instance] list_short.nil list_short.cons
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print SetTheory.PGame.listShortNthLe /-
-instance SetTheory.PGame.listShortNthLe :
+#print SetTheory.PGame.listShortGet /-
+instance SetTheory.PGame.listShortGet :
∀ (L : List SetTheory.PGame.{u}) [SetTheory.PGame.ListShort L] (i : Fin (List.length L)),
SetTheory.PGame.Short (List.nthLe L i i.is_lt)
| [], _, n => by exfalso; rcases n with ⟨_, ⟨⟩⟩
| hd::tl, @list_short.cons _ S _ _, ⟨0, _⟩ => S
| hd::tl, @list_short.cons _ _ _ S, ⟨n + 1, h⟩ =>
@list_short_nth_le tl S ⟨n, (add_lt_add_iff_right 1).mp h⟩
-#align pgame.list_short_nth_le SetTheory.PGame.listShortNthLe
+#align pgame.list_short_nth_le SetTheory.PGame.listShortGet
-/
#print SetTheory.PGame.shortOfLists /-
@@ -219,7 +219,7 @@ instance SetTheory.PGame.shortOfLists :
| L, R, _, _ => by
skip; apply short.mk
· intros; infer_instance
- · intros; apply SetTheory.PGame.listShortNthLe
+ · intros; apply SetTheory.PGame.listShortGet
#align pgame.short_of_lists SetTheory.PGame.shortOfLists
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,9 +3,9 @@ Copyright (c) 2019 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-/
-import Mathbin.Data.Fintype.Basic
-import Mathbin.SetTheory.Cardinal.Cofinality
-import Mathbin.SetTheory.Game.Birthday
+import Data.Fintype.Basic
+import SetTheory.Cardinal.Cofinality
+import SetTheory.Game.Birthday
#align_import set_theory.game.short from "leanprover-community/mathlib"@"728ef9dbb281241906f25cbeb30f90d83e0bb451"
mathlib commit https://github.com/leanprover-community/mathlib/commit/001ffdc42920050657fd45bd2b8bfbec8eaaeb29
@@ -282,12 +282,12 @@ instance SetTheory.PGame.shortBit1 (x : SetTheory.PGame.{u}) [SetTheory.PGame.Sh
#align pgame.short_bit1 SetTheory.PGame.shortBit1
-/
-#print SetTheory.PGame.leLfDecidable /-
+#print SetTheory.PGame.leLFDecidable /-
/-- Auxiliary construction of decidability instances.
We build `decidable (x ≤ y)` and `decidable (x ⧏ y)` in a simultaneous induction.
Instances for the two projections separately are provided below.
-/
-def SetTheory.PGame.leLfDecidable :
+def SetTheory.PGame.leLFDecidable :
∀ (x y : SetTheory.PGame.{u}) [SetTheory.PGame.Short x] [SetTheory.PGame.Short y],
Decidable (x ≤ y) × Decidable (x ⧏ y)
| mk xl xr xL xR, mk yl yr yL yR, shortx, shorty =>
@@ -311,20 +311,20 @@ def SetTheory.PGame.leLfDecidable :
intro i
apply (@le_lf_decidable _ _ _ _).1 <;> infer_instance
decreasing_by pgame_wf_tac
-#align pgame.le_lf_decidable SetTheory.PGame.leLfDecidable
+#align pgame.le_lf_decidable SetTheory.PGame.leLFDecidable
-/
#print SetTheory.PGame.leDecidable /-
instance SetTheory.PGame.leDecidable (x y : SetTheory.PGame.{u}) [SetTheory.PGame.Short x]
[SetTheory.PGame.Short y] : Decidable (x ≤ y) :=
- (SetTheory.PGame.leLfDecidable x y).1
+ (SetTheory.PGame.leLFDecidable x y).1
#align pgame.le_decidable SetTheory.PGame.leDecidable
-/
#print SetTheory.PGame.lfDecidable /-
instance SetTheory.PGame.lfDecidable (x y : SetTheory.PGame.{u}) [SetTheory.PGame.Short x]
[SetTheory.PGame.Short y] : Decidable (x ⧏ y) :=
- (SetTheory.PGame.leLfDecidable x y).2
+ (SetTheory.PGame.leLFDecidable x y).2
#align pgame.lf_decidable SetTheory.PGame.lfDecidable
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/442a83d738cb208d3600056c489be16900ba701d
@@ -26,22 +26,24 @@ prove anything using these instances.
universe u
-open scoped PGame
+open scoped SetTheory.PGame
-namespace PGame
+namespace SetTheory.PGame
-#print PGame.Short /-
+#print SetTheory.PGame.Short /-
/-- A short game is a game with a finite set of moves at every turn. -/
-inductive Short : PGame.{u} → Type (u + 1)
+inductive SetTheory.PGame.Short : SetTheory.PGame.{u} → Type (u + 1)
|
mk :
- ∀ {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} (sL : ∀ i : α, short (L i))
- (sR : ∀ j : β, short (R j)) [Fintype α] [Fintype β], short ⟨α, β, L, R⟩
-#align pgame.short PGame.Short
+ ∀ {α β : Type u} {L : α → SetTheory.PGame.{u}} {R : β → SetTheory.PGame.{u}}
+ (sL : ∀ i : α, short (L i)) (sR : ∀ j : β, short (R j)) [Fintype α] [Fintype β],
+ short ⟨α, β, L, R⟩
+#align pgame.short SetTheory.PGame.Short
-/
-#print PGame.subsingleton_short /-
-instance subsingleton_short : ∀ x : PGame, Subsingleton (Short x)
+#print SetTheory.PGame.subsingleton_short /-
+instance SetTheory.PGame.subsingleton_short :
+ ∀ x : SetTheory.PGame, Subsingleton (SetTheory.PGame.Short x)
| mk xl xr xL xR =>
⟨fun a b => by
cases a; cases b
@@ -51,92 +53,99 @@ instance subsingleton_short : ∀ x : PGame, Subsingleton (Short x)
· funext
apply @Subsingleton.elim _ (subsingleton_short (xR x))⟩
decreasing_by pgame_wf_tac
-#align pgame.subsingleton_short PGame.subsingleton_short
+#align pgame.subsingleton_short SetTheory.PGame.subsingleton_short
-/
-#print PGame.Short.mk' /-
+#print SetTheory.PGame.Short.mk' /-
/-- A synonym for `short.mk` that specifies the pgame in an implicit argument. -/
-def Short.mk' {x : PGame} [Fintype x.LeftMoves] [Fintype x.RightMoves]
- (sL : ∀ i : x.LeftMoves, Short (x.moveLeft i))
- (sR : ∀ j : x.RightMoves, Short (x.moveRight j)) : Short x := by
+def SetTheory.PGame.Short.mk' {x : SetTheory.PGame} [Fintype x.LeftMoves] [Fintype x.RightMoves]
+ (sL : ∀ i : x.LeftMoves, SetTheory.PGame.Short (x.moveLeft i))
+ (sR : ∀ j : x.RightMoves, SetTheory.PGame.Short (x.moveRight j)) : SetTheory.PGame.Short x := by
(cases x; dsimp at *) <;> exact short.mk sL sR
-#align pgame.short.mk' PGame.Short.mk'
+#align pgame.short.mk' SetTheory.PGame.Short.mk'
-/
attribute [class] short
-#print PGame.fintypeLeft /-
+#print SetTheory.PGame.fintypeLeft /-
/-- Extracting the `fintype` instance for the indexing type for Left's moves in a short game.
This is an unindexed typeclass, so it can't be made a global instance.
-/
-def fintypeLeft {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
- Fintype α := by cases' S with _ _ _ _ _ _ F _; exact F
-#align pgame.fintype_left PGame.fintypeLeft
+def SetTheory.PGame.fintypeLeft {α β : Type u} {L : α → SetTheory.PGame.{u}}
+ {R : β → SetTheory.PGame.{u}} [S : SetTheory.PGame.Short ⟨α, β, L, R⟩] : Fintype α := by
+ cases' S with _ _ _ _ _ _ F _; exact F
+#align pgame.fintype_left SetTheory.PGame.fintypeLeft
-/
attribute [local instance] fintype_left
-#print PGame.fintypeLeftMoves /-
-instance fintypeLeftMoves (x : PGame) [S : Short x] : Fintype x.LeftMoves := by cases x; dsimp;
- infer_instance
-#align pgame.fintype_left_moves PGame.fintypeLeftMoves
+#print SetTheory.PGame.fintypeLeftMoves /-
+instance SetTheory.PGame.fintypeLeftMoves (x : SetTheory.PGame) [S : SetTheory.PGame.Short x] :
+ Fintype x.LeftMoves := by cases x; dsimp; infer_instance
+#align pgame.fintype_left_moves SetTheory.PGame.fintypeLeftMoves
-/
-#print PGame.fintypeRight /-
+#print SetTheory.PGame.fintypeRight /-
/-- Extracting the `fintype` instance for the indexing type for Right's moves in a short game.
This is an unindexed typeclass, so it can't be made a global instance.
-/
-def fintypeRight {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
- Fintype β := by cases' S with _ _ _ _ _ _ _ F; exact F
-#align pgame.fintype_right PGame.fintypeRight
+def SetTheory.PGame.fintypeRight {α β : Type u} {L : α → SetTheory.PGame.{u}}
+ {R : β → SetTheory.PGame.{u}} [S : SetTheory.PGame.Short ⟨α, β, L, R⟩] : Fintype β := by
+ cases' S with _ _ _ _ _ _ _ F; exact F
+#align pgame.fintype_right SetTheory.PGame.fintypeRight
-/
attribute [local instance] fintype_right
-#print PGame.fintypeRightMoves /-
-instance fintypeRightMoves (x : PGame) [S : Short x] : Fintype x.RightMoves := by cases x; dsimp;
- infer_instance
-#align pgame.fintype_right_moves PGame.fintypeRightMoves
+#print SetTheory.PGame.fintypeRightMoves /-
+instance SetTheory.PGame.fintypeRightMoves (x : SetTheory.PGame) [S : SetTheory.PGame.Short x] :
+ Fintype x.RightMoves := by cases x; dsimp; infer_instance
+#align pgame.fintype_right_moves SetTheory.PGame.fintypeRightMoves
-/
-#print PGame.moveLeftShort /-
-instance moveLeftShort (x : PGame) [S : Short x] (i : x.LeftMoves) : Short (x.moveLeft i) := by
- cases' S with _ _ _ _ L _ _ _; apply L
-#align pgame.move_left_short PGame.moveLeftShort
+#print SetTheory.PGame.moveLeftShort /-
+instance SetTheory.PGame.moveLeftShort (x : SetTheory.PGame) [S : SetTheory.PGame.Short x]
+ (i : x.LeftMoves) : SetTheory.PGame.Short (x.moveLeft i) := by cases' S with _ _ _ _ L _ _ _;
+ apply L
+#align pgame.move_left_short SetTheory.PGame.moveLeftShort
-/
-#print PGame.moveLeftShort' /-
+#print SetTheory.PGame.moveLeftShort' /-
/-- Extracting the `short` instance for a move by Left.
This would be a dangerous instance potentially introducing new metavariables
in typeclass search, so we only make it an instance locally.
-/
-def moveLeftShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (i : xl) : Short (xL i) := by
- cases' S with _ _ _ _ L _ _ _; apply L
-#align pgame.move_left_short' PGame.moveLeftShort'
+def SetTheory.PGame.moveLeftShort' {xl xr} (xL xR)
+ [S : SetTheory.PGame.Short (SetTheory.PGame.mk xl xr xL xR)] (i : xl) :
+ SetTheory.PGame.Short (xL i) := by cases' S with _ _ _ _ L _ _ _; apply L
+#align pgame.move_left_short' SetTheory.PGame.moveLeftShort'
-/
attribute [local instance] move_left_short'
-#print PGame.moveRightShort /-
-instance moveRightShort (x : PGame) [S : Short x] (j : x.RightMoves) : Short (x.moveRight j) := by
- cases' S with _ _ _ _ _ R _ _; apply R
-#align pgame.move_right_short PGame.moveRightShort
+#print SetTheory.PGame.moveRightShort /-
+instance SetTheory.PGame.moveRightShort (x : SetTheory.PGame) [S : SetTheory.PGame.Short x]
+ (j : x.RightMoves) : SetTheory.PGame.Short (x.moveRight j) := by cases' S with _ _ _ _ _ R _ _;
+ apply R
+#align pgame.move_right_short SetTheory.PGame.moveRightShort
-/
-#print PGame.moveRightShort' /-
+#print SetTheory.PGame.moveRightShort' /-
/-- Extracting the `short` instance for a move by Right.
This would be a dangerous instance potentially introducing new metavariables
in typeclass search, so we only make it an instance locally.
-/
-def moveRightShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (j : xr) : Short (xR j) := by
- cases' S with _ _ _ _ _ R _ _; apply R
-#align pgame.move_right_short' PGame.moveRightShort'
+def SetTheory.PGame.moveRightShort' {xl xr} (xL xR)
+ [S : SetTheory.PGame.Short (SetTheory.PGame.mk xl xr xL xR)] (j : xr) :
+ SetTheory.PGame.Short (xR j) := by cases' S with _ _ _ _ _ R _ _; apply R
+#align pgame.move_right_short' SetTheory.PGame.moveRightShort'
-/
attribute [local instance] move_right_short'
-#print PGame.short_birthday /-
-theorem short_birthday : ∀ (x : PGame.{u}) [Short x], x.birthday < Ordinal.omega
+#print SetTheory.PGame.short_birthday /-
+theorem SetTheory.PGame.short_birthday :
+ ∀ (x : SetTheory.PGame.{u}) [SetTheory.PGame.Short x], x.birthday < Ordinal.omega
| ⟨xl, xr, xL, xR⟩, hs => by
haveI := hs
rcases hs with ⟨sL, sR⟩
@@ -151,35 +160,39 @@ theorem short_birthday : ∀ (x : PGame.{u}) [Short x], x.birthday < Ordinal.ome
apply short_birthday _
· exact move_left_short' xL xR i
· exact move_right_short' xL xR i
-#align pgame.short_birthday PGame.short_birthday
+#align pgame.short_birthday SetTheory.PGame.short_birthday
-/
-#print PGame.Short.ofIsEmpty /-
+#print SetTheory.PGame.Short.ofIsEmpty /-
/-- This leads to infinite loops if made into an instance. -/
-def Short.ofIsEmpty {l r xL xR} [IsEmpty l] [IsEmpty r] : Short (mk l r xL xR) :=
- Short.mk isEmptyElim isEmptyElim
-#align pgame.short.of_is_empty PGame.Short.ofIsEmpty
+def SetTheory.PGame.Short.ofIsEmpty {l r xL xR} [IsEmpty l] [IsEmpty r] :
+ SetTheory.PGame.Short (SetTheory.PGame.mk l r xL xR) :=
+ SetTheory.PGame.Short.mk isEmptyElim isEmptyElim
+#align pgame.short.of_is_empty SetTheory.PGame.Short.ofIsEmpty
-/
-#print PGame.short0 /-
-instance short0 : Short 0 :=
- Short.ofIsEmpty
-#align pgame.short_0 PGame.short0
+#print SetTheory.PGame.short0 /-
+instance SetTheory.PGame.short0 : SetTheory.PGame.Short 0 :=
+ SetTheory.PGame.Short.ofIsEmpty
+#align pgame.short_0 SetTheory.PGame.short0
-/
-#print PGame.short1 /-
-instance short1 : Short 1 :=
- Short.mk (fun i => by cases i; infer_instance) fun j => by cases j
-#align pgame.short_1 PGame.short1
+#print SetTheory.PGame.short1 /-
+instance SetTheory.PGame.short1 : SetTheory.PGame.Short 1 :=
+ SetTheory.PGame.Short.mk (fun i => by cases i; infer_instance) fun j => by cases j
+#align pgame.short_1 SetTheory.PGame.short1
-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print PGame.ListShort /-
+#print SetTheory.PGame.ListShort /-
/-- Evidence that every `pgame` in a list is `short`. -/
-inductive ListShort : List PGame.{u} → Type (u + 1)
+inductive SetTheory.PGame.ListShort : List SetTheory.PGame.{u} → Type (u + 1)
| nil : list_short []
- | cons : ∀ (hd : PGame.{u}) [Short hd] (tl : List PGame.{u}) [list_short tl], list_short (hd::tl)
-#align pgame.list_short PGame.ListShort
+ |
+ cons :
+ ∀ (hd : SetTheory.PGame.{u}) [SetTheory.PGame.Short hd] (tl : List SetTheory.PGame.{u})
+ [list_short tl], list_short (hd::tl)
+#align pgame.list_short SetTheory.PGame.ListShort
-/
attribute [class] list_short
@@ -188,29 +201,34 @@ attribute [instance] list_short.nil list_short.cons
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
-#print PGame.listShortNthLe /-
-instance listShortNthLe :
- ∀ (L : List PGame.{u}) [ListShort L] (i : Fin (List.length L)), Short (List.nthLe L i i.is_lt)
+#print SetTheory.PGame.listShortNthLe /-
+instance SetTheory.PGame.listShortNthLe :
+ ∀ (L : List SetTheory.PGame.{u}) [SetTheory.PGame.ListShort L] (i : Fin (List.length L)),
+ SetTheory.PGame.Short (List.nthLe L i i.is_lt)
| [], _, n => by exfalso; rcases n with ⟨_, ⟨⟩⟩
| hd::tl, @list_short.cons _ S _ _, ⟨0, _⟩ => S
| hd::tl, @list_short.cons _ _ _ S, ⟨n + 1, h⟩ =>
@list_short_nth_le tl S ⟨n, (add_lt_add_iff_right 1).mp h⟩
-#align pgame.list_short_nth_le PGame.listShortNthLe
+#align pgame.list_short_nth_le SetTheory.PGame.listShortNthLe
-/
-#print PGame.shortOfLists /-
-instance shortOfLists : ∀ (L R : List PGame) [ListShort L] [ListShort R], Short (PGame.ofLists L R)
+#print SetTheory.PGame.shortOfLists /-
+instance SetTheory.PGame.shortOfLists :
+ ∀ (L R : List SetTheory.PGame) [SetTheory.PGame.ListShort L] [SetTheory.PGame.ListShort R],
+ SetTheory.PGame.Short (SetTheory.PGame.ofLists L R)
| L, R, _, _ => by
skip; apply short.mk
· intros; infer_instance
- · intros; apply PGame.listShortNthLe
-#align pgame.short_of_lists PGame.shortOfLists
+ · intros; apply SetTheory.PGame.listShortNthLe
+#align pgame.short_of_lists SetTheory.PGame.shortOfLists
-/
-#print PGame.shortOfRelabelling /-
+#print SetTheory.PGame.shortOfRelabelling /-
-- where does the subtype.val come from?
/-- If `x` is a short game, and `y` is a relabelling of `x`, then `y` is also short. -/
-def shortOfRelabelling : ∀ {x y : PGame.{u}} (R : Relabelling x y) (S : Short x), Short y
+def SetTheory.PGame.shortOfRelabelling :
+ ∀ {x y : SetTheory.PGame.{u}} (R : SetTheory.PGame.Relabelling x y)
+ (S : SetTheory.PGame.Short x), SetTheory.PGame.Short y
| x, y, ⟨L, R, rL, rR⟩, S => by
skip
haveI := Fintype.ofEquiv _ L
@@ -219,18 +237,21 @@ def shortOfRelabelling : ∀ {x y : PGame.{u}} (R : Relabelling x y) (S : Short
short.mk'
(fun i => by rw [← L.right_inv i]; apply short_of_relabelling (rL (L.symm i)) inferInstance)
fun j => by simpa using short_of_relabelling (rR (R.symm j)) inferInstance
-#align pgame.short_of_relabelling PGame.shortOfRelabelling
+#align pgame.short_of_relabelling SetTheory.PGame.shortOfRelabelling
-/
-#print PGame.shortNeg /-
-instance shortNeg : ∀ (x : PGame.{u}) [Short x], Short (-x)
+#print SetTheory.PGame.shortNeg /-
+instance SetTheory.PGame.shortNeg :
+ ∀ (x : SetTheory.PGame.{u}) [SetTheory.PGame.Short x], SetTheory.PGame.Short (-x)
| mk xl xr xL xR, _ => by skip; exact short.mk (fun i => short_neg _) fun i => short_neg _
decreasing_by pgame_wf_tac
-#align pgame.short_neg PGame.shortNeg
+#align pgame.short_neg SetTheory.PGame.shortNeg
-/
-#print PGame.shortAdd /-
-instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
+#print SetTheory.PGame.shortAdd /-
+instance SetTheory.PGame.shortAdd :
+ ∀ (x y : SetTheory.PGame.{u}) [SetTheory.PGame.Short x] [SetTheory.PGame.Short y],
+ SetTheory.PGame.Short (x + y)
| mk xl xr xL xR, mk yl yr yL yR, _, _ => by
skip
apply short.mk;
@@ -239,32 +260,36 @@ instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
· apply short_add
· change short (mk xl xr xL xR + _); apply short_add
decreasing_by pgame_wf_tac
-#align pgame.short_add PGame.shortAdd
+#align pgame.short_add SetTheory.PGame.shortAdd
-/
-#print PGame.shortNat /-
-instance shortNat : ∀ n : ℕ, Short n
- | 0 => PGame.short0
- | n + 1 => @PGame.shortAdd _ _ (short_nat n) PGame.short1
-#align pgame.short_nat PGame.shortNat
+#print SetTheory.PGame.shortNat /-
+instance SetTheory.PGame.shortNat : ∀ n : ℕ, SetTheory.PGame.Short n
+ | 0 => SetTheory.PGame.short0
+ | n + 1 => @SetTheory.PGame.shortAdd _ _ (short_nat n) SetTheory.PGame.short1
+#align pgame.short_nat SetTheory.PGame.shortNat
-/
-#print PGame.shortBit0 /-
-instance shortBit0 (x : PGame.{u}) [Short x] : Short (bit0 x) := by dsimp [bit0]; infer_instance
-#align pgame.short_bit0 PGame.shortBit0
+#print SetTheory.PGame.shortBit0 /-
+instance SetTheory.PGame.shortBit0 (x : SetTheory.PGame.{u}) [SetTheory.PGame.Short x] :
+ SetTheory.PGame.Short (bit0 x) := by dsimp [bit0]; infer_instance
+#align pgame.short_bit0 SetTheory.PGame.shortBit0
-/
-#print PGame.shortBit1 /-
-instance shortBit1 (x : PGame.{u}) [Short x] : Short (bit1 x) := by dsimp [bit1]; infer_instance
-#align pgame.short_bit1 PGame.shortBit1
+#print SetTheory.PGame.shortBit1 /-
+instance SetTheory.PGame.shortBit1 (x : SetTheory.PGame.{u}) [SetTheory.PGame.Short x] :
+ SetTheory.PGame.Short (bit1 x) := by dsimp [bit1]; infer_instance
+#align pgame.short_bit1 SetTheory.PGame.shortBit1
-/
-#print PGame.leLfDecidable /-
+#print SetTheory.PGame.leLfDecidable /-
/-- Auxiliary construction of decidability instances.
We build `decidable (x ≤ y)` and `decidable (x ⧏ y)` in a simultaneous induction.
Instances for the two projections separately are provided below.
-/
-def leLfDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤ y) × Decidable (x ⧏ y)
+def SetTheory.PGame.leLfDecidable :
+ ∀ (x y : SetTheory.PGame.{u}) [SetTheory.PGame.Short x] [SetTheory.PGame.Short y],
+ Decidable (x ≤ y) × Decidable (x ⧏ y)
| mk xl xr xL xR, mk yl yr yL yR, shortx, shorty =>
by
skip
@@ -286,51 +311,55 @@ def leLfDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤
intro i
apply (@le_lf_decidable _ _ _ _).1 <;> infer_instance
decreasing_by pgame_wf_tac
-#align pgame.le_lf_decidable PGame.leLfDecidable
+#align pgame.le_lf_decidable SetTheory.PGame.leLfDecidable
-/
-#print PGame.leDecidable /-
-instance leDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≤ y) :=
- (leLfDecidable x y).1
-#align pgame.le_decidable PGame.leDecidable
+#print SetTheory.PGame.leDecidable /-
+instance SetTheory.PGame.leDecidable (x y : SetTheory.PGame.{u}) [SetTheory.PGame.Short x]
+ [SetTheory.PGame.Short y] : Decidable (x ≤ y) :=
+ (SetTheory.PGame.leLfDecidable x y).1
+#align pgame.le_decidable SetTheory.PGame.leDecidable
-/
-#print PGame.lfDecidable /-
-instance lfDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ⧏ y) :=
- (leLfDecidable x y).2
-#align pgame.lf_decidable PGame.lfDecidable
+#print SetTheory.PGame.lfDecidable /-
+instance SetTheory.PGame.lfDecidable (x y : SetTheory.PGame.{u}) [SetTheory.PGame.Short x]
+ [SetTheory.PGame.Short y] : Decidable (x ⧏ y) :=
+ (SetTheory.PGame.leLfDecidable x y).2
+#align pgame.lf_decidable SetTheory.PGame.lfDecidable
-/
-#print PGame.ltDecidable /-
-instance ltDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x < y) :=
+#print SetTheory.PGame.ltDecidable /-
+instance SetTheory.PGame.ltDecidable (x y : SetTheory.PGame.{u}) [SetTheory.PGame.Short x]
+ [SetTheory.PGame.Short y] : Decidable (x < y) :=
And.decidable
-#align pgame.lt_decidable PGame.ltDecidable
+#align pgame.lt_decidable SetTheory.PGame.ltDecidable
-/
-#print PGame.equivDecidable /-
-instance equivDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≈ y) :=
+#print SetTheory.PGame.equivDecidable /-
+instance SetTheory.PGame.equivDecidable (x y : SetTheory.PGame.{u}) [SetTheory.PGame.Short x]
+ [SetTheory.PGame.Short y] : Decidable (x ≈ y) :=
And.decidable
-#align pgame.equiv_decidable PGame.equivDecidable
+#align pgame.equiv_decidable SetTheory.PGame.equivDecidable
-/
-example : Short 0 := by infer_instance
+example : SetTheory.PGame.Short 0 := by infer_instance
-example : Short 1 := by infer_instance
+example : SetTheory.PGame.Short 1 := by infer_instance
-example : Short 2 := by infer_instance
+example : SetTheory.PGame.Short 2 := by infer_instance
-example : Short (-2) := by infer_instance
+example : SetTheory.PGame.Short (-2) := by infer_instance
-example : Short (ofLists [0] [1]) := by infer_instance
+example : SetTheory.PGame.Short (SetTheory.PGame.ofLists [0] [1]) := by infer_instance
-example : Short (ofLists [-2, -1] [1]) := by infer_instance
+example : SetTheory.PGame.Short (SetTheory.PGame.ofLists [-2, -1] [1]) := by infer_instance
-example : Short (0 + 0) := by infer_instance
+example : SetTheory.PGame.Short (0 + 0) := by infer_instance
-example : Decidable ((1 : PGame) ≤ 1) := by infer_instance
+example : Decidable ((1 : SetTheory.PGame) ≤ 1) := by infer_instance
-- No longer works since definitional reduction of well-founded definitions has been restricted.
-- example : (0 : pgame) ≤ 0 := dec_trivial
-- example : (1 : pgame) ≤ 1 := dec_trivial
-end PGame
+end SetTheory.PGame
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,16 +2,13 @@
Copyright (c) 2019 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module set_theory.game.short
-! leanprover-community/mathlib commit 728ef9dbb281241906f25cbeb30f90d83e0bb451
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.Fintype.Basic
import Mathbin.SetTheory.Cardinal.Cofinality
import Mathbin.SetTheory.Game.Birthday
+#align_import set_theory.game.short from "leanprover-community/mathlib"@"728ef9dbb281241906f25cbeb30f90d83e0bb451"
+
/-!
# Short games
mathlib commit https://github.com/leanprover-community/mathlib/commit/728ef9dbb281241906f25cbeb30f90d83e0bb451
@@ -4,7 +4,7 @@ Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
! This file was ported from Lean 3 source module set_theory.game.short
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
+! leanprover-community/mathlib commit 728ef9dbb281241906f25cbeb30f90d83e0bb451
! Please do not edit these lines, except to modify the commit id
! if you have ported upstream changes.
-/
@@ -15,6 +15,9 @@ import Mathbin.SetTheory.Game.Birthday
/-!
# Short games
+> THIS FILE IS SYNCHRONIZED WITH MATHLIB4.
+> Any changes to this file require a corresponding PR to mathlib4.
+
A combinatorial game is `short` [Conway, ch.9][conway2001] if it has only finitely many positions.
In particular, this means there is a finite set of moves at every point.
mathlib commit https://github.com/leanprover-community/mathlib/commit/9240e8be927a0955b9a82c6c85ef499ee3a626b8
@@ -30,6 +30,7 @@ open scoped PGame
namespace PGame
+#print PGame.Short /-
/-- A short game is a game with a finite set of moves at every turn. -/
inductive Short : PGame.{u} → Type (u + 1)
|
@@ -37,7 +38,9 @@ inductive Short : PGame.{u} → Type (u + 1)
∀ {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} (sL : ∀ i : α, short (L i))
(sR : ∀ j : β, short (R j)) [Fintype α] [Fintype β], short ⟨α, β, L, R⟩
#align pgame.short PGame.Short
+-/
+#print PGame.subsingleton_short /-
instance subsingleton_short : ∀ x : PGame, Subsingleton (Short x)
| mk xl xr xL xR =>
⟨fun a b => by
@@ -49,46 +52,60 @@ instance subsingleton_short : ∀ x : PGame, Subsingleton (Short x)
apply @Subsingleton.elim _ (subsingleton_short (xR x))⟩
decreasing_by pgame_wf_tac
#align pgame.subsingleton_short PGame.subsingleton_short
+-/
+#print PGame.Short.mk' /-
/-- A synonym for `short.mk` that specifies the pgame in an implicit argument. -/
def Short.mk' {x : PGame} [Fintype x.LeftMoves] [Fintype x.RightMoves]
(sL : ∀ i : x.LeftMoves, Short (x.moveLeft i))
(sR : ∀ j : x.RightMoves, Short (x.moveRight j)) : Short x := by
(cases x; dsimp at *) <;> exact short.mk sL sR
#align pgame.short.mk' PGame.Short.mk'
+-/
attribute [class] short
+#print PGame.fintypeLeft /-
/-- Extracting the `fintype` instance for the indexing type for Left's moves in a short game.
This is an unindexed typeclass, so it can't be made a global instance.
-/
def fintypeLeft {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
Fintype α := by cases' S with _ _ _ _ _ _ F _; exact F
#align pgame.fintype_left PGame.fintypeLeft
+-/
attribute [local instance] fintype_left
+#print PGame.fintypeLeftMoves /-
instance fintypeLeftMoves (x : PGame) [S : Short x] : Fintype x.LeftMoves := by cases x; dsimp;
infer_instance
#align pgame.fintype_left_moves PGame.fintypeLeftMoves
+-/
+#print PGame.fintypeRight /-
/-- Extracting the `fintype` instance for the indexing type for Right's moves in a short game.
This is an unindexed typeclass, so it can't be made a global instance.
-/
def fintypeRight {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
Fintype β := by cases' S with _ _ _ _ _ _ _ F; exact F
#align pgame.fintype_right PGame.fintypeRight
+-/
attribute [local instance] fintype_right
+#print PGame.fintypeRightMoves /-
instance fintypeRightMoves (x : PGame) [S : Short x] : Fintype x.RightMoves := by cases x; dsimp;
infer_instance
#align pgame.fintype_right_moves PGame.fintypeRightMoves
+-/
+#print PGame.moveLeftShort /-
instance moveLeftShort (x : PGame) [S : Short x] (i : x.LeftMoves) : Short (x.moveLeft i) := by
cases' S with _ _ _ _ L _ _ _; apply L
#align pgame.move_left_short PGame.moveLeftShort
+-/
+#print PGame.moveLeftShort' /-
/-- Extracting the `short` instance for a move by Left.
This would be a dangerous instance potentially introducing new metavariables
in typeclass search, so we only make it an instance locally.
@@ -96,13 +113,17 @@ in typeclass search, so we only make it an instance locally.
def moveLeftShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (i : xl) : Short (xL i) := by
cases' S with _ _ _ _ L _ _ _; apply L
#align pgame.move_left_short' PGame.moveLeftShort'
+-/
attribute [local instance] move_left_short'
+#print PGame.moveRightShort /-
instance moveRightShort (x : PGame) [S : Short x] (j : x.RightMoves) : Short (x.moveRight j) := by
cases' S with _ _ _ _ _ R _ _; apply R
#align pgame.move_right_short PGame.moveRightShort
+-/
+#print PGame.moveRightShort' /-
/-- Extracting the `short` instance for a move by Right.
This would be a dangerous instance potentially introducing new metavariables
in typeclass search, so we only make it an instance locally.
@@ -110,9 +131,11 @@ in typeclass search, so we only make it an instance locally.
def moveRightShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (j : xr) : Short (xR j) := by
cases' S with _ _ _ _ _ R _ _; apply R
#align pgame.move_right_short' PGame.moveRightShort'
+-/
attribute [local instance] move_right_short'
+#print PGame.short_birthday /-
theorem short_birthday : ∀ (x : PGame.{u}) [Short x], x.birthday < Ordinal.omega
| ⟨xl, xr, xL, xR⟩, hs => by
haveI := hs
@@ -129,26 +152,35 @@ theorem short_birthday : ∀ (x : PGame.{u}) [Short x], x.birthday < Ordinal.ome
· exact move_left_short' xL xR i
· exact move_right_short' xL xR i
#align pgame.short_birthday PGame.short_birthday
+-/
+#print PGame.Short.ofIsEmpty /-
/-- This leads to infinite loops if made into an instance. -/
def Short.ofIsEmpty {l r xL xR} [IsEmpty l] [IsEmpty r] : Short (mk l r xL xR) :=
Short.mk isEmptyElim isEmptyElim
#align pgame.short.of_is_empty PGame.Short.ofIsEmpty
+-/
+#print PGame.short0 /-
instance short0 : Short 0 :=
Short.ofIsEmpty
#align pgame.short_0 PGame.short0
+-/
+#print PGame.short1 /-
instance short1 : Short 1 :=
Short.mk (fun i => by cases i; infer_instance) fun j => by cases j
#align pgame.short_1 PGame.short1
+-/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print PGame.ListShort /-
/-- Evidence that every `pgame` in a list is `short`. -/
inductive ListShort : List PGame.{u} → Type (u + 1)
| nil : list_short []
| cons : ∀ (hd : PGame.{u}) [Short hd] (tl : List PGame.{u}) [list_short tl], list_short (hd::tl)
#align pgame.list_short PGame.ListShort
+-/
attribute [class] list_short
@@ -156,6 +188,7 @@ attribute [instance] list_short.nil list_short.cons
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
+#print PGame.listShortNthLe /-
instance listShortNthLe :
∀ (L : List PGame.{u}) [ListShort L] (i : Fin (List.length L)), Short (List.nthLe L i i.is_lt)
| [], _, n => by exfalso; rcases n with ⟨_, ⟨⟩⟩
@@ -163,14 +196,18 @@ instance listShortNthLe :
| hd::tl, @list_short.cons _ _ _ S, ⟨n + 1, h⟩ =>
@list_short_nth_le tl S ⟨n, (add_lt_add_iff_right 1).mp h⟩
#align pgame.list_short_nth_le PGame.listShortNthLe
+-/
+#print PGame.shortOfLists /-
instance shortOfLists : ∀ (L R : List PGame) [ListShort L] [ListShort R], Short (PGame.ofLists L R)
| L, R, _, _ => by
skip; apply short.mk
· intros; infer_instance
· intros; apply PGame.listShortNthLe
#align pgame.short_of_lists PGame.shortOfLists
+-/
+#print PGame.shortOfRelabelling /-
-- where does the subtype.val come from?
/-- If `x` is a short game, and `y` is a relabelling of `x`, then `y` is also short. -/
def shortOfRelabelling : ∀ {x y : PGame.{u}} (R : Relabelling x y) (S : Short x), Short y
@@ -183,12 +220,16 @@ def shortOfRelabelling : ∀ {x y : PGame.{u}} (R : Relabelling x y) (S : Short
(fun i => by rw [← L.right_inv i]; apply short_of_relabelling (rL (L.symm i)) inferInstance)
fun j => by simpa using short_of_relabelling (rR (R.symm j)) inferInstance
#align pgame.short_of_relabelling PGame.shortOfRelabelling
+-/
+#print PGame.shortNeg /-
instance shortNeg : ∀ (x : PGame.{u}) [Short x], Short (-x)
| mk xl xr xL xR, _ => by skip; exact short.mk (fun i => short_neg _) fun i => short_neg _
decreasing_by pgame_wf_tac
#align pgame.short_neg PGame.shortNeg
+-/
+#print PGame.shortAdd /-
instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
| mk xl xr xL xR, mk yl yr yL yR, _, _ => by
skip
@@ -199,18 +240,26 @@ instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
· change short (mk xl xr xL xR + _); apply short_add
decreasing_by pgame_wf_tac
#align pgame.short_add PGame.shortAdd
+-/
+#print PGame.shortNat /-
instance shortNat : ∀ n : ℕ, Short n
| 0 => PGame.short0
| n + 1 => @PGame.shortAdd _ _ (short_nat n) PGame.short1
#align pgame.short_nat PGame.shortNat
+-/
+#print PGame.shortBit0 /-
instance shortBit0 (x : PGame.{u}) [Short x] : Short (bit0 x) := by dsimp [bit0]; infer_instance
#align pgame.short_bit0 PGame.shortBit0
+-/
+#print PGame.shortBit1 /-
instance shortBit1 (x : PGame.{u}) [Short x] : Short (bit1 x) := by dsimp [bit1]; infer_instance
#align pgame.short_bit1 PGame.shortBit1
+-/
+#print PGame.leLfDecidable /-
/-- Auxiliary construction of decidability instances.
We build `decidable (x ≤ y)` and `decidable (x ⧏ y)` in a simultaneous induction.
Instances for the two projections separately are provided below.
@@ -238,22 +287,31 @@ def leLfDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤
apply (@le_lf_decidable _ _ _ _).1 <;> infer_instance
decreasing_by pgame_wf_tac
#align pgame.le_lf_decidable PGame.leLfDecidable
+-/
+#print PGame.leDecidable /-
instance leDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≤ y) :=
(leLfDecidable x y).1
#align pgame.le_decidable PGame.leDecidable
+-/
+#print PGame.lfDecidable /-
instance lfDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ⧏ y) :=
(leLfDecidable x y).2
#align pgame.lf_decidable PGame.lfDecidable
+-/
+#print PGame.ltDecidable /-
instance ltDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x < y) :=
And.decidable
#align pgame.lt_decidable PGame.ltDecidable
+-/
+#print PGame.equivDecidable /-
instance equivDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≈ y) :=
And.decidable
#align pgame.equiv_decidable PGame.equivDecidable
+-/
example : Short 0 := by infer_instance
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -46,8 +46,8 @@ instance subsingleton_short : ∀ x : PGame, Subsingleton (Short x)
· funext
apply @Subsingleton.elim _ (subsingleton_short (xL x))
· funext
- apply @Subsingleton.elim _ (subsingleton_short (xR x))⟩decreasing_by
- pgame_wf_tac
+ apply @Subsingleton.elim _ (subsingleton_short (xR x))⟩
+decreasing_by pgame_wf_tac
#align pgame.subsingleton_short PGame.subsingleton_short
/-- A synonym for `short.mk` that specifies the pgame in an implicit argument. -/
@@ -167,8 +167,8 @@ instance listShortNthLe :
instance shortOfLists : ∀ (L R : List PGame) [ListShort L] [ListShort R], Short (PGame.ofLists L R)
| L, R, _, _ => by
skip; apply short.mk
- · intros ; infer_instance
- · intros ; apply PGame.listShortNthLe
+ · intros; infer_instance
+ · intros; apply PGame.listShortNthLe
#align pgame.short_of_lists PGame.shortOfLists
-- where does the subtype.val come from?
@@ -185,8 +185,8 @@ def shortOfRelabelling : ∀ {x y : PGame.{u}} (R : Relabelling x y) (S : Short
#align pgame.short_of_relabelling PGame.shortOfRelabelling
instance shortNeg : ∀ (x : PGame.{u}) [Short x], Short (-x)
- | mk xl xr xL xR, _ => by skip;
- exact short.mk (fun i => short_neg _) fun i => short_neg _ decreasing_by pgame_wf_tac
+ | mk xl xr xL xR, _ => by skip; exact short.mk (fun i => short_neg _) fun i => short_neg _
+decreasing_by pgame_wf_tac
#align pgame.short_neg PGame.shortNeg
instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
@@ -196,8 +196,8 @@ instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
all_goals
rintro ⟨i⟩
· apply short_add
- · change short (mk xl xr xL xR + _); apply short_add decreasing_by
- pgame_wf_tac
+ · change short (mk xl xr xL xR + _); apply short_add
+decreasing_by pgame_wf_tac
#align pgame.short_add PGame.shortAdd
instance shortNat : ∀ n : ℕ, Short n
@@ -235,7 +235,8 @@ def leLfDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤
apply (@le_lf_decidable _ _ _ _).1 <;> infer_instance
· apply @Fintype.decidableExistsFintype xr _ _ (by infer_instance)
intro i
- apply (@le_lf_decidable _ _ _ _).1 <;> infer_instance decreasing_by pgame_wf_tac
+ apply (@le_lf_decidable _ _ _ _).1 <;> infer_instance
+decreasing_by pgame_wf_tac
#align pgame.le_lf_decidable PGame.leLfDecidable
instance leDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≤ y) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -26,7 +26,7 @@ prove anything using these instances.
universe u
-open PGame
+open scoped PGame
namespace PGame
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -154,12 +154,6 @@ attribute [class] list_short
attribute [instance] list_short.nil list_short.cons
-/- warning: pgame.list_short_nth_le -> PGame.listShortNthLe is a dubious translation:
-lean 3 declaration is
- forall (L : List.{succ u1} PGame.{u1}) [_inst_1 : PGame.ListShort.{u1} L] (i : Fin (List.length.{succ u1} PGame.{u1} L)), PGame.Short.{u1} (List.nthLe.{succ u1} PGame.{u1} L ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin (List.length.{succ u1} PGame.{u1} L)) Nat (HasLiftT.mk.{1, 1} (Fin (List.length.{succ u1} PGame.{u1} L)) Nat (CoeTCₓ.coe.{1, 1} (Fin (List.length.{succ u1} PGame.{u1} L)) Nat (coeBase.{1, 1} (Fin (List.length.{succ u1} PGame.{u1} L)) Nat (Fin.coeToNat (List.length.{succ u1} PGame.{u1} L))))) i) (PGame.ListShortNthLe._proof_1.{u1} L i))
-but is expected to have type
- PUnit.{succ (succ u1)}
-Case conversion may be inaccurate. Consider using '#align pgame.list_short_nth_le PGame.listShortNthLeₓ'. -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
instance listShortNthLe :
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -63,17 +63,12 @@ attribute [class] short
This is an unindexed typeclass, so it can't be made a global instance.
-/
def fintypeLeft {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
- Fintype α := by
- cases' S with _ _ _ _ _ _ F _
- exact F
+ Fintype α := by cases' S with _ _ _ _ _ _ F _; exact F
#align pgame.fintype_left PGame.fintypeLeft
attribute [local instance] fintype_left
-instance fintypeLeftMoves (x : PGame) [S : Short x] : Fintype x.LeftMoves :=
- by
- cases x
- dsimp
+instance fintypeLeftMoves (x : PGame) [S : Short x] : Fintype x.LeftMoves := by cases x; dsimp;
infer_instance
#align pgame.fintype_left_moves PGame.fintypeLeftMoves
@@ -81,52 +76,39 @@ instance fintypeLeftMoves (x : PGame) [S : Short x] : Fintype x.LeftMoves :=
This is an unindexed typeclass, so it can't be made a global instance.
-/
def fintypeRight {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
- Fintype β := by
- cases' S with _ _ _ _ _ _ _ F
- exact F
+ Fintype β := by cases' S with _ _ _ _ _ _ _ F; exact F
#align pgame.fintype_right PGame.fintypeRight
attribute [local instance] fintype_right
-instance fintypeRightMoves (x : PGame) [S : Short x] : Fintype x.RightMoves :=
- by
- cases x
- dsimp
+instance fintypeRightMoves (x : PGame) [S : Short x] : Fintype x.RightMoves := by cases x; dsimp;
infer_instance
#align pgame.fintype_right_moves PGame.fintypeRightMoves
-instance moveLeftShort (x : PGame) [S : Short x] (i : x.LeftMoves) : Short (x.moveLeft i) :=
- by
- cases' S with _ _ _ _ L _ _ _
- apply L
+instance moveLeftShort (x : PGame) [S : Short x] (i : x.LeftMoves) : Short (x.moveLeft i) := by
+ cases' S with _ _ _ _ L _ _ _; apply L
#align pgame.move_left_short PGame.moveLeftShort
/-- Extracting the `short` instance for a move by Left.
This would be a dangerous instance potentially introducing new metavariables
in typeclass search, so we only make it an instance locally.
-/
-def moveLeftShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (i : xl) : Short (xL i) :=
- by
- cases' S with _ _ _ _ L _ _ _
- apply L
+def moveLeftShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (i : xl) : Short (xL i) := by
+ cases' S with _ _ _ _ L _ _ _; apply L
#align pgame.move_left_short' PGame.moveLeftShort'
attribute [local instance] move_left_short'
-instance moveRightShort (x : PGame) [S : Short x] (j : x.RightMoves) : Short (x.moveRight j) :=
- by
- cases' S with _ _ _ _ _ R _ _
- apply R
+instance moveRightShort (x : PGame) [S : Short x] (j : x.RightMoves) : Short (x.moveRight j) := by
+ cases' S with _ _ _ _ _ R _ _; apply R
#align pgame.move_right_short PGame.moveRightShort
/-- Extracting the `short` instance for a move by Right.
This would be a dangerous instance potentially introducing new metavariables
in typeclass search, so we only make it an instance locally.
-/
-def moveRightShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (j : xr) : Short (xR j) :=
- by
- cases' S with _ _ _ _ _ R _ _
- apply R
+def moveRightShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (j : xr) : Short (xR j) := by
+ cases' S with _ _ _ _ _ R _ _; apply R
#align pgame.move_right_short' PGame.moveRightShort'
attribute [local instance] move_right_short'
@@ -190,12 +172,9 @@ instance listShortNthLe :
instance shortOfLists : ∀ (L R : List PGame) [ListShort L] [ListShort R], Short (PGame.ofLists L R)
| L, R, _, _ => by
- skip
- apply short.mk
- · intros
- infer_instance
- · intros
- apply PGame.listShortNthLe
+ skip; apply short.mk
+ · intros ; infer_instance
+ · intros ; apply PGame.listShortNthLe
#align pgame.short_of_lists PGame.shortOfLists
-- where does the subtype.val come from?
@@ -207,15 +186,12 @@ def shortOfRelabelling : ∀ {x y : PGame.{u}} (R : Relabelling x y) (S : Short
haveI := Fintype.ofEquiv _ R
exact
short.mk'
- (fun i => by
- rw [← L.right_inv i]
- apply short_of_relabelling (rL (L.symm i)) inferInstance)
+ (fun i => by rw [← L.right_inv i]; apply short_of_relabelling (rL (L.symm i)) inferInstance)
fun j => by simpa using short_of_relabelling (rR (R.symm j)) inferInstance
#align pgame.short_of_relabelling PGame.shortOfRelabelling
instance shortNeg : ∀ (x : PGame.{u}) [Short x], Short (-x)
- | mk xl xr xL xR, _ => by
- skip
+ | mk xl xr xL xR, _ => by skip;
exact short.mk (fun i => short_neg _) fun i => short_neg _ decreasing_by pgame_wf_tac
#align pgame.short_neg PGame.shortNeg
@@ -226,8 +202,7 @@ instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
all_goals
rintro ⟨i⟩
· apply short_add
- · change short (mk xl xr xL xR + _)
- apply short_add decreasing_by
+ · change short (mk xl xr xL xR + _); apply short_add decreasing_by
pgame_wf_tac
#align pgame.short_add PGame.shortAdd
@@ -236,16 +211,10 @@ instance shortNat : ∀ n : ℕ, Short n
| n + 1 => @PGame.shortAdd _ _ (short_nat n) PGame.short1
#align pgame.short_nat PGame.shortNat
-instance shortBit0 (x : PGame.{u}) [Short x] : Short (bit0 x) :=
- by
- dsimp [bit0]
- infer_instance
+instance shortBit0 (x : PGame.{u}) [Short x] : Short (bit0 x) := by dsimp [bit0]; infer_instance
#align pgame.short_bit0 PGame.shortBit0
-instance shortBit1 (x : PGame.{u}) [Short x] : Short (bit1 x) :=
- by
- dsimp [bit1]
- infer_instance
+instance shortBit1 (x : PGame.{u}) [Short x] : Short (bit1 x) := by dsimp [bit1]; infer_instance
#align pgame.short_bit1 PGame.shortBit1
/-- Auxiliary construction of decidability instances.
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -26,19 +26,19 @@ prove anything using these instances.
universe u
-open Pgame
+open PGame
-namespace Pgame
+namespace PGame
/-- A short game is a game with a finite set of moves at every turn. -/
-inductive Short : Pgame.{u} → Type (u + 1)
+inductive Short : PGame.{u} → Type (u + 1)
|
mk :
- ∀ {α β : Type u} {L : α → Pgame.{u}} {R : β → Pgame.{u}} (sL : ∀ i : α, short (L i))
+ ∀ {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} (sL : ∀ i : α, short (L i))
(sR : ∀ j : β, short (R j)) [Fintype α] [Fintype β], short ⟨α, β, L, R⟩
-#align pgame.short Pgame.Short
+#align pgame.short PGame.Short
-instance subsingleton_short : ∀ x : Pgame, Subsingleton (Short x)
+instance subsingleton_short : ∀ x : PGame, Subsingleton (Short x)
| mk xl xr xL xR =>
⟨fun a b => by
cases a; cases b
@@ -48,58 +48,58 @@ instance subsingleton_short : ∀ x : Pgame, Subsingleton (Short x)
· funext
apply @Subsingleton.elim _ (subsingleton_short (xR x))⟩decreasing_by
pgame_wf_tac
-#align pgame.subsingleton_short Pgame.subsingleton_short
+#align pgame.subsingleton_short PGame.subsingleton_short
/-- A synonym for `short.mk` that specifies the pgame in an implicit argument. -/
-def Short.mk' {x : Pgame} [Fintype x.LeftMoves] [Fintype x.RightMoves]
+def Short.mk' {x : PGame} [Fintype x.LeftMoves] [Fintype x.RightMoves]
(sL : ∀ i : x.LeftMoves, Short (x.moveLeft i))
(sR : ∀ j : x.RightMoves, Short (x.moveRight j)) : Short x := by
(cases x; dsimp at *) <;> exact short.mk sL sR
-#align pgame.short.mk' Pgame.Short.mk'
+#align pgame.short.mk' PGame.Short.mk'
attribute [class] short
/-- Extracting the `fintype` instance for the indexing type for Left's moves in a short game.
This is an unindexed typeclass, so it can't be made a global instance.
-/
-def fintypeLeft {α β : Type u} {L : α → Pgame.{u}} {R : β → Pgame.{u}} [S : Short ⟨α, β, L, R⟩] :
+def fintypeLeft {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
Fintype α := by
cases' S with _ _ _ _ _ _ F _
exact F
-#align pgame.fintype_left Pgame.fintypeLeft
+#align pgame.fintype_left PGame.fintypeLeft
attribute [local instance] fintype_left
-instance fintypeLeftMoves (x : Pgame) [S : Short x] : Fintype x.LeftMoves :=
+instance fintypeLeftMoves (x : PGame) [S : Short x] : Fintype x.LeftMoves :=
by
cases x
dsimp
infer_instance
-#align pgame.fintype_left_moves Pgame.fintypeLeftMoves
+#align pgame.fintype_left_moves PGame.fintypeLeftMoves
/-- Extracting the `fintype` instance for the indexing type for Right's moves in a short game.
This is an unindexed typeclass, so it can't be made a global instance.
-/
-def fintypeRight {α β : Type u} {L : α → Pgame.{u}} {R : β → Pgame.{u}} [S : Short ⟨α, β, L, R⟩] :
+def fintypeRight {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
Fintype β := by
cases' S with _ _ _ _ _ _ _ F
exact F
-#align pgame.fintype_right Pgame.fintypeRight
+#align pgame.fintype_right PGame.fintypeRight
attribute [local instance] fintype_right
-instance fintypeRightMoves (x : Pgame) [S : Short x] : Fintype x.RightMoves :=
+instance fintypeRightMoves (x : PGame) [S : Short x] : Fintype x.RightMoves :=
by
cases x
dsimp
infer_instance
-#align pgame.fintype_right_moves Pgame.fintypeRightMoves
+#align pgame.fintype_right_moves PGame.fintypeRightMoves
-instance moveLeftShort (x : Pgame) [S : Short x] (i : x.LeftMoves) : Short (x.moveLeft i) :=
+instance moveLeftShort (x : PGame) [S : Short x] (i : x.LeftMoves) : Short (x.moveLeft i) :=
by
cases' S with _ _ _ _ L _ _ _
apply L
-#align pgame.move_left_short Pgame.moveLeftShort
+#align pgame.move_left_short PGame.moveLeftShort
/-- Extracting the `short` instance for a move by Left.
This would be a dangerous instance potentially introducing new metavariables
@@ -109,15 +109,15 @@ def moveLeftShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (i : xl) : Short
by
cases' S with _ _ _ _ L _ _ _
apply L
-#align pgame.move_left_short' Pgame.moveLeftShort'
+#align pgame.move_left_short' PGame.moveLeftShort'
attribute [local instance] move_left_short'
-instance moveRightShort (x : Pgame) [S : Short x] (j : x.RightMoves) : Short (x.moveRight j) :=
+instance moveRightShort (x : PGame) [S : Short x] (j : x.RightMoves) : Short (x.moveRight j) :=
by
cases' S with _ _ _ _ _ R _ _
apply R
-#align pgame.move_right_short Pgame.moveRightShort
+#align pgame.move_right_short PGame.moveRightShort
/-- Extracting the `short` instance for a move by Right.
This would be a dangerous instance potentially introducing new metavariables
@@ -127,11 +127,11 @@ def moveRightShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (j : xr) : Shor
by
cases' S with _ _ _ _ _ R _ _
apply R
-#align pgame.move_right_short' Pgame.moveRightShort'
+#align pgame.move_right_short' PGame.moveRightShort'
attribute [local instance] move_right_short'
-theorem short_birthday : ∀ (x : Pgame.{u}) [Short x], x.birthday < Ordinal.omega
+theorem short_birthday : ∀ (x : PGame.{u}) [Short x], x.birthday < Ordinal.omega
| ⟨xl, xr, xL, xR⟩, hs => by
haveI := hs
rcases hs with ⟨sL, sR⟩
@@ -146,61 +146,61 @@ theorem short_birthday : ∀ (x : Pgame.{u}) [Short x], x.birthday < Ordinal.ome
apply short_birthday _
· exact move_left_short' xL xR i
· exact move_right_short' xL xR i
-#align pgame.short_birthday Pgame.short_birthday
+#align pgame.short_birthday PGame.short_birthday
/-- This leads to infinite loops if made into an instance. -/
def Short.ofIsEmpty {l r xL xR} [IsEmpty l] [IsEmpty r] : Short (mk l r xL xR) :=
Short.mk isEmptyElim isEmptyElim
-#align pgame.short.of_is_empty Pgame.Short.ofIsEmpty
+#align pgame.short.of_is_empty PGame.Short.ofIsEmpty
instance short0 : Short 0 :=
Short.ofIsEmpty
-#align pgame.short_0 Pgame.short0
+#align pgame.short_0 PGame.short0
instance short1 : Short 1 :=
Short.mk (fun i => by cases i; infer_instance) fun j => by cases j
-#align pgame.short_1 Pgame.short1
+#align pgame.short_1 PGame.short1
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/-- Evidence that every `pgame` in a list is `short`. -/
-inductive ListShort : List Pgame.{u} → Type (u + 1)
+inductive ListShort : List PGame.{u} → Type (u + 1)
| nil : list_short []
- | cons : ∀ (hd : Pgame.{u}) [Short hd] (tl : List Pgame.{u}) [list_short tl], list_short (hd::tl)
-#align pgame.list_short Pgame.ListShort
+ | cons : ∀ (hd : PGame.{u}) [Short hd] (tl : List PGame.{u}) [list_short tl], list_short (hd::tl)
+#align pgame.list_short PGame.ListShort
attribute [class] list_short
attribute [instance] list_short.nil list_short.cons
-/- warning: pgame.list_short_nth_le -> Pgame.listShortNthLe is a dubious translation:
+/- warning: pgame.list_short_nth_le -> PGame.listShortNthLe is a dubious translation:
lean 3 declaration is
- forall (L : List.{succ u1} Pgame.{u1}) [_inst_1 : Pgame.ListShort.{u1} L] (i : Fin (List.length.{succ u1} Pgame.{u1} L)), Pgame.Short.{u1} (List.nthLe.{succ u1} Pgame.{u1} L ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin (List.length.{succ u1} Pgame.{u1} L)) Nat (HasLiftT.mk.{1, 1} (Fin (List.length.{succ u1} Pgame.{u1} L)) Nat (CoeTCₓ.coe.{1, 1} (Fin (List.length.{succ u1} Pgame.{u1} L)) Nat (coeBase.{1, 1} (Fin (List.length.{succ u1} Pgame.{u1} L)) Nat (Fin.coeToNat (List.length.{succ u1} Pgame.{u1} L))))) i) (Pgame.ListShortNthLe._proof_1.{u1} L i))
+ forall (L : List.{succ u1} PGame.{u1}) [_inst_1 : PGame.ListShort.{u1} L] (i : Fin (List.length.{succ u1} PGame.{u1} L)), PGame.Short.{u1} (List.nthLe.{succ u1} PGame.{u1} L ((fun (a : Type) (b : Type) [self : HasLiftT.{1, 1} a b] => self.0) (Fin (List.length.{succ u1} PGame.{u1} L)) Nat (HasLiftT.mk.{1, 1} (Fin (List.length.{succ u1} PGame.{u1} L)) Nat (CoeTCₓ.coe.{1, 1} (Fin (List.length.{succ u1} PGame.{u1} L)) Nat (coeBase.{1, 1} (Fin (List.length.{succ u1} PGame.{u1} L)) Nat (Fin.coeToNat (List.length.{succ u1} PGame.{u1} L))))) i) (PGame.ListShortNthLe._proof_1.{u1} L i))
but is expected to have type
PUnit.{succ (succ u1)}
-Case conversion may be inaccurate. Consider using '#align pgame.list_short_nth_le Pgame.listShortNthLeₓ'. -/
+Case conversion may be inaccurate. Consider using '#align pgame.list_short_nth_le PGame.listShortNthLeₓ'. -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
/- ./././Mathport/Syntax/Translate/Expr.lean:177:8: unsupported: ambiguous notation -/
instance listShortNthLe :
- ∀ (L : List Pgame.{u}) [ListShort L] (i : Fin (List.length L)), Short (List.nthLe L i i.is_lt)
+ ∀ (L : List PGame.{u}) [ListShort L] (i : Fin (List.length L)), Short (List.nthLe L i i.is_lt)
| [], _, n => by exfalso; rcases n with ⟨_, ⟨⟩⟩
| hd::tl, @list_short.cons _ S _ _, ⟨0, _⟩ => S
| hd::tl, @list_short.cons _ _ _ S, ⟨n + 1, h⟩ =>
@list_short_nth_le tl S ⟨n, (add_lt_add_iff_right 1).mp h⟩
-#align pgame.list_short_nth_le Pgame.listShortNthLe
+#align pgame.list_short_nth_le PGame.listShortNthLe
-instance shortOfLists : ∀ (L R : List Pgame) [ListShort L] [ListShort R], Short (Pgame.ofLists L R)
+instance shortOfLists : ∀ (L R : List PGame) [ListShort L] [ListShort R], Short (PGame.ofLists L R)
| L, R, _, _ => by
skip
apply short.mk
· intros
infer_instance
· intros
- apply Pgame.listShortNthLe
-#align pgame.short_of_lists Pgame.shortOfLists
+ apply PGame.listShortNthLe
+#align pgame.short_of_lists PGame.shortOfLists
-- where does the subtype.val come from?
/-- If `x` is a short game, and `y` is a relabelling of `x`, then `y` is also short. -/
-def shortOfRelabelling : ∀ {x y : Pgame.{u}} (R : Relabelling x y) (S : Short x), Short y
+def shortOfRelabelling : ∀ {x y : PGame.{u}} (R : Relabelling x y) (S : Short x), Short y
| x, y, ⟨L, R, rL, rR⟩, S => by
skip
haveI := Fintype.ofEquiv _ L
@@ -211,15 +211,15 @@ def shortOfRelabelling : ∀ {x y : Pgame.{u}} (R : Relabelling x y) (S : Short
rw [← L.right_inv i]
apply short_of_relabelling (rL (L.symm i)) inferInstance)
fun j => by simpa using short_of_relabelling (rR (R.symm j)) inferInstance
-#align pgame.short_of_relabelling Pgame.shortOfRelabelling
+#align pgame.short_of_relabelling PGame.shortOfRelabelling
-instance shortNeg : ∀ (x : Pgame.{u}) [Short x], Short (-x)
+instance shortNeg : ∀ (x : PGame.{u}) [Short x], Short (-x)
| mk xl xr xL xR, _ => by
skip
exact short.mk (fun i => short_neg _) fun i => short_neg _ decreasing_by pgame_wf_tac
-#align pgame.short_neg Pgame.shortNeg
+#align pgame.short_neg PGame.shortNeg
-instance shortAdd : ∀ (x y : Pgame.{u}) [Short x] [Short y], Short (x + y)
+instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
| mk xl xr xL xR, mk yl yr yL yR, _, _ => by
skip
apply short.mk;
@@ -229,30 +229,30 @@ instance shortAdd : ∀ (x y : Pgame.{u}) [Short x] [Short y], Short (x + y)
· change short (mk xl xr xL xR + _)
apply short_add decreasing_by
pgame_wf_tac
-#align pgame.short_add Pgame.shortAdd
+#align pgame.short_add PGame.shortAdd
instance shortNat : ∀ n : ℕ, Short n
- | 0 => Pgame.short0
- | n + 1 => @Pgame.shortAdd _ _ (short_nat n) Pgame.short1
-#align pgame.short_nat Pgame.shortNat
+ | 0 => PGame.short0
+ | n + 1 => @PGame.shortAdd _ _ (short_nat n) PGame.short1
+#align pgame.short_nat PGame.shortNat
-instance shortBit0 (x : Pgame.{u}) [Short x] : Short (bit0 x) :=
+instance shortBit0 (x : PGame.{u}) [Short x] : Short (bit0 x) :=
by
dsimp [bit0]
infer_instance
-#align pgame.short_bit0 Pgame.shortBit0
+#align pgame.short_bit0 PGame.shortBit0
-instance shortBit1 (x : Pgame.{u}) [Short x] : Short (bit1 x) :=
+instance shortBit1 (x : PGame.{u}) [Short x] : Short (bit1 x) :=
by
dsimp [bit1]
infer_instance
-#align pgame.short_bit1 Pgame.shortBit1
+#align pgame.short_bit1 PGame.shortBit1
/-- Auxiliary construction of decidability instances.
We build `decidable (x ≤ y)` and `decidable (x ⧏ y)` in a simultaneous induction.
Instances for the two projections separately are provided below.
-/
-def leLfDecidable : ∀ (x y : Pgame.{u}) [Short x] [Short y], Decidable (x ≤ y) × Decidable (x ⧏ y)
+def leLfDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤ y) × Decidable (x ⧏ y)
| mk xl xr xL xR, mk yl yr yL yR, shortx, shorty =>
by
skip
@@ -273,23 +273,23 @@ def leLfDecidable : ∀ (x y : Pgame.{u}) [Short x] [Short y], Decidable (x ≤
· apply @Fintype.decidableExistsFintype xr _ _ (by infer_instance)
intro i
apply (@le_lf_decidable _ _ _ _).1 <;> infer_instance decreasing_by pgame_wf_tac
-#align pgame.le_lf_decidable Pgame.leLfDecidable
+#align pgame.le_lf_decidable PGame.leLfDecidable
-instance leDecidable (x y : Pgame.{u}) [Short x] [Short y] : Decidable (x ≤ y) :=
+instance leDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≤ y) :=
(leLfDecidable x y).1
-#align pgame.le_decidable Pgame.leDecidable
+#align pgame.le_decidable PGame.leDecidable
-instance lfDecidable (x y : Pgame.{u}) [Short x] [Short y] : Decidable (x ⧏ y) :=
+instance lfDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ⧏ y) :=
(leLfDecidable x y).2
-#align pgame.lf_decidable Pgame.lfDecidable
+#align pgame.lf_decidable PGame.lfDecidable
-instance ltDecidable (x y : Pgame.{u}) [Short x] [Short y] : Decidable (x < y) :=
+instance ltDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x < y) :=
And.decidable
-#align pgame.lt_decidable Pgame.ltDecidable
+#align pgame.lt_decidable PGame.ltDecidable
-instance equivDecidable (x y : Pgame.{u}) [Short x] [Short y] : Decidable (x ≈ y) :=
+instance equivDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≈ y) :=
And.decidable
-#align pgame.equiv_decidable Pgame.equivDecidable
+#align pgame.equiv_decidable PGame.equivDecidable
example : Short 0 := by infer_instance
@@ -305,10 +305,10 @@ example : Short (ofLists [-2, -1] [1]) := by infer_instance
example : Short (0 + 0) := by infer_instance
-example : Decidable ((1 : Pgame) ≤ 1) := by infer_instance
+example : Decidable ((1 : PGame) ≤ 1) := by infer_instance
-- No longer works since definitional reduction of well-founded definitions has been restricted.
-- example : (0 : pgame) ≤ 0 := dec_trivial
-- example : (1 : pgame) ≤ 1 := dec_trivial
-end Pgame
+end PGame
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
SetTheory.PGame.listShortGet
(#12201)
It was deprecated during port on 2023-07-01
@@ -200,7 +200,6 @@ instance ListShort.cons (hd : PGame.{u}) [short_hd : Short hd]
cons' short_hd short_tl
#align pgame.list_short.cons SetTheory.PGame.ListShort.cons
--- Porting note: use `List.get` instead of `List.nthLe` because it has been deprecated
instance listShortGet :
∀ (L : List PGame.{u}) [ListShort L] (i : Fin (List.length L)), Short (List.get L i)
| [], _, n => by
@@ -209,14 +208,7 @@ instance listShortGet :
| _::_, ListShort.cons' S _, ⟨0, _⟩ => S
| hd::tl, ListShort.cons' _ S, ⟨n + 1, h⟩ =>
@listShortGet tl S ⟨n, (add_lt_add_iff_right 1).mp h⟩
-
-set_option linter.deprecated false in
-@[deprecated listShortGet]
-instance listShortNthLe (L : List PGame.{u}) [ListShort L] (i : Fin (List.length L)) :
- Short (List.nthLe L i i.is_lt) := by
- rw [List.nthLe_eq]
- apply listShortGet
-#align pgame.list_short_nth_le SetTheory.PGame.listShortNthLe
+#align pgame.list_short_nth_le SetTheory.PGame.listShortGet
instance shortOfLists : ∀ (L R : List PGame) [ListShort L] [ListShort R], Short (PGame.ofLists L R)
| L, R, _, _ => by
The termination checker has been getting more capable, and many of the termination_by
or decreasing_by
clauses in Mathlib are no longer needed.
(Note that termination_by?
will show the automatically derived termination expression, so no information is being lost by removing these.)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -239,7 +239,6 @@ def shortOfRelabelling : ∀ {x y : PGame.{u}}, Relabelling x y → Short x →
instance shortNeg : ∀ (x : PGame.{u}) [Short x], Short (-x)
| mk xl xr xL xR, _ => by
exact Short.mk (fun i => shortNeg _) fun i => shortNeg _
--- Porting note: `decreasing_by pgame_wf_tac` is no longer needed.
#align pgame.short_neg SetTheory.PGame.shortNeg
instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
@@ -249,9 +248,7 @@ instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
rintro ⟨i⟩
· apply shortAdd
· change Short (mk xl xr xL xR + _); apply shortAdd
--- Porting note: In Lean 3 `using_well_founded` didn't need this to be explicit.
termination_by x y => (x, y)
--- Porting note: `decreasing_by pgame_wf_tac` is no longer needed.
#align pgame.short_add SetTheory.PGame.shortAdd
instance shortNat : ∀ n : ℕ, Short n
@@ -293,9 +290,7 @@ def leLFDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤
· apply @Fintype.decidableExistsFintype xr _ ?_ _
intro i
apply (leLFDecidable _ _).1
--- Porting note: In Lean 3 `using_well_founded` didn't need this to be explicit.
termination_by x y => (x, y)
--- Porting note: `decreasing_by pgame_wf_tac` is no longer needed.
#align pgame.le_lf_decidable SetTheory.PGame.leLFDecidable
instance leDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≤ y) :=
@@ -205,9 +205,7 @@ instance listShortGet :
∀ (L : List PGame.{u}) [ListShort L] (i : Fin (List.length L)), Short (List.get L i)
| [], _, n => by
exfalso
- rcases n with ⟨_, ⟨⟩⟩
- -- Porting note: The proof errors unless `done` or a `;` is added after `rcases`
- done
+ rcases n with ⟨_, ⟨⟩⟩;
| _::_, ListShort.cons' S _, ⟨0, _⟩ => S
| hd::tl, ListShort.cons' _ S, ⟨n + 1, h⟩ =>
@listShortGet tl S ⟨n, (add_lt_add_iff_right 1).mp h⟩
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: Joachim Breitner <mail@joachim-breitner.de>
@@ -72,9 +72,9 @@ theorem subsingleton_short_example : ∀ x : PGame, Subsingleton (Short x)
-- (In Lean 3 it was `(mk xl xr xL xR)` instead.)
· funext x
apply @Subsingleton.elim _ (subsingleton_short_example (xR x))⟩
-termination_by subsingleton_short_example x => x
+termination_by x => x
-- We need to unify a bunch of hypotheses before `pgame_wf_tac` can work.
-decreasing_by {
+decreasing_by all_goals {
subst_vars
simp only [mk.injEq, heq_eq_eq, true_and] at *
casesm* _ ∧ _
@@ -252,7 +252,7 @@ instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
· apply shortAdd
· change Short (mk xl xr xL xR + _); apply shortAdd
-- Porting note: In Lean 3 `using_well_founded` didn't need this to be explicit.
-termination_by shortAdd x y _ _ => Prod.mk x y
+termination_by x y => (x, y)
-- Porting note: `decreasing_by pgame_wf_tac` is no longer needed.
#align pgame.short_add SetTheory.PGame.shortAdd
@@ -296,7 +296,7 @@ def leLFDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤
intro i
apply (leLFDecidable _ _).1
-- Porting note: In Lean 3 `using_well_founded` didn't need this to be explicit.
-termination_by leLFDecidable x y _ _ => Prod.mk x y
+termination_by x y => (x, y)
-- Porting note: `decreasing_by pgame_wf_tac` is no longer needed.
#align pgame.le_lf_decidable SetTheory.PGame.leLFDecidable
Rationale: this instance creates (empty) data out of nothing, which may conflict with other data. If you have in the context [Fintype i]
and case on whether i
is empty or not, then this gave two non-defeq instances of [Fintype i]
around.
@@ -169,8 +169,10 @@ theorem short_birthday (x : PGame.{u}) : [Short x] → x.birthday < Ordinal.omeg
#align pgame.short_birthday SetTheory.PGame.short_birthday
/-- This leads to infinite loops if made into an instance. -/
-def Short.ofIsEmpty {l r xL xR} [IsEmpty l] [IsEmpty r] : Short (PGame.mk l r xL xR) :=
- Short.mk isEmptyElim isEmptyElim
+def Short.ofIsEmpty {l r xL xR} [IsEmpty l] [IsEmpty r] : Short (PGame.mk l r xL xR) := by
+ have : Fintype l := Fintype.ofIsEmpty
+ have : Fintype r := Fintype.ofIsEmpty
+ exact Short.mk isEmptyElim isEmptyElim
#align pgame.short.of_is_empty SetTheory.PGame.Short.ofIsEmpty
instance short0 : Short 0 :=
@@ -274,36 +274,36 @@ instance shortBit1 (x : PGame.{u}) [Short x] : Short (bit1 x) := by dsimp [bit1]
We build `Decidable (x ≤ y)` and `Decidable (x ⧏ y)` in a simultaneous induction.
Instances for the two projections separately are provided below.
-/
-def leLfDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤ y) × Decidable (x ⧏ y)
+def leLFDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤ y) × Decidable (x ⧏ y)
| mk xl xr xL xR, mk yl yr yL yR, shortx, shorty => by
constructor
· refine' @decidable_of_iff' _ _ mk_le_mk (id _)
apply @And.decidable _ _ ?_ ?_
· apply @Fintype.decidableForallFintype xl _ ?_ _
intro i
- apply (leLfDecidable _ _).2
+ apply (leLFDecidable _ _).2
· apply @Fintype.decidableForallFintype yr _ ?_ _
intro i
- apply (leLfDecidable _ _).2
+ apply (leLFDecidable _ _).2
· refine' @decidable_of_iff' _ _ mk_lf_mk (id _)
apply @Or.decidable _ _ ?_ ?_
· apply @Fintype.decidableExistsFintype yl _ ?_ _
intro i
- apply (leLfDecidable _ _).1
+ apply (leLFDecidable _ _).1
· apply @Fintype.decidableExistsFintype xr _ ?_ _
intro i
- apply (leLfDecidable _ _).1
+ apply (leLFDecidable _ _).1
-- Porting note: In Lean 3 `using_well_founded` didn't need this to be explicit.
-termination_by leLfDecidable x y _ _ => Prod.mk x y
+termination_by leLFDecidable x y _ _ => Prod.mk x y
-- Porting note: `decreasing_by pgame_wf_tac` is no longer needed.
-#align pgame.le_lf_decidable SetTheory.PGame.leLfDecidable
+#align pgame.le_lf_decidable SetTheory.PGame.leLFDecidable
instance leDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≤ y) :=
- (leLfDecidable x y).1
+ (leLFDecidable x y).1
#align pgame.le_decidable SetTheory.PGame.leDecidable
instance lfDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ⧏ y) :=
- (leLfDecidable x y).2
+ (leLFDecidable x y).2
#align pgame.lf_decidable SetTheory.PGame.lfDecidable
instance ltDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x < y) :=
Game
to SetTheory.Game
(#6365)
move Game
and PGame
into namespace SetTheory
as _root_.Game
might collide with other definitions (e.g. in projects depending on mathlib)
@@ -27,6 +27,8 @@ set_option synthInstance.checkSynthOrder false
universe u
+namespace SetTheory
+
open scoped PGame
namespace PGame
@@ -36,7 +38,7 @@ inductive Short : PGame.{u} → Type (u + 1)
| mk :
∀ {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} (_ : ∀ i : α, Short (L i))
(_ : ∀ j : β, Short (R j)) [Fintype α] [Fintype β], Short ⟨α, β, L, R⟩
-#align pgame.short PGame.Short
+#align pgame.short SetTheory.PGame.Short
-- Porting note: Added `simpNF` exception. It's unclear what puts `eq_iff_true_of_subsingleton` into
-- the simp set. A minimal reproduction of the simpNF error needs to import transitively at least
@@ -80,7 +82,7 @@ decreasing_by {
pgame_wf_tac
}
-#align pgame.subsingleton_short PGame.subsingleton_short
+#align pgame.subsingleton_short SetTheory.PGame.subsingleton_short
/-- A synonym for `Short.mk` that specifies the pgame in an implicit argument. -/
def Short.mk' {x : PGame} [Fintype x.LeftMoves] [Fintype x.RightMoves]
@@ -90,7 +92,7 @@ def Short.mk' {x : PGame} [Fintype x.LeftMoves] [Fintype x.RightMoves]
convert Short.mk sL sR
cases x
dsimp
-#align pgame.short.mk' PGame.Short.mk'
+#align pgame.short.mk' SetTheory.PGame.Short.mk'
attribute [class] Short
@@ -99,30 +101,30 @@ This is an unindexed typeclass, so it can't be made a global instance.
-/
def fintypeLeft {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
Fintype α := by cases' S with _ _ _ _ _ _ F _; exact F
-#align pgame.fintype_left PGame.fintypeLeft
+#align pgame.fintype_left SetTheory.PGame.fintypeLeft
attribute [local instance] fintypeLeft
instance fintypeLeftMoves (x : PGame) [S : Short x] : Fintype x.LeftMoves := by
cases S; assumption
-#align pgame.fintype_left_moves PGame.fintypeLeftMoves
+#align pgame.fintype_left_moves SetTheory.PGame.fintypeLeftMoves
/-- Extracting the `Fintype` instance for the indexing type for Right's moves in a short game.
This is an unindexed typeclass, so it can't be made a global instance.
-/
def fintypeRight {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
Fintype β := by cases' S with _ _ _ _ _ _ _ F; exact F
-#align pgame.fintype_right PGame.fintypeRight
+#align pgame.fintype_right SetTheory.PGame.fintypeRight
attribute [local instance] fintypeRight
instance fintypeRightMoves (x : PGame) [S : Short x] : Fintype x.RightMoves := by
cases S; assumption
-#align pgame.fintype_right_moves PGame.fintypeRightMoves
+#align pgame.fintype_right_moves SetTheory.PGame.fintypeRightMoves
instance moveLeftShort (x : PGame) [S : Short x] (i : x.LeftMoves) : Short (x.moveLeft i) := by
cases' S with _ _ _ _ L _ _ _; apply L
-#align pgame.move_left_short PGame.moveLeftShort
+#align pgame.move_left_short SetTheory.PGame.moveLeftShort
/-- Extracting the `Short` instance for a move by Left.
This would be a dangerous instance potentially introducing new metavariables
@@ -130,13 +132,13 @@ in typeclass search, so we only make it an instance locally.
-/
def moveLeftShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (i : xl) : Short (xL i) := by
cases' S with _ _ _ _ L _ _ _; apply L
-#align pgame.move_left_short' PGame.moveLeftShort'
+#align pgame.move_left_short' SetTheory.PGame.moveLeftShort'
attribute [local instance] moveLeftShort'
instance moveRightShort (x : PGame) [S : Short x] (j : x.RightMoves) : Short (x.moveRight j) := by
cases' S with _ _ _ _ _ R _ _; apply R
-#align pgame.move_right_short PGame.moveRightShort
+#align pgame.move_right_short SetTheory.PGame.moveRightShort
/-- Extracting the `Short` instance for a move by Right.
This would be a dangerous instance potentially introducing new metavariables
@@ -144,7 +146,7 @@ in typeclass search, so we only make it an instance locally.
-/
def moveRightShort' {xl xr} (xL xR) [S : Short (mk xl xr xL xR)] (j : xr) : Short (xR j) := by
cases' S with _ _ _ _ _ R _ _; apply R
-#align pgame.move_right_short' PGame.moveRightShort'
+#align pgame.move_right_short' SetTheory.PGame.moveRightShort'
attribute [local instance] moveRightShort'
@@ -164,20 +166,20 @@ theorem short_birthday (x : PGame.{u}) : [Short x] → x.birthday < Ordinal.omeg
rw [Cardinal.ord_aleph0]
· apply ihl
· apply ihr
-#align pgame.short_birthday PGame.short_birthday
+#align pgame.short_birthday SetTheory.PGame.short_birthday
/-- This leads to infinite loops if made into an instance. -/
def Short.ofIsEmpty {l r xL xR} [IsEmpty l] [IsEmpty r] : Short (PGame.mk l r xL xR) :=
Short.mk isEmptyElim isEmptyElim
-#align pgame.short.of_is_empty PGame.Short.ofIsEmpty
+#align pgame.short.of_is_empty SetTheory.PGame.Short.ofIsEmpty
instance short0 : Short 0 :=
Short.ofIsEmpty
-#align pgame.short_0 PGame.short0
+#align pgame.short_0 SetTheory.PGame.short0
instance short1 : Short 1 :=
Short.mk (fun i => by cases i; infer_instance) fun j => by cases j
-#align pgame.short_1 PGame.short1
+#align pgame.short_1 SetTheory.PGame.short1
/-- Evidence that every `PGame` in a list is `Short`. -/
class inductive ListShort : List PGame.{u} → Type (u + 1)
@@ -186,7 +188,7 @@ class inductive ListShort : List PGame.{u} → Type (u + 1)
-- `[ListShort tl]` as a constructor argument errors saying that `ListShort tl` is not a class.
-- Is this a bug in `class inductive`?
| cons' {hd : PGame.{u}} {tl : List PGame.{u}} : Short hd → ListShort tl → ListShort (hd::tl)
-#align pgame.list_short PGame.ListShort
+#align pgame.list_short SetTheory.PGame.ListShort
attribute [instance] ListShort.nil
@@ -194,7 +196,7 @@ instance ListShort.cons (hd : PGame.{u}) [short_hd : Short hd]
(tl : List PGame.{u}) [short_tl : ListShort tl] :
ListShort (hd::tl) :=
cons' short_hd short_tl
-#align pgame.list_short.cons PGame.ListShort.cons
+#align pgame.list_short.cons SetTheory.PGame.ListShort.cons
-- Porting note: use `List.get` instead of `List.nthLe` because it has been deprecated
instance listShortGet :
@@ -214,14 +216,14 @@ instance listShortNthLe (L : List PGame.{u}) [ListShort L] (i : Fin (List.length
Short (List.nthLe L i i.is_lt) := by
rw [List.nthLe_eq]
apply listShortGet
-#align pgame.list_short_nth_le PGame.listShortNthLe
+#align pgame.list_short_nth_le SetTheory.PGame.listShortNthLe
instance shortOfLists : ∀ (L R : List PGame) [ListShort L] [ListShort R], Short (PGame.ofLists L R)
| L, R, _, _ => by
apply Short.mk
· intros; infer_instance
· intros; apply PGame.listShortGet
-#align pgame.short_of_lists PGame.shortOfLists
+#align pgame.short_of_lists SetTheory.PGame.shortOfLists
/-- If `x` is a short game, and `y` is a relabelling of `x`, then `y` is also short. -/
def shortOfRelabelling : ∀ {x y : PGame.{u}}, Relabelling x y → Short x → Short y
@@ -232,13 +234,13 @@ def shortOfRelabelling : ∀ {x y : PGame.{u}}, Relabelling x y → Short x →
Short.mk'
(fun i => by rw [← L.right_inv i]; apply shortOfRelabelling (rL (L.symm i)) inferInstance)
fun j => by simpa using shortOfRelabelling (rR (R.symm j)) inferInstance
-#align pgame.short_of_relabelling PGame.shortOfRelabelling
+#align pgame.short_of_relabelling SetTheory.PGame.shortOfRelabelling
instance shortNeg : ∀ (x : PGame.{u}) [Short x], Short (-x)
| mk xl xr xL xR, _ => by
exact Short.mk (fun i => shortNeg _) fun i => shortNeg _
-- Porting note: `decreasing_by pgame_wf_tac` is no longer needed.
-#align pgame.short_neg PGame.shortNeg
+#align pgame.short_neg SetTheory.PGame.shortNeg
instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
| mk xl xr xL xR, mk yl yr yL yR, _, _ => by
@@ -250,23 +252,23 @@ instance shortAdd : ∀ (x y : PGame.{u}) [Short x] [Short y], Short (x + y)
-- Porting note: In Lean 3 `using_well_founded` didn't need this to be explicit.
termination_by shortAdd x y _ _ => Prod.mk x y
-- Porting note: `decreasing_by pgame_wf_tac` is no longer needed.
-#align pgame.short_add PGame.shortAdd
+#align pgame.short_add SetTheory.PGame.shortAdd
instance shortNat : ∀ n : ℕ, Short n
| 0 => PGame.short0
| n + 1 => @PGame.shortAdd _ _ (shortNat n) PGame.short1
-#align pgame.short_nat PGame.shortNat
+#align pgame.short_nat SetTheory.PGame.shortNat
instance shortOfNat (n : ℕ) [Nat.AtLeastTwo n] : Short (no_index (OfNat.ofNat n)) := shortNat n
-- Porting note: `bit0` and `bit1` are deprecated so these instances can probably be removed.
set_option linter.deprecated false in
instance shortBit0 (x : PGame.{u}) [Short x] : Short (bit0 x) := by dsimp [bit0]; infer_instance
-#align pgame.short_bit0 PGame.shortBit0
+#align pgame.short_bit0 SetTheory.PGame.shortBit0
set_option linter.deprecated false in
instance shortBit1 (x : PGame.{u}) [Short x] : Short (bit1 x) := by dsimp [bit1]; infer_instance
-#align pgame.short_bit1 PGame.shortBit1
+#align pgame.short_bit1 SetTheory.PGame.shortBit1
/-- Auxiliary construction of decidability instances.
We build `Decidable (x ≤ y)` and `Decidable (x ⧏ y)` in a simultaneous induction.
@@ -294,23 +296,23 @@ def leLfDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤
-- Porting note: In Lean 3 `using_well_founded` didn't need this to be explicit.
termination_by leLfDecidable x y _ _ => Prod.mk x y
-- Porting note: `decreasing_by pgame_wf_tac` is no longer needed.
-#align pgame.le_lf_decidable PGame.leLfDecidable
+#align pgame.le_lf_decidable SetTheory.PGame.leLfDecidable
instance leDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≤ y) :=
(leLfDecidable x y).1
-#align pgame.le_decidable PGame.leDecidable
+#align pgame.le_decidable SetTheory.PGame.leDecidable
instance lfDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ⧏ y) :=
(leLfDecidable x y).2
-#align pgame.lf_decidable PGame.lfDecidable
+#align pgame.lf_decidable SetTheory.PGame.lfDecidable
instance ltDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x < y) :=
And.decidable
-#align pgame.lt_decidable PGame.ltDecidable
+#align pgame.lt_decidable SetTheory.PGame.ltDecidable
instance equivDecidable (x y : PGame.{u}) [Short x] [Short y] : Decidable (x ≈ y) :=
And.decidable
-#align pgame.equiv_decidable PGame.equivDecidable
+#align pgame.equiv_decidable SetTheory.PGame.equivDecidable
example : Short 0 := by infer_instance
@@ -2,17 +2,14 @@
Copyright (c) 2019 Scott Morrison. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Scott Morrison
-
-! This file was ported from Lean 3 source module set_theory.game.short
-! leanprover-community/mathlib commit 70fd9563a21e7b963887c9360bd29b2393e6225a
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.Fintype.Basic
import Mathlib.SetTheory.Cardinal.Cofinality
import Mathlib.SetTheory.Game.Birthday
+#align_import set_theory.game.short from "leanprover-community/mathlib"@"70fd9563a21e7b963887c9360bd29b2393e6225a"
+
/-!
# Short games
@@ -158,7 +158,7 @@ theorem short_birthday (x : PGame.{u}) : [Short x] → x.birthday < Ordinal.omeg
intro hs
rcases hs with ⟨sL, sR⟩
rw [birthday, max_lt_iff]
- constructor;
+ constructor
all_goals
rw [← Cardinal.ord_aleph0]
refine'
Co-authored-by: Komyyy <pol_tta@outlook.jp> Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: Scott Morrison <scott.morrison@anu.edu.au> Co-authored-by: Ruben Van de Velde <65514131+Ruben-VandeVelde@users.noreply.github.com> Co-authored-by: Mario Carneiro <di.gama@gmail.com>
@@ -260,7 +260,7 @@ instance shortNat : ∀ n : ℕ, Short n
| n + 1 => @PGame.shortAdd _ _ (shortNat n) PGame.short1
#align pgame.short_nat PGame.shortNat
-instance shortOfNat (n : ℕ) [Nat.AtLeastTwo n] : Short (OfNat.ofNat n) := shortNat n
+instance shortOfNat (n : ℕ) [Nat.AtLeastTwo n] : Short (no_index (OfNat.ofNat n)) := shortNat n
-- Porting note: `bit0` and `bit1` are deprecated so these instances can probably be removed.
set_option linter.deprecated false in
@@ -16,11 +16,11 @@ import Mathlib.SetTheory.Game.Birthday
/-!
# Short games
-A combinatorial game is `short` [Conway, ch.9][conway2001] if it has only finitely many positions.
+A combinatorial game is `Short` [Conway, ch.9][conway2001] if it has only finitely many positions.
In particular, this means there is a finite set of moves at every point.
We prove that the order relations `≤` and `<`, and the equivalence relation `≈`, are decidable on
-short games, although unfortunately in practice `dec_trivial` doesn't seem to be able to
+short games, although unfortunately in practice `decide` doesn't seem to be able to
prove anything using these instances.
-/
@@ -41,7 +41,11 @@ inductive Short : PGame.{u} → Type (u + 1)
(_ : ∀ j : β, Short (R j)) [Fintype α] [Fintype β], Short ⟨α, β, L, R⟩
#align pgame.short PGame.Short
--- Porting note: simp can prove this
+-- Porting note: Added `simpNF` exception. It's unclear what puts `eq_iff_true_of_subsingleton` into
+-- the simp set. A minimal reproduction of the simpNF error needs to import transitively at least
+-- `Mathlib.Logic.Unique`.
+--
+-- The simplifier can already prove this using `eq_iff_true_of_subsingleton`
attribute [nolint simpNF] Short.mk.injEq
instance subsingleton_short (x : PGame) : Subsingleton (Short x) := by
@@ -81,7 +85,7 @@ decreasing_by {
#align pgame.subsingleton_short PGame.subsingleton_short
-/-- A synonym for `short.mk` that specifies the pgame in an implicit argument. -/
+/-- A synonym for `Short.mk` that specifies the pgame in an implicit argument. -/
def Short.mk' {x : PGame} [Fintype x.LeftMoves] [Fintype x.RightMoves]
(sL : ∀ i : x.LeftMoves, Short (x.moveLeft i))
(sR : ∀ j : x.RightMoves, Short (x.moveRight j)) : Short x := by
@@ -93,7 +97,7 @@ def Short.mk' {x : PGame} [Fintype x.LeftMoves] [Fintype x.RightMoves]
attribute [class] Short
-/-- Extracting the `fintype` instance for the indexing type for Left's moves in a short game.
+/-- Extracting the `Fintype` instance for the indexing type for Left's moves in a short game.
This is an unindexed typeclass, so it can't be made a global instance.
-/
def fintypeLeft {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
@@ -106,7 +110,7 @@ instance fintypeLeftMoves (x : PGame) [S : Short x] : Fintype x.LeftMoves := by
cases S; assumption
#align pgame.fintype_left_moves PGame.fintypeLeftMoves
-/-- Extracting the `fintype` instance for the indexing type for Right's moves in a short game.
+/-- Extracting the `Fintype` instance for the indexing type for Right's moves in a short game.
This is an unindexed typeclass, so it can't be made a global instance.
-/
def fintypeRight {α β : Type u} {L : α → PGame.{u}} {R : β → PGame.{u}} [S : Short ⟨α, β, L, R⟩] :
@@ -123,7 +127,7 @@ instance moveLeftShort (x : PGame) [S : Short x] (i : x.LeftMoves) : Short (x.mo
cases' S with _ _ _ _ L _ _ _; apply L
#align pgame.move_left_short PGame.moveLeftShort
-/-- Extracting the `short` instance for a move by Left.
+/-- Extracting the `Short` instance for a move by Left.
This would be a dangerous instance potentially introducing new metavariables
in typeclass search, so we only make it an instance locally.
-/
@@ -137,7 +141,7 @@ instance moveRightShort (x : PGame) [S : Short x] (j : x.RightMoves) : Short (x.
cases' S with _ _ _ _ _ R _ _; apply R
#align pgame.move_right_short PGame.moveRightShort
-/-- Extracting the `short` instance for a move by Right.
+/-- Extracting the `Short` instance for a move by Right.
This would be a dangerous instance potentially introducing new metavariables
in typeclass search, so we only make it an instance locally.
-/
@@ -178,7 +182,7 @@ instance short1 : Short 1 :=
Short.mk (fun i => by cases i; infer_instance) fun j => by cases j
#align pgame.short_1 PGame.short1
-/-- Evidence that every `pgame` in a list is `short`. -/
+/-- Evidence that every `PGame` in a list is `Short`. -/
class inductive ListShort : List PGame.{u} → Type (u + 1)
| nil : ListShort []
-- Porting note: We introduce `cons` as a separate instance because attempting to use
@@ -268,7 +272,7 @@ instance shortBit1 (x : PGame.{u}) [Short x] : Short (bit1 x) := by dsimp [bit1]
#align pgame.short_bit1 PGame.shortBit1
/-- Auxiliary construction of decidability instances.
-We build `decidable (x ≤ y)` and `decidable (x ⧏ y)` in a simultaneous induction.
+We build `Decidable (x ≤ y)` and `Decidable (x ⧏ y)` in a simultaneous induction.
Instances for the two projections separately are provided below.
-/
def leLfDecidable : ∀ (x y : PGame.{u}) [Short x] [Short y], Decidable (x ≤ y) × Decidable (x ⧏ y)
@@ -328,6 +332,6 @@ example : Short (0 + 0) := by infer_instance
example : Decidable ((1 : PGame) ≤ 1) := by infer_instance
-- No longer works since definitional reduction of well-founded definitions has been restricted.
--- example : (0 : pgame) ≤ 0 := dec_trivial
--- example : (1 : pgame) ≤ 1 := dec_trivial
+-- example : (0 : PGame.{u}) ≤ 0 := by decide
+-- example : (1 : PGame.{u}) ≤ 1 := by decide
end PGame
The unported dependencies are