hobbits-1.1.1: A library for canonically representing terms with binding

PortabilityGHC
Stabilityexperimental
Maintaineremw4@rice.edu
Safe HaskellSafe-Inferred

Data.Type.List.Proof.Append

Description

Proofs regarding a type list as an append of two others.

Synopsis

Documentation

data Append ctx1 ctx2 ctx whereSource

An Append ctx1 ctx2 ctx is a "proof" that ctx = ctx1 :++: ctx2.

Constructors

Append_Base :: Append ctx Nil ctx 
Append_Step :: Append ctx1 ctx2 ctx -> Append ctx1 (ctx2 :> a) (ctx :> a) 

trans :: Append ctx1 ctx2 ex_ctx -> Append ex_ctx ctx3 ctx -> Append ctx1 (ctx2 :++: ctx3) ctxSource

Appends two Append proofs.

appendPf :: Append ctx1 ctx2 ctx -> ctx :=: (ctx1 :++: ctx2)Source

Returns a proof that ctx :=: ctx1 :++: ctx2

length :: Append ctx1 ctx2 ctx3 -> IntSource

Returns the length of an Append proof.