diff --git a/databases/catdat/scripts/config.ts b/databases/catdat/scripts/config.ts
index b916e3701..e8f506742 100644
--- a/databases/catdat/scripts/config.ts
+++ b/databases/catdat/scripts/config.ts
@@ -1,4 +1,8 @@
-export type StructureType = 'category' | 'functor' | 'morphism'
+export const STRUCTURE_TYPES = ['category', 'functor', 'morphism'] as const
+
+export type StructureType = (typeof STRUCTURE_TYPES)[number]
+
+export const STRUCTURE_TYPES_WITH_DUALS: StructureType[] = ['category']
export const PLURALS = {
category: 'categories',
@@ -6,10 +10,6 @@ export const PLURALS = {
morphism: 'morphisms',
} as const
-export const STRUCTURES: StructureType[] = ['category', 'functor', 'morphism']
-
-export const STRUCTURES_WITH_DUALS: StructureType[] = ['category']
-
export const TABLES = {
category: 'categories',
functor: 'functors',
diff --git a/databases/catdat/scripts/deduce-implications.ts b/databases/catdat/scripts/deduce-implications.ts
index 033d12055..3035c9d71 100644
--- a/databases/catdat/scripts/deduce-implications.ts
+++ b/databases/catdat/scripts/deduce-implications.ts
@@ -1,4 +1,4 @@
-import { STRUCTURES_WITH_DUALS, type StructureType } from './config'
+import { STRUCTURE_TYPES_WITH_DUALS, type StructureType } from './config'
import { are_equal_sets, parse_nested_json_set, parse_json_set } from './utils/helpers'
import { get_client } from './utils/db'
@@ -161,7 +161,7 @@ export function create_dualized_implications(type: StructureType) {
* Creates all trivial implications of the form "self-dual + P ===> P^op".
*/
export function create_self_dual_implications(type: StructureType) {
- if (!STRUCTURES_WITH_DUALS.includes(type)) return
+ if (!STRUCTURE_TYPES_WITH_DUALS.includes(type)) return
const relevant_props = db
.prepare<[StructureType], { id: string; dual: string }>(
diff --git a/databases/catdat/scripts/deduce-structure-properties.ts b/databases/catdat/scripts/deduce-structure-properties.ts
index 5dfcc7d03..5fabf8af2 100644
--- a/databases/catdat/scripts/deduce-structure-properties.ts
+++ b/databases/catdat/scripts/deduce-structure-properties.ts
@@ -17,7 +17,7 @@ import {
get_proof_string,
NormalizedImplication,
} from './utils/implications'
-import { STRUCTURES_WITH_DUALS, type StructureType } from './config'
+import { STRUCTURE_TYPES_WITH_DUALS, type StructureType } from './config'
import { get_structures, is_dual_structure, type StructureMeta } from './utils/structures'
/**
@@ -428,7 +428,7 @@ export function deduce_properties_for_structures(type: StructureType) {
deduction()
- if (!STRUCTURES_WITH_DUALS.includes(type)) return
+ if (!STRUCTURE_TYPES_WITH_DUALS.includes(type)) return
const dual_deduction = db.transaction(() => {
for (const structure of structures) {
diff --git a/databases/catdat/scripts/seed.ts b/databases/catdat/scripts/seed.ts
index 0d5c6e5d1..100cfa021 100644
--- a/databases/catdat/scripts/seed.ts
+++ b/databases/catdat/scripts/seed.ts
@@ -12,7 +12,7 @@ import type {
MorphismYaml,
} from './utils/seed.types'
import { create_schema_hash, get_saved_schema_hash } from './utils/schema'
-import { PLURALS, STRUCTURES, type StructureType } from './config'
+import { PLURALS, STRUCTURE_TYPES, type StructureType } from './config'
const db = get_client()
@@ -126,7 +126,7 @@ function seed_config() {
)
function insert_config(config: ConfigYaml) {
- for (const type of STRUCTURES) {
+ for (const type of STRUCTURE_TYPES) {
for (const tag of config.structure_tags) {
structure_tag_insert.run(tag, type)
}
diff --git a/databases/catdat/scripts/test.ts b/databases/catdat/scripts/test.ts
index a1bcfd7db..f6493cfc1 100644
--- a/databases/catdat/scripts/test.ts
+++ b/databases/catdat/scripts/test.ts
@@ -14,7 +14,7 @@ import decided_functors from './expected-data/decided-functors.json'
import decided_morphisms from './expected-data/decided-morphisms.json'
import { capitalize } from './utils/helpers'
import { get_client } from './utils/db'
-import { PLURALS, STRUCTURES, type StructureType } from './config'
+import { PLURALS, STRUCTURE_TYPES, type StructureType } from './config'
import fs from 'node:fs'
import path from 'node:path'
import { decode_property_ID } from '../../../src/lib/commons/property.url'
@@ -242,7 +242,7 @@ function check_link_targets_exist() {
for (const { proof, error_prefix } of proofs) {
const link_regex = new RegExp(
- `
import { goto } from '$app/navigation'
import { page } from '$app/state'
- import { PLURALS, STRUCTURES } from '$lib/commons/structures'
+ import { PLURALS, STRUCTURE_TYPES } from '$lib/commons/structures'
import type { StructureType } from '$lib/commons/types'
type Props = {
@@ -24,7 +24,7 @@
} else if (path.includes('-comparison')) {
goto(`/${selected_type}-comparison`)
} else {
- goto(`/${PLURALS[selected_type]}`)
+ goto(`/${selected_type}-list`)
}
}
@@ -33,8 +33,8 @@
Structure
-
- {#each STRUCTURES as structure}
+
+ {#each STRUCTURE_TYPES as structure}
{PLURALS[structure]}
{/each}
diff --git a/src/components/TagList.svelte b/src/components/TagList.svelte
index 6323ae2b5..ca9b10233 100644
--- a/src/components/TagList.svelte
+++ b/src/components/TagList.svelte
@@ -1,6 +1,5 @@
-
+
{#snippet definition()}
objects:
- {@html data.category.objects}
+ {@html data.objects}
morphisms:
- {@html data.category.morphisms}
+ {@html data.morphisms}
{/snippet}
@@ -25,9 +28,9 @@
Special objects
- {#if data.category.special_objects.length}
+ {#if data.special_objects.length}
- {#each data.category.special_objects as obj}
+ {#each data.special_objects as obj}
{obj.type}: {@html obj.description}
{/each}
@@ -40,7 +43,7 @@
Special morphisms
- {#each data.category.special_morphisms as obj}
+ {#each data.special_morphisms as obj}
{#if obj.description}
@@ -56,18 +59,18 @@
{/snippet}
{#snippet footer()}
- {#if data.category.functors.length}
+ {#if data.functors.length}
Functors
- {pluralize(data.category.functors.length, {
+ {pluralize(data.functors.length, {
one: 'There is 1 functor',
other: 'There are {count} functors',
})}
whose source or target is the {data.structure.name}.
-
+
{/if}
{/snippet}
diff --git a/src/pages/FunctorDetailPage.svelte b/src/pages/FunctorDetailPage.svelte
new file mode 100644
index 000000000..ebe3c1be1
--- /dev/null
+++ b/src/pages/FunctorDetailPage.svelte
@@ -0,0 +1,46 @@
+
+
+
+ {#snippet definition()}
+
+ Source:
+ {data.source_name}
+
+
+
+ Target:
+ {data.target_name}
+
+
+ {#if data.left_adjoint}
+
+ Left adjoint functor:
+
+ {@html data.left_adjoint_notation}
+
+
+ {/if}
+
+ {#if data.right_adjoint}
+
+ Right adjoint functor:
+
+ {@html data.right_adjoint_notation}
+
+
+ {/if}
+ {/snippet}
+
diff --git a/src/pages/MorphismDetailPage.svelte b/src/pages/MorphismDetailPage.svelte
new file mode 100644
index 000000000..fc15a3b83
--- /dev/null
+++ b/src/pages/MorphismDetailPage.svelte
@@ -0,0 +1,19 @@
+
+
+
+ {#snippet definition()}
+
+ Category:
+
+ {data.category_name}
+
+
+ {/snippet}
+
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte
index 533170cef..fd92c8b49 100644
--- a/src/routes/+page.svelte
+++ b/src/routes/+page.svelte
@@ -20,8 +20,8 @@
CatDat provides a growing collection of
- categories and
- functors . Built by and for those who love
+ categories and
+ functors . Built by and for those who love
category theory
.
@@ -47,10 +47,10 @@
- Browse a comprehensive collection of categories
- and functors , each with detailed
+ and functors , each with detailed
descriptions, proofs of their properties, and related structures.
diff --git a/src/routes/[type]-comparison/+page.server.ts b/src/routes/[type]-comparison/+page.server.ts
new file mode 100644
index 000000000..6164bf3ce
--- /dev/null
+++ b/src/routes/[type]-comparison/+page.server.ts
@@ -0,0 +1,10 @@
+import { is_structure_type } from '$lib/commons/structures'
+import { fetch_structures } from '$lib/server/fetchers/structures'
+import { error } from '@sveltejs/kit'
+
+export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
+ return fetch_structures(type)
+}
diff --git a/src/routes/functor-comparison/+page.svelte b/src/routes/[type]-comparison/+page.svelte
similarity index 72%
rename from src/routes/functor-comparison/+page.svelte
rename to src/routes/[type]-comparison/+page.svelte
index a572a205c..c7bb8f51d 100644
--- a/src/routes/functor-comparison/+page.svelte
+++ b/src/routes/[type]-comparison/+page.svelte
@@ -4,4 +4,4 @@
let { data } = $props()
-
+
diff --git a/src/routes/[type]-comparison/[...ids]/+page.server.ts b/src/routes/[type]-comparison/[...ids]/+page.server.ts
new file mode 100644
index 000000000..326717db7
--- /dev/null
+++ b/src/routes/[type]-comparison/[...ids]/+page.server.ts
@@ -0,0 +1,17 @@
+import { is_structure_type } from '$lib/commons/structures'
+import { fetch_comparison_result } from '$lib/server/fetchers/comparison'
+import { cache_page } from '$lib/server/utils'
+import { error } from '@sveltejs/kit'
+
+export const prerender = false
+
+export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
+ const compared_ids = event.params.ids.split('/')
+
+ return fetch_comparison_result(compared_ids, type, () => {
+ cache_page(event)
+ })
+}
diff --git a/src/routes/functor-comparison/[...ids]/+page.svelte b/src/routes/[type]-comparison/[...ids]/+page.svelte
similarity index 71%
rename from src/routes/functor-comparison/[...ids]/+page.svelte
rename to src/routes/[type]-comparison/[...ids]/+page.svelte
index e942fb34b..bc78c0081 100644
--- a/src/routes/functor-comparison/[...ids]/+page.svelte
+++ b/src/routes/[type]-comparison/[...ids]/+page.svelte
@@ -4,4 +4,4 @@
let { data } = $props()
-
+
diff --git a/src/routes/[type]-implication/[id]/+page.server.ts b/src/routes/[type]-implication/[id]/+page.server.ts
new file mode 100644
index 000000000..5dc67fa23
--- /dev/null
+++ b/src/routes/[type]-implication/[id]/+page.server.ts
@@ -0,0 +1,13 @@
+import { is_structure_type } from '$lib/commons/structures'
+import { fetch_implication } from '$lib/server/fetchers/implication'
+import { render_nested_formulas } from '$lib/server/formulas'
+import { error } from '@sveltejs/kit'
+
+export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
+ const id = event.params.id
+
+ return render_nested_formulas(fetch_implication(type, id))
+}
diff --git a/src/routes/functor-implication/[id]/+page.svelte b/src/routes/[type]-implication/[id]/+page.svelte
similarity index 72%
rename from src/routes/functor-implication/[id]/+page.svelte
rename to src/routes/[type]-implication/[id]/+page.svelte
index e3588dd4e..a934b737e 100644
--- a/src/routes/functor-implication/[id]/+page.svelte
+++ b/src/routes/[type]-implication/[id]/+page.svelte
@@ -4,4 +4,4 @@
let { data } = $props()
-
+
diff --git a/src/routes/[type]-implications/+page.server.ts b/src/routes/[type]-implications/+page.server.ts
new file mode 100644
index 000000000..d8e406583
--- /dev/null
+++ b/src/routes/[type]-implications/+page.server.ts
@@ -0,0 +1,11 @@
+import { render_nested_formulas } from '$lib/server/formulas'
+import { fetch_implications } from '$lib/server/fetchers/implications'
+import { is_structure_type } from '$lib/commons/structures'
+import { error } from '@sveltejs/kit'
+
+export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
+ return render_nested_formulas(fetch_implications(type))
+}
diff --git a/src/routes/[type]-implications/+page.svelte b/src/routes/[type]-implications/+page.svelte
new file mode 100644
index 000000000..c3ba82ca5
--- /dev/null
+++ b/src/routes/[type]-implications/+page.svelte
@@ -0,0 +1,57 @@
+
+
+
+ {#snippet hints()}
+ {#if data.type === 'category'}
+
+ *Deductions from these implications are automatically incorporated into
+ each category whenever applicable. For instance, if a category is
+ identified as complete, the property of having a terminal object is
+ automatically inferred and added.
+
+
+
+ Implications can be combined to yield longer, non-obvious deductions that
+ are not explicitly listed above. For example, the listed implications
+ imply that every inhabited groupoid with binary products is trivial.
+
+
+
+ Moreover, implications are automatically dualized when the corresponding
+ dual properties exist. For example, the statement that finitely complete
+ categories with cofiltered limits are complete automatically implies that
+ finitely cocomplete categories with filtered colimits are cocomplete.
+ Similarly, if a category is self-dual and, for example, complete, it is
+ automatically inferred to be cocomplete as well.
+
+ {:else if data.type === 'functor'}
+
+ *Deductions from these implications are automatically incorporated into
+ each functor whenever applicable. For instance, if a functor is identified
+ as monadic, the property of being continuous is automatically inferred and
+ added.
+
+
+
+ Moreover, implications are automatically dualized when the corresponding
+ dual properties exist. For example, the statement that a right adjoint is
+ continuous automatically implies that a left adjoint is cocontinuous.
+
+ {:else if data.type === 'morphism'}
+
+ *Deductions from these implications are automatically incorporated into
+ each morphism whenever applicable. Moreover, implications are
+ automatically dualized when the corresponding dual properties exist.
+
+ {/if}
+
+
+ For results that do not quite fit the implication model,
+ content pages are used instead.
+
+ {/snippet}
+
diff --git a/src/routes/[type]-list/+page.server.ts b/src/routes/[type]-list/+page.server.ts
new file mode 100644
index 000000000..a8ad4c0b6
--- /dev/null
+++ b/src/routes/[type]-list/+page.server.ts
@@ -0,0 +1,15 @@
+import { is_structure_type, STRUCTURE_TYPES } from '$lib/commons/structures'
+import { fetch_structures_and_tags } from '$lib/server/fetchers/structures'
+import { error } from '@sveltejs/kit'
+import type { EntryGenerator } from './$types'
+
+export const entries: EntryGenerator = () => {
+ return STRUCTURE_TYPES.map((type) => ({ type }))
+}
+
+export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
+ return fetch_structures_and_tags(type)
+}
diff --git a/src/routes/functors/+page.svelte b/src/routes/[type]-list/+page.svelte
similarity index 72%
rename from src/routes/functors/+page.svelte
rename to src/routes/[type]-list/+page.svelte
index 6ab1832de..735cde096 100644
--- a/src/routes/functors/+page.svelte
+++ b/src/routes/[type]-list/+page.svelte
@@ -4,4 +4,4 @@
let { data } = $props()
-
+
diff --git a/src/routes/[type]-list/[tag]/+page.server.ts b/src/routes/[type]-list/[tag]/+page.server.ts
new file mode 100644
index 000000000..b167a39c3
--- /dev/null
+++ b/src/routes/[type]-list/[tag]/+page.server.ts
@@ -0,0 +1,16 @@
+import { fetch_tagged_structures } from '$lib/server/fetchers/structures'
+import { is_structure_type } from '$lib/commons/structures'
+import { error } from '@sveltejs/kit'
+import type { EntryGenerator } from './$types'
+import { fetch_structure_tags } from '$lib/server/fetchers/tags'
+
+export const entries: EntryGenerator = () => {
+ return fetch_structure_tags()
+}
+
+export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
+ return fetch_tagged_structures(type, event.params.tag)
+}
diff --git a/src/routes/functors/[tag]/+page.svelte b/src/routes/[type]-list/[tag]/+page.svelte
similarity index 71%
rename from src/routes/functors/[tag]/+page.svelte
rename to src/routes/[type]-list/[tag]/+page.svelte
index 62d2d5fe8..adb7a2c73 100644
--- a/src/routes/functors/[tag]/+page.svelte
+++ b/src/routes/[type]-list/[tag]/+page.svelte
@@ -4,4 +4,4 @@
let { data } = $props()
-
+
diff --git a/src/routes/[type]-properties/+page.server.ts b/src/routes/[type]-properties/+page.server.ts
new file mode 100644
index 000000000..c9b3687fe
--- /dev/null
+++ b/src/routes/[type]-properties/+page.server.ts
@@ -0,0 +1,10 @@
+import { is_structure_type } from '$lib/commons/structures'
+import { fetch_grouped_properties_and_tags } from '$lib/server/fetchers/properties'
+import { error } from '@sveltejs/kit'
+
+export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
+ return fetch_grouped_properties_and_tags(type)
+}
diff --git a/src/routes/functor-properties/+page.svelte b/src/routes/[type]-properties/+page.svelte
similarity index 72%
rename from src/routes/functor-properties/+page.svelte
rename to src/routes/[type]-properties/+page.svelte
index 3e22335dd..cffd0f300 100644
--- a/src/routes/functor-properties/+page.svelte
+++ b/src/routes/[type]-properties/+page.svelte
@@ -4,4 +4,4 @@
let { data } = $props()
-
+
diff --git a/src/routes/[type]-properties/[tag]/+page.server.ts b/src/routes/[type]-properties/[tag]/+page.server.ts
new file mode 100644
index 000000000..28049e913
--- /dev/null
+++ b/src/routes/[type]-properties/[tag]/+page.server.ts
@@ -0,0 +1,16 @@
+import { is_structure_type } from '$lib/commons/structures'
+import { fetch_tagged_properties } from '$lib/server/fetchers/properties'
+import { error } from '@sveltejs/kit'
+import type { EntryGenerator } from './$types'
+import { fetch_property_tags } from '$lib/server/fetchers/tags'
+
+export const entries: EntryGenerator = () => {
+ return fetch_property_tags()
+}
+
+export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
+ return fetch_tagged_properties(type, event.params.tag)
+}
diff --git a/src/routes/functor-properties/[tag]/+page.svelte b/src/routes/[type]-properties/[tag]/+page.svelte
similarity index 71%
rename from src/routes/functor-properties/[tag]/+page.svelte
rename to src/routes/[type]-properties/[tag]/+page.svelte
index 8804e18da..9c826c824 100644
--- a/src/routes/functor-properties/[tag]/+page.svelte
+++ b/src/routes/[type]-properties/[tag]/+page.svelte
@@ -4,4 +4,4 @@
let { data } = $props()
-
+
diff --git a/src/routes/functor-property/[id]/+page.server.ts b/src/routes/[type]-property/[id]/+page.server.ts
similarity index 50%
rename from src/routes/functor-property/[id]/+page.server.ts
rename to src/routes/[type]-property/[id]/+page.server.ts
index b08c10122..bd418f1dc 100644
--- a/src/routes/functor-property/[id]/+page.server.ts
+++ b/src/routes/[type]-property/[id]/+page.server.ts
@@ -1,11 +1,14 @@
import { render_nested_formulas } from '$lib/server/formulas'
import { decode_property_ID } from '$lib/commons/property.url'
import { fetch_property } from '$lib/server/fetchers/property'
+import { is_structure_type } from '$lib/commons/structures'
+import { error } from '@sveltejs/kit'
export const load = (event) => {
- const id = decode_property_ID(event.params.id)
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
- const property_data = fetch_property('functor', id)
+ const id = decode_property_ID(event.params.id)
- return render_nested_formulas(property_data)
+ return render_nested_formulas(fetch_property(type, id))
}
diff --git a/src/routes/functor-property/[id]/+page.svelte b/src/routes/[type]-property/[id]/+page.svelte
similarity index 72%
rename from src/routes/functor-property/[id]/+page.svelte
rename to src/routes/[type]-property/[id]/+page.svelte
index 5ac5a3d01..872796c41 100644
--- a/src/routes/functor-property/[id]/+page.svelte
+++ b/src/routes/[type]-property/[id]/+page.svelte
@@ -4,4 +4,4 @@
let { data } = $props()
-
+
diff --git a/src/routes/[type]-search/+page.server.ts b/src/routes/[type]-search/+page.server.ts
new file mode 100644
index 000000000..3bdfc3016
--- /dev/null
+++ b/src/routes/[type]-search/+page.server.ts
@@ -0,0 +1,10 @@
+import { is_structure_type } from '$lib/commons/structures'
+import { get_property_ids } from '$lib/server/fetchers/properties'
+import { error } from '@sveltejs/kit'
+
+export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
+ return { all_properties: get_property_ids(type), type }
+}
diff --git a/src/routes/[type]-search/+page.svelte b/src/routes/[type]-search/+page.svelte
new file mode 100644
index 000000000..618df053b
--- /dev/null
+++ b/src/routes/[type]-search/+page.svelte
@@ -0,0 +1,18 @@
+
+
+
+ {@html SAMPLES[data.type]}
+
diff --git a/src/routes/category-search/results/+page.server.ts b/src/routes/[type]-search/results/+page.server.ts
similarity index 64%
rename from src/routes/category-search/results/+page.server.ts
rename to src/routes/[type]-search/results/+page.server.ts
index 0646162d4..e6b4e2a6f 100644
--- a/src/routes/category-search/results/+page.server.ts
+++ b/src/routes/[type]-search/results/+page.server.ts
@@ -1,13 +1,18 @@
+import { is_structure_type } from '$lib/commons/structures'
import { fetch_search_results } from '$lib/server/fetchers/search'
import { cache_page } from '$lib/server/utils'
+import { error } from '@sveltejs/kit'
export const prerender = false
export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
const satisfied_query = event.url.searchParams.get('satisfied')
const unsatisfied_query = event.url.searchParams.get('unsatisfied')
- return fetch_search_results(satisfied_query, unsatisfied_query, 'category', () =>
+ return fetch_search_results(satisfied_query, unsatisfied_query, type, () =>
cache_page(event),
)
}
diff --git a/src/routes/functor-search/results/+page.svelte b/src/routes/[type]-search/results/+page.svelte
similarity index 72%
rename from src/routes/functor-search/results/+page.svelte
rename to src/routes/[type]-search/results/+page.svelte
index 44516cde3..3ac493da3 100644
--- a/src/routes/functor-search/results/+page.svelte
+++ b/src/routes/[type]-search/results/+page.svelte
@@ -4,4 +4,4 @@
let { data } = $props()
-
+
diff --git a/src/routes/[type]/[id]/+page.server.ts b/src/routes/[type]/[id]/+page.server.ts
new file mode 100644
index 000000000..05c13a580
--- /dev/null
+++ b/src/routes/[type]/[id]/+page.server.ts
@@ -0,0 +1,36 @@
+import { render_nested_formulas } from '$lib/server/formulas'
+import { fetch_structure } from '$lib/server/fetchers/structure'
+import { is_structure_type } from '$lib/commons/structures'
+import { error } from '@sveltejs/kit'
+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 '$lib/server/utils'
+
+const special_fetchers = {
+ category: fetch_category,
+ functor: fetch_functor,
+ morphism: fetch_morphism,
+}
+
+export const load = (event) => {
+ const type = event.params.type
+ if (!is_structure_type(type)) error(404, `Invalid structure type: ${type}`)
+
+ const id = event.params.id
+
+ const structure_data = fetch_structure(type, id)
+
+ const special_structure_data = special_fetchers[type](id)
+
+ if (special_structure_data.type === 'functor') {
+ structure_data.structure.notation = add_math(
+ `${strip_math(structure_data.structure.notation)}: ${strip_math(special_structure_data.source_notation)} \\to ${strip_math(special_structure_data.target_notation)}`,
+ )
+ }
+
+ return render_nested_formulas({
+ structure_data,
+ special_structure_data,
+ })
+}
diff --git a/src/routes/[type]/[id]/+page.svelte b/src/routes/[type]/[id]/+page.svelte
new file mode 100644
index 000000000..e6f33eab0
--- /dev/null
+++ b/src/routes/[type]/[id]/+page.svelte
@@ -0,0 +1,19 @@
+
+
+{#if data.special_structure_data.type === 'category'}
+
+{/if}
+
+{#if data.special_structure_data.type === 'functor'}
+
+{/if}
+
+{#if data.special_structure_data.type === 'morphism'}
+
+{/if}
diff --git a/src/routes/categories/+page.server.ts b/src/routes/categories/+page.server.ts
deleted file mode 100644
index cbedafab7..000000000
--- a/src/routes/categories/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { fetch_structures_and_tags } from '$lib/server/fetchers/structures'
-
-export const load = () => {
- return fetch_structures_and_tags('category')
-}
diff --git a/src/routes/categories/+page.svelte b/src/routes/categories/+page.svelte
deleted file mode 100644
index 7a38c6f9f..000000000
--- a/src/routes/categories/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/categories/[tag]/+page.server.ts b/src/routes/categories/[tag]/+page.server.ts
deleted file mode 100644
index 2dabfdeeb..000000000
--- a/src/routes/categories/[tag]/+page.server.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import type { EntryGenerator } from './$types'
-import { fetch_tagged_structures } from '$lib/server/fetchers/structures'
-import { fetch_structure_tags } from '$lib/server/fetchers/tags'
-
-export const entries: EntryGenerator = () => {
- return fetch_structure_tags('category')
-}
-
-export const load = (event) => {
- return fetch_tagged_structures('category', event.params.tag)
-}
diff --git a/src/routes/categories/[tag]/+page.svelte b/src/routes/categories/[tag]/+page.svelte
deleted file mode 100644
index 23a04e044..000000000
--- a/src/routes/categories/[tag]/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/category-comparison/+page.server.ts b/src/routes/category-comparison/+page.server.ts
deleted file mode 100644
index 5095734eb..000000000
--- a/src/routes/category-comparison/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { fetch_structures } from '$lib/server/fetchers/structures'
-
-export const load = () => {
- return fetch_structures('category')
-}
diff --git a/src/routes/category-comparison/+page.svelte b/src/routes/category-comparison/+page.svelte
deleted file mode 100644
index e09ee6646..000000000
--- a/src/routes/category-comparison/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/category-comparison/[...ids]/+page.server.ts b/src/routes/category-comparison/[...ids]/+page.server.ts
deleted file mode 100644
index 8b747a9c7..000000000
--- a/src/routes/category-comparison/[...ids]/+page.server.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { fetch_comparison_result } from '$lib/server/fetchers/comparison'
-import { cache_page } from '$lib/server/utils'
-
-export const prerender = false
-
-export const load = (event) => {
- const compared_ids = event.params.ids.split('/')
-
- return fetch_comparison_result(compared_ids, 'category', () => {
- cache_page(event)
- })
-}
diff --git a/src/routes/category-comparison/[...ids]/+page.svelte b/src/routes/category-comparison/[...ids]/+page.svelte
deleted file mode 100644
index e1fd975e3..000000000
--- a/src/routes/category-comparison/[...ids]/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/category-implication/[id]/+page.server.ts b/src/routes/category-implication/[id]/+page.server.ts
deleted file mode 100644
index 0483fd870..000000000
--- a/src/routes/category-implication/[id]/+page.server.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { fetch_implication } from '$lib/server/fetchers/implication'
-import { render_nested_formulas } from '$lib/server/formulas'
-
-export const load = (event) => {
- const id = event.params.id
-
- return render_nested_formulas(fetch_implication('category', id))
-}
diff --git a/src/routes/category-implication/[id]/+page.svelte b/src/routes/category-implication/[id]/+page.svelte
deleted file mode 100644
index af2c4f39c..000000000
--- a/src/routes/category-implication/[id]/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/category-implications/+page.server.ts b/src/routes/category-implications/+page.server.ts
deleted file mode 100644
index 2b5992bed..000000000
--- a/src/routes/category-implications/+page.server.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { render_nested_formulas } from '$lib/server/formulas'
-import { fetch_implications } from '$lib/server/fetchers/implications'
-
-export const load = () => {
- const { implications } = fetch_implications('category')
-
- return render_nested_formulas({ implications })
-}
diff --git a/src/routes/category-implications/+page.svelte b/src/routes/category-implications/+page.svelte
deleted file mode 100644
index e0e57b85a..000000000
--- a/src/routes/category-implications/+page.svelte
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
- {#snippet hints()}
-
- *Deductions from these implications are automatically incorporated into each
- category whenever applicable. For instance, if a category is identified as
- complete, the property of having a terminal object is automatically inferred
- and added.
-
-
-
- Implications can be combined to yield longer, non-obvious deductions that are
- not explicitly listed above. For example, the listed implications imply that
- every inhabited groupoid with binary products is trivial.
-
-
-
- Moreover, implications are automatically dualized when the corresponding dual
- properties exist. For example, the statement that finitely complete categories
- with cofiltered limits are complete automatically implies that finitely
- cocomplete categories with filtered colimits are cocomplete. Similarly, if a
- category is self-dual and, for example, complete, it is automatically inferred
- to be cocomplete as well.
-
-
-
- For results that do not quite fit the implication model,
- content pages are used instead.
-
- {/snippet}
-
diff --git a/src/routes/category-properties/+page.server.ts b/src/routes/category-properties/+page.server.ts
deleted file mode 100644
index da7dc35a3..000000000
--- a/src/routes/category-properties/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { fetch_grouped_properties_and_tags } from '$lib/server/fetchers/properties'
-
-export const load = () => {
- return fetch_grouped_properties_and_tags('category')
-}
diff --git a/src/routes/category-properties/+page.svelte b/src/routes/category-properties/+page.svelte
deleted file mode 100644
index 72c16cdd3..000000000
--- a/src/routes/category-properties/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/category-properties/[tag]/+page.server.ts b/src/routes/category-properties/[tag]/+page.server.ts
deleted file mode 100644
index 3c7531a70..000000000
--- a/src/routes/category-properties/[tag]/+page.server.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { fetch_tagged_properties } from '$lib/server/fetchers/properties'
-import { fetch_property_tags } from '$lib/server/fetchers/tags'
-import type { EntryGenerator } from './$types'
-
-export const entries: EntryGenerator = () => {
- return fetch_property_tags('category')
-}
-
-export const load = (event) => {
- return fetch_tagged_properties('category', event.params.tag)
-}
diff --git a/src/routes/category-properties/[tag]/+page.svelte b/src/routes/category-properties/[tag]/+page.svelte
deleted file mode 100644
index dbd54b293..000000000
--- a/src/routes/category-properties/[tag]/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/category-property/[id]/+page.server.ts b/src/routes/category-property/[id]/+page.server.ts
deleted file mode 100644
index f6b3b19d2..000000000
--- a/src/routes/category-property/[id]/+page.server.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { render_nested_formulas } from '$lib/server/formulas'
-import { decode_property_ID } from '$lib/commons/property.url'
-import { fetch_property } from '$lib/server/fetchers/property'
-
-export const load = (event) => {
- const id = decode_property_ID(event.params.id)
-
- const property_data = fetch_property('category', id)
-
- return render_nested_formulas(property_data)
-}
diff --git a/src/routes/category-property/[id]/+page.svelte b/src/routes/category-property/[id]/+page.svelte
deleted file mode 100644
index a031bd741..000000000
--- a/src/routes/category-property/[id]/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/category-search/+page.server.ts b/src/routes/category-search/+page.server.ts
deleted file mode 100644
index 1d5908868..000000000
--- a/src/routes/category-search/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { get_property_ids } from '$lib/server/fetchers/properties'
-
-export const load = () => {
- return { all_properties: get_property_ids('category') }
-}
diff --git a/src/routes/category-search/+page.svelte b/src/routes/category-search/+page.svelte
deleted file mode 100644
index 083471823..000000000
--- a/src/routes/category-search/+page.svelte
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- Search for categories with certain properties while excluding others. For example, you
- can look for categories that are finitely complete and pointed
- but not complete.
-
diff --git a/src/routes/category-search/results/+page.svelte b/src/routes/category-search/results/+page.svelte
deleted file mode 100644
index 44712f45e..000000000
--- a/src/routes/category-search/results/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/category/[id]/+page.server.ts b/src/routes/category/[id]/+page.server.ts
deleted file mode 100644
index bb30b3b31..000000000
--- a/src/routes/category/[id]/+page.server.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { render_nested_formulas } from '$lib/server/formulas'
-import { fetch_structure } from '$lib/server/fetchers/structure'
-import { fetch_category } from '$lib/server/fetchers/category'
-
-export const load = (event) => {
- const id = event.params.id
-
- const {
- structure,
- related_structures,
- tags,
- satisfied_properties,
- unsatisfied_properties,
- unknown_properties,
- undecidable_properties,
- undistinguishable_structures,
- comments,
- } = fetch_structure('category', id)
-
- const category = fetch_category(id)
-
- return render_nested_formulas({
- structure,
- category,
- related_structures,
- tags,
- satisfied_properties,
- unsatisfied_properties,
- unknown_properties,
- undecidable_properties,
- undistinguishable_structures,
- comments,
- })
-}
diff --git a/src/routes/functor-comparison/+page.server.ts b/src/routes/functor-comparison/+page.server.ts
deleted file mode 100644
index b26dc673b..000000000
--- a/src/routes/functor-comparison/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { fetch_structures } from '$lib/server/fetchers/structures'
-
-export const load = () => {
- return fetch_structures('functor')
-}
diff --git a/src/routes/functor-comparison/[...ids]/+page.server.ts b/src/routes/functor-comparison/[...ids]/+page.server.ts
deleted file mode 100644
index 637158805..000000000
--- a/src/routes/functor-comparison/[...ids]/+page.server.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { fetch_comparison_result } from '$lib/server/fetchers/comparison'
-import { cache_page } from '$lib/server/utils'
-
-export const prerender = false
-
-export const load = (event) => {
- const compared_ids = event.params.ids.split('/')
-
- return fetch_comparison_result(compared_ids, 'functor', () => {
- cache_page(event)
- })
-}
diff --git a/src/routes/functor-implication/[id]/+page.server.ts b/src/routes/functor-implication/[id]/+page.server.ts
deleted file mode 100644
index 8136bece3..000000000
--- a/src/routes/functor-implication/[id]/+page.server.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { fetch_implication } from '$lib/server/fetchers/implication'
-import { render_nested_formulas } from '$lib/server/formulas'
-
-export const load = (event) => {
- const id = event.params.id
-
- return render_nested_formulas(fetch_implication('functor', id))
-}
diff --git a/src/routes/functor-implications/+page.server.ts b/src/routes/functor-implications/+page.server.ts
deleted file mode 100644
index b234154c8..000000000
--- a/src/routes/functor-implications/+page.server.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { render_nested_formulas } from '$lib/server/formulas'
-import { fetch_implications } from '$lib/server/fetchers/implications'
-
-export const load = () => {
- const { implications } = fetch_implications('functor')
-
- return render_nested_formulas({ implications })
-}
diff --git a/src/routes/functor-implications/+page.svelte b/src/routes/functor-implications/+page.svelte
deleted file mode 100644
index beb32efa4..000000000
--- a/src/routes/functor-implications/+page.svelte
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-
- {#snippet hints()}
-
- *Deductions from these implications are automatically incorporated into each
- functor whenever applicable. For instance, if a functor is identified as
- monadic, the property of being continuous is automatically inferred and added.
-
-
-
- Moreover, implications are automatically dualized when the corresponding dual
- properties exist. For example, the statement that a right adjoint is
- continuous automatically implies that a left adjoint is cocontinuous.
-
-
-
- For results that do not quite fit the implication model,
- content pages are used instead.
-
- {/snippet}
-
diff --git a/src/routes/functor-properties/+page.server.ts b/src/routes/functor-properties/+page.server.ts
deleted file mode 100644
index 2e0797ff6..000000000
--- a/src/routes/functor-properties/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { fetch_grouped_properties_and_tags } from '$lib/server/fetchers/properties'
-
-export const load = () => {
- return fetch_grouped_properties_and_tags('functor')
-}
diff --git a/src/routes/functor-properties/[tag]/+page.server.ts b/src/routes/functor-properties/[tag]/+page.server.ts
deleted file mode 100644
index 7c4f183c7..000000000
--- a/src/routes/functor-properties/[tag]/+page.server.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { fetch_tagged_properties } from '$lib/server/fetchers/properties'
-import { fetch_property_tags } from '$lib/server/fetchers/tags'
-import type { EntryGenerator } from './$types'
-
-export const entries: EntryGenerator = () => {
- return fetch_property_tags('functor')
-}
-
-export const load = (event) => {
- return fetch_tagged_properties('functor', event.params.tag)
-}
diff --git a/src/routes/functor-search/+page.server.ts b/src/routes/functor-search/+page.server.ts
deleted file mode 100644
index 6aa4f890b..000000000
--- a/src/routes/functor-search/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { get_property_ids } from '$lib/server/fetchers/properties'
-
-export const load = () => {
- return { all_properties: get_property_ids('functor') }
-}
diff --git a/src/routes/functor-search/+page.svelte b/src/routes/functor-search/+page.svelte
deleted file mode 100644
index e174c391d..000000000
--- a/src/routes/functor-search/+page.svelte
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
- Search for functors with certain properties while excluding others. For example, you
- can look for functors that are continuous but not cocontinuous.
-
diff --git a/src/routes/functor-search/results/+page.server.ts b/src/routes/functor-search/results/+page.server.ts
deleted file mode 100644
index d5acdfd57..000000000
--- a/src/routes/functor-search/results/+page.server.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { fetch_search_results } from '$lib/server/fetchers/search'
-import { cache_page } from '$lib/server/utils'
-
-export const prerender = false
-
-export const load = (event) => {
- const satisfied_query = event.url.searchParams.get('satisfied')
- const unsatisfied_query = event.url.searchParams.get('unsatisfied')
-
- return fetch_search_results(satisfied_query, unsatisfied_query, 'functor', () =>
- cache_page(event),
- )
-}
diff --git a/src/routes/functor/[id]/+page.server.ts b/src/routes/functor/[id]/+page.server.ts
deleted file mode 100644
index f73f8337d..000000000
--- a/src/routes/functor/[id]/+page.server.ts
+++ /dev/null
@@ -1,40 +0,0 @@
-import { fetch_functor } from '$lib/server/fetchers/functor'
-import { fetch_structure } from '$lib/server/fetchers/structure'
-import { render_nested_formulas } from '$lib/server/formulas'
-import { add_math, strip_math } from '$lib/server/utils'
-
-export const load = (event) => {
- const id = event.params.id
-
- const {
- structure,
- related_structures,
- tags,
- satisfied_properties,
- unsatisfied_properties,
- unknown_properties,
- undecidable_properties,
- undistinguishable_structures,
- comments,
- } = fetch_structure('functor', id)
-
- const functor = fetch_functor(id)
-
- // functors are notated as F : C -> D
- structure.notation = add_math(
- `${strip_math(structure.notation)}: ${strip_math(functor.source_notation)} \\to ${strip_math(functor.target_notation)}`,
- )
-
- return render_nested_formulas({
- structure,
- functor,
- related_structures,
- tags,
- satisfied_properties,
- unsatisfied_properties,
- unknown_properties,
- undecidable_properties,
- undistinguishable_structures,
- comments,
- })
-}
diff --git a/src/routes/functor/[id]/+page.svelte b/src/routes/functor/[id]/+page.svelte
deleted file mode 100644
index 7d708bb00..000000000
--- a/src/routes/functor/[id]/+page.svelte
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
- {#snippet definition()}
-
- Source:
- {data.functor.source_name}
-
-
-
- Target:
- {data.functor.target_name}
-
-
- {#if data.functor.left_adjoint}
-
- Left adjoint functor:
-
- {@html data.functor.left_adjoint_notation}
-
-
- {/if}
-
- {#if data.functor.right_adjoint}
-
- Right adjoint functor:
-
- {@html data.functor.right_adjoint_notation}
-
-
- {/if}
- {/snippet}
-
diff --git a/src/routes/functors/+page.server.ts b/src/routes/functors/+page.server.ts
deleted file mode 100644
index 77c00b6ce..000000000
--- a/src/routes/functors/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { fetch_structures_and_tags } from '$lib/server/fetchers/structures'
-
-export const load = () => {
- return fetch_structures_and_tags('functor')
-}
diff --git a/src/routes/functors/[tag]/+page.server.ts b/src/routes/functors/[tag]/+page.server.ts
deleted file mode 100644
index b0131707c..000000000
--- a/src/routes/functors/[tag]/+page.server.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import type { EntryGenerator } from './$types'
-import { fetch_tagged_structures } from '$lib/server/fetchers/structures'
-import { fetch_structure_tags } from '$lib/server/fetchers/tags'
-
-export const entries: EntryGenerator = () => {
- return fetch_structure_tags('functor')
-}
-
-export const load = (event) => {
- const tag = event.params.tag
- return fetch_tagged_structures('functor', tag)
-}
diff --git a/src/routes/missing/+page.server.ts b/src/routes/missing/+page.server.ts
index b25f2c69d..5a788f79b 100644
--- a/src/routes/missing/+page.server.ts
+++ b/src/routes/missing/+page.server.ts
@@ -1,19 +1,19 @@
import { fetch_missing_data } from '$lib/server/fetchers/missing_data'
import { fetch_categories_with_missing_morphisms } from '$lib/server/fetchers/category'
-import { STRUCTURES } from '$lib/commons/structures'
+import { STRUCTURE_TYPES } from '$lib/commons/structures'
export const load = () => {
const categories_with_missing_morphisms = fetch_categories_with_missing_morphisms()
const missing_data = Object.fromEntries(
- STRUCTURES.map((type) => [type, fetch_missing_data(type)]),
+ STRUCTURE_TYPES.map((type) => [type, fetch_missing_data(type)]),
)
function select(
selector: (data: (typeof missing_data)[keyof typeof missing_data]) => T,
) {
return Object.fromEntries(
- STRUCTURES.map((type) => [type, selector(missing_data[type])]),
+ STRUCTURE_TYPES.map((type) => [type, selector(missing_data[type])]),
)
}
diff --git a/src/routes/missing/+page.svelte b/src/routes/missing/+page.svelte
index b566f809f..737ce4199 100644
--- a/src/routes/missing/+page.svelte
+++ b/src/routes/missing/+page.svelte
@@ -3,7 +3,7 @@
import MetaData from '$components/MetaData.svelte'
import SuggestionForm from '$components/SuggestionForm.svelte'
import { get_property_url } from '$lib/commons/property.url'
- import { PLURALS, STRUCTURES } from '$lib/commons/structures'
+ import { PLURALS, STRUCTURE_TYPES } from '$lib/commons/structures'
import { capitalize } from '$lib/client/utils'
const { data } = $props()
@@ -21,7 +21,7 @@
contributing to this project.
-{#each STRUCTURES as type}
+{#each STRUCTURE_TYPES as type}
{@const structures = data.structures_with_unknown_properties[type]}
{@const total = data.unknown_totals[type]}
-{#each STRUCTURES as type}
+{#each STRUCTURE_TYPES as type}
{@const pairs = data.undistinguishable_pairs[type]}
{#if pairs.length > 0}
@@ -84,7 +84,7 @@
{/if}
{/each}
-{#each STRUCTURES as type}
+{#each STRUCTURE_TYPES as type}
{@const combinations = data.missing_combinations[type]}
{#if combinations.length > 0}
diff --git a/src/routes/morphism-comparison/+page.server.ts b/src/routes/morphism-comparison/+page.server.ts
deleted file mode 100644
index 27b026bc8..000000000
--- a/src/routes/morphism-comparison/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { fetch_structures } from '$lib/server/fetchers/structures'
-
-export const load = () => {
- return fetch_structures('morphism')
-}
diff --git a/src/routes/morphism-comparison/+page.svelte b/src/routes/morphism-comparison/+page.svelte
deleted file mode 100644
index 626b192e5..000000000
--- a/src/routes/morphism-comparison/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/morphism-comparison/[...ids]/+page.server.ts b/src/routes/morphism-comparison/[...ids]/+page.server.ts
deleted file mode 100644
index 12443fd9b..000000000
--- a/src/routes/morphism-comparison/[...ids]/+page.server.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import { fetch_comparison_result } from '$lib/server/fetchers/comparison'
-import { cache_page } from '$lib/server/utils'
-
-export const prerender = false
-
-export const load = (event) => {
- const compared_ids = event.params.ids.split('/')
-
- return fetch_comparison_result(compared_ids, 'morphism', () => {
- cache_page(event)
- })
-}
diff --git a/src/routes/morphism-comparison/[...ids]/+page.svelte b/src/routes/morphism-comparison/[...ids]/+page.svelte
deleted file mode 100644
index 11f4d1e6f..000000000
--- a/src/routes/morphism-comparison/[...ids]/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/morphism-implication/[id]/+page.server.ts b/src/routes/morphism-implication/[id]/+page.server.ts
deleted file mode 100644
index bb302106c..000000000
--- a/src/routes/morphism-implication/[id]/+page.server.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { fetch_implication } from '$lib/server/fetchers/implication'
-import { render_nested_formulas } from '$lib/server/formulas'
-
-export const load = (event) => {
- const id = event.params.id
-
- return render_nested_formulas(fetch_implication('morphism', id))
-}
diff --git a/src/routes/morphism-implication/[id]/+page.svelte b/src/routes/morphism-implication/[id]/+page.svelte
deleted file mode 100644
index a97e46ffd..000000000
--- a/src/routes/morphism-implication/[id]/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/morphism-implications/+page.server.ts b/src/routes/morphism-implications/+page.server.ts
deleted file mode 100644
index c3c4e42b8..000000000
--- a/src/routes/morphism-implications/+page.server.ts
+++ /dev/null
@@ -1,8 +0,0 @@
-import { render_nested_formulas } from '$lib/server/formulas'
-import { fetch_implications } from '$lib/server/fetchers/implications'
-
-export const load = () => {
- const { implications } = fetch_implications('morphism')
-
- return render_nested_formulas({ implications })
-}
diff --git a/src/routes/morphism-implications/+page.svelte b/src/routes/morphism-implications/+page.svelte
deleted file mode 100644
index fd3605ac0..000000000
--- a/src/routes/morphism-implications/+page.svelte
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
- {#snippet hints()}
-
- *Deductions from these implications are automatically incorporated into each
- morphism whenever applicable. Moreover, implications are automatically
- dualized when the corresponding dual properties exist.
-
- {/snippet}
-
diff --git a/src/routes/morphism-properties/+page.server.ts b/src/routes/morphism-properties/+page.server.ts
deleted file mode 100644
index 65095e1bd..000000000
--- a/src/routes/morphism-properties/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { fetch_grouped_properties_and_tags } from '$lib/server/fetchers/properties'
-
-export const load = () => {
- return fetch_grouped_properties_and_tags('morphism')
-}
diff --git a/src/routes/morphism-properties/+page.svelte b/src/routes/morphism-properties/+page.svelte
deleted file mode 100644
index dadefb7f8..000000000
--- a/src/routes/morphism-properties/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/morphism-properties/[tag]/+page.server.ts b/src/routes/morphism-properties/[tag]/+page.server.ts
deleted file mode 100644
index ccbb6896e..000000000
--- a/src/routes/morphism-properties/[tag]/+page.server.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { fetch_tagged_properties } from '$lib/server/fetchers/properties'
-import { fetch_property_tags } from '$lib/server/fetchers/tags'
-import type { EntryGenerator } from './$types'
-
-export const entries: EntryGenerator = () => {
- return fetch_property_tags('morphism')
-}
-
-export const load = (event) => {
- return fetch_tagged_properties('morphism', event.params.tag)
-}
diff --git a/src/routes/morphism-properties/[tag]/+page.svelte b/src/routes/morphism-properties/[tag]/+page.svelte
deleted file mode 100644
index 62fb6cb9f..000000000
--- a/src/routes/morphism-properties/[tag]/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/morphism-property/[id]/+page.server.ts b/src/routes/morphism-property/[id]/+page.server.ts
deleted file mode 100644
index 3ce350d54..000000000
--- a/src/routes/morphism-property/[id]/+page.server.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import { render_nested_formulas } from '$lib/server/formulas'
-import { decode_property_ID } from '$lib/commons/property.url'
-import { fetch_property } from '$lib/server/fetchers/property'
-
-export const load = (event) => {
- const id = decode_property_ID(event.params.id)
-
- const property_data = fetch_property('morphism', id)
-
- return render_nested_formulas(property_data)
-}
diff --git a/src/routes/morphism-property/[id]/+page.svelte b/src/routes/morphism-property/[id]/+page.svelte
deleted file mode 100644
index acb5718b5..000000000
--- a/src/routes/morphism-property/[id]/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/morphism-search/+page.server.ts b/src/routes/morphism-search/+page.server.ts
deleted file mode 100644
index 6ba761c34..000000000
--- a/src/routes/morphism-search/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { get_property_ids } from '$lib/server/fetchers/properties'
-
-export const load = () => {
- return { all_properties: get_property_ids('morphism') }
-}
diff --git a/src/routes/morphism-search/+page.svelte b/src/routes/morphism-search/+page.svelte
deleted file mode 100644
index d62dc5d32..000000000
--- a/src/routes/morphism-search/+page.svelte
+++ /dev/null
@@ -1,13 +0,0 @@
-
-
-
- Search for morphism with certain properties while excluding others. For example, you
- can look for morphisms which are monomorphisms and epimorphisms,
- but no isomorphisms.
-
diff --git a/src/routes/morphism-search/results/+page.server.ts b/src/routes/morphism-search/results/+page.server.ts
deleted file mode 100644
index 390cfa6bd..000000000
--- a/src/routes/morphism-search/results/+page.server.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import { fetch_search_results } from '$lib/server/fetchers/search'
-import { cache_page } from '$lib/server/utils'
-
-export const prerender = false
-
-export const load = (event) => {
- const satisfied_query = event.url.searchParams.get('satisfied')
- const unsatisfied_query = event.url.searchParams.get('unsatisfied')
-
- return fetch_search_results(satisfied_query, unsatisfied_query, 'morphism', () =>
- cache_page(event),
- )
-}
diff --git a/src/routes/morphism-search/results/+page.svelte b/src/routes/morphism-search/results/+page.svelte
deleted file mode 100644
index 2a2557f43..000000000
--- a/src/routes/morphism-search/results/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/morphism/[id]/+page.server.ts b/src/routes/morphism/[id]/+page.server.ts
deleted file mode 100644
index 6923eaf43..000000000
--- a/src/routes/morphism/[id]/+page.server.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { fetch_morphism } from '$lib/server/fetchers/morphism'
-import { fetch_structure } from '$lib/server/fetchers/structure'
-import { render_nested_formulas } from '$lib/server/formulas'
-
-export const load = (event) => {
- const id = event.params.id
-
- const {
- structure,
- related_structures,
- tags,
- satisfied_properties,
- unsatisfied_properties,
- unknown_properties,
- undecidable_properties,
- undistinguishable_structures,
- comments,
- } = fetch_structure('morphism', id)
-
- const morphism = fetch_morphism(id)
-
- return render_nested_formulas({
- structure,
- morphism,
- related_structures,
- tags,
- satisfied_properties,
- unsatisfied_properties,
- unknown_properties,
- undecidable_properties,
- undistinguishable_structures,
- comments,
- })
-}
diff --git a/src/routes/morphism/[id]/+page.svelte b/src/routes/morphism/[id]/+page.svelte
deleted file mode 100644
index 0e2550a60..000000000
--- a/src/routes/morphism/[id]/+page.svelte
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-
- {#snippet definition()}
-
- Category:
-
- {data.morphism.category_name}
-
-
- {/snippet}
-
diff --git a/src/routes/morphisms/+page.server.ts b/src/routes/morphisms/+page.server.ts
deleted file mode 100644
index 0825b73ec..000000000
--- a/src/routes/morphisms/+page.server.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import { fetch_structures_and_tags } from '$lib/server/fetchers/structures'
-
-export const load = () => {
- return fetch_structures_and_tags('morphism')
-}
diff --git a/src/routes/morphisms/+page.svelte b/src/routes/morphisms/+page.svelte
deleted file mode 100644
index f94edcfc7..000000000
--- a/src/routes/morphisms/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
diff --git a/src/routes/morphisms/[tag]/+page.server.ts b/src/routes/morphisms/[tag]/+page.server.ts
deleted file mode 100644
index 7624ca36a..000000000
--- a/src/routes/morphisms/[tag]/+page.server.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-import type { EntryGenerator } from './$types'
-import { fetch_tagged_structures } from '$lib/server/fetchers/structures'
-import { fetch_structure_tags } from '$lib/server/fetchers/tags'
-
-export const entries: EntryGenerator = () => {
- return fetch_structure_tags('morphism')
-}
-
-export const load = (event) => {
- const tag = event.params.tag
- return fetch_tagged_structures('morphism', tag)
-}
diff --git a/src/routes/morphisms/[tag]/+page.svelte b/src/routes/morphisms/[tag]/+page.svelte
deleted file mode 100644
index d3340462d..000000000
--- a/src/routes/morphisms/[tag]/+page.svelte
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-