summaryrefslogtreecommitdiff
path: root/src/theory/skolem_lemma.h
blob: d67f71cf6fb30c2d8e1abfa33fc5bc877d65dace (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
/*********************                                                        */
/*! \file skolem_lemma.h
 ** \verbatim
 ** Top contributors (to current version):
 **   Andrew Reynolds
 ** This file is part of the CVC4 project.
 ** Copyright (c) 2009-2021 by the authors listed in the file AUTHORS
 ** in the top-level source directory and their institutional affiliations.
 ** All rights reserved.  See the file COPYING in the top-level source
 ** directory for licensing information.\endverbatim
 **
 ** \brief The skolem lemma utility
 **/

#include "cvc4_private.h"

#ifndef CVC4__THEORY__SKOLEM_LEMMA_H
#define CVC4__THEORY__SKOLEM_LEMMA_H

#include "expr/node.h"
#include "theory/trust_node.h"

namespace cvc5 {
namespace theory {

/**
 * A skolem lemma is a pair containing a trust node repreresenting a lemma
 * and the skolem it is for. A common example would be the trust node proving
 * the lemma:
 *    (ite C (= k A) (= k B))
 * and the skolem k.
 *
 * Skolem lemmas can be used as a way of tracking the relevance of a lemma.
 * They can be used for things like term formula removal and preprocessing.
 */
class SkolemLemma
{
 public:
  /**
   * Make skolem from trust node lem of kind LEMMA and skolem k.
   */
  SkolemLemma(TrustNode lem, Node k);
  /**
   * Make skolem lemma from witness form of skolem k. If non-null, pg is
   * proof generator that can generator a proof for getSkolemLemmaFor(k).
   */
  SkolemLemma(Node k, ProofGenerator* pg);

  /** The lemma, a trust node of kind LEMMA */
  TrustNode d_lemma;
  /** The skolem associated with that lemma */
  Node d_skolem;

  /**
   * Get the lemma for skolem k based on its witness form. If k has witness
   * form (witness ((x T)) (P x)), this is the formula (P k).
   */
  static Node getSkolemLemmaFor(Node k);
};

}  // namespace theory
}  // namespace cvc5

#endif /* CVC4__THEORY__SKOLEM_LEMMA_H */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback