List of {PLURALS[type]}
- {#if type === 'morphism'}
+ {#if type === 'morphism' || type === 'symmetric_monoidal_category'}
- The morphism application is still in its early stages. More morphisms will be added
- soon.
+ The {remove_underscores(type)} application is still in its early stages. More {PLURALS[
+ type
+ ]} will be added soon.
{/if}
@@ -47,7 +48,7 @@
{pluralize(searched_structures.length, {
- one: `Found {count} ${type}`,
+ one: `Found {count} ${remove_underscores(type)}`,
other: `Found {count} ${PLURALS[type]}`
})}
diff --git a/src/pages/SymmetricMonoidalCategoryDetailPage.svelte b/src/pages/SymmetricMonoidalCategoryDetailPage.svelte
new file mode 100644
index 000000000..6213f9c07
--- /dev/null
+++ b/src/pages/SymmetricMonoidalCategoryDetailPage.svelte
@@ -0,0 +1,22 @@
+
+
+
+ {#snippet definition()}
+
+ Underlying category:
+
+ {data.underlying_category_name}
+
+
+ {/snippet}
+
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 1dbe1211c..09133dcd7 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -21,8 +21,11 @@
CatDat provides a growing collection of categorical structures such as
categories,
- functors, and
- morphisms. Built by and for those who love
+ functors,
+ morphisms, and
+ symmetric monoidal categories. Built by and for those who love
category theory
.
diff --git a/src/routes/[type]-implications/+page.svelte b/src/routes/[type]-implications/+page.svelte
index 46c8dbcaf..21549bb98 100644
--- a/src/routes/[type]-implications/+page.svelte
+++ b/src/routes/[type]-implications/+page.svelte
@@ -53,6 +53,13 @@
overview of the relationships between the various types of epimorphisms and
monomorphisms.
+ {:else if data.type === 'symmetric_monoidal_category'}
+
+ *Deductions from these implications are automatically incorporated into
+ each symmetric monoidal category whenever applicable. Moreover,
+ implications are automatically dualized when the corresponding dual
+ properties exist.
+
{/if}
diff --git a/src/routes/[type]-search/+page.svelte b/src/routes/[type]-search/+page.svelte
index e19c21d44..ba746c332 100644
--- a/src/routes/[type]-search/+page.svelte
+++ b/src/routes/[type]-search/+page.svelte
@@ -9,7 +9,9 @@
'/category-search/results?satisfied=finitely_complete~pointed&unsatisfied=complete',
functor: '/functor-search/results?satisfied=continuous&unsatisfied=cocontinuous',
morphism:
- '/morphism-search/results?satisfied=monomorphism~epimorphism&unsatisfied=isomorphism'
+ '/morphism-search/results?satisfied=monomorphism~epimorphism&unsatisfied=isomorphism',
+ symmetric_monoidal_category:
+ '/symmetric_monoidal_category-search/results?satisfied=cocomplete&unsatisfied=cartesian'
}
@@ -27,5 +29,9 @@
For example, you can
look
for morphisms that are monomorphisms and epimorphisms, but no isomorphisms.
+ {:else if data.type === 'symmetric_monoidal_category'}
+ For example, you can
+ look
+ for symmetric monoidal categories that are cocomplete, but not cartesian.
{/if}
diff --git a/src/routes/[type]/[id]/+page.server.ts b/src/routes/[type]/[id]/+page.server.ts
index 665af5a3d..58af8b25c 100644
--- a/src/routes/[type]/[id]/+page.server.ts
+++ b/src/routes/[type]/[id]/+page.server.ts
@@ -6,11 +6,13 @@ import { fetch_category } from '$lib/server/fetchers/category'
import { fetch_functor } from '$lib/server/fetchers/functor'
import { fetch_morphism } from '$lib/server/fetchers/morphism'
import { add_math, strip_math } from '$shared/utils'
+import { fetch_symmetric_monoidal_category } from '$lib/server/fetchers/symmetric_monoidal_category'
const special_fetchers = {
category: fetch_category,
functor: fetch_functor,
- morphism: fetch_morphism
+ morphism: fetch_morphism,
+ symmetric_monoidal_category: fetch_symmetric_monoidal_category
}
export const load = (event) => {
diff --git a/src/routes/[type]/[id]/+page.svelte b/src/routes/[type]/[id]/+page.svelte
index e6f33eab0..da567a1e3 100644
--- a/src/routes/[type]/[id]/+page.svelte
+++ b/src/routes/[type]/[id]/+page.svelte
@@ -2,10 +2,13 @@
import CategoryDetailPage from '$pages/CategoryDetailPage.svelte'
import FunctorDetailPage from '$pages/FunctorDetailPage.svelte'
import MorphismDetailPage from '$pages/MorphismDetailPage.svelte'
+ import SymmetricMonoidalCategoryDetailPage from '$pages/SymmetricMonoidalCategoryDetailPage.svelte'
let { data } = $props()
+
+
{#if data.special_structure_data.type === 'category'}
{/if}
@@ -17,3 +20,10 @@
{#if data.special_structure_data.type === 'morphism'}
{/if}
+
+{#if data.special_structure_data.type === 'symmetric_monoidal_category'}
+
+{/if}
diff --git a/src/routes/missing/+page.svelte b/src/routes/missing/+page.svelte
index 7294f45cb..eeb00017e 100644
--- a/src/routes/missing/+page.svelte
+++ b/src/routes/missing/+page.svelte
@@ -5,7 +5,7 @@
import { get_property_url } from '$shared/property.utils'
import { PLURALS } from '$shared/config'
import { STRUCTURE_TYPES } from '$shared/config'
- import { capitalize, pluralize } from '$shared/utils'
+ import { capitalize, pluralize, remove_underscores } from '$shared/utils'
const { data } = $props()
@@ -60,7 +60,7 @@
{#if pairs.length > 0}
- Indistinguishable {type} pairs
+ Indistinguishable {remove_underscores(type)} pairs
{pluralize(pairs.length, {
@@ -93,13 +93,14 @@
{@const combinations = data.missing_combinations[type]}
- Missing {type} combinations
+ Missing {remove_underscores(type)} combinations
{#if combinations.length}
- Among the consistent {type} property combinations of the form p ∧ ¬q,
- the following are not yet witnessed by a {type} in the database or its dual.
- If some of these combinations are
+ Among the consistent {remove_underscores(type)} property combinations of the
+ form p ∧ ¬q, the following are not yet witnessed by a {remove_underscores(
+ type
+ )} in the database or its dual. If some of these combinations are
inconsistent, this indicates that some
implication is missing.
@@ -121,8 +122,9 @@
{:else}
- Every consistent {type} property combination of the form p ∧ ¬q is witnessed
- by a {type} in the database or its dual. 🎉
+ Every consistent {remove_underscores(type)} property combination of the form
+ p ∧ ¬q is witnessed by a {remove_underscores(type)} in the database
+ or its dual. 🎉
—
diff --git a/tests/missing.spec.ts b/tests/missing.spec.ts
index 08b68807d..00d0e59d9 100644
--- a/tests/missing.spec.ts
+++ b/tests/missing.spec.ts
@@ -31,9 +31,11 @@ test('user can see categories with missing data', async ({ page }) => {
})
).toBeVisible()
- const categories_section = page.locator('section', {
- hasText: 'Categories with unknown properties'
- })
+ const categories_section = page
+ .locator('section', {
+ hasText: 'Categories with unknown properties'
+ })
+ .first()
await expect(categories_section).toBeVisible()
@@ -112,7 +114,7 @@ test('user cannot see any missing functor combinations', async ({ page }) => {
await expect(combinations_section).toBeVisible()
await expect(combinations_section).toHaveText(
- /.+Every consistent functor property combination.+is witnessed/
+ /Every consistent functor property combination[\s\S]+is witnessed/
)
})
@@ -127,6 +129,6 @@ test('user cannot see any missing morphism combinations', async ({ page }) => {
await expect(combinations_section).toBeVisible()
await expect(combinations_section).toHaveText(
- /.+Every consistent morphism property combination.+is witnessed/
+ /.+Every consistent morphism property combination[\s\S]+is witnessed/
)
})
diff --git a/tests/structure_selector.spec.ts b/tests/structure_selector.spec.ts
index f62d76a63..4187cdc7e 100644
--- a/tests/structure_selector.spec.ts
+++ b/tests/structure_selector.spec.ts
@@ -91,3 +91,44 @@ test('morphisms are selected on a morphism route', async ({ page }) => {
await expect(selector).toBeVisible()
await expect(selector).toHaveValue('morphism')
})
+
+test('user can switch to symmetric monoidal categories', async ({ page }) => {
+ await page.goto('/', { waitUntil: 'networkidle' })
+
+ const selector = page
+ .getByRole('combobox', {
+ name: 'Structure',
+ exact: true
+ })
+ .first()
+
+ await expect(selector).toBeVisible()
+ await selector.selectOption('symmetric_monoidal_category')
+
+ await expect(selector).toHaveValue('symmetric_monoidal_category')
+
+ await expect(page).toHaveURL('/symmetric_monoidal_category-list')
+
+ await expect(
+ page.getByRole('heading', {
+ name: 'List of symmetric monoidal categories',
+ exact: true
+ })
+ ).toBeVisible()
+})
+
+test('symmetric monoidal categories are selected on a symmetric monoidal category route', async ({
+ page
+}) => {
+ await page.goto('/symmetric_monoidal_category-properties')
+
+ const selector = page
+ .getByRole('combobox', {
+ name: 'Structure',
+ exact: true
+ })
+ .first()
+
+ await expect(selector).toBeVisible()
+ await expect(selector).toHaveValue('symmetric_monoidal_category')
+})
diff --git a/tests/symmetric_monoidal_categories.spec.ts b/tests/symmetric_monoidal_categories.spec.ts
new file mode 100644
index 000000000..0ac246da3
--- /dev/null
+++ b/tests/symmetric_monoidal_categories.spec.ts
@@ -0,0 +1,82 @@
+import { test, expect } from '@playwright/test'
+
+// This test file does not cover all features of symmetric monoidal categories,
+// but only a selection. The other features are covered sufficiently by the
+// test cases for the other types of categorical structures.
+
+test('user can navigate to a symmetric monoidal category', async ({ page }) => {
+ await page.goto('/')
+
+ await page
+ .getByRole('link', {
+ name: 'symmetric monoidal categories',
+ exact: true
+ })
+ .first()
+ .click()
+
+ await expect(
+ page.getByRole('heading', {
+ name: 'List of symmetric monoidal categories',
+ exact: true
+ })
+ ).toBeVisible()
+
+ await expect(page).toHaveURL('/symmetric_monoidal_category-list')
+
+ await page
+ .getByRole('link', {
+ name: 'symmetric monoidal category of abelian groups',
+ exact: true
+ })
+ .click()
+
+ await expect(
+ page.getByRole('heading', {
+ name: 'symmetric monoidal category of abelian groups',
+ exact: true
+ })
+ ).toBeVisible()
+
+ await expect(page).toHaveURL('/symmetric_monoidal_category/Ab_tensor')
+})
+
+test('user can view symmetric monoidal category details', async ({ page }) => {
+ await page.goto('/symmetric_monoidal_category/Ab_tensor')
+
+ await expect(
+ page.getByRole('heading', {
+ name: 'symmetric monoidal category of abelian groups',
+ exact: true
+ })
+ ).toBeVisible()
+
+ await expect(page.getByText('tensor product of abelian groups')).toBeVisible()
+ await expect(page.getByText('is closed')).toBeVisible()
+ await expect(page.getByText('is cocomplete')).toBeVisible()
+ await expect(page.getByText('is not strict')).toBeVisible()
+ await expect(page.getByText('is not cartesian')).toBeVisible()
+})
+
+test('user can navigate to the underlying category', async ({ page }) => {
+ await page.goto('/symmetric_monoidal_category/Set_cartesian', {
+ waitUntil: 'networkidle'
+ })
+
+ await page
+ .getByRole('link', {
+ name: 'category of sets',
+ exact: true
+ })
+ .first()
+ .click()
+
+ await expect(
+ page.getByRole('heading', {
+ name: 'category of sets',
+ exact: true
+ })
+ ).toBeVisible()
+
+ await expect(page).toHaveURL('/category/Set')
+})