-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathactions.py
58 lines (46 loc) · 1.55 KB
/
actions.py
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
class Action:
def __init__(self):
pass
def __repr__(self):
return self.__class__.__name__
def to_coq(self):
return self.coq_str
def __hash__(self):
return hash(self.coq_str)
def __eq__(self, other):
return hash(self) == hash(other)
class ApplyAntisymmetric(Action):
def __init__(self):
self.coq_str = "apply antisymmetric."
class ApplyMeetDefinition(Action):
def __init__(self):
self.coq_str = "apply meet_is_inf."
class ApplyJoinDefinition(Action):
def __init__(self):
self.coq_str = "apply join_is_sup."
class ApplyMeetIsLowerBound(Action):
def __init__(self):
self.coq_str = "apply meet_is_lb."
class ApplyJoinIsUpperBound(Action):
def __init__(self):
self.coq_str = "apply join_is_ub."
class Reflexivity(Action):
def __init__(self):
self.coq_str = "reflexivity."
class SplitTheAndStatement(Action):
def __init__(self):
self.coq_str = "split."
class ApplyTransitivity(Action):
def __init__(self, y):
self.coq_str = "apply transitivity with (y := {}).".format(y)
class Undo(Action):
def __init__(self):
self.coq_str = "Undo."
all_actions = [ApplyAntisymmetric(),
ApplyMeetDefinition(), ApplyJoinDefinition(),
ApplyMeetIsLowerBound(), ApplyJoinIsUpperBound(),
Reflexivity(), SplitTheAndStatement()
, ApplyTransitivity(y="a ⊓ b"), ApplyTransitivity(y="b ⊓ c")
#, ApplyTransitivity(y="a ⊔ b"), ApplyTransitivity(y="b ⊔ c")
#, Undo() # deprecating the Undo action, since it messes up the proof search
]