2013-09-01 23:59:15 +00:00
|
|
|
/*
|
|
|
|
Copyright (c) 2013 Microsoft Corporation. All rights reserved.
|
|
|
|
Released under Apache 2.0 license as described in the file LICENSE.
|
|
|
|
|
|
|
|
Author: Leonardo de Moura
|
|
|
|
*/
|
|
|
|
#pragma once
|
2013-09-13 10:35:29 +00:00
|
|
|
#include <utility>
|
2013-09-13 03:04:10 +00:00
|
|
|
#include "util/hash.h"
|
2015-06-08 17:41:30 +00:00
|
|
|
#include "kernel/expr_pair.h"
|
2014-06-17 19:14:22 +00:00
|
|
|
#include "library/expr_lt.h"
|
2013-09-01 23:59:15 +00:00
|
|
|
|
|
|
|
namespace lean {
|
2014-06-17 19:14:22 +00:00
|
|
|
inline bool is_lt(expr_pair const & p1, expr_pair const & p2, bool use_hash) {
|
|
|
|
return is_lt(p1.first, p2.first, use_hash) || (p1.first == p2.first && is_lt(p1.second, p2.second, use_hash));
|
|
|
|
}
|
|
|
|
struct expr_pair_quick_cmp {
|
|
|
|
int operator()(expr_pair const & p1, expr_pair const & p2) const { return is_lt(p1, p2, true) ? -1 : (p1 == p2 ? 0 : 1); }
|
|
|
|
};
|
2013-09-01 23:59:15 +00:00
|
|
|
}
|