HeadChoice #
Here we define HeadChoices, which are merely functions from triggers to head indices.
We also define machinery to get a branch from a tree that corresponds to a given HeadChoice.
A HeadChoice is a function that maps each trigger to one of its head indices.
Equations
- HeadChoice sig = ((trg : PreTrigger sig) → Fin trg.rule.head.length)
Instances For
Often we want to assume that a HeadChoice for equivalent triggers returns the same index.
Equations
- hc.consistent_for_equivalent_triggers = ∀ {trg trg2 : PreTrigger sig}, trg.equiv trg2 → ↑(hc trg) = ↑(hc trg2)
Instances For
A shortcut for the trigger output dictaded by a head choice.
Equations
- trg.output_for_headChoice hc = trg.mapped_head[↑(hc trg)]
Instances For
The head choice output for equivalent triggers is the same given that the head choice is consistent_for_equivalent_triggers.
A ChaseNode adheres to a HeadChoice if its origin uses the index that is the head choice of its trigger.
Equations
- One or more equations did not get rendered due to their size.
Instances For
A ChaseDerivationSkeleton adheres to a HeadChoice if every node adheres to the HeadChoice.
Equations
- cd.adheres_to_headChoice hc = ∀ (n : N), n ∈ cd → ChaseNode.adheres_to_headChoice n hc
Instances For
The generator function used to generate the tree branch corresponding to the given HeadChoice.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The generator function produces a child node if it produces a value at all.
The generator function does not yield a new value if and only if the childNodes are empty.
The node produced by generator_for_headChoice adheres to the head choice.
This function generates the tree branch that corresponds to the given HeadChoice.
Equations
- td.subderivation_for_headChoice hc = td.generate_subderivation (TreeDerivation.NodeWithAddress.root td) (td.generator_for_headChoice hc) id ⋯ ⋯
Instances For
The subderivation_for_headChoice is a branch, which follows since we use TreeDerivation.generate_subderivation to build it.
The head of subderivation_for_headChoice is the root of the tree derivation.
The subderivation for a head choice adheres to that head choice.
This function generates the tree branch that corresponds to the given HeadChoice.
Equations
- ct.subderivation_for_headChoice hc = { toChaseDerivation := ct.subderivation_for_headChoice hc, database_first := ⋯ }
Instances For
The subderivation for a head choice adheres to that head choice.