File size: 1,985 Bytes
ea76aac
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import Mathlib
import OAI.Computability.MaxCut.Model

namespace OAI

/-!
Finite occurrence presentations used by the v2 rounding/subdivision construction.
An occurrence has its own identifier: its endpoints need not be distinct and
different occurrences may have the same endpoints. The bipartite target records
injectivity of the pair of endpoints, which is precisely the required simplicity.
No hardness or analytic premise enters these structures.
-/

namespace MaxCutGames.Explicit

structure OccurrenceGame (V E A : Type*) where
  source : E → V
  target : E → V
  permutation : E → Equiv.Perm A

structure BipartiteGame (L R E A : Type*) where
  left : E → L
  right : E → R
  permutation : E → Equiv.Perm A
  simple : Function.Injective (fun e => (left e, right e))

namespace OccurrenceGame

def Satisfied {V E A : Type*} (G : OccurrenceGame V E A)
    (labeling : V → A) (e : E) : Prop :=
  labeling (G.target e) = G.permutation e (labeling (G.source e))

instance satisfiedDecidable {V E A : Type*} [DecidableEq A]
    (G : OccurrenceGame V E A) (labeling : V → A) (e : E) :
    Decidable (G.Satisfied labeling e) := inferInstanceAs (Decidable (_ = _))

def IsTranslation {V E A : Type*} [Add A] (G : OccurrenceGame V E A) : Prop :=
  ∃ offset : E → A, ∀ e a, G.permutation e a = a + offset e

end OccurrenceGame

namespace BipartiteGame

def Satisfied {L R E A : Type*} (G : BipartiteGame L R E A)
    (leftLabeling : L → A) (rightLabeling : R → A) (e : E) : Prop :=
  rightLabeling (G.right e) = G.permutation e (leftLabeling (G.left e))

instance satisfiedDecidable {L R E A : Type*} [DecidableEq A]
    (G : BipartiteGame L R E A) (a : L → A) (b : R → A) (e : E) :
    Decidable (G.Satisfied a b e) := inferInstanceAs (Decidable (_ = _))

def IsTranslation {L R E A : Type*} [Add A] (G : BipartiteGame L R E A) : Prop :=
  ∃ offset : E → A, ∀ e a, G.permutation e a = a + offset e

end BipartiteGame

end MaxCutGames.Explicit

end OAI