I stumbled across this accidentally. Take a look at spans: http://proofgeneral.inf.ed.ac.uk/components -- Jerry James http://www.ittc.ku.edu/~james/