 }
 
 
-func == <Syntax: Equatable, Term: Equatable> (left: ABT<Syntax, Term>, right: ABT<Syntax, Term>) -> Bool {
-	return ABT.equal(syntaxEqual: ==, termEqual: ==)(left, right)
+func == <Syntax: Equatable, Term: Equatable> (left: Scoping<Syntax, Term>, right: Scoping<Syntax, Term>) -> Bool {
+	return Scoping.equal(syntaxEqual: ==, termEqual: ==)(left, right)
 }
 
 
 indirect enum ABTTerm {
-	case In(Set<Name>, ABT<AST<ABTTerm>, ABTTerm>)
+	case In(Set<Name>, Scoping<AST<ABTTerm>, ABTTerm>)
 
 	static func Variable(name: Name) -> ABTTerm {
 		return .In([ name ], .Variable(name))

//  Copyright © 2015 Rob Rix. All rights reserved.

enum ABT<Syntax, Term> {
	case Variable(Name)
	case Abstraction(Name, Term)
	case Identity(Syntax)


	static func equal(syntaxEqual syntaxEqual: (Syntax, Syntax) -> Bool, termEqual: (Term, Term) -> Bool)(_ left: ABT, _ right: ABT) -> Bool {
		switch (left, right) {
		case let (.Variable(name1), .Variable(name2)):
			return name1 == name2

		return variables
	}

	var out: Scoping<AST<ABTTerm>, ABTTerm> {
		switch self {
		case let .In(_, out):
			return out
