File size: 2,032 Bytes
4a56cd6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import Mathlib

namespace OAI

namespace ElementaryPositivity

structure NaturalUnitIntervalGraph (n : β„•) where
  h : Fin n β†’ Fin n
  increasing : Monotone h
  extensive : βˆ€ i, i ≀ h i

namespace NaturalUnitIntervalGraph

variable {n : β„•} (G : NaturalUnitIntervalGraph n)

def Edge (i j : Fin n) : Prop :=
  (i < j ∧ j ≀ G.h i) ∨ (j < i ∧ i ≀ G.h j)

instance (i j : Fin n) : Decidable (G.Edge i j) :=
  inferInstanceAs (Decidable ((_ ∧ _) ∨ (_ ∧ _)))

def Nondescent (Οƒ : Equiv.Perm (Fin n)) : Prop :=
  βˆ€ i j : Fin n, i.val + 1 = j.val β†’ Οƒ j < Οƒ i β†’ G.Edge (Οƒ i) (Οƒ j)

instance (Οƒ : Equiv.Perm (Fin n)) : Decidable (G.Nondescent Οƒ) :=
  inferInstanceAs (Decidable (βˆ€ i j : Fin n,
    i.val + 1 = j.val β†’ Οƒ j < Οƒ i β†’ G.Edge (Οƒ i) (Οƒ j)))

def graphInversions (Οƒ : Equiv.Perm (Fin n)) : β„• :=
  (Finset.univ.filter fun ij : Fin n Γ— Fin n =>
    ij.1 < ij.2 ∧ Οƒ ij.2 < Οƒ ij.1 ∧ G.Edge (Οƒ ij.1) (Οƒ ij.2)).card

def Proper {r : β„•} (f : Fin n β†’ Fin r) : Prop :=
  βˆ€ i j : Fin n, G.Edge i j β†’ f i β‰  f j

instance {r : β„•} (f : Fin n β†’ Fin r) : Decidable (G.Proper f) :=
  inferInstanceAs (Decidable (βˆ€ i j : Fin n, G.Edge i j β†’ f i β‰  f j))

def coloringAscents {r : β„•} (f : Fin n β†’ Fin r) : β„• :=
  (Finset.univ.filter fun ij : Fin n Γ— Fin n =>
    ij.1 < ij.2 ∧ G.Edge ij.1 ij.2 ∧ f ij.1 < f ij.2).card

noncomputable def chromatic (r : β„•) : MvPolynomial (Fin r) (Polynomial β„•) :=
  βˆ‘ f ∈ Finset.univ.filter (G.Proper (r := r)),
    MvPolynomial.C (Polynomial.X ^ G.coloringAscents f) *
      ∏ i : Fin n, MvPolynomial.X (f i)

structure PermutationWitness where
  theta : {Οƒ : Equiv.Perm (Fin n) // G.Nondescent Οƒ} β†’ Nat.Partition n
  expansion : βˆ€ r : β„•, G.chromatic r =
    βˆ‘ Οƒ : {Οƒ : Equiv.Perm (Fin n) // G.Nondescent Οƒ},
      MvPolynomial.C (Polynomial.X ^ G.graphInversions Οƒ.val) *
        MvPolynomial.esymmPart (Fin r) (Polynomial β„•) (theta Οƒ)

end NaturalUnitIntervalGraph
end ElementaryPositivity

end OAI