28 Commits
Author SHA1 Message Date
Julius FischerandClaude Opus 5.5 743a88721d Model: the rules of Mathlib's ZFSet as a record
Typecheck / agda (push) Successful in 5m16s
Model/Mathlib states one field per lemma of Mathlib's ZFSet
(Mathlib/SetTheory/ZFC/Basic.lean), with Lean names and statements in
Agda syntax. Model/FromMathlib derives the base ZF axioms from it (ω as
the least inductive subset of Mathlib's omega). Mathlib's ZFSet has no
universes, so Model/ConsistencyZF adds Grothendieck's universe axiom on
top: no-False-Mathlib, no-0≡1-Mathlib, no-∀A→A-Mathlib.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-26 12:03:10 +01:00
Julius FischerandClaude Opus 5.5 bbc335501a Model: Tarski–Grothendieck set theory
Typecheck / agda (push) Successful in 2m28s
Model/TarskiGrothendieck states Tarski's Axiom A (Mizar's foundation; with
transitivity as in con-leche): every set is a member of a Tarski universe.
Model/FromTarski shows every Tarski universe is a Grothendieck universe,
without choice: replacement by Cantor's theorem, unions by regularity (a
member Y with Y ∈ y ∈ Y otherwise), pairs as an image of 𝒫 (𝒫 ∅). So TG
gives Grothendieck's universe axiom and our ZF record;
Model/ConsistencyZF adds no-False-TG, no-0≡1-TG, no-∀A→A-TG.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-23 21:00:50 +01:00
Julius FischerandClaude Opus 5.5 7fd4a58b36 Model: con-leche's ZF axioms, and our set theory derived from them
Typecheck / agda (push) Successful in 2m26s
Model/ZF is the ZF interface in the style of con-leche's SetTheory class
(extensionality, empty set, pairing, union, power set, replacement,
regularity, infinity) with Grothendieck universes along the ω·2 strata and
classical logic as a field (em). Model/FromZF constructs the operations of
Model/SetTheory from it: separation, Kuratowski pairs and projections,
Σ-sets, function graphs, von Neumann numerals (injective by regularity)
and the universe closure. Model/ConsistencyZF states no-False, no-0≡1 and
no-∀A→A for every ZF instance.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-23 16:58:21 +01:00
Julius FischerandClaude Opus 5.5 5d83754d18 True and False, with ex falso; False is empty in the model
Typecheck / agda (push) Successful in 2m22s
True is the unit type (`True = `Unit, `trivial = `tt). `False : Set has
no introduction form; `absurd P e : P for e : False never reduces at the
root (neutral when e is). Covered through level equality, confluence,
the level normaliser, subject reduction, progress, decidability and
strong normalisation (members of False are terms reducing to a neutral
term). The set-theory interface gains an empty set, which False denotes;
Model/Consistency proves no-False.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-22 23:11:57 +01:00
Julius FischerandClaude Opus 5.5 db56f5e4ef Consistency relative to a model of set theory
Typecheck / agda (push) Successful in 2m15s
Model/Soundness: soundness of typing up to conversion — a well-typed term
is well-denoted and its meaning lies in the meaning of a well-denoted
witness W ≈ T, in every environment satisfying a convertible semantic
context. Model/Consistency: no closed term of zero ≡ suc zero or of
∀ (A : Set) → A, for every instance of the set-theory interface.
Re-exported in Theorems; README and TODO describe the model.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-22 21:36:40 +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 b05b643c39 TODO: plan for consistency via a set-theoretic model
Typecheck / agda (push) Successful in 1m55s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q7dfaHQ3dYSfqcxR7V5UrJ
2026-11-22 21:05:04 +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 c2055d6eae Docs: natural numbers in README and TODO
Typecheck / agda (push) Successful in 1m56s
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 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
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 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 0d06ad591c TODO: plan for decidability of conversion
Typecheck / agda (push) Successful in 1m11s
Unary logical relation adapted from AÖV, existing theorems unchanged,
universes and levels last.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016LG5WunTkTJFuvdzgET3Af
2026-11-19 15:50:16 +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
JKFandClaude Opus 5.5 a658081632 Add unit type Unit with tt
`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>
2026-11-06 16:49:14 +01: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 b39cfabb43 Injectivity of lsuc via the normaliser
~-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
2026-10-22 13:41:06 +02:00
Julius FischerandClaude Opus 5.5 cee0d8ef68 Docs: separate level syntax and conversion modulo level equality
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
2026-10-22 11:33:43 +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
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