MindFormal v1.0.0One Mind

MindFormal.Tools.SecurityGrid.Finite

Finite-game security algebra. These objects contain no native controller, encounter law, or independence assumption.

def MindFormal.Security.column {A : Type u_1} {B : Type u_2} [Fintype A] (pay : A → B → ℝ) (p : A → ℝ) (b : B) :
Equations
Instances For
    def MindFormal.Security.worst {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] (pay : A → B → ℝ) (p : A → ℝ) :
    Equations
    Instances For
      theorem MindFormal.Security.worst_le {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] (pay : A → B → ℝ) (p : A → ℝ) (b : B) :
      worst pay p ≤ column pay p b
      theorem MindFormal.Security.le_worst_iff {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] (pay : A → B → ℝ) (p : A → ℝ) (v : ℝ) :
      v ≤ worst pay p ↔ ∀ (b : B), v ≤ column pay p b
      theorem MindFormal.Security.worst_continuous {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] (pay : A → B → ℝ) :

      The finite probability simplex is compact in its ordinary product topology. Both nonnegativity and exact total mass are retained.

      theorem MindFormal.Security.maximin_exists {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] [Nonempty A] (pay : A → B → ℝ) :
      ∃ (p : A → ℝ), FiniteDecision.Probability p ∧ ∀ (q : A → ℝ), FiniteDecision.Probability q → worst pay q ≤ worst pay p

      SD26: a maximizer exists, by compactness and continuity of the finite minimum of column expectations. No fixed-point theorem is used.

      noncomputable def MindFormal.Security.optimizer {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] [Nonempty A] (pay : A → B → ℝ) :
      A → ℝ
      Equations
      Instances For
        noncomputable def MindFormal.Security.value {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] [Nonempty A] (pay : A → B → ℝ) :
        Equations
        Instances For
          theorem MindFormal.Security.worst_le_value {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] [Nonempty A] (pay : A → B → ℝ) (p : A → ℝ) (hp : FiniteDecision.Probability p) :
          worst pay p ≤ value pay
          def MindFormal.Security.payment {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] (pay : A → B → ℝ) (p : A → ℝ) (q : B → ℝ) :
          Equations
          Instances For
            theorem MindFormal.Security.protects_iff {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] (pay : A → B → ℝ) (p : A → ℝ) (v : ℝ) :
            (∀ (q : B → ℝ), FiniteDecision.Probability q → v ≤ payment pay p q) ↔ v ≤ worst pay p

            Security against every joint opponent mixture is exactly the pure column test. Opponents may have arbitrary internal correlation.

            theorem MindFormal.Security.maximizer_iff {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] [Nonempty A] (pay : A → B → ℝ) (p : A → ℝ) (hp : FiniteDecision.Probability p) :
            worst pay p = value pay ↔ ∀ (b : B), value pay ≤ column pay p b

            SD26's maximizers are exactly the mixtures whose every column expectation is at least the security value.

            noncomputable def MindFormal.Security.tv {I : Type u_3} [Fintype I] (p q : I → ℝ) :
            Equations
            Instances For
              theorem MindFormal.Security.mean_tv {A : Type u_1} [Fintype A] [Nonempty A] (p q f : A → ℝ) (hp : FiniteDecision.Probability p) (hq : FiniteDecision.Probability q) (R : ℝ) (oscillation : ∀ (i j : A), |f i - f j| ≤ R) :

              The exact bounded-payoff TV price, with the oscillation rather than twice the supremum norm. Both distributions have mass one.

              theorem MindFormal.Security.column_table_error {A : Type u_1} {B : Type u_2} [Fintype A] (pay estimate : A → B → ℝ) (p : A → ℝ) (hp : FiniteDecision.Probability p) (ε : ℝ) (err : ∀ (a : A) (b : B), |estimate a b - pay a b| ≤ ε) (b : B) :
              |column estimate p b - column pay p b| ≤ ε

              A uniform entrywise table error bounds every mixed column error.

              theorem MindFormal.Security.worst_error {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] (pay estimate : A → B → ℝ) (p : A → ℝ) (ε : ℝ) (err : ∀ (b : B), |column estimate p b - column pay p b| ≤ ε) :
              |worst estimate p - worst pay p| ≤ ε
              theorem MindFormal.Security.value_table_error {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] [Nonempty A] (pay estimate : A → B → ℝ) (ε : ℝ) (err : ∀ (a : A) (b : B), |estimate a b - pay a b| ≤ ε) :
              |value estimate - value pay| ≤ ε
              theorem MindFormal.Security.robustness {A : Type u_1} {B : Type u_2} [Fintype A] [Fintype B] [Nonempty B] [Nonempty A] (pay estimate : A → B → ℝ) (candidate actual : A → ℝ) (hc : FiniteDecision.Probability candidate) (ha : FiniteDecision.Probability actual) (εpay δalg R εact Cproc cost : ℝ) (tableError : ∀ (a : A) (b : B), |estimate a b - pay a b| ≤ εpay) (algorithm : value estimate - δalg ≤ worst estimate candidate) (range : ∀ (b : B) (a c : A), |pay a b - pay c b| ≤ R) (readError : tv actual candidate ≤ εact) (hR : 0 ≤ R) (processing : cost ≤ Cproc) :
              value pay - 2 * εpay - δalg - R * εact - Cproc ≤ worst pay actual - cost

              SD28's entire finite error bill: two payoff-table errors, algorithm defect, actual conditional act TV error and processing cost.