Skip to content

Commit 24b2d5a

Browse files
authored
Split RARE rewrites for expert extensions to own files (cvc5#11619)
This is work towards decoupling expert/safe poritions of the proof signature.
1 parent 9880318 commit 24b2d5a

File tree

5 files changed

+37
-32
lines changed

5 files changed

+37
-32
lines changed

src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,6 +1441,10 @@ set(REWRITES_FILES
14411441
${PROJECT_SOURCE_DIR}/src/theory/strings/rewrites
14421442
${PROJECT_SOURCE_DIR}/src/theory/strings/rewrites-regexp-membership
14431443
${PROJECT_SOURCE_DIR}/src/theory/uf/rewrites
1444+
# these files should only be enabled in expert builds and should
1445+
# be partitioned into their own proof signature
1446+
${PROJECT_SOURCE_DIR}/src/theory/arith/rewrites-transcendentals
1447+
${PROJECT_SOURCE_DIR}/src/theory/sets/rewrites-card
14441448
)
14451449

14461450
#-----------------------------------------------------------------------------#

src/theory/arith/rewrites

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,18 +77,6 @@
7777
(>= (to_real t) c)
7878
(>= t cc))
7979

80-
; trancendentals
81-
82-
(define-rule arith-sine-zero () (sin 0/1) 0/1)
83-
(define-rule arith-sine-pi2 () (sin (* 1/2 real.pi)) 1/1)
84-
(define-rule arith-cosine-elim ((x Real)) (cos x) (sin (- (* 1/2 real.pi) x)))
85-
(define-rule arith-tangent-elim ((x Real)) (tan x) (/ (sin x) (cos x)))
86-
(define-rule arith-secent-elim ((x Real)) (sec x) (/ 1/1 (sin x)))
87-
(define-rule arith-cosecent-elim ((x Real)) (csc x) (/ 1/1 (cos x)))
88-
(define-rule arith-cotangent-elim ((x Real)) (cot x) (/ (cos x) (sin x)))
89-
90-
(define-rule arith-pi-not-int () (is_int real.pi) false)
91-
9280
; absolute value comparisons
9381

9482
(define-rule arith-abs-eq ((x ?) (y ?))
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
; trancendentals
2+
3+
(define-rule arith-sine-zero () (sin 0/1) 0/1)
4+
(define-rule arith-sine-pi2 () (sin (* 1/2 real.pi)) 1/1)
5+
(define-rule arith-cosine-elim ((x Real)) (cos x) (sin (- (* 1/2 real.pi) x)))
6+
(define-rule arith-tangent-elim ((x Real)) (tan x) (/ (sin x) (cos x)))
7+
(define-rule arith-secent-elim ((x Real)) (sec x) (/ 1/1 (sin x)))
8+
(define-rule arith-cosecent-elim ((x Real)) (csc x) (/ 1/1 (cos x)))
9+
(define-rule arith-cotangent-elim ((x Real)) (cot x) (/ (cos x) (sin x)))
10+
11+
(define-rule arith-pi-not-int () (is_int real.pi) false)
12+

src/theory/sets/rewrites

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; Equality
1+
; Theory of sets
22

33
(define-cond-rule sets-eq-singleton-emp ((x ?Set) (y ?))
44
(= x (@set.empty_of_type (@type_of x)))
@@ -64,29 +64,10 @@
6464
(set.choose (set.singleton x))
6565
x)
6666

67-
(define-rule sets-card-singleton ((x ?))
68-
(set.card (set.singleton x))
69-
1)
70-
71-
(define-rule sets-card-union ((s ?Set) (t ?Set))
72-
(set.card (set.union s t))
73-
(- (+ (set.card s) (set.card t)) (set.card (set.inter s t))))
74-
75-
(define-rule sets-card-minus ((s ?Set) (t ?Set))
76-
(set.card (set.minus s t))
77-
(- (set.card s) (set.card (set.inter s t))))
78-
79-
(define-cond-rule sets-card-emp ((x ?Set))
80-
(= x (@set.empty_of_type (@type_of x)))
81-
(set.card x)
82-
0)
83-
8467
(define-rule sets-minus-self ((x ?Set))
8568
(set.minus x x)
8669
(@set.empty_of_type (@type_of x)))
8770

88-
; (set.complement S) ---> (set.minus (as set.universe (Set Int)) S)
89-
9071
(define-rule sets-is-empty-elim ((x ?Set))
9172
(set.is_empty x)
9273
(= x (@set.empty_of_type (@type_of x))))

src/theory/sets/rewrites-card

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
; Theory of sets with cardinality
2+
3+
(define-rule sets-card-singleton ((x ?))
4+
(set.card (set.singleton x))
5+
1)
6+
7+
(define-rule sets-card-union ((s ?Set) (t ?Set))
8+
(set.card (set.union s t))
9+
(- (+ (set.card s) (set.card t)) (set.card (set.inter s t))))
10+
11+
(define-rule sets-card-minus ((s ?Set) (t ?Set))
12+
(set.card (set.minus s t))
13+
(- (set.card s) (set.card (set.inter s t))))
14+
15+
(define-cond-rule sets-card-emp ((x ?Set))
16+
(= x (@set.empty_of_type (@type_of x)))
17+
(set.card x)
18+
0)
19+
20+
; (set.complement S) ---> (set.minus (as set.universe (Set Int)) S)

0 commit comments

Comments
 (0)