The Boolean syntax layer for a coherent basis (R4 converse piece 3, #107) #
The index type of a RelSignature.CoherentBasis must be closed under finite Boolean operations
and carry a strict action of the finitely supported relabelings. Both are obtained here by
taking the indices to be formal expressions over a set of atoms, rather than a set of events
closed under the operations.
Why syntax rather than a closed family of events #
Two things go wrong if the index is a family of events:
- The anchor is not determined by the event. The same set can arise anchored at different
finite vertex sets, so an event-indexed family forces a choice of anchor, and then
anchor_actdemands that choice be equivariant — which is the coherence problem again. - The action laws stop being strict. Closing a family of events under complement and
intersection and then acting on it requires choosing representatives of equal events, and
act_one/act_mulhold only up to that choice.
With syntax both problems vanish: anchor and event are computed by recursion, so the
anchor travels with the expression, and act acts on the syntax tree, so its laws follow by
structural induction from the corresponding laws on atoms.
Contents #
RelSignature.BasisExpr— formal Boolean expressions over an atom type;BasisExpr.eval/BasisExpr.anchorOf— the event and anchor of an expression, by recursion;BasisExpr.act— the relabeling action on expressions, withact_oneandact_mulproved by induction from the atom-level laws;BasisExpr.instCountable— countability, so the resulting index type is countable.
The syntax #
Formal Boolean expressions over an atom type α: the formal Boolean-expression syntax
with ⊥, complement, and intersection — unquotiented terms, not the free Boolean ring itself.
Union and difference are derived, so the image of eval is a set ring.
The index of a CoherentBasis is built from this rather than from a closed family of events,
so that the anchor is computed from the expression and the relabeling action is structural.
- bot
{α : Type u_1}
: BasisExpr α
The empty event, anchored at
∅. - atom
{α : Type u_1}
: α → BasisExpr α
An atom.
- compl
{α : Type u_1}
: BasisExpr α → BasisExpr α
Complement; the anchor is unchanged.
- inter
{α : Type u_1}
: BasisExpr α → BasisExpr α → BasisExpr α
Intersection; the anchor is the union of the two anchors.
Instances For
Evaluation #
The anchor of an expression, computed structurally: ⊥ is anchored at ∅, complement
preserves the anchor, and intersection takes the union — which is exactly what keeps the
indices anchored inside A closed under the operations.
Equations
- RelSignature.BasisExpr.anchorOf atomAnchor RelSignature.BasisExpr.bot = ∅
- RelSignature.BasisExpr.anchorOf atomAnchor (RelSignature.BasisExpr.atom a) = atomAnchor a
- RelSignature.BasisExpr.anchorOf atomAnchor a.compl = RelSignature.BasisExpr.anchorOf atomAnchor a
- RelSignature.BasisExpr.anchorOf atomAnchor (a.inter a_1) = RelSignature.BasisExpr.anchorOf atomAnchor a ∪ RelSignature.BasisExpr.anchorOf atomAnchor a_1
Instances For
The event of an expression, computed structurally.
Equations
- RelSignature.BasisExpr.eval atomEvent RelSignature.BasisExpr.bot = ∅
- RelSignature.BasisExpr.eval atomEvent (RelSignature.BasisExpr.atom a) = atomEvent a
- RelSignature.BasisExpr.eval atomEvent a.compl = (RelSignature.BasisExpr.eval atomEvent a)ᶜ
- RelSignature.BasisExpr.eval atomEvent (a.inter a_1) = RelSignature.BasisExpr.eval atomEvent a ∩ RelSignature.BasisExpr.eval atomEvent a_1
Instances For
Every expression evaluates into the fixing algebra of its own anchor, provided the atoms do.
The intersection case is where the anchor-as-union convention pays: both sides are pushed up to
the union by fixingAlgebra_mono.
The relabeling action #
The action on expressions, induced by an action on atoms. Typed by the finitely
supported subgroup, matching CoherentBasis.act.
Equations
- RelSignature.BasisExpr.act atomAct σ RelSignature.BasisExpr.bot = RelSignature.BasisExpr.bot
- RelSignature.BasisExpr.act atomAct σ (RelSignature.BasisExpr.atom a) = RelSignature.BasisExpr.atom (atomAct σ a)
- RelSignature.BasisExpr.act atomAct σ a.compl = (RelSignature.BasisExpr.act atomAct σ a).compl
- RelSignature.BasisExpr.act atomAct σ (a.inter a_1) = (RelSignature.BasisExpr.act atomAct σ a).inter (RelSignature.BasisExpr.act atomAct σ a_1)
Instances For
The action is trivial at the identity, by induction from the atom-level law.
The action is multiplicative, by induction from the atom-level law. The orientation matches
the contravariance of RelStructure.relabel.
The action transports anchors by the image map, provided the atoms do.
The action transports events by preimage — exactly, with no null sets, provided the atoms do. Complement and intersection commute with preimage on the nose, which is the whole reason the syntax layer keeps the action strict.