Valuation: Pi-Typed Partial Variable Assignment (V2) #
Replaces the old Situation (which fixed Variable → Option Bool).
A Valuation α is a Π-type partial valuation where each vertex v
has its own value type α v. The Pi pattern follows mathlib's
Algebra/Group/Pi/Basic.lean idiom for index-dependent value families.
α := fun _ => Bool recovers the legacy binary substrate.
A DecidableValuation aggregator typeclass bundles
∀ v, DecidableEq (α v) for use throughout the API.
Partial valuation: each vertex v either has a value of type α v
(encoded some x) or is undetermined (none). Generalizes the old
Situation (which fixed α := fun _ => Bool).
Defined as an abbrev for Π-type rather than a structure, so
elaboration unifies Valuation α with Π v, Option (α v) directly.
Equations
- Core.Causal.Valuation α = ((v : V) → Option (α v))
Instances For
Per-vertex decidable equality. An abbrev (not a class) so it
unfolds transparently to the bare ∀ v, DecidableEq (α v) constraint
typeclass search expects. Avoids the bundled-class antipattern.
Equations
- Core.Causal.DecidableValuation α = ((v : V) → DecidableEq (α v))
Instances For
The empty valuation: nothing is determined.
Equations
- Core.Causal.Valuation.empty x✝ = none
Instances For
Equations
- Core.Causal.Valuation.instInhabited = { default := Core.Causal.Valuation.empty }
Information ordering: every value defined in s₁ matches in s₂.
Instances For
Count of undetermined vertices over a finite list. Termination
measure for the forward-development fixpoint (mirrors the old
Monotonicity.lean measure but generalized over α).
Equations
- s.undeterminedCount l = List.countP (fun (v : V) => (s.get v).isNone) l