fixing parsing

This commit is contained in:
Ellen Arvidsson 2025-06-28 00:20:00 +02:00
parent 0aa49cfe9b
commit 333534a8d1
8 changed files with 95 additions and 47 deletions

View file

@ -8,7 +8,7 @@ s, t ::= s | t (disjunction, a.k.a. union)
| s => t (implication)
| s -> t (arrow, a.k.a. function)
| forall x . t (forall, polymorphic)
| box t (box, c.f. modular logic)
| box t (box, c.f. modal logic)
| a [t..] (type operator application)
| x (variable)
| n (nominal)
@ -37,23 +37,23 @@ s, γ ⊢ s, δ
---- [false-left]
false, γ ⊢ δ
// trace pairs: none
// trace pairs: none?
s, t, γ ⊢ δ
---- [conj-left]
s & t, γ ⊢ δ
// trace pairs: none
// trace pairs: none?
γ ⊢ s, t, δ
---- [disj-right]
γ ⊢ s | t, δ
// trace pairs: none
// trace pairs: none?
s, γ ⊢ δ
t, γ ⊢ δ
---- [disj-left]
s | t, γ ⊢ δ
// trace pairs: none
// trace pairs: none?
γ ⊢ s, δ
γ ⊢ t, δ
---- [conj-right]
@ -61,12 +61,12 @@ s | t, γ ⊢ δ
// XXX
// remove s => t? always make progress
// trace pairs: none
// trace pairs: none?
s => t, s, t, γ ⊢ δ
---- [impl-left]
s => t, s, γ ⊢ δ
// trace pairs: none
// trace pairs: none?
s, γ ⊢ t, δ
---- [impl-right]
γ ⊢ s => t, δ
@ -89,7 +89,7 @@ box t, γ ⊢ δ
// to exclude typedefs like
// type A = A
// Or that our cycle detection excludes paths between "identical" states.
// trace pairs: none
// trace pairs: none?
γ ⊢ expand(a[t..]), δ
----
γ ⊢ a[t..], δ
@ -114,6 +114,7 @@ n fresh
---- [forall]
γ ⊢ δ
// TODO can we choose a simpler rule instead?
// 1 + n! premises
// trace pairs: i ∈ [1..(n! + 1)], premise[i] -- conclusion
c, γ* ⊢ a_1, ..., a_n, δ*
@ -122,9 +123,10 @@ c, γ* ⊢ a_1, ..., a_n, δ*
OR
{ b_i | i ∈ ¬I }, γ* ⊢ d, δ*
---- [loads-of-fun]
a_1 -> b_1, ..., a_n -> b_n, γ c -> d, δ
a_1 -> b_1, ..., a_n -> b_n, γ c -> d, δ
```
### context operators
* box filtering

View file

@ -1,11 +1,9 @@
# draft of presentation
## sappho short
# sappho short
- sappho types intro
- a quick look at msph and spho
### The types
## The types
We take a look at the grammar for sappho types
@ -15,7 +13,7 @@ s, t ::= s | t (disjunction, a.k.a. union)
| s => t (implication)
| s -> t (arrow, a.k.a. function)
| forall x . t (forall, polymorphic)
| box t (box, c.f. modular logic)
| box t (box, c.f. modal logic)
| a [t..] (type operator application)
| x (variable)
| n (nominal)
@ -30,7 +28,7 @@ n ∈ nominal
a ∈ opname
```
The type `t <: s` would be expressive sugar for `box (t => s)`
The type `t <: s` would be syntactic sugar for `box (t => s)`
### msph and spho
@ -60,7 +58,7 @@ Thoughts
* maybe eventually add a basic term language and interpreter
* can we use external software/libraries for proof search?
## interpretation of types
# interpretation of types
- example programs in `msph`
- unified syntax for types and bounded polymorphism
- example: self typing
@ -75,7 +73,8 @@ Check formalities.md.
- simple rules
- type constructor rules
- recursion and cyclic proofs
* next steps?
# next steps?
- formals:
- formulate theorems
- if we use semantic subtyping, isn't it enough to
@ -85,3 +84,4 @@ Check formalities.md.
- simple rules, should be fairly simple
- type constructors, straightforward hopefully
- recursion and cyclic proofs... `¯\_(ツ)_/¯`
- describe use of language with type system (interpretation of types)