Context towers #
A depth-indexed stack of context shifts over an origin, the one carrier for the
context-manipulation mechanisms of [abusch-1997], [anand-nevins-2004], [cumming-2026] and
[schlenker-2003]: Kaplanian indexicals read the origin, shifted indexicals the innermost
context, De Bruijn temporal indexing a relative depth. A shift is an endomorphism of the
context type, an element of the monoid Function.End C acting on contexts, and a tower is an
origin, Kaplan's speech-act context, with its shifts from outermost to innermost
(ContextTower). The context at depth k is the product of the first k shifts acting on
the origin (ContextTower.contextAt), saturating at the innermost context
(ContextTower.innermost), and pushing a shift multiplies it in (ContextTower.push,
push_innermost). An access pattern reads a coordinate of the context at a depth given
relative to the tower (AccessPattern, DepthSpec); AccessPattern.origin reads the
speech-act context and AccessPattern.innermost the innermost one, and a pattern is stable
under a shift when pushing it changes nothing (AccessPattern.Stable), which every origin
pattern is (AccessPattern.stable_origin).
References #
- [kaplan-1989]
- [schlenker-2003]
- [anand-nevins-2004]
- [abusch-1997]
- [cumming-2026]
A context tower: an origin with a stack of shifts, from outermost to innermost.
- origin : C
The root context, the speech-act context.
- shifts : List (Function.End C)
The shifts, the first being the outermost embedding.
Instances For
The embedding depth: the number of shifts.
Instances For
The context at depth k: the first k shifts acting on the origin, saturating at the
innermost context.
Instances For
The innermost context: every shift acting on the origin.
Instances For
The trivial tower over a context.
Equations
- Reference.ContextTower.root c = { origin := c, shifts := [] }
Instances For
Embed one level deeper.
Instances For
Past the tower depth, contextAt saturates at the innermost context.
Pushing a shift lets it act on the innermost context.
Below the tower depth, a push leaves the context at each depth unchanged.
Beyond the tower depth, a push saturates at the shifted innermost context.
Equations
- Reference.instDecidableEqDepthSpec.decEq Reference.DepthSpec.origin Reference.DepthSpec.origin = isTrue ⋯
- Reference.instDecidableEqDepthSpec.decEq Reference.DepthSpec.origin Reference.DepthSpec.local = isFalse Reference.instDecidableEqDepthSpec.decEq._proof_1
- Reference.instDecidableEqDepthSpec.decEq Reference.DepthSpec.origin (Reference.DepthSpec.relative k) = isFalse ⋯
- Reference.instDecidableEqDepthSpec.decEq Reference.DepthSpec.local Reference.DepthSpec.origin = isFalse Reference.instDecidableEqDepthSpec.decEq._proof_3
- Reference.instDecidableEqDepthSpec.decEq Reference.DepthSpec.local Reference.DepthSpec.local = isTrue ⋯
- Reference.instDecidableEqDepthSpec.decEq Reference.DepthSpec.local (Reference.DepthSpec.relative k) = isFalse ⋯
- Reference.instDecidableEqDepthSpec.decEq (Reference.DepthSpec.relative k) Reference.DepthSpec.origin = isFalse ⋯
- Reference.instDecidableEqDepthSpec.decEq (Reference.DepthSpec.relative k) Reference.DepthSpec.local = isFalse ⋯
- Reference.instDecidableEqDepthSpec.decEq (Reference.DepthSpec.relative a) (Reference.DepthSpec.relative b) = if h : a = b then h ▸ isTrue ⋯ else isFalse ⋯
Instances For
Equations
- Reference.instReprDepthSpec = { reprPrec := Reference.instReprDepthSpec.repr }
Equations
- One or more equations did not get rendered due to their size.
- Reference.instReprDepthSpec.repr Reference.DepthSpec.origin prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Reference.DepthSpec.origin")).group prec✝
- Reference.instReprDepthSpec.repr Reference.DepthSpec.local prec✝ = Repr.addAppParen (Std.Format.nest (if prec✝ ≥ 1024 then 1 else 2) (Std.Format.text "Reference.DepthSpec.local")).group prec✝
Instances For
Equations
- Reference.instInhabitedDepthSpec = { default := Reference.instInhabitedDepthSpec.default }
The depth read at a tower of the given depth.
Equations
- Reference.DepthSpec.origin.resolve towerDepth = 0
- Reference.DepthSpec.local.resolve towerDepth = towerDepth
- (Reference.DepthSpec.relative a).resolve towerDepth = a
Instances For
Resolve an access pattern against a tower.
Instances For
Equations
- Reference.AccessPattern.instFunctor = { map := fun {α β : Type ?u.1} (f : α → β) (ap : Reference.AccessPattern C α) => { depth := ap.depth, project := f ∘ ap.project } }
Read the coordinate f of the speech-act context: a Kaplanian pure indexical.
Equations
- Reference.AccessPattern.origin f = { depth := Reference.DepthSpec.origin, project := f }
Instances For
Read the coordinate f of the innermost context: a shifted indexical.
Equations
- Reference.AccessPattern.innermost f = { depth := Reference.DepthSpec.local, project := f }
Instances For
An access pattern is stable under a shift when pushing the shift onto any tower leaves its
resolution unchanged. Kaplan-compliance is stability under every shift and monsterhood
instability of some pattern (Reference/Kaplan.lean).
Equations
- ap.Stable σ = ∀ (t : Reference.ContextTower C), ap.resolve (t.push σ) = ap.resolve t
Instances For
Origin access is invariant under push: Kaplan's thesis for expressions reading the speech-act context.
Innermost access tracks the pushed shift.