File size: 6,067 Bytes
216fb31
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
import OAI.Algebra.Finitistic.Encoding.DirectedBound
import Mathlib.LinearAlgebra.FiniteDimensional.Basic
import Mathlib.Tactic.FinCases

namespace OAI
noncomputable section
namespace LittleFinitistic
universe u v
variable {k V W U : Type u} [Field k]
  [AddCommGroup V] [Module k V] [AddCommGroup W] [Module k W]
  [AddCommGroup U] [Module k U]

/-- Coordinates by the six possible path endpoints: three vertices,
0-to-1 arrows, 1-to-2 arrows, and length-two paths modulo relations. -/
abbrev ThreeVertexAlgebra (_μ : W →ₗ[k] V →ₗ[k] U) := k × k × k × V × W × U

namespace ThreeVertexAlgebra
variable (μ : W →ₗ[k] V →ₗ[k] U)

instance : AddCommGroup (ThreeVertexAlgebra μ) :=
  inferInstanceAs (AddCommGroup (k × k × k × V × W × U))
instance : Module k (ThreeVertexAlgebra μ) :=
  inferInstanceAs (Module k (k × k × k × V × W × U))

@[simp] theorem zero_eq : (0 : ThreeVertexAlgebra μ) = (0, 0, 0, 0, 0, 0) := rfl
@[simp] theorem add_eq (x y : ThreeVertexAlgebra μ) :
    x + y = (x.1+y.1, x.2.1+y.2.1, x.2.2.1+y.2.2.1,
      x.2.2.2.1+y.2.2.2.1, x.2.2.2.2.1+y.2.2.2.2.1,
      x.2.2.2.2.2+y.2.2.2.2.2) := rfl
@[simp] theorem smul_eq (c : k) (x : ThreeVertexAlgebra μ) :
    c • x = (c*x.1, c*x.2.1, c*x.2.2.1,
      c • x.2.2.2.1, c • x.2.2.2.2.1, c • x.2.2.2.2.2) := rfl

def mul (x y : ThreeVertexAlgebra μ) : ThreeVertexAlgebra μ :=
  (x.1 * y.1, x.2.1 * y.2.1, x.2.2.1 * y.2.2.1,
   y.1 • x.2.2.2.1 + x.2.1 • y.2.2.2.1,
   y.2.1 • x.2.2.2.2.1 + x.2.2.1 • y.2.2.2.2.1,
   y.1 • x.2.2.2.2.2 + μ x.2.2.2.2.1 y.2.2.2.1 + x.2.2.1 • y.2.2.2.2.2)

def unit : ThreeVertexAlgebra μ := (1, 1, 1, 0, 0, 0)

@[ext] theorem ext (x y : ThreeVertexAlgebra μ)
    (h0 : x.1 = y.1) (h1 : x.2.1 = y.2.1) (h2 : x.2.2.1 = y.2.2.1)
    (hv : x.2.2.2.1 = y.2.2.2.1) (hw : x.2.2.2.2.1 = y.2.2.2.2.1)
    (hu : x.2.2.2.2.2 = y.2.2.2.2.2) : x = y :=
  Prod.ext h0 (Prod.ext h1 (Prod.ext h2 (Prod.ext hv (Prod.ext hw hu))))

instance : Ring (ThreeVertexAlgebra μ) where
  __ := (inferInstance : AddCommGroup (ThreeVertexAlgebra μ))
  mul := mul μ
  one := unit μ
  mul_assoc x y z := by
    change mul μ (mul μ x y) z = mul μ x (mul μ y z)
    apply Prod.ext <;> dsimp [mul]
    · ring
    apply Prod.ext
    · ring
    apply Prod.ext
    · ring
    apply Prod.ext
    · simp only [smul_add, smul_smul]; module
    apply Prod.ext
    · simp only [smul_add, smul_smul]; module
    · simp only [map_add, map_smul, LinearMap.add_apply, LinearMap.smul_apply,
        smul_add, smul_smul]; module
  one_mul x := by
    change mul μ (unit μ) x = x
    apply Prod.ext <;> dsimp [mul, unit]
    · simp
    apply Prod.ext
    · simp
    apply Prod.ext
    · simp
    apply Prod.ext
    · simp
    apply Prod.ext <;> simp
  mul_one x := by
    change mul μ x (unit μ) = x
    apply Prod.ext <;> dsimp [mul, unit]
    · simp
    apply Prod.ext
    · simp
    apply Prod.ext
    · simp
    apply Prod.ext
    · simp
    apply Prod.ext <;> simp
  left_distrib x y z := by
    change mul μ x (y + z) = mul μ x y + mul μ x z
    rw [add_eq μ (mul μ x y) (mul μ x z), add_eq μ y z]
    ext <;> simp [mul, mul_add, smul_add, add_smul, map_add] <;> abel
  right_distrib x y z := by
    change mul μ (x + y) z = mul μ x z + mul μ y z
    rw [add_eq μ (mul μ x z) (mul μ y z), add_eq μ x y]
    ext <;> simp [mul, add_mul, smul_add, add_smul, map_add] <;> abel
  zero_mul x := by
    change (mul μ 0 x : k × k × k × V × W × U) = 0
    ext <;> simp [mul]
  mul_zero x := by
    change (mul μ x 0 : k × k × k × V × W × U) = 0
    ext <;> simp [mul]


