Commit Graph
14 Commits
Author SHA1 Message Date
Julius FischerandClaude Opus 5.5 48d3f9040b ⊢-∀ / ⊢-∃: the codomain level must be well formed
Typecheck / agda (push) Failing after 7s
Over an empty domain the codomain derivation says nothing about the level
l₂, so the set-theoretic model needs Γ ⊢ₗ l₂ (cf. con-leche's
certification tax). This replaces the planned premise on ⊢-≈, which the
model avoids by stating soundness up to conversion. Proofs, tests and
Examples/Issue pass the premise.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-22 21:27:08 +01:00
Julius FischerandClaude Opus 5.5 d83c61261d Annotate λ with its domain: `λ[x⦂ A ] e
Typecheck / agda (push) Successful in 1m52s
Preparation for the set-theoretic model, where a λ denotes the graph of
its body over its domain. ⊢-λ uses the annotation as the domain;
reduction also reduces it (ξ-λ₁) and β discards it, so inductive SN and
the backward closure get a side condition for it. All proofs, tests and
Examples/Issue (annotations only) are updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-22 21:12:06 +01:00
Julius FischerandClaude Opus 5.5 e708f2d425 Restructure folders: Specification, Metatheory, Decidability
Typecheck / agda (push) Successful in 1m54s
Specification/ (moved up from SubjectReduction/) holds only definitions.
Metatheory/ holds the proofs about it: Substitution (was Composition),
Levels/ (Equality, NormalForm, Decision), Confluence/ (Parallel, Modulo,
Conversion) and Typing/ (Inversion, Substitution, SubjectReduction,
Progress). Decidability/ groups SN/ (Inductive, Properties, Strong) and
LogRel/ (Core, Lift, LevelValue, Universes). Theorems.agda re-exports the
main results. Examples/ keeps the hand-written examples apart from the
generated Tests/ (NatExample renamed to Tests/Nat). Module names, docs and
the CI postulate check follow the new paths; no proof changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-21 14:50:06 +01:00
Julius FischerandClaude Opus 5.5 e48fcbaf7c Tests: factorial with natrec
Tests/NatExample types plus, times and factorial with ⊢-natrec (constant
motive λ ℕ).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-21 13:19:11 +01:00
Julius FischerandClaude Opus 5.5 76b4e71d12 Pair rule: the codomain must be a type
Typecheck / agda (push) Successful in 1m20s
⊢-, gets the premise Γ , t₁ ⊢ t₂ ⦂ Setω l, as in Agda. Without it,
(λz. Unit , tt) : ∃[x⦂ ∀ (z : Level) → Setω 0 ] (x · x) is derivable
although x · x is not a type, and no reducible type is convertible to
the pair's type, so the logical relation cannot cover pairs. Statements
of existing theorems are unchanged; the proofs matching on ⊢-, (≈-Γ-⊢,
⊢ren, ⊢sub, subject reduction, inversion, progress) pass the premise
along. New test Tests.Typing.pair; TODO updated with the two further
ingredients of the fundamental theorem.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-21 02:24:00 +01:00
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