Docs / Semantics / Reference / Context / Overwrite

Overwriting coordinates of a context

import Linglib.Semantics.Reference.Context.Overwrite · namespace Kaplan

A context is the function from its coordinates to their values (Context.equivPi), and overwrite s c i is c with its coordinates in s taken from i, Finset.piecewise through that equivalence: the operation by which a shifty operator replaces coordinates of the context with those of an index of the same type. An indexical depends, in the sense of DependsOn, on one coordinate; after a sequence of overwrites it reads the context of the last overwrite that took that coordinate.

Main definitions

  • Context.Coord, Context.equivPi: the coordinates of a context, and the context as a function on them.
  • Context.overwrite s c i: c with the coordinates in s taken from i.
  • Context.localDepth ss k: the position of the last of the overwrites ss that takes k.
  • shiftyOp s: the shifty operator, evaluating its argument at the context overwritten from the index, Kaplan's shiftBy (overwrite s).

Main results

References

Declarations

The coordinates of a context.

inductive Context.CoordL54–61

Derives DecidableEq, Fintype.

Used by Context.Coord.Carrier, Context.equivPi, Context.overwrite, Context.equivPi_overwrite, Context.overwrite_agent, Context.overwrite_addressee, Context.overwrite_world, Context.overwrite_time, Context.overwrite_position, Context.overwrite_self, Context.overwrite_overwrite, Context.apply_overwrite_of_subset, Context.apply_overwrite_of_disjoint, Context.apply_overwrite_of_apply_eq, Context.localDepth, Context.localDepth_nil, Context.localDepth_append_singleton, Context.localDepth_le_length, Context.apply_foldl_overwrite, shiftyOp, shiftyOp_apply, shiftyOp_shiftyOp, diag_shiftyOp

Used in AnandNevins2004, Deal2020

A context is the function from its coordinates to their values.

def Context.equivPiL70–80
{W E P T : Type u} :
Context W E P T ≃ ((k : Coord) → Coord.Carrier W E P T k)

The definition is too large to print here; read it in the source.

Built from ,

Used by Context.overwrite, Context.equivPi_overwrite, Context.dependsOn_agent, Context.apply_overwrite_of_subset, Context.apply_overwrite_of_disjoint, Context.apply_overwrite_of_apply_eq, Context.apply_foldl_overwrite

Used in AnandNevins2004, Deal2020

The context c with the coordinates in s overwritten by those of i.

def Context.overwriteL82–84
{W E P T : Type u} (s : Finset Coord) (c i : Context W E P T) :
Context W E P T

Built from ,

Used by Context.equivPi_overwrite, Context.overwrite_agent, Context.overwrite_addressee, Context.overwrite_world, Context.overwrite_time, Context.overwrite_position, Context.overwrite_empty, Context.overwrite_univ, Context.overwrite_self, Context.overwrite_overwrite, Context.apply_overwrite_of_subset, Context.apply_overwrite_of_disjoint, Context.apply_overwrite_of_apply_eq, Context.apply_foldl_overwrite, shiftyOp, shiftyOp_apply

Used in AnandNevins2004, Deal2020

L109
L111
L113

Expressions reading some coordinates

L147–153

Local Determination

The position, counting from one, of the last of the overwrites ss that takes the coordinate k, or 0 if none does.

def Context.localDepthL157–160
(ss : List (Finset Coord)) (k : Coord) :
ℕ

Built from

Used by Context.localDepth_nil, Context.localDepth_append_singleton, Context.localDepth_le_length, Context.apply_foldl_overwrite

Used in AnandNevins2004, Deal2020

L162
L164–166
L168–174

Local Determination: after overwrites by the pairs ops, outermost first, an expression reading only the coordinate k reads the context of the last pair that overwrites k, the last of the first localDepth overwriting contexts, or the original context if none does.

theorem Context.apply_foldl_overwriteL176–194
{W E P T : Type u} {α : Type u_1} {f : Context W E P T → α} {k : Coord} (hf : DependsOn (f ∘ ⇑equivPi.symm) {k}) (c : Context W E P T) (ops : List (Finset Coord × Context W E P T)) :
f (List.foldl (fun (c : Context W E P T) (p : Finset Coord × Context W E P T) => overwrite p.1 c p.2) c ops) = f ((List.take (localDepth (List.map Prod.fst ops) k) (List.map Prod.snd ops)).getLastD c)

Built from , , ,

The shifty operator overwriting the coordinates s of the context with those of the index, ⟦OP α⟧^{c,i} = ⟦α⟧^{overwrite s c i, i} (Anand & Nevins 2004, Deal 2020).

def shiftyOpL204–209
{W E P T : Type u} {α : Type u_1} (s : Finset Context.Coord) :
Character (Context W E P T) (Context W E P T) α → Character (Context W E P T) (Context W E P T) α

Built from ,

Used by shiftyOp_apply, shiftyOp_empty, shiftyOp_shiftyOp, diag_shiftyOp

Used in AnandNevins2004, Deal2020