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
44 lines
1.3 KiB
Agda
44 lines
1.3 KiB
Agda
module univTypes.Specification.Conversion where
|
|
|
|
open import univTypes.Specification.Syntax
|
|
open import univTypes.Specification.Reduction
|
|
open import univTypes.Specification.LevelEquality
|
|
|
|
infix 4 _↪~_ _↪~*_ _≈_
|
|
|
|
-- Reduction modulo level equality: a step is a reduction step or a level
|
|
-- equation.
|
|
|
|
data _↪~_ {s n} (e e' : Tm s n) : Set where
|
|
↪~-↪ : e ↪ e' → e ↪~ e'
|
|
↪~-~ : e ~ e' → e ↪~ e'
|
|
|
|
data _↪~*_ : ∀ {s n} → Tm s n → Tm s n → Set where
|
|
↪~*-refl : ∀ {s n} {e : Tm s n}
|
|
→ e ↪~* e
|
|
↪~*-step : ∀ {s n} {e₁ e₂ e₃ : Tm s n}
|
|
→ e₁ ↪~ e₂
|
|
→ e₂ ↪~* e₃
|
|
→ e₁ ↪~* e₃
|
|
|
|
↪~*-trans : ∀ {s n} {e₁ e₂ e₃ : Tm s n}
|
|
→ e₁ ↪~* e₂
|
|
→ e₂ ↪~* e₃
|
|
→ e₁ ↪~* e₃
|
|
↪~*-trans ↪~*-refl q = q
|
|
↪~*-trans (↪~*-step x p) q = ↪~*-step x (↪~*-trans p q)
|
|
|
|
-- Two terms are convertible iff they have a common reduct under reduction
|
|
-- modulo level equality. (Reducing first and comparing with _~_ only at the
|
|
-- end would make transitivity hard to prove: l `⊔ l ~ l duplicates l, and
|
|
-- the two copies can then be reduced differently.)
|
|
|
|
record _≈_ {s n} (e₁ e₂ : Tm s n) : Set where
|
|
constructor mk-≈
|
|
field
|
|
u : Tm s n
|
|
e₁↪~*u : e₁ ↪~* u
|
|
e₂↪~*u : e₂ ↪~* u
|
|
|
|
open _≈_ public
|