Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

ordered-locale

БесплатноЗапускает вложенные скриптыНе проверен

Ordered Locales (Heunen-van der Schaaf 2024): Point-free topology with direction. Frame + compatible preorder with open cone conditions.

plurigridот plurigrid★ 73 звезды на GitHub

Об этом скилле

Ordered Locale Skill

"We extend Stone duality between topological spaces and locales to include order." — Heunen & van der Schaaf, 2024

Overview

An ordered locale is a locale (point-free topological space) equipped with a compatible preorder satisfying the open cone condition.

Ordered Locale = Frame + Preorder + Open Cones

Key Definitions

Frame (Locale)

A frame is a complete lattice where finite meets distribute over arbitrary joins:

a ∧ (⋁ᵢ bᵢ) = ⋁ᵢ (a ∧ bᵢ)

Equivalently: a complete Heyting algebra.

Open Cone Condition

For a preorder ≤ on locale L, the open cone condition requires:

↑x = {y ∈ L : x ≤ y}  is an open in L  (upper cone)
↓x = {y ∈ L : y ≤ x}  is an open in L  (lower cone)

This ensures the order is "visible" to the topology.

Ordered Locale (Definition 2.1, Heunen-van der Schaaf)

An ordered locale is a tuple (L, ≤) where:

  1. L is a locale (frame of opens)
  2. ≤ is a preorder on O(L)
  3. The open cone condition holds

Stone Duality Extended

┌────────────────────────┐     adjunction     ┌─────────────────────┐
│ Preordered Topological │ ←───────────────→ │   Ordered Locales   │
│ Spaces (open cones)    │                    │     (spatial)       │
└────────────────────────┘                    └─────────────────────┘

Restricts to an equivalence:

  • Spatial ordered locales ≃ Sober T₀-ordered spaces with open cones

Julia Implementation (Catlab.jl)

Frame as Subobject Heyting Algebra

From Catlab's Subobjects.jl:

using Catlab, Catlab.Theories, Catlab.CategoricalAlgebra

# Frame operations via ThSubobjectHeytingAlgebra
@signature ThFrame <: ThSubobjectHeytingAlgebra begin
  # Infinite joins (frame-specific)
  Join(I::TYPE, f::(I → Sub(X)))::Sub(X) ⊣ [X::Ob]
  
  # Frame distributivity: a ∧ (⋁ᵢ bᵢ) = ⋁ᵢ (a ∧ bᵢ)
end

Ordered Locale Schema (ACSet)

using ACSets

@present SchOrderedLocale(FreeSchema) begin
  Open::Ob                    # Opens of the frame
  Arrow::Ob                   # Order relation arrows
  
  src::Hom(Arrow, Open)       # Source of order arrow
  tgt::Hom(Arrow, Open)       # Target of order arrow
  
  # Cone structure
  Cone::Ob
  apex::Hom(Cone, Open)       # Apex of cone
  leg::Hom(Cone, Arrow)       # Legs of cone
  
  # Attributes
  Index::AttrType
  idx::Attr(Open, Index)      # Open index
  is_upper::Attr(Cone, Bool)  # Upper vs lower cone
end

@acset_type OrderedLocale(SchOrderedLocale)

Open Cone Verification

function verify_open_cone_condition(L::OrderedLocale)
  """
  Verify that ↑x and ↓x are opens for all x.
  """
  opens = parts(L, :Open)
  
  for x in opens
    # Upper cone: ↑x = {y : x ≤ y}
    upper_cone = Set{Int}()
    for arr in parts(L, :Arrow)
      if L[arr, :src] == x
        push!(upper_cone, L[arr, :tgt])
      end
    end
    push!(upper_cone, x)  # Reflexive
    
    # Check upper cone is an open (exists in frame)
    if !is_open(L, upper_cone)
      return false, "↑$x is not an open"
    end
    
    # Lower cone: ↓x = {y : y ≤ x}
    lower_cone = Set{Int}()
    for arr in parts(L, :Arrow)
      if L[arr, :tgt] == x
        push!(lower_cone, L[arr, :src])
      end
    end
    push!(lower_cone, x)  # Reflexive
    
    if !is_open(L, lower_cone)
      return false, "↓$x is not an open"
    end
  end
  
  return true, "Open cone condition satisfied"
end

Cone and Cocone Operations

From Catlab's Limits.jl:

using Catlab.Theories: ThCompleteCategory, ThCocompleteCategory

# Cone: A natural transformation Δ(X) → D
# where Δ(X) is the constant diagram at X
struct Cone{Ob, Hom}
  apex::Ob
  legs::Vector{Hom}  # One leg per object in diagram
end

# Cocone: Dual - natural transformation D → Δ(X)
struct Cocone{Ob, Hom}
  apex::Ob
  legs::Vector{Hom}
end

# Limit = universal cone
function limit_cone(diagram::FreeDiagram, model)
  # Find apex and legs such that any other cone factors through
  lim = limit[model](diagram)
  Cone(ob(lim), collect(legs(lim)))
end

# Colimit = universal cocone  
function colimit_cocone(diagram::FreeDiagram, model)
  colim = colimit[model](diagram)
  Cocone(ob(colim), collect(legs(colim)))
end

Frame Operations via Limits/Colimits

# Meet (∧) = pullback = limit of cospan
function frame_meet(L::OrderedLocale, a::Int, b::Int)
  # Pullback in the locale category
  diagram = FreeDiagram([a, b], [(a, top(L)), (b, top(L))])
  lim = limit_cone(diagram, L)
  return lim.apex
end

# Join (∨) = pushout = colimit of span
function frame_join(L::OrderedLocale, a::Int, b::Int)
  # Pushout in the locale category
  bot = bottom(L)
  diagram = FreeDiagram([a, b], [(bot, a), (bot, b)])
  colim = colimit_cocone(diagram, L)
  return colim.apex
end

# Infinite join (frame-specific)
function frame_sup(L::OrderedLocale, opens::Vector{Int})
  # Colimit of discrete diagram
  diagram = FreeDiagram(opens, Pair{Int,Int}[])
  colim = colimit_cocone(diagram, L)
  return colim.apex
en
Полный SKILL.md на GitHub

Установить ordered-locale в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

OrderedLocale.jlOrderedLocale.orggeodesics/OrderedLocale.geodesic.jlgeodesics/ordered_locale.geodesic.pyordered_locale.jlordered_locale.orgordered_locale.py

FAQ

Что делает скилл ordered-locale?

Ordered Locales (Heunen-van der Schaaf 2024): Point-free topology with direction. Frame + compatible preorder with open cone conditions.

Как установить скилл ordered-locale?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл ordered-locale запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить ordered-locale с