Open amelieled opened 2 years ago
The first argument is used to denote the output sort of the pattern (which is also a pattern itself). In particular, for any kore construct, one should be able to prove some kind of typing lemma like this (e.g. https://github.com/kframework/matching-logic-proof-checker/blob/main/theory/kore-sorting.mm)
ph1 in [ph0] ph2 in [ph0]
-----------------------------------
( \kore-and ph0 ph1 ph2 ) in [ph0]
where [ph0]
denotes the domain of sort ph0
.
In the case of \kore-not
, we couldn't use the native \not
, because semantically it takes the complement with respect to the entire domain, but instead we want to take the complement with respect to only [ph0]
. Thus we are taking an extra intersection with [ph0]
(which is equal to \kore-top ph0
)
In the case of \kore-ceil
and \kore-floor
, we actually need two sorts ph0
and ph1
, where ph0
denotes the output sort as before, and ph1
denotes the input sort. These sorts are used to make sure that the result stays in [ph0]
.
In the file
theory/kore.mm
, someone can read:Why do you use
ph0
to define\kore-not
, but not in the case of\kore-and
orkore-or
? Is it a tricky detail?Moreover,
\ceil
andfloor
(in ML so) have only one argument, but someone can read (in the same file as previously):Why in this case have 2 arguments been added and not one as for the other existing symbols in the Matching Logic? Is it a tricky detail?
More generally, I don't understand what is the usefulness of the additional argument?