A Property Kind Calculus for Measurement Metrology

17.5. The requirement clause — what the model must satisfy🔗

The five clauses above say what a module computes, how that relates to its measurement model, at which carriers, and how it distributes. None says what the module's quantities must satisfy — the input/output ratio that may not exceed a bound, the output that must lie in a band, the idealization whose error must stay below a tolerance — nor by what evidence each demand is met. A requirement is that statement, as data beside the declared boundary it governs, in the shape the theorem edge set: declaration names the environment resolves, the author's words where the calculus cannot read them, and nothing the commands do not check.

Two categories, told apart by the statement and not by the effort. A provable requirement closes over the model's own declarations and kinded quantities — every constant its statement mentions is the model's or the library's — so a theorem about the model discharges it: a theorem edge from the governed boundary to a specification boundary, a declared boundary whose one member computes the bound and whose role says so, or a bare theorem; a negative one — "this is never summed over the pair" — by the absence of a license the elaborator asks the environment for and must not find. Where the model also runs, the requirement names its spot checks: Bool declarations the requirement command evaluates and requires true, the way an inhabitation check spot-checks a proof — evidence that the proof reaches the carrier the model runs on and the operational inputs, not a discharge. An empirical requirement names a referent the model does not define — a datasheet value, a prior, a reference measurement, a population — so no theorem about the model alone can discharge it, however much proof is spent: the referent is a free variable only observation closes, which makes this the falsifiable category and testing its correct instrument rather than a fallback. It is discharged by a gate, a decider whose threshold is the referent, or deferred. The referent is a kinded quantity carrying @[kindReferent "where it comes from"], and the mark is what makes the demarcation mechanical: a provable requirement's statement may name no referent, and an empirical requirement's gate must name one. Either category may be attested, in the sense of attestation: deferred with a reason in the author's words. That is not a third category but a ratchet, counted by the census and meant to fall.

A requirement has a requirement scope: the objects it quantifies over — every object the boundary is evaluated for, every object of a named sort, reached through the Sorted edge of the ontological square, named objects, or the objects a named decider selects. "Every spring" is a sort, "the coupling spring" is an object, and neither is statable over a boundary whose objects are nominal.

Definition17.5.1
Group: The sixth clause is a stated requirement per produced port: what the port's quantity must satisfy, and the evidence by which it is met — a theorem edge to a specification boundary or a theorem, with spot checks where the model runs; a gate against a marked referent; or an attestation with its reason. The four definitions carry the data, the commands beside them check, survey, census and gate it, and the witness at the end of the chapter is the tutorial's oscillator carrying the clause in both categories. (4)
Group member previews
Preview
Definition 17.5.2
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 0used by 0✓L∃∀N

A requirement on a declared boundary: its name as a document cites it, the statement in the author's words, its category, the model boundary it governs and the governed port (or the boundary as a whole), its scope, and the evidence — for a provable requirement the witness (a theorem edge whose left side is the governed boundary and whose right side is a specification boundary, or a sorry-free theorem), the spot checks, and the absence claimed; for an empirical requirement the referents and the gate; for either, the attestation that defers it. #kind_requirement checks everything around the statement and throws on every failure — the governed boundary is a model's, the port is one it declares, the scope names a sort, sorted objects, or a decider, a provable statement names no referent, an empirical gate names one, every spot check evaluates to true, a claimed absence is absent, and an attestation never stands beside a discharge. #kind_requirements surveys a namespace's requirements as one pinnable report; #kind_requirement_coverage is the census — every produced port of every model boundary in scope governed by a requirement or marked @[kindRequirementFree "reason"], with the category tallies and the attested count — and #kind_requirement_clean its gate.

