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
65
66
/*++
Copyright (c) 2012 Microsoft Corporation
Module Name:
der_tactic.h
Abstract:
DER tactic
Author:
Leonardo de Moura (leonardo) 2012-10-20
Tactic Documentation:
## Tactic der
### Short Description:
The tactic performs _destructive equality resolution_.
### Long Description
Destructive equality resolution replaces bound variables that are
_solved_ by their solutions in formulas. In short, the destructive
equality resolution rule takes the form:
```
(forall (X Y) (or X /= s C[X])) --> (forall (Y) C[Y])
```
### Example
```z3
(declare-fun f (Int) Int)
(declare-fun p (Int Int) Bool)
(assert (forall ((x Int) (y Int)) (or (not (= x (f y))) (p x y))))
(apply der)
```
### Notes
* supports unsat cores, proof terms
--*/
#pragma once
#include "tactic/dependent_expr_state_tactic.h"
#include "ast/simplifiers/der_simplifier.h"
inline tactic * mk_der_tactic(ast_manager & m, params_ref const & p = params_ref()) {
return alloc(dependent_expr_state_tactic, m, p,
[](auto& m, auto& p, auto& s) -> dependent_expr_simplifier* {
return alloc(der_simplifier, m, p, s);
});
}
/*
ADD_TACTIC("der", "destructive equality resolution.", "mk_der_tactic(m, p)")
ADD_SIMPLIFIER("der", "destructive equality resolution.", "alloc(der_simplifier, m, p, s)")
*/