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
37 lines
1.4 KiB
Agda
37 lines
1.4 KiB
Agda
module univTypes.Decidability.Statement where
|
||
|
||
open import Data.Product using (∃-syntax; _×_)
|
||
open import Relation.Nullary using (Dec)
|
||
|
||
open import univTypes.SubjectReduction.Specification
|
||
|
||
-- Decidability of conversion, stated as types (to be inhabited).
|
||
--
|
||
-- On arbitrary terms conversion is undecidable (by Scott–Curry, already
|
||
-- `e ≈ λx. x` is undecidable for untyped e), so the statement is restricted
|
||
-- to well-typed terms. The two terms may have different types: the type
|
||
-- checker compares types that live in different universes.
|
||
|
||
Decidable-≈ : Set
|
||
Decidable-≈ = ∀ {n} {Γ : Context n} {e₁ e₂ t₁ t₂ : Term n}
|
||
→ Γ ⊢ e₁ ⦂ t₁
|
||
→ Γ ⊢ e₂ ⦂ t₂
|
||
→ Dec (e₁ ≈ e₂)
|
||
|
||
-- The same for level expressions (well-formed levels may contain atoms,
|
||
-- i.e. arbitrary terms of type Level).
|
||
Decidable-≈ₗ : Set
|
||
Decidable-≈ₗ = ∀ {n} {Γ : Context n} {l₁ l₂ : Lvl n}
|
||
→ Γ ⊢ₗ l₁
|
||
→ Γ ⊢ₗ l₂
|
||
→ Dec (l₁ ≈ l₂)
|
||
|
||
-- The expected route: normalisation (every well-typed term reduces to a
|
||
-- normal form, Value), then confluence modulo ~ (ConfluenceModulo) reduces
|
||
-- e₁ ≈ e₂ to comparing the normal forms modulo ~, which the level
|
||
-- normaliser decides (LevelEqualityDecision).
|
||
Normalisation : Set
|
||
Normalisation = ∀ {n} {Γ : Context n} {e t : Term n}
|
||
→ Γ ⊢ e ⦂ t
|
||
→ ∃[ v ] e ↪* v × Value v
|