Commit Graph
18 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 0c079aadf2 Canonicity of closed terms
Typecheck / agda (push) Successful in 1m53s
canonicity: a closed term whose type has head h reduces to an
introduction form for h; canonicity-ℕ: a closed natural number reduces to
a numeral ⌜ k ⌝. From normalisation, subject reduction and canonical forms,
since closed normal forms are not neutral. Re-exported in Theorems.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-21 18:36:15 +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 18de2bc597 Natural numbers: decidability, normalisation and strong normalisation
Inductive SN gains weak head steps for natrec (natrec-zero discards the
motive and the step, natrec-suc nothing) and neutral natrec. The logical
relation gets ⊩ℕ, whose members (Nat) weak-head reduce to zero, to suc of a
member, or to a neutral term; the fundamental theorem handles natrec by
induction on Nat, for both natrec rules. Backward closure covers the new
steps (the discarded motive and step are packed as a pair).

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 bcc09bbf47 Natural numbers: confluence, subject reduction and progress
Level equality gains the congruences ~-suc / ~-natrec. Parallel reduction
and complete development cover β-natrec-zero / β-natrec-suc; the level
normaliser encodes the new constructors; progress has canonical forms for
ℕ; subject reduction handles both natrec rules (natrec-suc-type computes
the type of the unfolded recursion).

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 4e2e782375 Strong normalisation of well-typed terms
Typecheck / agda (push) Successful in 1m34s
StrongNormalisation.agda: inductive SN is sound for accessibility of ↪.
Introduction forms and neutral spines preserve accessibility directly;
backward closure under weak head expansion goes through a commutation
lemma (another step is the head step, or commutes with it and reduces the
contractum or only the discarded part) and lexicographic recursion. This
proves StrongNormalisation for terms and levels. TODO: the
fast-decision-procedure item is dropped; η for the coercions stays
optional.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-21 11:53:47 +01:00
Julius FischerandClaude Opus 5.5 5666d0d881 Decidability: normalisation by reduction alone
Typecheck / agda (push) Successful in 1m20s
Inductive SN drops its ~ clauses, which the fundamental theorem never
used, so a derivation yields a normal form by ↪* (nf). This proves the
strict Normalisation statements (normalisation, normalisationₗ), and
decidability now goes through them.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-21 02:55:26 +01:00
Julius FischerandClaude Opus 5.5 5ea926c57d Decidability of conversion: the fundamental theorem
Typecheck / agda (push) Successful in 1m35s
Fundamental.agda: semantic typing (member of a reducible type convertible
to the type, in the relation of all universes), reducible substitutions,
semantic versions of every typing rule (application, λ, pairs,
projections, subst, type formers at exact strata with level values,
universes, cumulativity), the fundamental theorem for terms and levels,
the reducible identity substitution of a well-formed context, inductive
SN of well-typed terms, and decidable-≈ / decidable-≈ₗ. README and TODO
document the proof.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-21 02:52:46 +01:00
Julius FischerandClaude Opus 5.5 7d9eb08c4e Decidability: universe hierarchy of the relation
Universes.agda: strata fin k < ω+ m, kits by structural recursion
(kitF, kitW), classification of their universes (Set j or Setω m with the
members of that stratum), the kit laws for every stratum, the kit kit∞ of
all universes (for type annotations), embeddings between strata
(cumulativity, and into kit∞), and introduction/elimination of universes
in the relation of kit∞.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-21 02:45:57 +01:00
Julius FischerandClaude Opus 5.5 6a9496d8c9 Decidability: cumulativity and semantic levels
Lift.agda: kit embeddings (composable) lift reducible types with the same
members. Levels.agda: the value of a level (normal form, neutral atoms
counted as 0), invariant under ~ and conversion, stable under renaming;
the universes use the value after one weakening, so that a weakening can
be removed again by a renaming (⟦≡⟧⁺-str).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-21 02:40:54 +01:00
Julius FischerandClaude Opus 5.5 f932f964c1 Decidability: families up to conversion, renaming of reducibility
The domain and codomain families of ∀ and ∃ are now reducible up to
conversion (a reducible type convertible to each instance), since typing
only fixes types up to conversion. Reducible types are therefore not SN
themselves (⊩→SN removed); the kit's universe members carry SN instead.
New: whnf/tag views (tag-≈), prepending weak head steps (⇒*-⊩), and
renaming of reducible types and members (ren-⊩, ren-∋), with renaming
laws in KitLaws. The kit field is renamed Univ.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-21 02:32:45 +01:00
Julius FischerandClaude Opus 5.5 1ac22cee87 Decidability: logical relation for the core types
Typecheck / agda (push) Successful in 1m25s
LogRel.agda: reducible types and their members by induction-recursion
(neutral, Level, Unit, ≡, ∀, ∃ Kripke over renamings, universes via a
Kit with KitLaws). Conversion irrelevance (conv: convertible reducible
types have the same members; shapes via ≈-head and Spine≉head, confluence
instead of determinism of whnf), CR1 (∋→SN), CR3 (SNe→∋), closure under
weak head expansion (⇒-∋, ⇒*-∋), reducible types are SN (⊩→SN).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-20 15:15:00 +01:00
Julius FischerandClaude Opus 5.5 2f0c28b9e5 Decidability: properties of inductive SN
SNProperties.agda: weak head reduction sequences ⇒* (expansion of SN,
congruence, ⇒* ⊆ ≈), renaming of ⇒, SN and SNe, identity renaming and
ren (extᵣ wk) e [ ` zero ] ≡ e, and neutral spines: preserved by ↪ and ~,
so a neutral term is never convertible to a type former (Spine≉head).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-20 15:11:51 +01:00
Julius FischerandClaude Opus 5.5 21c12fdc00 Decidability: inductive SN, decision via normalisation up to ~
Typecheck / agda (push) Successful in 1m7s
SN.agda: weak head reduction _⇒_ with SN side conditions, SNe and SN,
closed under ~ by an explicit clause (accessibility modulo ~ fails for
levels: duplicating an atom with ~ and reducing one copy cycles), and
nf : SN e → normal form up to ~. Statement.agda: Normalisation~.
Decision.agda: decide via ↪~*, so SNᵢ → Decidable-≈ (also for levels).
TODO updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-20 01:30:48 +01:00
Julius FischerandClaude Opus 5.5 a2c2882ab5 Decidability: normaliser from SN, decision from normalisation
Typecheck / agda (push) Successful in 3m32s
Decision.agda: normalise / normaliseₗ recurse on an SN proof using
progress and subject reduction (SN→Normalisation); normalisation decides
conversion by comparing normal forms with _~?_
(Normalisation→Decidable-≈, also for levels). Registered in
Everything.agda; TODO updated.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-20 01:19:15 +01:00
Julius FischerandClaude Opus 5.5 663e7a03f5 Decidability: well-formed contexts, rigidity of normal forms
Statement.agda: the judgement ⊢ Γ, SN, and the statements
(StrongNormalisation, Normalisation, Decidable-≈, each also for levels)
with a ⊢ Γ premise. NormalForms.agda: ~ preserves Value and Neutral
(both directions), a normal form only takes ~ steps under ↪~*, so
convertible normal forms are ~-equal (≈-Value).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-20 01:19:15 +01:00
Julius FischerandClaude Opus 5.5 411c93d27f State decidability of conversion
Typecheck / agda (push) Failing after 1m5s
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
2026-11-19 15:05:04 +01:00