Perch tagging rules¶
Summary
A perch is an information set within a stage. Field declarations and typed block headers establish where quantities are interpreted; perch marks request arrival, decision, or continuation contexts. A control or shock listed on a block side follows its role-specific timing rule, rather than automatically becoming a state observed at that side.
Relationship with other documents
Builds on — Stages: domains, roles, and headers; Equation parsing rules: written syntax. Formal account — Appendix C: state sufficiency and information checks; Appendix D: field indexing and implicit policy relations. Used by — Field equations: consumption and expectations; Branching: discrete alternatives.
1 What a perch mark requests¶
The stage marks identify information contexts, not calendar dates:
| Written reference | Requested context |
|---|---|
V[<] |
Arrival value. |
V or V[~] |
Decision value, where the header side that lists V, or the perch word in V's own listing, names the decision perch. |
V[>] |
Continuation value. |
A field is a quantity measurable with respect to its information context, meaning that its value is determined by the information available there. The same token at different perches can denote different fields. Equal spelling does not make V[<], V, and V[>] equal, and an explicit mark does not establish that the requested field is defined.
For example, the discounting stage keeps the three asset coordinates explicit:
@stage: assets
Xa := ℝ₊
[id=arvl_to_dcsn, (a : Xa) : !arvl -> (a_d : Xa) : !dcsn] {
a_d = a
}
[id=dcsn_to_cntn, (a_d) : !dcsn -> (a[>] : Xa) : !cntn] {
a[>] = a_d
}
This complete transition fragment states the two identities; it does not infer them from a shared name. The declaration establishes unmarked a as an arrival input in the first block, whereas a[>] explicitly identifies the continuation output in the second. The decision state is named a_d. Bare references are resolved from declarations and the expression's context; the parser's identical treatment of a bare token and [~] does not itself determine its economic role.
In a header, a mark must agree with the perch word of its side, : !arvl, : !dcsn or : !cntn, with one exception: the input side of a forward block may list a constant that the stage takes in at its continuation perch, spelled as the backward header that takes it in spells it, as age[>] in (m, c : !ctrl @ ℝ₊, age[>]) : !dcsn, and the constant stays at the continuation perch. Construction checks this for [<] and [>]: the listing (a[>] : Xa) : !arvl is refused under field-perch. The mark [~] names the decision perch and is optional. The package reads x[~] as the bare name x. A state or a value written without a mark takes the perch of the header side that lists it, so the listing (a[~] : Xa) : !arvl, which breaks the rule, is read as the arrival field a and nothing is refused. The package does not yet check this (Appendix C §5.3).
We use [<], [~], and [>] for stage information. Although .bl inherits syntax from dynspec, an expression language, we do not transfer its steady-state reading of [~] into these equations, or use ordinary component indices such as [1] as alternative perch marks.
2 How headers establish context¶
A new field requires a declared set and an established information context. A top-level declaration or a header listing supplies the set. A block header alone supplies the context of a state or a value: the perch word of the side that lists the field, or the perch word or mark in the field's own listing. A control stands at the decision perch by its role, and a shock belongs to no perch. Construction refuses a state or a value that nothing places at a perch, under field-perch. It admits a field to which no declaration and no header gives a set, and that field has no declared set. The package does not yet check this (Appendix C §5.3).
All declarations of one field must agree. A later occurrence may restate a declared set or a role, but cannot silently replace it. Two roles for one field are refused under one-name-one-meaning. The sets written for one field at its several occurrences are intersected. Where one block produces the field on one set and another block reads it on a second set, the first set must lie in the second, and a field that breaks this is refused under set-mismatch. For some pairs of sets, such as a pair in which an endpoint names a parameter, the package does not yet check the inclusion (Appendix C §5.3). Where that refusal does not apply, two cases leave the field without a declared set, and nothing is refused. In the first the sets have no member in common, as with a top-level declaration a_d : [2,3] beside a header's (a_d : [0,1]). In the second the package does not compute their intersection, as with the named set Xa beside ℝ. The package does not yet refuse the first case, and in the second it does not yet compute the intersection (Appendix C §5.3). A header listing carries one set, and several sets in one listing are refused under readable-form (Symbols and conventions §9.2).
A side may omit its perch word only when each field it lists carries the mark [<] or [>] or its own perch word, as in (a_d : Xa @ !dcsn), or is a control or a shock. A bare listing on such a side is refused under field-perch, even where another header lists the name at one perch, so a perch is never guessed. The package reads a listing marked [~] as a bare listing, so on such a side it is refused under field-perch in the same way (§1).
Abstract grammar: Signature
This ASDL projection gives the constructor Signature, by which the grammar records a block's header, and the simple coordinate case. Other typer and coordinate alternatives remain in the full grammar; the box does not redefine them.
typer = Signature(subject source, classifier* source_types,
subject target, classifier* target_types)
subject = Subject(coordinate* coordinates)
coordinate = Coordinate(identifier stem, index? at,
classifier* classifiers)
classifier = Domain(setexpr space)
| Infoset(perch side)
| Role(role kind)
perch = Arrival | Decision | Continuation
Keys. source and target are ordered subjects with side types; coordinates lists their members; stem names a coordinate, at records optional indexing, and classifiers lists type components. index, setexpr, and role are sorts in the full grammar. * means a list and ? optional.
Head. A block header writes the two subjects around ->, with : for type information.
Denotes. The header specifies the inputs and outputs of the block's equations, interpreted under Appendix C §2.2.
Status. The grammar records the header's shape. Construction checks role and perch agreement, output definitions, and the exceptions below; it rejects a contradictory declaration at the offending header or declaration's source span.
The side annotation normally supplies the information context of its state or value coordinates. There are four exceptions:
- A decision control remains a decision control when listed beside continuation inputs. Listed there, it is the coordinate at which the block's lines are read, not an input of the block; it does not redefine the control as a continuation-state coordinate.
- A shock listed as a transition argument is not thereby known at the input perch. Its law and transition use establish the relevant uncertainty and timing.
- A state of the perch at which a backward block's output stands is a coordinate of that output and is listed on no backward header; a line of the block reads it without a listing, and a listed state is refused under
header-coordinate. A state of the block's input perch is reached through the law of motion alone. A backward header therefore lists the value fields the block reads and writes and the controls at which its lines are read (Appendix C R1). - A constant that the stage takes in at its continuation perch stays at that perch where the input side of a forward block lists it; the block's law of motion or a shock law reads it there.
For example, the consumption backward block lists (V[>], c) on its continuation side. The role !ctrl established for c still identifies a decision control. The calculation of value uses the chosen control and continuation value together. The continuation calculation must retain any decision information it needs; a smaller continuation state vector alone need not encode the control.
Parameters are constant with respect to stage uncertainty and have no perch. They still require declarations and admissible values. A parameter name declared by two stages of one period denotes one period parameter; this does not identify either stage's fields. Numerical settings are supplied separately and are not economic fields.
A backward header can keep a field by listing its bare name on both sides and writing no equation for it. For a nonconstant field, the corresponding forward block must keep every state coordinate its representing function reads. L on both sides can keep a constant, while L[>] and L are different fields. See Fields sent backward.
3 Shocks and expectations¶
In the income transition, y is listed beside arrival assets b, but income is realized between arrival and decision. The state equation w = y + b*R makes income available in decision cash on hand. The backward equation V[<] = E_{y}(V) uses the shock's conditional law to form arrival value.
Writing an explicit perch mark cannot make an unobserved shock known. For example, replacing that arrival equation by V[<] = E_{y}(V) + y leaves an unintegrated shock outside the expectation. Construction must reject this use when y is unobserved at arrival, identifying the statement and offending occurrence. The nested expression E_{y}(V + y) has a different scope: both terms are integrated, subject to integrability.
An ordered joint distribution for (ε, η) determines a joint expectation over those shocks. The order of the inputs a header lists implies nothing about dependence. Separate declarations define the joint law of the shocks of one transition as the product of the declared conditional laws (Appendix C §2.1). Each law is conditional on the shocks that it names as arguments and on the source coordinates, the states and controls on the transition's input side. Two shocks whose laws name no other shock are therefore conditionally independent given the source coordinates. Construction records the product as the assumption joint-distribution-factorization, which stage.obligations() lists. The law of the continuation state, which a connection route (Periods §2) requires, is formed from the joint laws so defined. A dependence between two shocks is stated in the model by a joint declaration, (ε, η) ~ N(…), or by naming one shock as an argument of the other's law. Constant parameters describe an IID draw only when the declared distribution is conditional on earlier information and does not depend on that information.
4 Fields at another perch¶
A reference at another perch needs an equation or supported transition interpretation that defines it there. The mark is not an inverse-transition operator. For instance, a forward equation defining decision cash on hand from arrival wealth and income does not automatically recover the two inputs from cash on hand.
The consumption example deliberately defines c[>] and m_d[>] as candidates indexed by continuation savings. Its final c = c[>] is an implicit relation between the policy and the candidate: read at the decision perch, it relates them through the savings transition; rewritten at the continuation perch, it relates them through the coordinate map that m_d[>] = a + c[>] defines, and the construction states it there (Appendix C R5 and R10). The continuation candidate and decision policy are distinct objects; matching their values requires the relation and the function-selection conditions in Field equations.
A state vector collects chosen state coordinates. Representing a field as a function of that vector requires that those coordinates contain enough information to determine the field, as well as the relevant conditional laws. Perch measurability alone does not establish this. Nor does writing three state vectors prove their generated information sets are nested: a state transition can discard information. Appendix C R5 separates these assumptions from syntax.
5 Discrete alternatives¶
A branching stage declares a finite-valued control and the state outputs for each labeled alternative. For example, the retirement stage declares the labels work and retire, distinct continuation fields V_w[>] and V_r[>], and selects from their ordered tuple using the control d. The branch labels identify alternatives within the continuation interface; they do not add calendar dates or new perch kinds. Branching supplies the complete source.
Within each alternative, the fields and functions must use that alternative's declared state domain. Construction refuses a continuation value read at the tuple positions of two alternatives, under branch-value-position, and a derivative of one alternative's continuation value taken in another alternative's state, under derivative-coordinate. It admits a law of motion of one alternative that reads another alternative's continuation state: a_w = a_d + a_r in the work block is read with the retire block's law in place of a_r, as a_w = a_d + a_d. The package does not yet check this (Appendix C §5.3). The value comparison also requires a common objective and the declared label order. Ordinary tuple selection is distinct from a perch mark, so (V_w[>], V_r[>])[d] first names continuation quantities and then chooses a tuple entry.