Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions CombinatorialGames/Game/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,26 @@ theorem ofSets_lf_of_mem_right {s t : Set Game.{u}} [Small.{u} s] [Small.{u} t]
have : x.out ∈ !{out '' s | out '' t}ᴿ := by simpa using mem_image_of_mem _ h
simpa [← mk_le_mk] using lf_right this

theorem ofSets_le_ofSets_iff {s₁ t₁ s₂ t₂ : Set Game.{u}}
[Small.{u} s₁] [Small.{u} t₁] [Small.{u} s₂] [Small.{u} t₂] :
!{s₁ | t₁} ≤ !{s₂ | t₂} ↔ (∀ z ∈ s₁, z ⧏ !{s₂ | t₂}) ∧ (∀ z ∈ t₂, !{s₁ | t₁} ⧏ z) := by
apply IGame.le_iff_forall_lf.trans
simp only [moves_ofSets, mem_image, forall_exists_index, and_imp, forall_apply_eq_imp_iff₂]
congr!
all_goals
rw [← Game.mk_le_mk, out_eq]
rfl

theorem ofSets_lf_ofSets_iff {s₁ t₁ s₂ t₂ : Set Game.{u}}
[Small.{u} s₁] [Small.{u} t₁] [Small.{u} s₂] [Small.{u} t₂] :
!{s₁ | t₁} ⧏ !{s₂ | t₂} ↔ (∃ z ∈ s₂, !{s₁ | t₁} ≤ z) ∨ (∃ z ∈ t₁, z ≤ !{s₂ | t₂}) := by
apply IGame.lf_iff_exists_le.trans
simp only [moves_ofSets, mem_image, exists_exists_and_eq_and]
congr!
all_goals
rw [← Game.mk_le_mk, out_eq]
rfl

end Game

namespace IGame
Expand Down
12 changes: 12 additions & 0 deletions CombinatorialGames/Surreal/Basic.lean
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,18 @@ theorem ofSets_lt_of_mem_right {s t : Set Surreal.{u}} [Small.{u} s] [Small.{u}
rw [lt_iff_not_ge, ← toGame_le_iff, toGame_ofSets]
exact Game.ofSets_lf_of_mem_right (Set.mem_image_of_mem _ hx)

theorem ofSets_le_ofSets_iff {s₁ t₁ s₂ t₂ : Set Surreal.{u}}
[Small.{u} s₁] [Small.{u} t₁] [Small.{u} s₂] [Small.{u} t₂]
{H₁ : ∀ x ∈ s₁, ∀ y ∈ t₁, x < y} {H₁ : ∀ x ∈ s₂, ∀ y ∈ t₂, x < y} :
!{s₁ | t₁} ≤ !{s₂ | t₂} ↔ (∀ z ∈ s₁, z < !{s₂ | t₂}) ∧ (∀ z ∈ t₂, !{s₁ | t₁} < z) := by
simp [lt_iff_not_ge, ← toGame_le_iff, Game.ofSets_le_ofSets_iff]

theorem ofSets_lt_ofSets_iff {s₁ t₁ s₂ t₂ : Set Surreal.{u}}
[Small.{u} s₁] [Small.{u} t₁] [Small.{u} s₂] [Small.{u} t₂]
{H₁ : ∀ x ∈ s₁, ∀ y ∈ t₁, x < y} {H₁ : ∀ x ∈ s₂, ∀ y ∈ t₂, x < y} :
!{s₁ | t₁} < !{s₂ | t₂} ↔ (∃ z ∈ s₂, !{s₁ | t₁} ≤ z) ∨ (∃ z ∈ t₁, z ≤ !{s₂ | t₂}) := by
simp [lt_iff_not_ge, ← toGame_le_iff, Game.ofSets_lf_ofSets_iff]

theorem zero_def : (0 : Surreal) = !{fun _ ↦ ∅} := by apply (mk_ofSets' ..).trans; congr!; simp
theorem one_def : (1 : Surreal) = !{{0} | ∅} := by apply (mk_ofSets ..).trans; congr! <;> aesop

Expand Down
Loading