Documentation

Validator.StateSetFormalism.PartialModel

PartialModel #

This file provides the definition of partial models and operations and lemmas for working with them.

Partial models are partial assignments. In contrast to Model, these are used at runtime.

Instances For
    theorem Validator.PartialModel.ext {n : ℕ} {x y : PartialModel n} (pos : x.pos = y.pos) (neg : x.neg = y.neg) :
    x = y
    theorem Validator.PartialModel.ext_iff {n : ℕ} {x y : PartialModel n} :
    x = y ↔ x.pos = y.pos ∧ x.neg = y.neg
    def Validator.instDecidableEqPartialModel.decEq {n✝ : ℕ} (x✝ x✝¹ : PartialModel n✝) :
    Decidable (x✝ = x✝¹)
    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[instance_reducible]
      Equations
      • One or more equations did not get rendered due to their size.
      theorem Validator.PartialModel.mem_pos_iff {n : ℕ} (M : PartialModel n) (i : Fin n) :
      i ∈ M.pos ↔ { var := i, isPos := true } ∈ M
      theorem Validator.PartialModel.mem_neg_iff {n : ℕ} (M : PartialModel n) (i : Fin n) :
      i ∈ M.neg ↔ { var := i, isPos := false } ∈ M
      theorem Validator.PartialModel.ext' {n : ℕ} {M M' : PartialModel n} :
      (∀ (l : Literal n), l ∈ M ↔ l ∈ M') → M = M'
      theorem Validator.PartialModel.ext'_iff {n : ℕ} {M M' : PartialModel n} :
      M = M' ↔ ∀ (l : Literal n), l ∈ M ↔ l ∈ M'
      Equations
      Instances For
        theorem Validator.PartialModel.mem_vars {n : ℕ} {i : Fin n} {M : PartialModel n} :
        i ∈ M.vars ↔ ∃ (l : Literal n), l ∈ M ∧ l.var = i

        All models corresponding to to partial model M.

        Equations
        Instances For
          theorem Validator.PartialModel.mem_models' {n : ℕ} (M : PartialModel n) {M' : Model n} :
          M' ∈ M.models ↔ (∀ (i : Fin n), i ∈ M.pos → M' i) ∧ ∀ (i : Fin n), i ∈ M.neg → ¬M' i
          theorem Validator.PartialModel.mem_models {n : ℕ} {M : PartialModel n} {M' : Model n} :
          M' ∈ M.models ↔ ∀ (l : Literal n), l ∈ M → M' ∈ l.models
          Equations
          Instances For

            The partial model equivalent to the conjunction of the given partial model and the given literal.

            Equations
            Instances For
              @[simp]
              theorem Validator.PartialModel.mem_insert_iff {n : ℕ} {M : PartialModel n} {l : Literal n} {h : ¬l.var ∈ M.vars} (l' : Literal n) :
              l' ∈ M.insert l h ↔ l' ∈ M ∨ l' = l
              @[simp]
              theorem Validator.PartialModel.models_insert {n : ℕ} {M : PartialModel n} {l : Literal n} {h1 : ¬l.var ∈ M.vars} :

              Returns none if the negation of the literal already occurs in M

              Equations
              Instances For
                @[simp]
                theorem Validator.PartialModel.insert?_eq_some_iff {n : ℕ} {M M' : PartialModel n} {l : Literal n} :
                M.insert? l = some M' ↔ ¬l.negate ∈ M ∧ ∀ (l' : Literal n), l' ∈ M' ↔ l' ∈ M ∨ l' = l
                def Validator.PartialModel.foldl {α : Sort u_1} {n : ℕ} (f : α → Literal n → α) (init : α) (M : PartialModel n) :
                α
                Equations
                • One or more equations did not get rendered due to their size.
                Instances For
                  theorem Validator.PartialModel.foldl_cons {α : Type u_1} {n : ℕ} {M : PartialModel n} {f : Literal n → α} {a : α} :
                  a ∈ foldl (fun (a : List α) (l : Literal n) => f l :: a) [] M ↔ ∃ (l : Literal n), l ∈ M ∧ a = f l

                  Two partial models are compatible if they agree on their common variables.

                  Equations
                  Instances For

                    The conjunction of two compatible partial models.

                    Equations
                    Instances For
                      @[simp]
                      theorem Validator.PartialModel.pos_and {n : ℕ} {M1 M2 : PartialModel n} {h : M1.Compatible M2} :
                      (M1.and M2 h).neg = M1.neg ∪ M2.neg
                      @[simp]
                      theorem Validator.PartialModel.neg_and {n : ℕ} {M1 M2 : PartialModel n} {h : M1.Compatible M2} :
                      (M1.and M2 h).pos = M1.pos ∪ M2.pos
                      @[simp]
                      theorem Validator.PartialModel.mem_and {n : ℕ} {M1 M2 : PartialModel n} {h : M1.Compatible M2} {l : Literal n} :
                      l ∈ M1.and M2 h ↔ l ∈ M1 ∨ l ∈ M2
                      @[simp]
                      theorem Validator.PartialModel.vars_and {n : ℕ} {M1 M2 : PartialModel n} {h : M1.Compatible M2} :
                      (M1.and M2 h).vars = M1.vars ∪ M2.vars
                      @[simp]
                      theorem Validator.PartialModel.models_and {n : ℕ} {M1 M2 : PartialModel n} {h : M1.Compatible M2} :
                      (M1.and M2 h).models = M1.models ∩ M2.models
                      theorem Validator.PartialModel.and_symm {n : ℕ} {M1 M2 : PartialModel n} {h : M1.Compatible M2} :
                      ∃ (h' : M2.Compatible M1), M1.and M2 h = M2.and M1 h'

                      Returns the conjunction of two partial models. Returns none if the conjunction of the two partial models is inconsistent.

                      Equations
                      Instances For
                        @[simp]
                        theorem Validator.PartialModel.and?_eq_some_iff {n : ℕ} {M1 M2 M3 : PartialModel n} :
                        M1.and? M2 = some M3 ↔ ∃ (h1 : M1.Compatible M2), M1.and M2 h1 = M3

                        Restrict the given partial model to the given set of variables.

                        Equations
                        Instances For
                          @[simp]
                          theorem Validator.PartialModel.pos_restrict {n : ℕ} {M : PartialModel n} {vars : STRIPS.VarSet n} :
                          (M.restrict vars).pos = M.pos ∩ vars
                          @[simp]
                          theorem Validator.PartialModel.neg_restrict {n : ℕ} {M : PartialModel n} {vars : STRIPS.VarSet n} :
                          (M.restrict vars).neg = M.neg ∩ vars
                          @[simp]
                          theorem Validator.PartialModel.vars_restrict {n : ℕ} {M : PartialModel n} {vars : STRIPS.VarSet n} :
                          (M.restrict vars).vars = M.vars ∩ vars
                          @[simp]
                          theorem Validator.PartialModel.mem_restrict {n : ℕ} {M : PartialModel n} {vars : STRIPS.VarSet n} {l : Literal n} :
                          l ∈ M.restrict vars ↔ l ∈ M ∧ l.var ∈ vars
                          @[simp]
                          theorem Validator.PartialModel.restrict_inter {n : ℕ} {M : PartialModel n} {V1 V2 : STRIPS.VarSet n} :
                          M.restrict (V1 ∩ V2) = (M.restrict V1).restrict V2
                          @[simp]
                          theorem Validator.PartialModel.and_restrict_left {n : ℕ} {M1 M2 : PartialModel n} {h : M1.Compatible M2} :
                          (M1.and M2 h).restrict M1.vars = M1
                          @[simp]
                          theorem Validator.PartialModel.and_restrict_right {n : ℕ} {M1 M2 : PartialModel n} {h : M1.Compatible M2} :
                          (M1.and M2 h).restrict M2.vars = M2

                          Expand the given partial model M to 2 ^ |V \ M.vars| partial models over M.vars ∪ V.

                          Equations
                          Instances For
                            @[simp]
                            theorem Validator.PartialModel.models_expand {n : ℕ} (M : PartialModel n) (V : STRIPS.VarSet n) :
                            M.models = ⋃ M' ∈ M.expand V, M'.models
                            Equations
                            Instances For
                              Equations
                              Instances For
                                theorem Validator.PartialModel.mem_toCNF {n : ℕ} {M : PartialModel n} {γ : Clause n} :
                                γ ∈ M.toCNF ↔ ∃ (l : Literal n), l ∈ M ∧ γ = [l]

                                Translate δ to a partial model. Returns none if δ is inconsistent.

                                Equations
                                Instances For
                                  @[simp]