-
Notifications
You must be signed in to change notification settings - Fork 35
/
codi_down_sum.clif
64 lines (44 loc) · 1.26 KB
/
codi_down_sum.clif
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
/*******************************************************************************
* Copyright (c) University of Toronto and others. All rights reserved.
* The content of this file is licensed under the Creative Commons Attribution-
* ShareAlike 4.0 Unported license. The legal text of this license can be
* found at http://creativecommons.org/licenses/by-sa/4.0/legalcode.
*
* Contributors:
* Torsten Hahmann - initial implementation
*******************************************************************************/
(cl-text http://colore.oor.net/multidim_space_codi/codi_down_sum.clif
(cl-imports http://colore.oor.net/multidim_space_codi/codi_down.clif)
(cl-comment 'CODI with downwards closure and sums')
(cl-comment 'Sum-A1: sum is commutative')
(forall (x y)
(= (sum x y) (sum y x))
)
(cl-comment 'Sum-A2: sum of entities of different dimensions')
(forall (x y)
(if
(< x y)
(= y (sum x y))
)
)
(cl-comment 'Sum-A3: every part of y is a part of x+y if x<=y')
(forall (x y z)
(if
(and
(<= x y)
(Cont z y)
)
(Cont z (sum x y))
)
)
(cl-comment 'Sum-A4: everything contained in the sum has a part contained in x or contained in y')
(forall (x y z)
(if
(and
(Cont z (sum x y))
(not (Cont z x))
)
(Cont (difference z x) y)
)
)
)