let mk_outr = let sym = Coproduct(OutR) in function | App(Coproduct(InR), [x]) -> x | x -> mk_app sym [x]