This module defines the capture set syntax of CC.
A set of captured variables.
- empty {s : Sig} : CaptureSet s
- union {s : Sig} : CaptureSet s → CaptureSet s → CaptureSet s
- var {s : Sig} : Var Kind.var s → CaptureSet s
- cvar {s : Sig} : BVar s Kind.cvar → CaptureSet s
Instances For
Provides {} notation for the empty capture set.
Equations
- CC.CaptureSet.instEmptyCollection = { emptyCollection := CC.CaptureSet.empty }
Provides ∪ notation for capture set union.
Equations
- CC.CaptureSet.instUnion = { union := CC.CaptureSet.union }
Applies a renaming to a variable. Free variables remain unchanged.
Equations
- (CC.Var.bound x_2).rename x✝ = CC.Var.bound (x✝.var x_2)
- (CC.Var.free n).rename x✝ = CC.Var.free n
Instances For
Applies a renaming to all bound variables in a capture set.
Equations
- CC.CaptureSet.empty.rename x✝ = CC.CaptureSet.empty
- (cs1.union cs2).rename x✝ = (cs1.rename x✝).union (cs2.rename x✝)
- (CC.CaptureSet.var x_2).rename x✝ = CC.CaptureSet.var (x_2.rename x✝)
- (CC.CaptureSet.cvar x_2).rename x✝ = CC.CaptureSet.cvar (x✝.var x_2)
Instances For
Renaming by the identity renaming leaves a capture set unchanged.
The subset relation on capture sets.
- refl {s : Sig} {C : CaptureSet s} : C.Subset C
- union_left {s : Sig} {C1 C C2 : CaptureSet s} : C1.Subset C → C2.Subset C → (C1.union C2).Subset C
- union_right_left {s : Sig} {C C1 C2 : CaptureSet s} : C.Subset C1 → C.Subset (C1.union C2)
- union_right_right {s : Sig} {C C2 C1 : CaptureSet s} : C.Subset C2 → C.Subset (C1.union C2)
Instances For
Provides ⊆ notation for capture set subset.
Equations
- CC.CaptureSet.instHasSubset = { Subset := CC.CaptureSet.Subset }
A capture set is closed if it contains no heap pointers.
- empty {s : Sig} : CaptureSet.empty.IsClosed
- union {s : Sig} {cs1 cs2 : CaptureSet s} : cs1.IsClosed → cs2.IsClosed → (cs1.union cs2).IsClosed
- cvar {s : Sig} {x : BVar s Kind.cvar} : (CaptureSet.cvar x).IsClosed
- var_bound {s : Sig} {x : BVar s Kind.var} : (var (Var.bound x)).IsClosed