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
|
## sappho subtyping rules
|
||||||
|
|
||||||
```
|
```cmath
|
||||||
|
// trace pairs: none
|
||||||
---- [identity]
|
---- [identity]
|
||||||
s, γ ⊢ s, δ
|
s, γ ⊢ s, δ
|
||||||
|
|
||||||
|
// trace pairs: none
|
||||||
---- [true-right]
|
---- [true-right]
|
||||||
γ ⊢ true, δ
|
γ ⊢ true, δ
|
||||||
|
|
||||||
|
// trace pairs: none
|
||||||
---- [false-left]
|
---- [false-left]
|
||||||
false, γ ⊢ δ
|
false, γ ⊢ δ
|
||||||
|
|
||||||
|
// trace pairs: none
|
||||||
s, t, γ ⊢ δ
|
s, t, γ ⊢ δ
|
||||||
---- [conj-left]
|
---- [conj-left]
|
||||||
s & t, γ ⊢ δ
|
s & t, γ ⊢ δ
|
||||||
|
|
||||||
|
// trace pairs: none
|
||||||
γ ⊢ s, t, δ
|
γ ⊢ s, t, δ
|
||||||
---- [disj-right]
|
---- [disj-right]
|
||||||
γ ⊢ s | t, δ
|
γ ⊢ s | t, δ
|
||||||
|
|
||||||
|
// trace pairs: none
|
||||||
s, γ ⊢ δ
|
s, γ ⊢ δ
|
||||||
t, γ ⊢ δ
|
t, γ ⊢ δ
|
||||||
---- [disj-left]
|
---- [disj-left]
|
||||||
s | t, γ ⊢ δ
|
s | t, γ ⊢ δ
|
||||||
|
|
||||||
|
// trace pairs: none
|
||||||
γ ⊢ s, δ
|
γ ⊢ s, δ
|
||||||
γ ⊢ t, δ
|
γ ⊢ t, δ
|
||||||
---- [conj-right]
|
---- [conj-right]
|
||||||
|
@ -54,24 +61,24 @@ s | t, γ ⊢ δ
|
||||||
|
|
||||||
// XXX
|
// XXX
|
||||||
// remove s => t? always make progress
|
// remove s => t? always make progress
|
||||||
|
// trace pairs: none
|
||||||
s => t, s, t, γ ⊢ δ
|
s => t, s, t, γ ⊢ δ
|
||||||
---- [impl-left]
|
---- [impl-left]
|
||||||
s => t, s, γ ⊢ δ
|
s => t, s, γ ⊢ δ
|
||||||
|
|
||||||
// discussion about implication below
|
// trace pairs: none
|
||||||
// check how "normal sequent calculus handles this"
|
|
||||||
s, γ ⊢ t, δ
|
s, γ ⊢ t, δ
|
||||||
---- [impl-right]
|
---- [impl-right]
|
||||||
γ ⊢ s => t, δ
|
γ ⊢ s => t, δ
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// box works as a kind of "forall" for concrete types
|
// box works as a kind of "forall" for concrete types
|
||||||
|
// trace pairs: none
|
||||||
box t, t, γ ⊢ δ
|
box t, t, γ ⊢ δ
|
||||||
---- [box-left]
|
---- [box-left]
|
||||||
box t, γ ⊢ δ
|
box t, γ ⊢ δ
|
||||||
|
|
||||||
// (.)-- filters the contexts.
|
// (.)-- filters the contexts.
|
||||||
|
// trace pairs: premise[0] -- conclusion
|
||||||
γ-- ⊢ t, δ--
|
γ-- ⊢ t, δ--
|
||||||
---- [box-right]
|
---- [box-right]
|
||||||
γ ⊢ box t, δ
|
γ ⊢ box t, δ
|
||||||
|
@ -82,6 +89,7 @@ box t, γ ⊢ δ
|
||||||
// to exclude typedefs like
|
// to exclude typedefs like
|
||||||
// type A = A
|
// type A = A
|
||||||
// Or that our cycle detection excludes paths between "identical" states.
|
// Or that our cycle detection excludes paths between "identical" states.
|
||||||
|
// trace pairs: none
|
||||||
γ ⊢ expand(a[t..]), δ
|
γ ⊢ expand(a[t..]), δ
|
||||||
----
|
----
|
||||||
γ ⊢ a[t..], δ
|
γ ⊢ a[t..], δ
|
||||||
|
@ -92,6 +100,7 @@ a[t..], γ ⊢ δ
|
||||||
|
|
||||||
|
|
||||||
// member types are filtered according to member name
|
// member types are filtered according to member name
|
||||||
|
// trace pairs: premise[0] -- conclusion
|
||||||
γ >> m ⊢ δ >> m
|
γ >> m ⊢ δ >> m
|
||||||
---- [member]
|
---- [member]
|
||||||
γ ⊢ δ
|
γ ⊢ δ
|
||||||
|
@ -99,11 +108,14 @@ a[t..], γ ⊢ δ
|
||||||
|
|
||||||
// foralls are unwrapped and variable substituted with fresh name
|
// foralls are unwrapped and variable substituted with fresh name
|
||||||
// i.e. we treat the bound variable nominally
|
// i.e. we treat the bound variable nominally
|
||||||
|
// trace pairs: premise[1] -- conclusion
|
||||||
n fresh
|
n fresh
|
||||||
γ [n] ⊢ δ [n]
|
γ [n] ⊢ δ [n]
|
||||||
---- [forall]
|
---- [forall]
|
||||||
γ ⊢ δ
|
γ ⊢ δ
|
||||||
|
|
||||||
|
// 1 + n! premises
|
||||||
|
// trace pairs: i ∈ [1..(n! + 1)], premise[i] -- conclusion
|
||||||
c, γ* ⊢ a_1, ..., a_n
|
c, γ* ⊢ a_1, ..., a_n
|
||||||
∀ I ⊆ {1, ..., n}.
|
∀ I ⊆ {1, ..., n}.
|
||||||
c, γ* ⊢ { a_i | i ∈ I }, δ*
|
c, γ* ⊢ { a_i | i ∈ I }, δ*
|
||||||
|
@ -113,7 +125,6 @@ c, γ* ⊢ a_1, ..., a_n
|
||||||
a_1 -> b_1, ..., a_n -> b_n, γ ⊢ c -> d, δ
|
a_1 -> b_1, ..., a_n -> b_n, γ ⊢ c -> d, δ
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### context operators
|
### context operators
|
||||||
|
|
||||||
* box filtering
|
* box filtering
|
||||||
|
@ -136,6 +147,14 @@ a_1 -> b_1, ..., a_n -> b_n, γ ⊢ c -> d, δ
|
||||||
γ [n] otherwise
|
γ [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
|
### Semantic function subtyping
|
||||||
|
|
||||||
*Here we try to give an intuitive explainer of how to reason about function
|
*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