>
}
- let { type, implication, structures, mapped_types, property_relation_dict }: Props =
- $props()
+ let {
+ type,
+ implication,
+ structures,
+ associated_types,
+ property_relation_dict
+ }: Props = $props()
- let has_additional_assumptions = $derived(
- Object.values(implication.mapped_assumptions).some((list) => list?.size)
+ let has_associated_assumptions = $derived(
+ Object.values(implication.associated_assumptions).some((list) => list?.size)
)
@@ -34,19 +39,20 @@
Claim:
- {#if has_additional_assumptions}
+ {#if has_associated_assumptions}
Given a {remove_underscores(type)}
- {#each Object.entries(implication.mapped_assumptions) as [map, set], ind}
+ {#each Object.entries(implication.associated_assumptions) as [label, set], ind}
{#if set}
whose
- {remove_underscores(map)}
+ {remove_underscores(label)}
{#each set as property, index}
- {property_relation_dict[mapped_types[map]][property]}
- {property}{property}{#if index < set.size - 1}
and
{/if}
- {/each}{#if ind < Object.entries(implication.mapped_assumptions).length - 1}
+ {/each}{#if ind < Object.entries(implication.associated_assumptions).length - 1}
, and
{/if}
{/if}
diff --git a/src/pages/MorphismDetailPage.svelte b/src/pages/MorphismDetailPage.svelte
deleted file mode 100644
index fc15a3b83..000000000
--- a/src/pages/MorphismDetailPage.svelte
+++ /dev/null
@@ -1,19 +0,0 @@
-
-
-
- {#snippet definition()}
-
- Category:
-
- {data.category_name}
-
-
- {/snippet}
-
diff --git a/src/pages/StructureDetailPage.svelte b/src/pages/StructureDetailPage.svelte
index fd486540c..7cc8a2a8e 100644
--- a/src/pages/StructureDetailPage.svelte
+++ b/src/pages/StructureDetailPage.svelte
@@ -5,23 +5,28 @@
import SuggestionForm from '$components/SuggestionForm.svelte'
import TagList from '$components/TagList.svelte'
import IndistinguishableStructures from '$components/IndistinguishableStructures.svelte'
+ import StructuresBasedOn from '$components/StructuresBasedOn.svelte'
import { PLURALS } from '$shared/config'
import type {
+ AssociatedStructure,
CommentObject,
PropertyAssignmentDisplay,
PropertyShort,
RelatedStructure,
StructureDisplay,
StructureShort,
+ StructureShortDictionary,
StructureType
} from '$lib/commons/types'
import type { Snippet } from 'svelte'
- import { remove_underscores } from '$shared/utils'
+ import { capitalize, remove_underscores } from '$shared/utils'
type Props = {
type: StructureType
structure: StructureDisplay
+ associated_structures: AssociatedStructure[]
related_structures: RelatedStructure[]
+ structures_based_on: StructureShortDictionary
children: RelatedStructure[]
tags: string[]
satisfied_properties: PropertyAssignmentDisplay[]
@@ -32,13 +37,14 @@
comments: CommentObject[]
definition?: Snippet
specials?: Snippet
- footer?: Snippet
}
let {
type,
structure,
+ associated_structures,
related_structures,
+ structures_based_on,
children,
tags,
satisfied_properties,
@@ -48,8 +54,7 @@
indistinguishable_structures,
comments,
definition,
- specials,
- footer
+ specials
}: Props = $props()
@@ -68,6 +73,13 @@
{@render definition?.()}
+ {#each associated_structures as a}
+
+ {capitalize(remove_underscores(a.label))}:
+ {a.name}
+
+ {/each}
+
{#if structure.parent}
Parent:
@@ -143,7 +155,7 @@
-{@render footer?.()}
+
diff --git a/src/pages/SymmetricMonoidalCategoryDetailPage.svelte b/src/pages/SymmetricMonoidalCategoryDetailPage.svelte
deleted file mode 100644
index 6213f9c07..000000000
--- a/src/pages/SymmetricMonoidalCategoryDetailPage.svelte
+++ /dev/null
@@ -1,22 +0,0 @@
-
-
-
- {#snippet definition()}
-
- Underlying category:
-
- {data.underlying_category_name}
-
-
- {/snippet}
-
diff --git a/src/routes/[type]/[id]/+page.server.ts b/src/routes/[type]/[id]/+page.server.ts
index 58af8b25c..73d2ace54 100644
--- a/src/routes/[type]/[id]/+page.server.ts
+++ b/src/routes/[type]/[id]/+page.server.ts
@@ -3,17 +3,7 @@ import { fetch_structure } from '$lib/server/fetchers/structure'
import { is_structure_type } from '$shared/config'
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 '$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,
- symmetric_monoidal_category: fetch_symmetric_monoidal_category
-}
+import { adjust_functor_notation } from '$lib/server/transforms'
export const load = (event) => {
const type = event.params.type
@@ -23,13 +13,9 @@ export const load = (event) => {
const structure_data = fetch_structure(type, id)
- const special_structure_data = special_fetchers[type](id)
+ if (type === 'functor') adjust_functor_notation(structure_data)
- if (special_structure_data.type === 'functor') {
- structure_data.structure.notation = add_math(
- `${strip_math(structure_data.structure.notation)}: ${strip_math(special_structure_data.domain_notation)} \\to ${strip_math(special_structure_data.codomain_notation)}`
- )
- }
+ const special_structure_data = type === 'category' ? fetch_category(id) : { type }
return render_nested_formulas({
structure_data,
diff --git a/src/routes/[type]/[id]/+page.svelte b/src/routes/[type]/[id]/+page.svelte
index da567a1e3..51e3acc60 100644
--- a/src/routes/[type]/[id]/+page.svelte
+++ b/src/routes/[type]/[id]/+page.svelte
@@ -1,29 +1,12 @@
-
-
{#if data.special_structure_data.type === 'category'}
-{/if}
-
-{#if data.special_structure_data.type === 'functor'}
-
-{/if}
-
-{#if data.special_structure_data.type === 'morphism'}
-
-{/if}
-
-{#if data.special_structure_data.type === 'symmetric_monoidal_category'}
-
+{:else}
+
{/if}