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
- Causation.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
- Causation.DecidableValuation α = ((v : V) → DecidableEq (α v))
Instances For
The empty valuation: nothing is determined.
Equations
- Causation.Valuation.empty x✝ = none
Instances For
Equations
- Causation.Valuation.instInhabited = { default := Causation.Valuation.empty }
The information order is a partial order (mathlib Finset-style
instance; s₁.le s₂ and s₁ ≤ s₂ are definitionally equal).
Equations
- Causation.Valuation.instPartialOrder = { le := fun (s₁ s₂ : Causation.Valuation α) => s₁.le s₂, le_refl := ⋯, le_trans := ⋯, lt_iff_le_not_ge := ⋯, le_antisymm := ⋯ }