Uniqueness of elaboration: source lookups are functional, and elabExp is
syntax-directed — a term has at most one source type and one Core term.
theorem
index_lookup_uniqueness
{T T₁ T₂ : SCE.Typ}
{n : Nat}
(h₁ : SCE.SLookup T n T₁)
(h₂ : SCE.SLookup T n T₂)
:
theorem
record_lookup_uniqueness
{T T₁ T₂ : SCE.Typ}
{l : String}
(h₁ : SCE.SRLookup T l T₁)
(h₂ : SCE.SRLookup T l T₂)
:
theorem
inference_uniqueness
{Γ A₁ A₂ : SCE.Typ}
{e : SCE.Exp}
(h₁ : SCE.HasType Γ e A₁)
(h₂ : SCE.HasType Γ e A₂)
:
A source expression has at most one type in a given context.