@[simp] theorem mul_eq (x y : ThreeVertexAlgebra μ) : x * y = mul μ x y := rfl
@[simp] theorem one_eq : (1 : ThreeVertexAlgebra μ) = unit μ := rfl

instance : Algebra k (ThreeVertexAlgebra μ) where
  algebraMap :=
    { toFun := fun c => (c, c, c, 0, 0, 0)
      map_zero' := (zero_eq μ).symm
      map_one' := rfl
      map_add' := fun a b => by
        change ((a+b, a+b, a+b, 0, 0, 0) : ThreeVertexAlgebra μ) =
          (a, a, a, 0, 0, 0) + (b, b, b, 0, 0, 0)
        rw [add_eq μ]
        simp
      map_mul' := fun a b => by
        change ((a*b, a*b, a*b, 0, 0, 0) : ThreeVertexAlgebra μ) =
          mul μ (a, a, a, 0, 0, 0) (b, b, b, 0, 0, 0)
        simp [mul] }
  commutes' c x := by
    change mul μ (c, c, c, 0, 0, 0) x = mul μ x (c, c, c, 0, 0, 0)
    ext <;> simp [mul, mul_comm]
  smul_def' c x := by
    change c • x = mul μ (c, c, c, 0, 0, 0) x
    rw [smul_eq μ]
    simp [mul]

instance [FiniteDimensional k V] [FiniteDimensional k W] [FiniteDimensional k U] :
    FiniteDimensional k (ThreeVertexAlgebra μ) :=
  inferInstanceAs (FiniteDimensional k (k × k × k × V × W × U))

/-- The three vertex idempotents, in the manuscript's order. -/
def vertex : Fin 3 → ThreeVertexAlgebra μ
  | ⟨0, _⟩ => (1, 0, 0, 0, 0, 0)
  | ⟨1, _⟩ => (0, 1, 0, 0, 0, 0)
  | ⟨2, _⟩ => (0, 0, 1, 0, 0, 0)

def directedSystem : DirectedBound.DirectedSystem k (ThreeVertexAlgebra μ) 3 where
  e := vertex μ
  idem i := by fin_cases i <;> ext <;> simp [vertex, mul]
  orthogonal i j hij := by
    fin_cases i <;> fin_cases j <;> simp_all [vertex, mul]
  complete := by
    simp [Fin.sum_univ_succ, vertex, unit, add_eq μ]
  diagonal i a := by
    fin_cases i
    · exact ⟨a.1, by ext <;> simp [vertex, mul, smul_eq μ]⟩
    · exact ⟨a.2.1, by ext <;> simp [vertex, mul, smul_eq μ]⟩
    · exact ⟨a.2.2.1, by ext <;> simp [vertex, mul, smul_eq μ]⟩
  directed i j hij a := by
    fin_cases i <;> fin_cases j <;> simp_all [vertex, mul]

open CategoryTheory
/-- The three-vertex coordinate algebra has global dimension at most two on both sides. -/
theorem globalDimension_le_two :
    (⨆ N : ModuleCat.{max u v} (ThreeVertexAlgebra μ), projectiveDimension N) ≤ (2 : ℕ) ∧
    (⨆ N : ModuleCat.{max u v} (ThreeVertexAlgebra μ)ᵐᵒᵖ, projectiveDimension N) ≤ (2 : ℕ) :=
  (directedSystem μ).both_sides_globalDimension_le
end ThreeVertexAlgebra
end LittleFinitistic

end

end OAI