Index of theproofnetwork/open-problems@860a535/Prove2Me/Definitions/Def_AJGames_Tensor.lean
qedmarket’s copy of theproofnetwork/open-problems@860a535, 30 Nov 2026original source ↗
/-From Prove2Me, definition `AJGames_Tensor` (https://prove2.me/definitions/605ecab9-2400-40a7-868e-01596583a50b). Apache-2.0 per Prove2Me's terms.-/import Mathlibimport Prove2Me.Definitions.Def_AJGames_Game namespace AJGames section Tensor universe uvariable {α β : Type u} /-- **Tensor transition relation** (Abramsky and Jagadeesan, *Games and Full Completeness for Multiplicative Linear Logic*, J. Symbolic Logic 59(2) (1994), 543–574, §3.2, tensor product; axioms T1 (alternation) and T2 (only Opponent switches component)). Consecutive moves `m, m'` of the tensor: alternately labelled, and *if they lie in different components,`m'` is an Opponent move* (only Opponent may switch component). -/def TR (la : α → Pl) (lb : β → Pl) (m m' : α ⊕ β) : Prop := Sum.elim la lb m ≠ Sum.elim la lb m' ∧ (m.isLeft = m'.isLeft ∨ Sum.elim la lb m' = Pl.O) /-- The restriction to the left component. -/def projL (s : List (α ⊕ β)) : List α := s.filterMap Sum.getLeft?/-- The restriction to the right component. -/def projR (s : List (α ⊕ β)) : List β := s.filterMap Sum.getRight? end Tensor namespace Game /-- **Tensor product** `A ⊗ B` (Abramsky and Jagadeesan, *Games and Full Completeness for Multiplicative Linear Logic*, J. Symbolic Logic 59(2) (1994), 543–574, §3.2). disjoint union of moves; positions are alternately labelled interleavings whoserestrictions are positions of `A` and `B`, in which **only Opponent may switch component**. -/@[reducible] def tensor (A B : Game) : Game where M := A.M ⊕ B.M lab := Sum.elim A.lab B.lab pos := {s | List.IsChain (TR A.lab B.lab) s ∧ projL s ∈ A.pos ∧ projR s ∈ B.pos} nil_mem := ⟨List.isChain_nil, A.nil_mem, B.nil_mem⟩ prefix_closed := by rintro s t hst ⟨h1, h2, h3⟩ refine ⟨h1.infix hst.isInfix, A.prefix_closed _ _ ?_ h2, B.prefix_closed _ _ ?_ h3⟩ · exact hst.filterMap Sum.getLeft? · exact hst.filterMap Sum.getRight? alt := fun s hs => hs.1.imp fun a b h => h.1 /-- Linear implication `A ⊸ B := (A ⊗ B⊥)⊥`. -/@[reducible] def imp (A B : Game) : Game := (tensor A B.dual).dual /-- Par `A ⅋ B := (A⊥ ⊗ B⊥)⊥`. -/@[reducible] def par (A B : Game) : Game := (tensor A.dual B.dual).dual end Game end AJGames