Here is an example of some games defining Agda games (2.4.2), and binary operation in games.
module MWE where open import Data.Sum open import Size data Game (i : Size) : Setβ where game : {Move : Set} β {<i : Size< i} β (play : Move β Game <i) β Game i _β§_ : β {ij} β Game i β Game j β Game β _β§_ {i} {j} (game {Move/g} {<i} play/g) (game {Move/h} {<j} play/h) = game {β} {Move/g β Move/h} Ξ» { (injβ x) β _β§_ {<i} {j} (play/gx) (game play/h) ; (injβ y) β _β§_ {i} {<j} (game play/g) (play/hy) }
This code type check and completion. However, if I replaced the definition of Game with the definition of a record, for example:
record Game (i : Size) : Setβ where inductive constructor game field {Move} : Set {<i} : Size< i play : Move β Game <i
Agda no longer considers the definition of _β§_ complete, even if the value of any i or j decreases with every recursive call. To my knowledge, these two Game definitions should be equivalent; What makes Agda successfully stop checking the first, but not the last?
source share