z3-src 501.0.0

Source distribution of the Z3 SMT solver, for use as a build dependency
Documentation
/*++
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)")
*/