Commit Graph
9 Commits
Author SHA1 Message Date
JKF 87a1bb1a4e git status 2026-10-30 16:49:02 +01:00
JKF bb43eaa670 Rename Set≤Set to Set<Set 2026-10-30 14:48:25 +01:00
JKF 479d734cd6 Remove ⊢-Setω≤ 2026-10-30 14:41:19 +01:00
Julius FischerandClaude Opus 5.5 897f74321b Use Fin from the standard library
Replace univTypes.Util.Fin with Data.Fin (same constructors zero/suc) and
drop the unused Data.Fin import renamed to 𝔽.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-22 14:34:37 +02:00
Julius FischerandClaude Opus 5.5 bd07cf09c4 Progress for open terms
Progress.agda: canonical forms via a generic head lemma (≈-head: type
formers keep their outermost constructor under ↪ and ~), mutual
progress / progressₗ (well-typed terms are normal forms or reduce), and
value-normal (normal forms do not reduce). Tests and docs updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-22 14:28:40 +02:00
Julius FischerandClaude Opus 5.5 641378dd51 Port the level normaliser to the sorted syntax
Atoms are now exactly the terms under `latom, so the Atom/View
machinery in Completeness goes away: flatten is total on Lvl with four
cases, and a well-formed entry is just a term in normal form. nf, sound
and complete are generic in the sort; the term order encodes `lvl and
`latom and decodes by sort.

Decidability (_~?_) moves to LevelEqualityDecision, since level
equality properties no longer depend on the normaliser.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-22 11:32:37 +02:00
Julius FischerandClaude Opus 5.5 c1e10c1420 Separate syntax for level expressions
Terms are now indexed by a sort: Term = Tm term, Lvl = Tm level. Level
expressions (`lzero, `lsuc, _`⊔_) live in Lvl and meet terms only through
the coercions `lvl : Lvl → Term and `latom : Term → Lvl, with the new
reduction `latom (`lvl l) ↪ l. Level equality _~_ is unchanged on levels
and a pure congruence on terms, so it can no longer hide or create redexes.

Conversion _≈_ is now a common reduct under reduction modulo level
equality (_↪~*_). Typing gains the level well-formedness judgement _⊢ₗ_.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-22 11:14:30 +02:00
Julius FischerandClaude Opus 5.5 88f9d4d579 Level normaliser: soundness, completeness, decidability
Prove the level normaliser correct: u ~ u' iff nf u ≡ nf u'.

- LevelNormalForm: compare via an encoding of terms as trees (same
  order as before); merge without `with` so it passes the termination
  checker; shift via map₂; readback without a where block.
- LevelNormalForm/Order: compare is a strict total order, decidable
  equality on terms.
- LevelNormalForm/Merge: sortedness, merge laws (associativity via
  lookup extensionality), join/shift laws.
- LevelNormalForm/Completeness: well-formed normal forms, the key lemma
  flatten (readback L) ≡ L, idempotence, completeness.
- LevelNormalForm/Soundness: denotation of normal forms, soundness.
- LevelEqualityProperties: decision procedure _~?_ and injectivity of
  all constructors except lsuc and ⊔ up to ~.
- Tests for the decision procedure; README and TODO updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-21 22:57:49 +02:00
Julius FischerandClaude Opus 5.5 2439a6c998 Level normaliser nf and tests
- SubjectReduction/LevelNormalForm.agda: nf normalises every level
  expression in a term to max(c, a₁ + k₁, …) with atoms normalised first,
  one entry per atom (largest offset), atoms sorted by a total order on
  terms, and the constant dropped when some offset is at least as large.
- Tests/: example derivations for the typing rules, examples for _~_ and
  _≈_, and computational tests for nf (all six level equations,
  canonical shapes, atoms, idempotence).
- README: level normal form and repository layout; TODO: proof steps
  for nf (properties of compare, soundness, completeness, decidability).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-21 15:53:52 +02:00