Lean code for Definition17.5.1●1 definition
  • structure(12 fields)defined in PropertyKindCalculus/Requirement.lean
    complete
    structure PropertyKindCalculus.Provenance.Requirement : Type
    structure PropertyKindCalculus.Provenance.Requirement :
      Type
    **A requirement on a declared boundary**: what the boundary's quantities must satisfy,
    in the author's words, and the evidence by which it is met — the theorem edge or theorem
    of a provable requirement with its spot checks, the referents and gate of an empirical
    one, or the attestation that defers either. The prose is not checked and is not meant to
    be; what is checked is that the governed boundary is a model's, that each named
    declaration exists and has the shape its field claims, that a provable statement names no
    referent and an empirical gate names one, that each spot check evaluates to `true`, and
    that a claimed absence is absent. 
    name : String
    The requirement's identifier, as a document cites it. 
    statement : String
    The requirement in the author's words: what must hold, of what. 
    kind : PropertyKindCalculus.Provenance.RequirementKind
    Provable or empirical. 
    governs : Lean.Name
    The declaration name of the model boundary the requirement governs. 
    port : Option PropertyKindCalculus.Provenance.NodeId
    The governed port of that boundary, or `none` for everything the boundary
    produces. 
    scope : PropertyKindCalculus.Provenance.RequirementScope
    The objects the requirement quantifies over. 
    witness : Lean.Name
    Provable: the discharge — a `Relation` whose left side is the governed boundary and
    whose right side is a specification boundary, or a sorry-free theorem. Anonymous where
    the requirement is attested. 
    spotChecks : List Lean.Name
    Named `Bool` declarations the requirement command evaluates and requires `true`: the
    runtime spot checks of a proof, at the carrier the model runs on, on operational
    inputs. 
    absent : Lean.Name
    Provable, negative: the declaration of a `Prop` that is a class application — a
    license — of which the environment must hold no instance. 
    referents : List Lean.Name
    Empirical: the `@[kindReferent]`-marked declarations the statement names — what the
    model does not define. 
    gate : Lean.Name
    Empirical: the declaration that decides the requirement against its referent — a
    `KindAdmissible` instance, a `Bool`-valued predicate — which must mention one of the
    referents. Anonymous where the requirement is attested. 
    attested : String
    The deferral, in the author's words, where the requirement is not yet discharged.
    Empty where it is. 
Proof for Definition 17.5.1
uses 0

A record of names and strings, nothing about it decidable; what the elaborator adds is the checking of everything around the statement, the evaluation of the spot checks, and the instance search behind a claimed absence, each refusal pinned by a probe.

Definition17.5.2
Group: The sixth clause is a stated requirement per produced port: what the port's quantity must satisfy, and the evidence by which it is met — a theorem edge to a specification boundary or a theorem, with spot checks where the model runs; a gate against a marked referent; or an attestation with its reason. The four definitions carry the data, the commands beside them check, survey, census and gate it, and the witness at the end of the chapter is the tutorial's oscillator carrying the clause in both categories. (4)
Group member previews
Preview
Definition 17.5.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 0used by 0✓L∃∀N

The two categories, provable and empirical, as the demarcation reads them: the constants a provable requirement's witness statement mentions may include no @[kindReferent]-marked declaration, and an empirical requirement's gate must mention one. A requirement declared in the wrong category is refused on its constants.

Lean code for Definition17.5.2●1 definition
  • inductive(2 constructors)defined in PropertyKindCalculus/Requirement.lean
    complete
    inductive PropertyKindCalculus.Provenance.RequirementKind : Type
    inductive PropertyKindCalculus.Provenance.RequirementKind :
      Type
    The category of a requirement: how its statement is closed, and so how it is
    discharged. 
    PropertyKindCalculus.Provenance.RequirementKind.provable :
      PropertyKindCalculus.Provenance.RequirementKind
    The statement closes over the model's own declarations: a theorem discharges it, and
    spot checks evaluate it where the model runs. 
    PropertyKindCalculus.Provenance.RequirementKind.empirical :
      PropertyKindCalculus.Provenance.RequirementKind
    The statement names a referent the model does not define: a gate on an observation
    discharges it. 
Proof for Definition 17.5.2
uses 0

A two-constructor enumeration; the demarcation is the elaborator's constant walk over the witness statement and the gate's body, pinned by acceptance and refusal probes.

Definition17.5.3
Group: The sixth clause is a stated requirement per produced port: what the port's quantity must satisfy, and the evidence by which it is met — a theorem edge to a specification boundary or a theorem, with spot checks where the model runs; a gate against a marked referent; or an attestation with its reason. The four definitions carry the data, the commands beside them check, survey, census and gate it, and the witness at the end of the chapter is the tutorial's oscillator carrying the clause in both categories. (4)
Group member previews
Preview
Definition 17.5.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 0used by 0✓L∃∀N

