496189feed
See item 4 at https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/lean-discuss/oJXwW5wT2Ds/d1Dgr8B-pE0J See also https://github.com/leanprover/lean/pull/659
20 lines
654 B
C++
20 lines
654 B
C++
/*
|
|
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
|
|
#include <utility>
|
|
#include "util/hash.h"
|
|
#include "kernel/expr_pair.h"
|
|
#include "library/expr_lt.h"
|
|
|
|
namespace lean {
|
|
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); }
|
|
};
|
|
}
|