Decidability/Statement.agda states Decidable-≈ and Decidable-≈ₗ for
well-typed terms (conversion is undecidable on untyped terms) and the
normalisation property the proof is expected to go through. TODO and
README updated.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
`Unit : Set and `tt : `Unit, both values and inert under renaming,
substitution, reduction and level equality. Cases added throughout
confluence, conversion, the level normaliser, substitution lemmas,
subject reduction and progress (new head hUnit for canonical forms).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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
~-lsuc-inj : lsuc l ~ lsuc l' → l ~ l' in LevelEqualityDecision: shift is
injective and readback is injective on well-formed normal forms. TODO
records the analysis of the optional η rule for the coercions.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
README describes the two-sort syntax, why level equations on ordinary
terms break transitivity, conversion as a common reduct under
reduction modulo level equality, and the Church–Rosser proof. TODO
ticks off the level-equality chain and the typing repairs; IDEAS
records the alternatives that were considered and why they fail.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
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
- 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
- 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
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
- 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