Reference · Finite types, distributions and Markov chains
rainbow.math.finite.signed-argmax
Executable finite argmax over exact signed-rational scores. The fold accepts an explicit fallback action, compares scores with the computable signed order, and returns an action rather than only a maximum value. The certificates prove that the result comes from the declared finite carrier (when the fallback does) and dominates every declared action. Runtime carrier length and arbitrary signed scores are both supported. Native, kernel-checked, and axiom-free on D63.
decision/signed-select
decision/signed-select.{u} :
(A : Type u) (score : A → ℚ) (x₁ x₂ : A)
→ Aℚ = signed/SignedRational
list/signed-argmax-from
list/signed-argmax-from.{u} :
(A : Type u) (score : A → ℚ) (x₁ : A) (x₂ : List A)
→ AList = data/Listℚ = signed/SignedRational
decision/finite-signed-argmax
decision/finite-signed-argmax.{u} :
(A : Type u) (actions : Finset A) (initial : A) (score : A → ℚ)
→ AFinset = finset-data/Finsetℚ = signed/SignedRational
decision/signed-select-is-left-or-right
decision/signed-select-is-left-or-right.{u} :
(A : Type u) (score : A → ℚ) (left right : A)
→ proposition/disjunction (select = left) (select = right)
where select := decision/signed-select A score left right= = equality/Eqℚ = signed/SignedRational
decision/signed-select-left-bound
decision/signed-select-left-bound.{u} :
(A : Type u) (score : A → ℚ) (left right : A)
→ score left ≤ score (decision/signed-select A score left right)ℚ = signed/SignedRational≤ = signed/at-most
decision/signed-select-right-bound
decision/signed-select-right-bound.{u} :
(A : Type u) (score : A → ℚ) (left right : A)
→ score right ≤ score (decision/signed-select A score left right)ℚ = signed/SignedRational≤ = signed/at-most
list/signed-argmax-from-bounds-initial
list/signed-argmax-from-bounds-initial.{u} :
(A : Type u) (score : A → ℚ) (initial : A) (source : List A)
→ (fun source₁ => score initial ≤ score (list/signed-argmax-from A score initial source₁)) sourceList = data/Listℚ = signed/SignedRational≤ = signed/at-most
list/signed-argmax-from-bounds-member
list/signed-argmax-from-bounds-member.{u} :
(A : Type u) (score : A → ℚ) (initial : A) (source : List A) (value : A)
(member : list/membership A source value)
→ score value ≤ score (list/signed-argmax-from A score initial source)List = data/Listℚ = signed/SignedRational≤ = signed/at-most
list/signed-argmax-from-is-initial-or-member
list/signed-argmax-from-is-initial-or-member.{u} :
(A : Type u) (score : A → ℚ) (initial : A) (source : List A)
→ proposition/disjunction (list/signed-argmax-from A score initial source = initial) (membership)
where membership := list/membership A source (list/signed-argmax-from A score initial source)= = equality/EqList = data/Listℚ = signed/SignedRational
decision/finite-signed-argmax-is-member
decision/finite-signed-argmax-is-member.{u} :
(A : Type u) (actions : Finset A) (initial : A) (score : A → ℚ)
(initial-member : initial ∈ actions)
→ decision/finite-signed-argmax A actions initial score ∈ actionsFinset = finset-data/Finsetℚ = signed/SignedRational∈ = finset-data/to-set: membership in a finite set
decision/finite-signed-argmax-dominates
decision/finite-signed-argmax-dominates.{u} :
(A : Type u) (actions : Finset A) (initial : A) (score : A → ℚ) (candidate : A)
(candidate-member : candidate ∈ actions)
→ score candidate ≤ score (decision/finite-signed-argmax A actions initial score)Finset = finset-data/Finsetℚ = signed/SignedRational∈ = finset-data/to-set: membership in a finite set≤ = signed/at-most