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
/*++
Copyright (c) 2017 Microsoft Corporation
Module Name:
injectivity_tactic.h
Abstract:
Injectivity tactics
Author:
Nicolas Braud-Santoni (t-nibrau) 2017-08-10
Tactic Documentation:
## Tactic injectivity
### Short Description:
- Discover axioms of the form `forall x. (= (g (f x)) x`
Mark `f` as injective
- Rewrite (sub)terms of the form `(= (f x) (f y))` to `(= x y)` whenever `f` is injective.
### Example
```z3
(declare-fun f (Int) Int)
(declare-fun g (Int) Int)
(declare-const x Int)
(declare-const y Int)
(assert (forall ((x Int)) (= (g (f x)) x)))
(assert (not (= (f x) (f (f y)))))
(apply injectivity)
```
### Notes
* does not support cores nor proofs
--*/
#pragma once
#include "util/params.h"
class ast_manager;
class tactic;
tactic * mk_injectivity_tactic(ast_manager & m, params_ref const & p = params_ref());
/*
ADD_TACTIC("injectivity", "Identifies and applies injectivity axioms.", "mk_injectivity_tactic(m, p)")
*/