Commit Graph
63 Commits
Author SHA1 Message Date
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
Julius FischerandClaude Opus 5.5 18ec877ca7 Declare fixities for all term operators
Loosest to tightest, all above the judgements (4) and context
extension (5):
  6  `λ_ ∀[x⦂_]_ ∃[x⦂_]_  (infixr; binder bodies extend to the right)
  7  _`,_                 (infixr)
  8  _`≡_
  9  `Setn_ `Setω_        (`Setn l₁ `⊔ l₂ = `Setn (l₁ `⊔ l₂))
  10 _`⊔_                 (infixl)
  11 _·_                  (infixl)
  12 _[_]                 (infixl)
  13 `_

Previously `_ bound looser than the undeclared operators, so e.g.
` x `⊔ ` y did not parse.

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
Julius FischerandClaude Opus 5.5 34548eceea Level equality _~_ and conversion modulo level equality
- Specification/LevelEquality.agda: _~_ is the congruence closure of the
  level equations (associativity, commutativity and idempotence of ⊔,
  lzero as unit, lsuc distributing over ⊔, l ⊔ lsuc l = lsuc l).
- Conversion: e₁ ≈ e₂ iff e₁ ↪* u₁, e₂ ↪* u₂ and u₁ ~ u₂.

ConversionProperties and the other proofs still use the old record with a
single common reduct; see TODO.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-21 15:47:12 +02:00
Julius FischerandClaude Opus 5.5 d10ef901a2 Typing and Values: close gaps found in review
Values:
- val-Setω requires Value l (as val-Setn does), so a reducible Setω term
  is no longer a value.
- Rename val-l to val-lzero.
- Add val-⊔: _⊔_ does not reduce, so a join of values is a value.

Typing:
- ⊢-λ requires the domain to be a type (Γ ⊢ t₁ ⦂ Setω l; small types
  reach Setω lzero via ⊢-Set≤Setω).
- ∃ mirrors ∀: ⊢-∃, ⊢-∃ω, ⊢-∃-dep.
- ⊢-≡ requires t ⦂ Set l and lives in Set l; the motive of ⊢-subst is in
  Set (ren wk l).
- ⊢-Setn and ⊢-Setω require their level to have type Level.

Downstream proofs still need cases for the new rules; see TODO.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-21 15:41:18 +02:00
Julius FischerandClaude Opus 5.5 fc39eeec29 Docs: motivation, design notes, TODO and alternative ideas
- README: motivation (Agda issue #5810, loss of subject reduction with
  Setω), design of the universe hierarchy and of level equality by
  normalisation in conversion.
- TODO.md: plan for level equality, typing follow-ups and review findings
  on Values.
- IDEAS.md: the Bad-predicate formulation of level-dependent ∀.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-21 15:20:23 +02:00
Julius FischerandClaude Opus 5.5 eb1085ea44 Typing: universe hierarchy with cumulativity and level-dependent ∀
- ⊢-∀ now determines its result level: Set (l₁ ⊔ l₂), where the codomain
  level is a weakened outer level and so cannot mention the bound variable.
- ⊢-∀ω: the same for domain and codomain in Setω.
- ⊢-∀-dep: codomain level may depend on the bound variable
  (e.g. ∀ (l : Level) → Set l), result in Setω.
- Cumulativity via lifting rules: Set l ≤ Setω lzero and
  Setω l ≤ Setω (lsuc l).

The downstream proofs (ConversionProperties, SubstitutionPreservesTyping,
Inversion, SubjectReduction) do not yet cover the new rules; see TODO.md.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-21 15:20:23 +02:00
Julius FischerandClaude Opus 5.5 40f9ccaec1 Split Specification into topic modules
Move the contents of Specification.agda unchanged into
Specification/{Axioms,Syntax,Substitution,Values,Reduction,Conversion,Typing}.agda,
with fixity declarations next to their definitions. Specification.agda
now re-exports all parts, so existing imports keep working. The unused
helper cong₃ moves to Util/Equality.agda.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-10-21 15:20:23 +02:00
JKF 201fe7942b Make β-λ more generic (Argument can now be any type T instead of `Setn L) 2026-04-25 22:24:28 +02:00
JKF e8ee5b200c Some definitions and adjusted proofs 2026-04-25 21:57:10 +02:00
Julius 5cbf679c0c small work 2026-04-21 20:44:15 +02:00
JKF 077d91a485 changes 2026-04-17 19:31:44 +02:00
JKF f9e4b4d9aa initial commit 2026-04-01 18:29:46 +02:00
minze 70e9a24640 Initial commit 2026-04-01 18:19:34 +02:00