aboutsummaryrefslogtreecommitdiff
path: root/Functor/Monoidal/Instance/Nat/System.agda
blob: 2201c359d5be0324a6670bccee904a5c6a737831 (plain)
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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
{-# OPTIONS --without-K --safe #-}

module Functor.Monoidal.Instance.Nat.System where

import Categories.Category.Monoidal.Utilities as ⊗-Util
import Data.Circuit.Value as Value
import Data.Vec.Functional as Vec
import Relation.Binary.PropositionalEquality as open import Level using (0ℓ; suc; Level)

open import Category.Monoidal.Instance.Nat using (Nat,+,0; Natop,+,0)
open import Categories.Category.Monoidal.Bundle using (SymmetricMonoidalCategory; BraidedMonoidalCategory)
open import Category.Instance.Setoids.SymmetricMonoidal {0} {0} using () renaming (Setoids-× to 0ℓ-Setoids-×)
open import Category.Instance.Setoids.SymmetricMonoidal {suc 0} {suc 0} using (Setoids-×)

module Natop,+,0 = SymmetricMonoidalCategory Natop,+,0 renaming (braidedMonoidalCategory to B)
module 0-Setoids = SymmetricMonoidalCategory 0ℓ-Setoids-× renaming (braidedMonoidalCategory to B)

open import Functor.Monoidal.Instance.Nat.Pull using (Pull,++,[])
open import Categories.Functor.Monoidal.Braided Natop,+,0.B 0ℓ-Setoids-×.B using (module Strong)

Pull,++,[]B : Strong.BraidedMonoidalFunctor
Pull,++,[]B = record { isBraidedMonoidal = Pull,++,[].isBraidedMonoidal }
module Pull,++,[]B = Strong.BraidedMonoidalFunctor (record { isBraidedMonoidal = Pull,++,[].isBraidedMonoidal })

open import Categories.Category.BinaryProducts using (module BinaryProducts)
open import Categories.Category.Cartesian using (Cartesian)
open import Categories.Category.Cocartesian using (Cocartesian)
open import Categories.Category.Instance.Nat using (Nat; Nat-Cocartesian; Natop)
open import Categories.Category.Instance.Setoids using (Setoids)
open import Categories.Category.Instance.SingletonSet using () renaming (SingletonSetoid to ⊤ₛ)
open import Categories.Category.Monoidal.Instance.Setoids using (Setoids-Cartesian)
open import Categories.Category.Product using (Product)
open import Categories.Category.Product using (_⁂_)
open import Categories.Functor using (Functor)
open import Categories.Functor using (_∘F_)
open import Categories.Functor.Monoidal.Symmetric Nat,+,0 Setoids-× using (module Lax)
open import Categories.NaturalTransformation.Core using (NaturalTransformation; ntHelper)
open import Data.Circuit.Value using (Monoid)
open import Data.Fin using (Fin)
open import Data.Nat using (ℕ; _+_)
open import Data.Product using (_,_; dmap; _×_) renaming (map to ×-map)
open import Data.Product.Function.NonDependent.Setoid using (_×-function_; proj₁ₛ; proj₂ₛ; <_,_>ₛ; swapₛ)
open import Data.Product.Relation.Binary.Pointwise.NonDependent using (_×ₛ_)
open import Data.Setoid using (_⇒ₛ_; ∣_∣)
open import Data.System {suc 0} using (Systemₛ; System; discrete; _≤_)
open import Data.System.Values Monoid using (++ₛ; splitₛ; Values; ++-cong; _++_; [])
open import Data.System.Values Value.Monoid using (_≋_; module ≋)
open import Data.Unit.Polymorphic using (⊤; tt)
open import Function using (Func; _⟶ₛ_; _⟨$⟩_; _∘_; id; case_of_)
open import Function.Construct.Constant using () renaming (function to Const)
open import Function.Construct.Identity using () renaming (function to Id)
open import Function.Construct.Setoid using (_∙_; setoid)
open import Functor.Instance.Nat.Pull using (Pull)
open import Functor.Instance.Nat.Push using (Push)
open import Functor.Instance.Nat.System using (Sys; Sys-defs)
open import Functor.Monoidal.Braided.Strong.Properties Pull,++,[]B using (braiding-compat-inv)
open import Functor.Monoidal.Instance.Nat.Push using (Push,++,[])
open import Functor.Monoidal.Strong.Properties Pull,++,[].monoidalFunctor using (associativity-inv)
open import Functor.Monoidal.Strong.Properties Pull,++,[].monoidalFunctor using (unitaryʳ-inv; unitaryˡ-inv; module Shorthands)
open import Relation.Binary using (Setoid)
open import Relation.Binary.PropositionalEquality as  using (_≡_; _≗_)

open module  {A} {B} = Setoid (setoid {0} {0} {0} {0} A B) using (_≈_)

open Cartesian (Setoids-Cartesian {suc 0} {suc 0}) using (products)

open BinaryProducts products using (-×-)
open Cocartesian Nat-Cocartesian using (module Dual; i₁; i₂; -+-; _+₁_; +-assocʳ; +-assocˡ; +-comm; +-swap; +₁∘+-swap; +₁∘i₁; +₁∘i₂)
open Dual.op-binaryProducts using () renaming (×-assoc to +-assoc)
open SymmetricMonoidalCategory using () renaming (braidedMonoidalCategory to B)

open Func

Sys-ε : ⊤ₛ {suc 0} {suc 0} ⟶ₛ Systemₛ 0
Sys-ε = Const ⊤ₛ (Systemₛ 0) (discrete 0)

private

  variable
    n m o :     c₁ c₂ c₃ c₄ c₅ c₆ : Level
    ℓ₁ ℓ₂ ℓ₃ ℓ₄ ℓ₅ ℓ₆ : Level

_×-⇒_
    : {A : Setoid c₁ ℓ₁}
      {B : Setoid c₂ ℓ₂}
      {C : Setoid c₃ ℓ₃}
      {D : Setoid c₄ ℓ₄}
      {E : Setoid c₅ ℓ₅}
      {F : Setoid c₆ ℓ₆}
     A ⟶ₛ B ⇒ₛ C
     D ⟶ₛ E ⇒ₛ F
     A ×ₛ D ⟶ₛ B ×ₛ E ⇒ₛ C ×ₛ F
_×-⇒_ f g .to (x , y) = to f x ×-function to g y
_×-⇒_ f g .cong (x , y) = cong f x , cong g y

 : System n × System m  System (n + m) {n} {m} (S₁ , S₂) = record
    { S = S₁.S ×ₛ S₂.S
    ; fₛ = S₁.fₛ ×-⇒ S₂.fₛ  splitₛ
    ; fₒ = ++ₛ  S₁.fₒ ×-function S₂.fₒ
    }
  where
    module S₁ = System S₁
    module S₂ = System S₂

opaque

  _~_ : {A B : Setoid 0 0}  Func A B  Func A B  Set
  _~_ = _≈_
  infix 4 _~_

  sym-~
      : {A B : Setoid 0 0}
        {x y : Func A B}
       x ~ y
       y ~ x
  sym-~ {A} {B} {x} {y} = 0ℓ-Setoids-×.Equiv.sym {A} {B} {x} {y}

⊗ₛ
    : {n m : }
     Systemₛ n ×ₛ Systemₛ m ⟶ₛ Systemₛ (n + m)
⊗ₛ .to = ⊗
⊗ₛ {n} {m} .cong {a , b} {c , d} ((a≤c , c≤a) , (b≤d , d≤b)) = left , right
  where
    module a = System a
    module b = System b
    module c = System c
    module d = System d
    module a≤c = _≤_ a≤c
    module b≤d = _≤_ b≤d
    module c≤a = _≤_ c≤a
    module d≤b = _≤_ d≤b

    open _≤_
    left : ⊗ₛ ⟨$⟩ (a , b)  ⊗ₛ ⟨$⟩ (c , d)
    left .⇒S = a≤c.⇒S ×-function b≤d.⇒S
    left .≗-fₛ i with (i₁ , i₂)  splitₛ ⟨$⟩ i = dmap (a≤c.≗-fₛ i₁) (b≤d.≗-fₛ i₂)
    left .≗-fₒ = cong ++ₛ  dmap a≤c.≗-fₒ b≤d.≗-fₒ

    right : ⊗ₛ ⟨$⟩ (c , d)  ⊗ₛ ⟨$⟩ (a , b)
    right .⇒S = c≤a.⇒S ×-function d≤b.⇒S
    right .≗-fₛ i with (i₁ , i₂)  splitₛ ⟨$⟩ i = dmap (c≤a.≗-fₛ i₁) (d≤b.≗-fₛ i₂)
    right .≗-fₒ = cong ++ₛ  dmap c≤a.≗-fₒ d≤b.≗-fₒ

opaque

  unfolding Sys-defs

  System-⊗-≤
      : {n n′ m m′ : }
        (X : System n)
        (Y : System m)
        (f : Fin n  Fin n′)
        (g : Fin m  Fin m′)
        (Sys.₁ f ⟨$⟩ X , Sys.₁ g ⟨$⟩ Y)  Sys.₁ (f +₁ g) ⟨$⟩  (X , Y)
  System-⊗-≤ {n} {n′} {m} {m′} X Y f g = record
      { ⇒S = Id (X.S ×ₛ Y.S)
      ; ≗-fₛ = λ i s  cong (X.fₛ ×-⇒ Y.fₛ) (Pull,++,[].⊗-homo.⇐.sym-commute (f , g) {i}) {s}
      ; ≗-fₒ = λ (s₁ , s₂)  Push,++,[].⊗-homo.commute (f , g) {X.fₒ′ s₁ , Y.fₒ′ s₂}
      }
    where
      module X = System X
      module Y = System Y

  System-⊗-≥
      : {n n′ m m′ : }
        (X : System n)
        (Y : System m)
        (f : Fin n  Fin n′)
        (g : Fin m  Fin m′)
       Sys.₁ (f +₁ g) ⟨$⟩ ( (X , Y))   (Sys.₁ f ⟨$⟩ X , Sys.₁ g ⟨$⟩ Y)
  System-⊗-≥ {n} {n′} {m} {m′} X Y f g = record
      { ⇒S = Id (X.S ×ₛ Y.S)
      ; ≗-fₛ = λ i s  cong (X.fₛ ×-⇒ Y.fₛ) (Pull,++,[].⊗-homo.⇐.commute (f , g) {i}) {s}
      ; ≗-fₒ = λ (s₁ , s₂)  Push,++,[].⊗-homo.sym-commute (f , g) {X.fₒ′ s₁ , Y.fₒ′ s₂}
      }
    where
      module X = System X
      module Y = System Y

⊗-homomorphism : NaturalTransformation (-×- ∘F (Sys  Sys)) (Sys ∘F -+-)
⊗-homomorphism = ntHelper record
    { η = λ (n , m)  ⊗ₛ {n} {m}
    ; commute = λ { (f , g) {X , Y}  System-⊗-≤ X Y f g , System-⊗-≥ X Y f g }
    }

opaque

  unfolding Sys-defs

  ⊗-assoc-≤
      : (X : System n)
        (Y : System m)
        (Z : System o)
       Sys.₁ (+-assocˡ {n}) ⟨$⟩ ( ( (X , Y) , Z))   (X ,  (Y , Z))
  ⊗-assoc-≤ {n} {m} {o} X Y Z = record
      { ⇒S = assocˡ
      ; ≗-fₛ = λ i ((s₁ , s₂) , s₃)  cong (X.fₛ ×-⇒ (Y.fₛ ×-⇒ Z.fₛ)  assocˡ) (associativity-inv {x = i}) {s₁ , s₂ , s₃}
      ; ≗-fₒ = λ ((s₁ , s₂) , s₃)  Push,++,[].associativity {x = (X.fₒ′ s₁ , Y.fₒ′ s₂) , Z.fₒ′ s₃}
      }
    where
      open Cartesian (Setoids-Cartesian {0} {0}) using () renaming (products to 0ℓ-products)
      open BinaryProducts 0ℓ-products using (assocˡ)

      module X = System X
      module Y = System Y
      module Z = System Z

  ⊗-assoc-≥
      : (X : System n)
        (Y : System m)
        (Z : System o)
        (X ,  (Y , Z))  Sys.₁ (+-assocˡ {n}) ⟨$⟩ ( ( (X , Y) , Z))
  ⊗-assoc-≥ {n} {m} {o} X Y Z = record
      { ⇒S = ×-assocʳ
      ; ≗-fₛ = λ i (s₁ , s₂ , s₃)  cong ((X.fₛ ×-⇒ Y.fₛ) ×-⇒ Z.fₛ) (sym-split-assoc {i}) {(s₁ , s₂) , s₃}
      ; ≗-fₒ = λ (s₁ , s₂ , s₃)  sym-++-assoc {(X.fₒ′ s₁ , Y.fₒ′ s₂) , Z.fₒ′ s₃}
      }
    where
      open Cartesian (Setoids-Cartesian {0} {0}) using () renaming (products to prod)
      open BinaryProducts prod using () renaming (assocʳ to ×-assocʳ; assocˡ to ×-assocˡ)

      +-assocℓ : Fin ((n + m) + o)  Fin (n + (m + o))
      +-assocℓ = +-assocˡ {n} {m} {o}

      opaque

        unfolding _~_

        associativity-inv-~ : splitₛ ×-function Id (Values o)  splitₛ  Pull.₁ +-assocℓ ~ ×-assocʳ  Id (Values n) ×-function splitₛ  splitₛ
        associativity-inv-~ {i} = associativity-inv {n} {m} {o} {i}

        associativity-~ : Push.₁ (+-assocˡ {n} {m} {o})  ++ₛ  ++ₛ ×-function Id (Values o) ~ ++ₛ  Id (Values n) ×-function ++ₛ  ×-assocˡ
        associativity-~ {i} = Push,++,[].associativity {n} {m} {o} {i}

      sym-split-assoc-~ : ×-assocʳ  Id (Values n) ×-function splitₛ  splitₛ ~ splitₛ ×-function Id (Values o)  splitₛ  Pull.₁ +-assocℓ
      sym-split-assoc-~ = sym-~ associativity-inv-~

      sym-++-assoc-~ : ++ₛ  Id (Values n) ×-function ++ₛ  ×-assocˡ ~ Push.₁ (+-assocˡ {n} {m} {o})  ++ₛ  ++ₛ ×-function Id (Values o)
      sym-++-assoc-~ = sym-~ associativity-~

      opaque

        unfolding _~_

        sym-split-assoc : ×-assocʳ  Id (Values n) ×-function splitₛ  splitₛ  splitₛ ×-function Id (Values o)  splitₛ  Pull.₁ +-assocℓ
        sym-split-assoc {i} = sym-split-assoc-~ {i}

        sym-++-assoc : ++ₛ  Id (Values n) ×-function ++ₛ  ×-assocˡ  Push.₁ (+-assocˡ {n} {m} {o})  ++ₛ  ++ₛ ×-function Id (Values o)
        sym-++-assoc {i} = sym-++-assoc-~

      module X = System X
      module Y = System Y
      module Z = System Z

  Sys-unitaryˡ-≤  : (X : System n)  Sys.₁ id ⟨$⟩ ( (discrete 0 , X))  X
  Sys-unitaryˡ-≤ {n} X = record
      { ⇒S = proj₂ₛ
      ; ≗-fₛ = λ i (_ , s)  cong (X.fₛ  proj₂ₛ {A = ⊤ₛ {0}}) (unitaryˡ-inv {n} {i})
      ; ≗-fₒ = λ (_ , s)  Push,++,[].unitaryˡ {n} {tt , X.fₒ′ s}
      }
    where
      module X = System X

  Sys-unitaryˡ-≥  : (X : System n)  X  Sys.₁ id ⟨$⟩ ( (discrete 0 , X))
  Sys-unitaryˡ-≥ {n} X = record
      { ⇒S = < Const X.S ⊤ₛ tt , Id X.S >ₛ
      ; ≗-fₛ = λ i s  cong (disc.fₛ ×-⇒ X.fₛ  ε⇒ ×-function Id (Values n)) (sym-split-unitaryˡ {i})
      ; ≗-fₒ = λ s  sym-++-unitaryˡ {_ , X.fₒ′ s}
      }
    where
      module X = System X
      open SymmetricMonoidalCategory 0ℓ-Setoids-× using (module Equiv)
      open ⊗-Util.Shorthands 0ℓ-Setoids-×.monoidal using (λ)
      open Shorthands using (ε⇐; ε⇒)
      module disc = System (discrete 0)
      sym-split-unitaryˡ
          : λ  ε⇐ ×-function Id (Values n)  splitₛ  Pull.₁ ((λ ()) Vec.++ id)
      sym-split-unitaryˡ =
          0ℓ-Setoids-×.Equiv.sym
              {Values n}
              {⊤ₛ ×ₛ Values n}
              {ε⇐ ×-function Id (Values n)  splitₛ  Pull.₁ ((λ ()) Vec.++ id)}
              {λ}
              (unitaryˡ-inv {n})
      sym-++-unitaryˡ : proj₂ₛ {A = ⊤ₛ {0} {0}}  Push.₁ ((λ ()) Vec.++ id)  ++ₛ  Push,++,[].ε ×-function Id (Values n)
      sym-++-unitaryˡ =
          0ℓ-Setoids-×.Equiv.sym
              {⊤ₛ ×ₛ Values n}
              {Values n}
              {Push.₁ ((λ ()) Vec.++ id)  ++ₛ  Push,++,[].ε ×-function Id (Values n)}
              {proj₂ₛ}
              (Push,++,[].unitaryˡ {n})


  Sys-unitaryʳ-≤ : (X : System n)  Sys.₁ (id Vec.++ (λ ())) ⟨$⟩ ( {n} {0} (X , discrete 0))  X
  Sys-unitaryʳ-≤ {n} X = record
      { ⇒S = proj₁ₛ
      ; ≗-fₛ = λ i (s , _)  cong (X.fₛ  proj₁ₛ {B = ⊤ₛ {0}}) (unitaryʳ-inv {n} {i})
      ; ≗-fₒ = λ (s , _)  Push,++,[].unitaryʳ {n} {X.fₒ′ s , tt}
      }
    where
      module X = System X

  Sys-unitaryʳ-≥ : (X : System n)  X  Sys.₁ (id Vec.++ (λ ())) ⟨$⟩ ( {n} {0} (X , discrete 0))
  Sys-unitaryʳ-≥ {n} X = record
      { ⇒S = < Id X.S , Const X.S ⊤ₛ tt >ₛ
      ; ≗-fₛ = λ i s  cong (X.fₛ ×-⇒ disc.fₛ  Id (Values n) ×-function ε⇒) sym-split-unitaryʳ {s , tt}
      ; ≗-fₒ = λ s  sym-++-unitaryʳ {X.fₒ′ s , tt}
      }
    where
      module X = System X
      module disc = System (discrete 0)
      open ⊗-Util.Shorthands 0ℓ-Setoids-×.monoidal using (ρ⇐)
      open Shorthands using (ε⇐; ε⇒)
      sym-split-unitaryʳ
          : ρ⇐  Id (Values n) ×-function ε⇐  splitₛ  Pull.₁ (id Vec.++ (λ ()))
      sym-split-unitaryʳ =
          0ℓ-Setoids-×.Equiv.sym
              {Values n}
              {Values n ×ₛ ⊤ₛ}
              {Id (Values n) ×-function ε⇐  splitₛ  Pull.₁ (id Vec.++ (λ ()))}
              {ρ⇐}
              (unitaryʳ-inv {n})
      sym-++-unitaryʳ : proj₁ₛ {B = ⊤ₛ {0}}  Push.₁ (id Vec.++ (λ ()))  ++ₛ  Id (Values n) ×-function Push,++,[].ε
      sym-++-unitaryʳ =
          0ℓ-Setoids-×.Equiv.sym
              {Values n ×ₛ ⊤ₛ}
              {Values n}
              {Push.₁ (id Vec.++ (λ ()))  ++ₛ  Id (Values n) ×-function Push,++,[].ε}
              {proj₁ₛ}
              (Push,++,[].unitaryʳ {n})

  Sys-braiding-compat-≤
      : (X : System n)
        (Y : System m)
       Sys.₁ (+-swap {m} {n}) ⟨$⟩ ( (X , Y))   (Y , X)
  Sys-braiding-compat-≤ {n} {m} X Y = record
      { ⇒S = swapₛ
      ; ≗-fₛ = λ i (s₁ , s₂)  cong (Y.fₛ ×-⇒ X.fₛ  swapₛ) (braiding-compat-inv {m} {n} {i}) {s₂ , s₁}
      ; ≗-fₒ = λ (s₁ , s₂)  Push,++,[].braiding-compat {n} {m} {X.fₒ′ s₁ , Y.fₒ′ s₂}
      }
    where
      module X = System X
      module Y = System Y

  Sys-braiding-compat-≥
      : (X : System n)
        (Y : System m)
        (Y , X)  Sys.₁ (+-swap {m} {n}) ⟨$⟩  (X , Y)
  Sys-braiding-compat-≥ {n} {m} X Y = record
      { ⇒S = swapₛ
      ; ≗-fₛ = λ i (s₂ , s₁)  cong (X.fₛ ×-⇒ Y.fₛ) (sym-braiding-compat-inv {i})
      ; ≗-fₒ = λ (s₂ , s₁)  sym-braiding-compat-++ {X.fₒ′ s₁ , Y.fₒ′ s₂}
      }
    where
      module X = System X
      module Y = System Y
      sym-braiding-compat-inv : swapₛ  splitₛ {m}  splitₛ  Pull.₁ (+-swap {m} {n})
      sym-braiding-compat-inv {i} =
          0ℓ-Setoids-×.Equiv.sym
              {Values (m + n)}
              {Values n ×ₛ Values m}
              {splitₛ  Pull.₁ (+-swap {m} {n})}
              {swapₛ  splitₛ {m}}
              (λ {j}  braiding-compat-inv {m} {n} {j}) {i}
      sym-braiding-compat-++ : ++ₛ {m}  swapₛ  Push.₁ (+-swap {m} {n})  ++ₛ
      sym-braiding-compat-++ {i} =
          0ℓ-Setoids-×.Equiv.sym
              {Values n ×ₛ Values m}
              {Values (m + n)}
              {Push.₁ (+-swap {m} {n})  ++ₛ}
              {++ₛ {m}  swapₛ}
              (Push,++,[].braiding-compat {n} {m})

open Lax.SymmetricMonoidalFunctor

Sys,⊗,ε : Lax.SymmetricMonoidalFunctor
Sys,⊗,ε .F = Sys
Sys,⊗,ε .isBraidedMonoidal = record
    { isMonoidal = record
        { ε = Sys-ε
        ; ⊗-homo = ⊗-homomorphism
        ; associativity = λ { {n} {m} {o} {(X , Y), Z}  ⊗-assoc-≤ X Y Z , ⊗-assoc-≥ X Y Z }
        ; unitaryˡ = λ { {n} {_ , X}  Sys-unitaryˡ-≤ X , Sys-unitaryˡ-≥ X }
        ; unitaryʳ = λ { {n} {X , _}  Sys-unitaryʳ-≤ X , Sys-unitaryʳ-≥ X }
        }
    ; braiding-compat = λ { {n} {m} {X , Y}  Sys-braiding-compat-≤ X Y , Sys-braiding-compat-≥ X Y }
    }

module Sys,⊗,ε = Lax.SymmetricMonoidalFunctor Sys,⊗,ε