Combinatorial games. #
In this file we define the quotient of pre-games by the equivalence relation p ≈ q ↔ p ≤ q ∧ q ≤ p
, and construct an instance add_comm_group game
, as well as an instance partial_order game
(although note carefully the warning that the <
field in this instance is not the usual relation
on combinatorial games).
The type of combinatorial games. In ZFC, a combinatorial game is constructed from
two sets of combinatorial games that have been constructed at an earlier
stage. To do this in type theory, we say that a combinatorial pre-game is built
inductively from two families of combinatorial games indexed over any type
in Type u. The resulting type pgame.{u}
lives in Type (u+1)
,
reflecting that it is a proper class in ZFC.
A combinatorial game is then constructed by quotienting by the equivalence
x ≈ y ↔ x ≤ y ∧ y ≤ x
.
Equations
Equations
- game.inhabited = {default := 0}
Equations
- game.has_neg = {neg := game.neg}
Equations
- game.has_add = {add := game.add}
Equations
Equations
- game.add_monoid = {add := add_semigroup.add game.add_semigroup, add_assoc := _, zero := 0, zero_add := game.zero_add, add_zero := game.add_zero, nsmul := nsmul_rec (add_zero_class.to_has_add game), nsmul_zero' := game.add_monoid._proof_1, nsmul_succ' := game.add_monoid._proof_2}
Equations
- game.add_group = {add := add_monoid.add game.add_monoid, add_assoc := _, zero := add_monoid.zero game.add_monoid, zero_add := _, add_zero := _, nsmul := nsmul game.add_monoid, nsmul_zero' := _, nsmul_succ' := _, neg := has_neg.neg game.has_neg, sub := sub_neg_monoid.sub._default add_monoid.add add_monoid.add_assoc add_monoid.zero add_monoid.zero_add add_monoid.add_zero nsmul add_monoid.nsmul_zero' add_monoid.nsmul_succ' has_neg.neg, sub_eq_add_neg := game.add_group._proof_1, gsmul := sub_neg_monoid.gsmul._default add_monoid.add add_monoid.add_assoc add_monoid.zero add_monoid.zero_add add_monoid.add_zero nsmul add_monoid.nsmul_zero' add_monoid.nsmul_succ' has_neg.neg, gsmul_zero' := game.add_group._proof_2, gsmul_succ' := game.add_group._proof_3, gsmul_neg' := game.add_group._proof_4, add_left_neg := game.add_left_neg}
Equations
Equations
- game.add_comm_group = {add := add_comm_semigroup.add game.add_comm_semigroup, add_assoc := _, zero := add_group.zero game.add_group, zero_add := _, add_zero := _, nsmul := add_group.nsmul game.add_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_group.neg game.add_group, sub := add_group.sub game.add_group, sub_eq_add_neg := _, gsmul := add_group.gsmul game.add_group, gsmul_zero' := _, gsmul_succ' := _, gsmul_neg' := _, add_left_neg := _, add_comm := _}
The <
operation provided by this partial order is not the usual <
on games!
Equations
- game.game_partial_order = {le := has_le.le game.has_le, lt := preorder.lt._default has_le.le, le_refl := game.le_refl, le_trans := game.le_trans, lt_iff_le_not_le := game.game_partial_order._proof_1, le_antisymm := game.le_antisymm}
The <
operation provided by this ordered_add_comm_group
is not the usual <
on games!
Equations
- game.ordered_add_comm_group_game = {add := add_comm_group.add game.add_comm_group, add_assoc := _, zero := add_comm_group.zero game.add_comm_group, zero_add := _, add_zero := _, nsmul := add_comm_group.nsmul game.add_comm_group, nsmul_zero' := _, nsmul_succ' := _, neg := add_comm_group.neg game.add_comm_group, sub := add_comm_group.sub game.add_comm_group, sub_eq_add_neg := _, gsmul := add_comm_group.gsmul game.add_comm_group, gsmul_zero' := _, gsmul_succ' := _, gsmul_neg' := _, add_left_neg := _, add_comm := _, le := partial_order.le game.game_partial_order, lt := partial_order.lt game.game_partial_order, le_refl := _, le_trans := _, lt_iff_le_not_le := _, le_antisymm := _, add_le_add_left := game.add_le_add_left}