Documentation

Semantic.CC.TypeSystem.BasicProps

Basic properties of the type system.

This module contains fundamental properties about:

theorem CC.Ctx.lookup_var_det {s : Sig} {Γ : Ctx s} {x : BVar s Kind.var} {T1 T2 : Ty TySort.capt s} :
Γ.LookupVar x T1Γ.LookupVar x T2T1 = T2
theorem CC.Ctx.lookup_tvar_det {s : Sig} {Γ : Ctx s} {X : BVar s Kind.tvar} {T1 T2 : Ty TySort.shape s} :
Γ.LookupTVar X T1Γ.LookupTVar X T2T1 = T2
theorem CC.Ctx.lookup_cvar_det {s : Sig} {Γ : Ctx s} {c : BVar s Kind.cvar} {cb1 cb2 : CaptureBound s} :
Γ.LookupCVar c cb1Γ.LookupCVar c cb2cb1 = cb2
theorem CC.Subcapt.refl {s : Sig} {Γ : Ctx s} {C : CaptureSet s} :
Subcapt Γ C C
theorem CC.Subbound.refl {s : Sig} {Γ : Ctx s} {cb : CaptureBound s} :
Subbound Γ cb cb
theorem CC.CaptureSet.rename_closed {s1 s2 : Sig} {cs : CaptureSet s1} {f : Rename s1 s2} :
cs.IsClosed(cs.rename f).IsClosed

Renaming preserves closedness of capture sets.

theorem CC.CaptureSet.rename_closed_inv {s1 s2 : Sig} {cs : CaptureSet s1} {f : Rename s1 s2} :
(cs.rename f).IsClosedcs.IsClosed

If a renamed capture set is closed, the original is also closed.

theorem CC.CaptureBound.rename_closed {s1 s2 : Sig} {cb : CaptureBound s1} {f : Rename s1 s2} :
cb.IsClosed(cb.rename f).IsClosed

Renaming preserves closedness of capture bounds.

theorem CC.CaptureBound.rename_closed_inv {s1 s2 : Sig} {cb : CaptureBound s1} {f : Rename s1 s2} :
(cb.rename f).IsClosedcb.IsClosed

If a renamed capture bound is closed, the original is also closed.

theorem CC.Ty.rename_closed {sort : TySort} {s1 s2 : Sig} {T : Ty sort s1} {f : Rename s1 s2} :
theorem CC.Ty.rename_closed_inv {sort : TySort} {s1 s2 : Sig} {T : Ty sort s1} {f : Rename s1 s2} :

If a renamed type is closed, the original is also closed.

theorem CC.Ctx.lookup_var_gives_closed {s : Sig} {Γ : Ctx s} {x : BVar s Kind.var} {T : Ty TySort.capt s} ( : Γ.IsClosed) (hlookup : Γ.LookupVar x T) :
theorem CC.HasType.use_set_is_closed {a✝ : Sig} {C : CaptureSet a✝} {Γ : Ctx a✝} {e : Exp a✝} {T : Ty TySort.exi a✝} (ht : C # Γ e : T) :
theorem CC.HasType.exp_is_closed {a✝ : Sig} {C : CaptureSet a✝} {Γ : Ctx a✝} {e : Exp a✝} {T : Ty TySort.exi a✝} (ht : C # Γ e : T) :
theorem CC.HasType.type_is_closed {a✝ : Sig} {C : CaptureSet a✝} {Γ : Ctx a✝} {e : Exp a✝} {E : Ty TySort.exi a✝} (ht : C # Γ e : E) :
theorem CC.Ctx.lookup_var_exists {s : Sig} {Γ : Ctx s} {x : BVar s Kind.var} :
∃ (T : Ty TySort.capt s), Γ.LookupVar x T