ies/music-topos/.codex/skills/rezk-types/SKILL.md
Rezk types (complete Segal spaces). Local univalence: categorical isomorphisms ≃ type-theoretic identities.
npx skillsauth add plurigrid/asi rezk-typesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
"In a Rezk type, isomorphisms are equivalent to identities — local univalence." — Emily Riehl & Michael Shulman
Rezk types are Segal types with an additional local univalence condition: categorical isomorphisms are equivalent to type-theoretic identities. This is the ∞-categorical analogue of the univalence axiom.
#lang rzk-1
-- Isomorphism in a Segal type
#define is-iso (A : Segal) (x y : A) (f : hom A x y) : U
:= Σ (g : hom A y x),
(hom2 A x y x f g (id x)) × (hom2 A y x y g f (id y))
-- The type of isomorphisms
#define Iso (A : Segal) (x y : A) : U
:= Σ (f : hom A x y), is-iso A x y f
-- Identity-to-isomorphism map
#define id-to-iso (A : Segal) (x y : A) : (x = y) → Iso A x y
:= λ p. transport (λ z. Iso A x z) p (id x, refl-iso)
-- Rezk condition (local univalence)
#define is-rezk (A : Segal) : U
:= (x y : A) → is-equiv (id-to-iso A x y)
-- Rezk type (complete Segal space)
#define Rezk : U
:= Σ (A : Segal), is-rezk A
| ∞-Category Concept | Chemical Interpretation | |--------------------|------------------------| | Isomorphism | Reversible reaction (equilibrium) | | Local univalence | "Isomers at equilibrium are the same species" | | Rezk completion | Finding thermodynamic fixed points | | Identity = Iso | Chemical identity = equilibrium class |
segal-types (-1) ⊗ directed-interval (0) ⊗ rezk-types (+1) = 0 ✓
As a Generator (+1), rezk-types creates:
In a Rezk type:
(A ≅ B) ≃ (A = B)
Chemical interpretation: Two species at mutual equilibrium can be identified. The equilibrium constant K = 1 means "same species up to naming."
import InfinityCosmos.ForMathlib.AlgebraicTopology.Quasicategory
-- Rezk completion functor
def RezkCompletion : SegalSpace → RezkSpace := sorry
-- Local univalence
theorem local_univalence (R : RezkSpace) (x y : R.X 0) :
(x = y) ≃ Iso R x y := by
exact R.rezk x y
# Rezk completion for interaction sequences
module RezkCompletion
# Two interaction sequences are "Rezk-equivalent" if
# they produce the same observable effect
def self.equivalent?(seq1, seq2)
# Check if there's an isomorphism between outcomes
# Isomorphism = both directions have GF(3) = 0
forward_trit_sum = seq1.zip(seq2).map { |a, b| a.trit - b.trit }.sum
backward_trit_sum = seq2.zip(seq1).map { |a, b| a.trit - b.trit }.sum
(forward_trit_sum % 3 == 0) && (backward_trit_sum % 3 == 0)
end
end
Rezk completion exists: Every Segal type has a universal Rezk completion.
Functors preserve Rezk: A functor F : A → B between Rezk types preserves isomorphisms.
Adjoint is property: For a functor between Rezk types, having an adjoint is a mere proposition (at most one adjoint up to iso).
development
BDD-Driven Mathematical Content Verification Skill Combines Behavior-Driven Development with mathematical formula extraction, verification, and transformation using: - Cucumber/Gherkin for specification - RSpec for implementation verification - mathpix-gem for LaTeX/mathematical content extraction - Pattern matching on syntax trees for formula validation Enables iterative discovery and verification of mathematical properties through executable specifications.
tools
Meta-skill that generates domain-specific AI skills from tool documentation
development
Code Query with AI-enhanced deterministic analysis via SplitMix ternary classification
development
Directed Yoneda lemma as directed path induction. Riehl-Shulman's key insight for synthetic ∞-categories.