The four scope forms: all, sort (a SortOfSystem declaration, which the objects reach through their Sorted instance), objects (declarations whose type carries a Sorted instance, so each is an object of some sort and not a bare value), and decided (a named decider selecting a batch's subset). The square's left edge is what makes the first three statable.

Lean code for Definition17.5.3●1 definition
  • inductive(4 constructors)defined in PropertyKindCalculus/Requirement.lean
    complete
    inductive PropertyKindCalculus.Provenance.RequirementScope : Type
    inductive PropertyKindCalculus.Provenance.RequirementScope :
      Type
    The objects a requirement quantifies over. 
    PropertyKindCalculus.Provenance.RequirementScope.all :
      PropertyKindCalculus.Provenance.RequirementScope
    Every object the governed boundary is evaluated for. 
    PropertyKindCalculus.Provenance.RequirementScope.sort
      (sort : Lean.Name) :
      PropertyKindCalculus.Provenance.RequirementScope
    Every object of the named sort — a `SortOfSystem` declaration, which the objects
    reach through their `Sorted` instance. 
    PropertyKindCalculus.Provenance.RequirementScope.objects
      (objects : List Lean.Name) :
      PropertyKindCalculus.Provenance.RequirementScope
    The named objects: declarations whose type carries a `Sorted` instance, so each is an
    object of some sort and not a bare value. 
    PropertyKindCalculus.Provenance.RequirementScope.decided
      (decider : Lean.Name) :
      PropertyKindCalculus.Provenance.RequirementScope
    The objects a named decider selects — a batch's subset, where the objects are carved
    by a predicate rather than named. 
Proof for Definition 17.5.3
uses 0

A four-constructor enumeration; the elaborator checks a named sort is one, synthesizes the Sorted instance for each named object's type, and refuses an empty object list as a vacuous scope.

Definition17.5.4
Group: The sixth clause is a stated requirement per produced port: what the port's quantity must satisfy, and the evidence by which it is met — a theorem edge to a specification boundary or a theorem, with spot checks where the model runs; a gate against a marked referent; or an attestation with its reason. The four definitions carry the data, the commands beside them check, survey, census and gate it, and the witness at the end of the chapter is the tutorial's oscillator carrying the clause in both categories. (4)
Group member previews
Preview
Definition 17.5.1
Loading preview
Group member preview content is loaded from the rendered-fragment cache.
uses 0used by 1✓L∃∀N

Which side of a requirement a declared boundary stands on: model (the default — what a requirement governs and what the coverage census asks for) or specification (what a requirement is checked against, and itself the subject of no requirement). The same structure under the same checks, so a specification is kernel-accepted exactly as a model is; only the role tells them apart, and #kind_requirement refuses a requirement that governs a specification or is checked against a model.

Lean code for Definition17.5.4●1 definition
  • inductive(2 constructors)defined in PropertyKindCalculus/Provenance.lean
    complete
    inductive PropertyKindCalculus.Provenance.BoundaryRole : Type
    inductive PropertyKindCalculus.Provenance.BoundaryRole :
      Type
    **Which side of a requirement a declared boundary stands on.** A boundary declares what
    its members compute. A requirement on that computation (`Requirement`) is a theorem edge
    between it and a second boundary whose one member computes the bound the requirement
    states — the *specification*. The two are the same structure under the same checks, and
    only the role tells them apart: a model boundary is what a requirement governs and what
    the requirement-coverage census asks for; a specification boundary is what a requirement is
    checked against, and is itself the subject of no requirement. A boundary that says nothing
    about its role is a model's. 
    PropertyKindCalculus.Provenance.BoundaryRole.model :
      PropertyKindCalculus.Provenance.BoundaryRole
    The boundary of a model: what a requirement governs. 
    PropertyKindCalculus.Provenance.BoundaryRole.specification :
      PropertyKindCalculus.Provenance.BoundaryRole
    The boundary of a specification: the bound a requirement is checked against. 
Proof for Definition 17.5.4
uses 0

A two-constructor enumeration carried as a defaulted field of the contract, rendered in the contract's own report when it is not the default.