Current section
Files
Jump to
Current section
Files
README.md
Dan Kan: Simplicial HoTT
========================
Groupoid Infinity Simplicial HoTT Computer Algebra System is a pure algebraΡc implementation
with explicit syntaxt for fastest type checking. It supports following extensions: `Chain`,
`Cochain`, `Simplex`, `Simplicial`, `Category`, `Monoid`, `Group`, `Ring`.
Simplicial HoTT is a Rezk/GAP replacement incorporated into CCHM/CHM/HTS Agda-like Anders/Dan
with Kan, Rezk and Segal simplicial modes for computable β-categories.
<img src="styles/Daniel_Kan.JPG"/>
## Abstract
We present a domain-specific language (DSL), the extension to Cubical Homotopy Type Theory (CCHM) for simplicial structures,
designed as a fast type checker with a focus on algebraic purity. Built on the Cohen-Coquand-Huber-MΓΆrtberg (CCHM)
framework, our DSL employs a Lean/Anders-like sequent syntax `Π (context) β’ k (vβ, ..., vβ | fβ, ..., fβ | ... )` to define
k-dimensional `0, ..., n, β` simplices via explicit contexts, vertex lists, and face relations, eschewing geometric coherence terms
in favor of compositional constraints (e.g., `f = g β h`). The semantics, formalized as inference rules in a Martin-LΓΆf
Type Theory MLTT-like setting, include Formation, Introduction, Elimination, Composition, Computational, and
Uniqueness rules, ensuring a lightweight, deterministic computational model with linear-time type checking (O(k + m + n),
where k is vertices, m is faces, and n is relations). Inspired by opetopic purity, our system avoids cubical
path-filling (e.g., `PathP`), aligning with syntactic approaches to higher structures while retaining CCHMβs
type-theoretic foundation. Compared to opetopic sequent calculi and the Rzk prover, our DSL balances algebraic
simplicity with practical efficiency, targeting simplicial constructions over general β-categories,
and achieves a fast, pure checker suitable for formal proofs and combinatorial reasoning.
## Setup
```
$ ocamlopt -o dan src/simplicity.ml && ./dan
```
## Syntax
Incorporating into CCHM/CHM/HTS Anders/Dan core.
### Definition
New sequent contruction:
```
def <name> : <type> := Π (context), conditions β’ <n> (elements | constraints)
```
Instances:
```
def chain : Chain := Π (context), conditions β’ n (Cβ, Cβ, ..., Cβ | ββ, ββ, ..., ββββ)
def simplicial : Simplicial := Π (context), conditions β’ n (sβ, sβ, ..., sβ | facemaps, degeneracies)
def group : Group := Π (context), conditions β’ n (generators | relations)
def cat : Category := Π (context), conditions β’ n (objects | morphisms | coherence)
```
### BNF
```
<program> ::= <definition> | <definition> <program>
<definition> ::= "def" <id> ":" <type-name> ":=" <type-term>
<type-name> ::= "Simplex" | "Simplicial" | "Chain" | "Cochain"
| "Category" | "Group" | "Monoid" | "Ring" | "Field"
<type-term> ::= "Π" "(" <context> ")" "β’" <n> "(" <elements> "|" <constraints> ")"
<digit> ::= "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9"
<superscript> ::= "ΒΉ" | "Β²" | "Β³" | "β΄" | "β΅" | "βΆ" | "β·" | "βΈ" | "βΉ"
<n> ::= <digit> | <digit> <n> | "β"
<context> ::= <hypothesis> | <hypothesis> "," <context>
<hypothesis> ::= <id> ":" <type-term> % Single declaration, e.g., a : Simplex
| "(" <id-list> ":" <type-term> ")" % Grouped declaration, e.g., (a b c : Simplex)
| <id> "=" <t> "<" <t> % Map, e.g., ββ = Cβ < Cβ
| <id> "=" <t> % Equality, e.g., x = 2
| <id> "=" <t> "β" <t> % Monoid composition, e.g., ac = ab β bc
| <id> "=" <t> "+" <t> % Ring addition, e.g., x + y = s
| <id> "=" <t> "β
" <t> % Ring multiplication, e.g., x β
y = p
| <id> "=" <t> "/" <t> % Field division, e.g., x / y = d
<id-list> ::= <id> | <id> <id-list> % e.g., a b c
<elements> ::= <element-list> | Ξ΅
<element-list> ::= <id> | <id> "," <element-list>
<constraints> ::= <constraint-list> | Ξ΅
<constraint-list> ::= <constraint> | <constraint> "," <constraint-list>
<constraint> ::= <t> "=" <t> % Equality, e.g., a = 2
| <t> "β" <t> "=" <t> % Monoid composition, e.g., a β a = e
| <t> "+" <t> "=" <t> % Ring addition, e.g., x + y = s
| <t> "β
" <t> "=" <t> % Ring multiplication, e.g., x β
y = p
| <t> "/" <t> "=" <t> % Field division, e.g., x / y = d
| <id> "<" <id> % Map, e.g., ββ < Cβ
<t> ::= <id> % e.g., a
| <t> "β" <t> % e.g., a β b
| <t> "+" <t> % e.g., x + y
| <t> "β
" <t> % e.g., x β
y
| <t> "/" <t> % e.g., x / y
| <t> "^-1" % e.g., a^-1
| <t> "^" <superscript> % e.g., aΒ³
| "e" % identity
| <number> % e.g., 2
| <matrix> % e.g., [[1,2],[3,4]]
<number> ::= <digit> | <digit> <number> % e.g., 123
<matrix> ::= "[" <row-list> "]" % e.g., [[1,2],[3,4]]
<row-list> ::= <row> | <row> "," <row-list>
<row> ::= "[" <number-list> "]" % e.g., [1,2]
<number-list> ::= <number> | <number> "," <number-list> % e.g., 1,2
```
Meaning of `<n>` Across Types:
* Simplex: Dimension of the simplexβe.g., n=2 for a triangle (2-simplex).
* Group: Number of generatorsβe.g., n=1 for Z/3Z (one generator a).
* Simplicial: Maximum dimension of the simplicial setβe.g., n=1 for S1 (up to 1-simplices).
* Chain: Length of the chain (number of levels minus 1)βe.g., n=2 for a triangle chain (0, 1, 2 levels).
* Category: Number of objectsβe.g., n=2 for a path category (two objects x,y).
* Monoid: Number of generatorsβe.g., n=2 for N (zero and successor).
## Semantics
### Chain
* Formation. Ξ β’ Chain : Set
* Intro. Ξ β’ n (S `|` R) : Chain if Ξ = sββ, β¦, sβββ : Simplex, rβ, β¦, rβ β§ Sβ, Sβ, β¦, Sβ = (sββ, β¦, sβββ), β¦, (sββ, β¦, sβββ) β§ β rβ±Ό = tβ±Ό = tβ±Ό', Ξ β’ rβ±Ό : tβ±Ό = tβ±Ό' β§ β βα΅’β±Ό < sββ, Ξ β’ βα΅’β±Ό : sββ β sβββ,β
* Elim Face. Ξ β’ βα΅’β±Ό s : Simplex if Ξ β’ n (S `|` R) : Chain β§ r = βα΅’β±Ό < s β§ r β R β§ s β S
* Comp Face. βα΅’β±Ό (n (S `|` R)) β s' if r = βα΅’β±Ό < s' β§ r β R β§ s' β S
* Uniq Face. Ξ β’ βα΅’β±Ό s β‘ βα΅’β±Ό s' if Ξ β’ n (S `|` R) : Chain β§ n (S' `|` R') : Chain β§ s β S β§ s' β S' β§ β r = βα΅’β±Ό < s β R β§ r' = βα΅’β±Ό < s' β R'
### Cochain
* Formation. Ξ β’ Cochain : Set
* Intro. Ξ β’ n (S `|` R) : Cochain if Ξ = sββ, β¦, sβββ : Simplex, rβ, β¦, rβ β§ Sβ, Sβ, β¦, Sβ = (sββ, β¦, sβββ), β¦, (sββ, β¦, sβββ) β§ β rβ±Ό = tβ±Ό = tβ±Ό', Ξ β’ rβ±Ό : tβ±Ό = tβ±Ό' β§ β Οα΅’β±Ό < sββ, Ξ β’ Οα΅’β±Ό : sββ β sβββ,β
* Elim Degeneracy. Ξ β’ Οα΅’β±Ό s : Simplex if Ξ β’ n (S `|` R) : Cochain β§ r = Οα΅’β±Ό < s β§ r β R β§ s β S
* Comp Degeneracy. Οα΅’β±Ό (n (S `|` R)) β s' if r = Οα΅’β±Ό < s' β§ r β R β§ s' β S
* Uniq Degeneracy. Ξ β’ Οα΅’β±Ό s β‘ Οα΅’β±Ό s' if Ξ β’ n (S `|` R) : Cochain β§ n (S' `|` R') : Cochain β§ s β S β§ s' β S' β§ β r = Οα΅’β±Ό < s β R β§ r' = Οα΅’β±Ό < s' β R'
### Category
* Formation. Ξ β’ Category : Set
* Intro. Ξ β’ n (O `|` M `|` R) : Category if Ξ = oβ, β¦, oβ, mβ, β¦, mβ : Simplex, rβ, β¦, rβ β§ O = (oβ, β¦, oβ) β§ M = (mβ, β¦, mβ) β§ β rβ±Ό = tβ±Ό = tβ±Ό', Ξ β’ rβ±Ό : tβ±Ό = tβ±Ό' β§ β tβ±Ό = mβ β mᡦ, mβ, mᡦ β Ξ
* Elim Comp. Ξ β’ c : Simplex if Ξ β’ n (O `|` M `|` R) : Category β§ r = c = mβ β mβ β§ r β R β§ mβ, mβ β Ξ
* Comp Comp. (mβ β mβ) (n (O `|` M `|` R)) β c if r = c = mβ β mβ β§ r β R β§ mβ, mβ β Ξ
* Uniq Comp. Ξ β’ c β‘ c' if Ξ β’ n (O `|` M `|` R) : Category β§ n (O' `|` M' `|` R') : Category β§ r = c = mβ β mβ β R β§ r' = c' = mβ' β mβ' β R' β§ mβ, mβ β Ξ β§ mβ', mβ' β Ξ'
### Monoid
* Formation. Ξ β’ Monoid : Set
* Intro. Ξ β’ n (M `|` R) : Monoid if Ξ = mβ, β¦, mβ : Simplex, rβ, β¦, rβ β§ M = (mβ, β¦, mβ) β§ β rβ±Ό = tβ±Ό = tβ±Ό', Ξ β’ rβ±Ό : tβ±Ό = tβ±Ό' β§ β tβ±Ό = mβ β mᡦ, mβ, mᡦ β M
* Elim Comp. Ξ β’ c : Simplex if Ξ β’ n (M `|` R) : Monoid β§ r = c = mβ β mβ β§ r β R β§ mβ, mβ β M
* Comp Comp. (mβ β mβ) (n (M `|` R)) β c if r = c = mβ β mβ β§ r β R β§ mβ, mβ β M
* Uniq Comp. Ξ β’ c β‘ c' if Ξ β’ n (M `|` R) : Monoid β§ n (M' `|` R') : Monoid β§ r = c = mβ β mβ β R β§ r' = c' = mβ' β mβ' β R' β§ mβ, mβ β M β§ mβ', mβ' β M'
### Simplex
* Formation. Ξ β’ Simplex : Set
* Intro. Ξ β’ n (S `|` R) : Simplex if Ξ = sβ, β¦, sβ : Simplex, rβ, β¦, rβ β§ `|`S`|` = n + 1 β§ β rβ±Ό = tβ±Ό = tβ±Ό', Ξ β’ rβ±Ό : tβ±Ό = tβ±Ό' β§ β βα΅’ < sβ, Ξ β’ βα΅’ : sβ β sβββ β§ β Οα΅’ < sβ, Ξ β’ Οα΅’ : sβ β sβββ
* Elim Face. Ξ β’ βα΅’ s : Simplex if Ξ β’ n (S `|` R) : Simplex β§ r = βα΅’ < s β§ r β R β§ s β S
* Elim Degeneracy. Ξ β’ Οα΅’ s : Simplex if Ξ β’ n (S `|` R) : Simplex β§ r = Οα΅’ < s β§ r β R β§ s β S
* Comp Face. βα΅’ (n (S `|` R)) β s' if r = βα΅’ < s' β§ r β R β§ s' β S
* Comp Degeneracy. Οα΅’ (n (S `|` R)) β s' if r = Οα΅’ < s' β§ r β R β§ s' β S
* Uniq Face. Ξ β’ βα΅’ s β‘ βα΅’ s' if Ξ β’ n (S `|` R) : Simplex β§ n (S' `|` R') : Simplex β§ s β S β§ s' β S' β§ β r = βα΅’ < s β R β§ r' = βα΅’ < s' β R'
* Uniq Degeneracy. Ξ β’ Οα΅’ s β‘ Οα΅’ s' if Ξ β’ n (S `|` R) : Simplex β§ n (S' `|` R') : Simplex β§ s β S β§ s' β S' β§ β r = Οα΅’ < s β R β§ r' = Οα΅’ < s' β R'
### Simplicial
#### Simplicial Modes
* Ξ β’ Ξβ : Type (Simplex)
* Ξ β’ Ξβα΅α΅βΏ : Type
* Ξ β’ ΞβΚ³α΅αΆ»α΅ : Type
* Ξ β’ ΞβΛ’α΅α΅α΅Λ‘ : Type
#### Formation
The simplicial type is declared as a set within the context Ξ without any premises.
```
Ξ β’ Ξ : Type
```
#### Introduction
A simplicial set of rank n with elements S and constraints R is formed from context Ξ if simplices, equalities, face maps, and degeneracy maps are properly defined.
```
Ξ β’ n (S | R) : Simplicial if
Ξ = sββ, β¦, sβββ : Simplex, rβ, β¦, rβ β§
Sβ, Sβ, β¦, Sβ = (sββ, β¦, sβββ), β¦, (sββ, β¦, sβββ) β§
rβ±Ό = tβ±Ό = tβ±Ό',
Ξ β’ rβ±Ό : tβ±Ό = tβ±Ό' β§
βα΅’β±Ό < sββ,
Ξ β’ βα΅’β±Ό : sββ β sβββ,β β§
Οα΅’β±Ό < sββ,
Ξ β’ Οα΅’β±Ό : sββ β sβββ,β
```
#### Elim Face
The face map βα΅’β±Ό extracts a simplex from s in a simplicial set if the constraint r defines the face relation.
```
Ξ β’ βα΅’β±Ό s : Simplex if
Ξ β’ n (S | R) : Simplicial β§
r = βα΅’β±Ό < s β§
r β R β§
s β S
```
#### Elim Composition
The composition sβ β sβ yields a simplex c in a simplicial set if the constraint r defines it and s1 and s2 are composable.
```
Ξ β’ c : Simplex if
Ξ β’ n (S | R) : Simplicial β§
r = c = sβ β sβ β§
r β R β§ sβ, sβ β S β§
Ξ β’ βα΅’α΅’ββ sβ = βα΅’β sβ
```
#### Elim Degeneracy
The degeneracy map Οα΅’β±Ό lifts a simplex s to a higher simplex in a simplicial set if the constraint r defines the degeneracy relation.
```
Ξ β’ Οα΅’β±Ό s : Simplex if
Ξ β’ n (S | R) : Simplicial β§
r = Οα΅’β±Ό < s,
r β R,
s β S
```
#### Face Computation
The face map βα΅’β±Ό applied to a simplicial set reduces to the simplex sβ² specified by the constraint r in R.
```
βα΅’β±Ό (n (S | R)) β s' if
r = βα΅’β±Ό < s' β§
r β R β§
s' β S
```
#### Composition Computation.
The composition sβ β sβ applied to a simplicial set reduces to the simplex c specified by the constraint r in R, given s1 and s2 are composable.
```
(sβ β sβ) (n (S | R)) β c if
r = c = sβ β sβ β§
r β R β§
sβ, sβ β S β§
Ξ β’ βα΅’α΅’ββ sβ = βα΅’β sβ
```
#### Degeneracy Computation.
The degeneracy map Οα΅’β±Ό applied to a simplicial set reduces to the simplex sβ² specified by the constraint r in R.
```
Οα΅’β±Ό (n (S | R)) β s' if
r = Οα΅’β±Ό < s' β§
r β R β§
s' β S
```
#### Face Uniqueness
Two face maps βα΅’β±Ό s and βα΅’β±Ό sβ² are equal if they are defined by constraints r and rβ² across two simplicial sets with matching elements.
```
Ξ β’ βα΅’β±Ό s β‘ βα΅’β±Ό s' if
Ξ β’ n (S | R) : Simplicial β§
n (S' | R') : Simplicial β§
s β S β§ s' β S' β§
r = βα΅’β±Ό < s β R β§
r' = βα΅’β±Ό < s' β R'
```
#### Uniqueness of Composition.
Two composed simplices c and cβ² are equal if their constraints r and rβ² define compositions of matching pairs sβ, sβ and sββ², sββ² across two simplicial sets with composability conditions.
```
Ξ β’ c β‘ c' if
Ξ β’ n (S | R) : Simplicial β§
n (S' | R') : Simplicial β§
r = c = sβ β sβ β R β§
r' = c' = sβ' β sβ' β R' β§
sβ, sβ β S β§
sβ', sβ' β S' β§
Ξ β’ βα΅’α΅’ββ sβ = βα΅’β sβ β§
Ξ β’ βα΅’α΅’ββ sβ' = βα΅’β sβ'
```
#### Uniqueness of Degeneracy.
Two degeneracy maps Οα΅’β±Ό s and Οα΅’β±Ό sβ² are equal if they are defined by constraints r and rβ² across two simplicial sets with matching elements.
```
Ξ β’ Οα΅’β±Ό s β‘ Οα΅’β±Ό s' if
Ξ β’ n (S | R) : Simplicial β§
n (S' | R') : Simplicial β§
s β S β§
s' β S' β§
r = Οα΅’β±Ό < s β R β§
r' = Οα΅’β±Ό < s' β R'
```
## Examples
### N-Monoid
```
def nat_monoid : Monoid
:= Π (z s : Simplex),
s β z = s, z β s = s
β’ 2 (z s | s β z = s, z β s = s)
```
O(5).
### Category with Group (Path Category with Z/2Z)
```
def path_z2_category : Category
:= Π (x y : Simplex),
(f g h : Simplex),
(z2 : Group(Π (e a : Simplex), aΒ² = e β’ 1 (a | aΒ² = e))),
f β g = h
β’ 2 (x y | f g h | f β g = h)
```
O(8)β5 context + 2 nested group + 1 constraintβlinear with nesting.
### Triangle Chain
```
def triangle_chain : Chain
:= Π (vβ vβ vβ eββ eββ eββ t : Simplex),
βββ = eββ, βββ = eββ, βββ = eββ, ββ < eββ eββ eββ
β’ 2 (vβ vβ vβ, eββ eββ eββ, t | βββ βββ βββ, ββ)
```
O(11).
### Simplicial Circle
```
def circle : Simplicial
:= Π (v e : Simplex),
βββ = v, βββ = v, sβ < v
β’ 1 (v, e | βββ βββ, sβ)
```
O(5).
### Z/3Z
```
def z3 : Group
:= Π (e a : Simplex),
aΒ³ = e
β’ 1 (a | aΒ³ = e)
```
O(4).
### Triangle
```
def triangle : Simplex := Π (a b c : Simplex),
(ab bc ca : Simplex), ac = ab β bc
β’ 2 (a b c | ab bc ca)
```
O(7).
### Singular Cone
```
def singular_cone : Simplex
:= Π (p q r s : Simplex),
(qrs prs pqs : Simplex), pqr = pqs β qrs
β’ 3 (p q r s | qrs prs pqs pqr)
```
Context: p, q, r, s: Simplex (vertices), qrs, prs, pqs : Simplex (faces), pqr = pqs β qrs.
Simplex: Dimension 3, 4 faces.
### MΓΆbius Piece
```
def MΓΆbius : Simplex
:= Π (a b c : Simplex),
(bc ac : Simplex), ab = bc β ac
β’ 2 (a b c | bc ac ab)
```
Context: a, b, c : Simplex (vertices), bc, ac : Simplex (faces), ab = bc β ac (relation).
Simplex: Dimension 2, 3 faces.
### Degenerate Tetrahedron
```
def degen_tetra : Simplex
:= Π (p q r s : Simplex, q = r),
(qrs prs pqs : Simplex), pqr = pqs β qrs
β’ 3 (p q r s | qrs prs pqs pqr)
```
Context: p, q, r, s : Simplex, q = r (degeneracy), qrs, prs, pqs : Simplex, pqr = pqs β qrs.
Simplex: Dimension 3, 4 facesβdegeneracy implies a collapsed edge.
Non-Triviality: q = r flattens the structure algebraically, testing composition under equality.
### Twisted Annulus
```
def twisted_annulus : Simplex
:= Π (a b c d : Simplex),
(bc ac bd : Simplex), ab = bc β ac, cd = ac β bd
β’ 2 (a b c | bc ac ab), 2 (b c d | bc bd cd)
```
Context:
* Vertices: a, b, c, d.
* Faces: bc, ac, bd.
* Relations: ab = bc β ac, cd = ac β bd (twist via composition).
Simplices:
* (a b c `|` bc, ac, ab ): First triangle.
* (b c d `|` bc, bd, cd ): Second triangle, sharing bc.
Checking:
* Vertices: a, b, c, d β Ξ β O(4).
* Faces: bc, ac, ab (O(3)), bc, bd, cd (O(3)) β total O(6).
* Relations: ab = bc β ac (O(1)), cd = ac β bd (O(1)) β O(2).
* Total: O(12) β linear, fast.
### Degenerate Triangle (Collapsed Edge)
```
def degen_triangle : Simplex
:= Π (a b c : Simplex, b = c),
(bc ac : Simplex), ab = bc β ac
β’ 2 (a b c | bc ac ab)
```
Context:
* Vertices: a, b, c, with b = c.
* Faces: bc, ac.
* Relation: ab = bc β ac.
Simplex:
* (a b c `|` bc, ac, ab ) β 3 faces, despite degeneracy.
Checking:
* Vertices: a, b, c β Ξ, b = c β O(3).
* Faces: bc, ac, ab β Ξ β O(3).
* Relation: ab = bc β ac β O(1).
* Total: O(7)βefficient, handles degeneracy cleanly.
### Singular Prism (Degenerate Face)
```
def singular_prism : Simplex
:= Π (p q r s t : Simplex),
(qrs prs pqt : Simplex, qrs = qrs), pqr = pqt β qrs
β’ 3 (p q r s | qrs prs pqt pqr)
```
Context:
* Vertices: p, q, r, s, t.
* Faces: qrs, prs, pqt.
* Relations: qrs = qrs (degenerate identity), pqr = pqt β qrs.
Simplex:
* (p q r s `|` qrs, prs, pqt, pqr ) β 4 faces, one degenerate.
Checking:
* Vertices: p, q, r, s β Ξ (t unused, valid) β O(4).
* Faces: qrs, prs, pqt, pqr β Ξ β O(4).
* Relations: qrs = qrs (O(1)), pqr = pqt β qrs (O(1)) β O(2).
* Total: O(10) β linear, fast despite degeneracy.
### SΒΉ as β-Groupoid
```
def s1_infty : Simplicial
:= Π (v e : Simplex),
βββ = v, βββ = v, sβ < v,
βββ = e β e, sββ < βββ
β’ β (v, e, βββ | βββ βββ, sβ, βββ, sββ)
```
AST:
```
(* Infinite SΒΉ β-groupoid *)
let s1_infty = {
name = "s1_infty";
typ = Simplicial;
context = [
Decl (["v"; "e"], Simplex); (* Base point and loop *)
Equality ("βββ", Id "v", Id "βββ");
Equality ("βββ", Id "v", Id "βββ");
Equality ("sβ", Id "e", Id "sβ");
Equality ("βββ", Comp (Id "e", Id "e"), Id "βββ"); (* 2-cell: e β e *)
Equality ("sββ", Id "βββ", Id "sββ") (* Degeneracy for 2-cell *)
];
rank = Infinite; (* Unbounded dimensions *)
elements = ["v"; "e"; "βββ"]; (* Finite truncation: 0-, 1-, 2-cells *)
constraints = [
Eq (Id "βββ", Id "v");
Eq (Id "βββ", Id "v");
Map ("sβ", ["v"]);
Eq (Id "βββ", Comp (Id "e", Id "e"));
Map ("sββ", ["βββ"])
]
}
```
### β-Category with cube fillers
```
def cube_infty : Category := Π (a b c : Simplex),
(f g h : Simplex), cube2 = g β f, cube2 : Simplex,
cube3 = cube2 β f, cube3 : Simplex
β’ β (a b c | cube2 cube3)
```
### Matrix Ring Spectrum
```
def matrix_ring_spectrum : Ring
:= Π (a b s p : Simplex),
a + b = s, a β
b = p,
a = [[1,2],[3,4]], b = [[0,1],[1,0]], s = [[1,3],[4,4]], p = [[2,1],[4,3]]
β’ 4 (a b s p | a + b = s, a β
b = p, a = [[1,2],[3,4]], b = [[0,1],[1,0]],
s = [[1,3],[4,4]], p = [[2,1],[4,3]])
```
### HZ spectrum
```
def hz_spectrum : Ring
:= Π (x y p : Simplex),
x β
y = p,
x = 2, y = 3, p = 6
β’ 3 (x y p | x β
y = p, x = 2, y = 3, p = 6)
```
### Poly Ring spectrum
```
def poly_ring_zx : Ring
:= Π (f g s p : Simplex),
f + g = s, f β
g = p,
f = x + 1, g = 2 β
x, s = 3 β
x + 1, p = 2 β
x β
x + 2 β
x
β’ 4 (f g s p | f + g = s, f β
g = p, f = x + 1, g = 2 β
x,
s = 3 β
x + 1, p = 2 β
x β
x + 2 β
x)
```
### GF(2β΄) Finite Field
```
def gf16 : Field
:= Π (x y s p d : Simplex),
x + y = s, x β
y = p, x / y = d,
x = Z(2^4), y = Z(2^4)^2,
s = Z(2^4) + Z(2^4)^2,
p = Z(2^4)^3, d = Z(2^4)^14
β’ 5 (x y s p d | x + y = s, x β
y = p, x / y = d,
x = Z(2^4), y = Z(2^4)^2,
s = Z(2^4) + Z(2^4)^2,
p = Z(2^4)^3,
d = Z(2^4)^14)
```
### GF(7) Prime Field
```
def gf7 : Field
:= Π (x y s p d : Simplex),
x + y = s, x β
y = p, x / y = d,
x = 2, y = 3, s = 5, p = 6, d = 3
β’ 5 (x y s p d | x + y = s, x β
y = p,
x / y = d, x = 2, y = 3,
s = 5, p = 6, d = 3)
```
## Bibliography
* Daniel Kan. Abstract Homotopy I. 1955.
* Daniel Kan. Abstract Homotopy II. 1956.
* Daniel Kan. On c.s.s. Complexes. 1957.
* Daniel Kan. A Combinatorial Definition of Homotopy Groups. 1958.
* Daniel Kan, W. G. Dwyer. Adjoint functors. 1958.
* Daniel Kan, W. G. Dwyer. Simplicial Localizations of Categories. 1980.
* Graeme Segal. Classifying spaces and spectral sequences. 1968.
* Graeme Segal. Categories and cohomology theories. 1974.
* Graeme Segal, R. Bott. Loop groups and their classifying spaces. 1988.
* Charles Rezk. A model for the homotopy theory of homotopy theory. 2001.
* Charles Rezk. A cartesian presentation of weak n-categories". 2010.
* Charles Rezk, S. Schwede, B. Shipley. Simplicial structures on model categories and functors. 2001.
* Charles Rezk, J. Bergner. Comparison of models for (β,n)-categories. 2013.
## Conclusion
Dan Kan Simplicity HoTT, hosted at groupoid/dan, is a lightweight, pure type checker
built on Cubical Homotopy Type Theory (CCHM), named in tribute to Daniel Kan for
his foundational work on simplicial sets. With a unified syntax β
`Π (context) β’ n (elements | constraints)` β Dan supports a rich type
system `Simplex`, `Group`, `Simplicial`, `Chain`, `Category`, `Monoid`, now extended with
β-categories featuring cube fillers.