added trace pairs
This commit is contained in:
parent
33b8a30610
commit
7d23372846
1 changed files with 25 additions and 6 deletions
|
@ -24,29 +24,36 @@ a ∈ opname
|
|||
|
||||
## sappho subtyping rules
|
||||
|
||||
```
|
||||
```cmath
|
||||
// trace pairs: none
|
||||
---- [identity]
|
||||
s, γ ⊢ s, δ
|
||||
|
||||
// trace pairs: none
|
||||
---- [true-right]
|
||||
γ ⊢ true, δ
|
||||
|
||||
// trace pairs: none
|
||||
---- [false-left]
|
||||
false, γ ⊢ δ
|
||||
|
||||
// trace pairs: none
|
||||
s, t, γ ⊢ δ
|
||||
---- [conj-left]
|
||||
s & t, γ ⊢ δ
|
||||
|
||||
// trace pairs: none
|
||||
γ ⊢ s, t, δ
|
||||
---- [disj-right]
|
||||
γ ⊢ s | t, δ
|
||||
|
||||
// trace pairs: none
|
||||
s, γ ⊢ δ
|
||||
t, γ ⊢ δ
|
||||
---- [disj-left]
|
||||
s | t, γ ⊢ δ
|
||||
|
||||
// trace pairs: none
|
||||
γ ⊢ s, δ
|
||||
γ ⊢ t, δ
|
||||
---- [conj-right]
|
||||
|
@ -54,24 +61,24 @@ s | t, γ ⊢ δ
|
|||
|
||||
// XXX
|
||||
// remove s => t? always make progress
|
||||
// trace pairs: none
|
||||
s => t, s, t, γ ⊢ δ
|
||||
---- [impl-left]
|
||||
s => t, s, γ ⊢ δ
|
||||
|
||||
// discussion about implication below
|
||||
// check how "normal sequent calculus handles this"
|
||||
// trace pairs: none
|
||||
s, γ ⊢ t, δ
|
||||
---- [impl-right]
|
||||
γ ⊢ s => t, δ
|
||||
|
||||
|
||||
|
||||
// box works as a kind of "forall" for concrete types
|
||||
// trace pairs: none
|
||||
box t, t, γ ⊢ δ
|
||||
---- [box-left]
|
||||
box t, γ ⊢ δ
|
||||
|
||||
// (.)-- filters the contexts.
|
||||
// trace pairs: premise[0] -- conclusion
|
||||
γ-- ⊢ t, δ--
|
||||
---- [box-right]
|
||||
γ ⊢ box t, δ
|
||||
|
@ -82,6 +89,7 @@ box t, γ ⊢ δ
|
|||
// to exclude typedefs like
|
||||
// type A = A
|
||||
// Or that our cycle detection excludes paths between "identical" states.
|
||||
// trace pairs: none
|
||||
γ ⊢ expand(a[t..]), δ
|
||||
----
|
||||
γ ⊢ a[t..], δ
|
||||
|
@ -92,6 +100,7 @@ a[t..], γ ⊢ δ
|
|||
|
||||
|
||||
// member types are filtered according to member name
|
||||
// trace pairs: premise[0] -- conclusion
|
||||
γ >> m ⊢ δ >> m
|
||||
---- [member]
|
||||
γ ⊢ δ
|
||||
|
@ -99,11 +108,14 @@ a[t..], γ ⊢ δ
|
|||
|
||||
// foralls are unwrapped and variable substituted with fresh name
|
||||
// i.e. we treat the bound variable nominally
|
||||
// trace pairs: premise[1] -- conclusion
|
||||
n fresh
|
||||
γ [n] ⊢ δ [n]
|
||||
---- [forall]
|
||||
γ ⊢ δ
|
||||
|
||||
// 1 + n! premises
|
||||
// trace pairs: i ∈ [1..(n! + 1)], premise[i] -- conclusion
|
||||
c, γ* ⊢ a_1, ..., a_n
|
||||
∀ I ⊆ {1, ..., n}.
|
||||
c, γ* ⊢ { a_i | i ∈ I }, δ*
|
||||
|
@ -113,7 +125,6 @@ c, γ* ⊢ a_1, ..., a_n
|
|||
a_1 -> b_1, ..., a_n -> b_n, γ ⊢ c -> d, δ
|
||||
```
|
||||
|
||||
|
||||
### context operators
|
||||
|
||||
* box filtering
|
||||
|
@ -136,6 +147,14 @@ a_1 -> b_1, ..., a_n -> b_n, γ ⊢ c -> d, δ
|
|||
γ [n] otherwise
|
||||
```
|
||||
|
||||
### trace pairs
|
||||
Trace pairs are related to cyclic proofs. They identify the pairs of
|
||||
`premise -- conclusion` that are *productive*, i.e. leads to some progress
|
||||
making a cycle in the proof tree admissable as a cyclic proof of the nodes in
|
||||
the cycle.
|
||||
|
||||
The trace pairs are described in the comments for each subtyping rule.
|
||||
|
||||
### Semantic function subtyping
|
||||
|
||||
*Here we try to give an intuitive explainer of how to reason about function
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue