Documentation

Validator.StateSetFormalism.Formalism

All variables i have a primed and an unprimed version, represented by 2 * i + 1 and 2 * i respectively.

def Fin.toUnprimed {n : } :
Fin nFin (2 * n)
Equations
Instances For
    def Fin.toPrimed {n : } (i : Fin (2 * n)) (h : Even i) :
    Fin (2 * n)
    Equations
    Instances For
      @[reducible, inline]
      abbrev Validator.VarSet'.IsUnprimed {n : } (V : VarSet' (2 * n)) :
      Equations
      Instances For
        Equations
        Instances For
          Equations
          Instances For
            def Validator.Formula.Model.toPrimed {n : } (V : VarSet' n) (M : Model (2 * n)) :
            Model (2 * n)

            Swap the primed and unprimed versions of the variables in V and replace the other primed variables with their even version.

            Equations
            Instances For
              theorem Validator.Formula.Model.toPrimed_eq {n : } (V : VarSet' n) (M : Model (2 * n)) :
              toPrimed V M = fun (i : Fin (2 * n)) => if h : ¬Even i then M i - 1, else if i / 2, V then M i + 1, else M i
              class Validator.Formalism {n : } (pt : STRIPS n) (R : Type) extends Validator.Formula (2 * n) R :
              Instances
                instance Validator.instFormalismStates {n : } {pt : STRIPS n} :
                Equations
                • One or more equations did not get rendered due to their size.
                @[reducible, inline]
                abbrev Validator.Formalism.Variable {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                Equations
                Instances For
                  @[reducible, inline]
                  abbrev Validator.Formalism.Variable.vars {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] :
                  Variable pt RVarSet' (2 * n)
                  Equations
                  Instances For
                    @[reducible, inline]
                    abbrev Validator.Formalism.UnprimedVariable {n : } (pt : STRIPS n) (R : Type) [F : Formalism pt R] :
                    Equations
                    Instances For
                      @[simp]
                      theorem Validator.Formalism.UnprimedVariable.toUnprimed_mem_vars_ofVarSet' {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] [h : Formula.OfPartialModel (2 * n) R] {V : VarSet' n} {pos : Bool} {i : Fin n} :
                      i.toUnprimed (↑(ofVarset' R V pos)).vars i V
                      @[simp]
                      theorem Validator.Formalism.UnprimedVariable.mem_models_ofVarSet' {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] [h : Formula.OfPartialModel (2 * n) R] {V : VarSet' n} {pos : Bool} {M : Formula.Model (2 * n)} :
                      M (↑(ofVarset' R V pos)).models iV, i M.unprimedState pos = true
                      @[irreducible]
                      def Validator.Formalism.UnprimedVariable.toPrimedAux {n : } (oldVars : List (Fin (2 * n))) (h : ioldVars, Even i) (toRename : List (Fin n)) :
                      List (Fin (2 * n))
                      Equations
                      Instances For
                        theorem Validator.Formalism.UnprimedVariable.toPrimedAux_eq {n : } {oldVars : VarSet' (2 * n)} {h : ioldVars, Even i} {toRename : VarSet' n} :
                        toPrimedAux (↑oldVars) h toRename = List.map (fun (x : { x : Fin (2 * n) // x oldVars }) => match x with | i, hi => if i toRename.toUnprimed then have hi := ; i + 1, hi else i) (↑oldVars).attach

                        Make all unprimed vars in x corresponding to the vars in V primed. TODO : clarify the difference between all kinds of variables.

                        Equations
                        Instances For
                          def Validator.Formalism.UnprimedVariable.toPrimed {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] [Formula.Rename (2 * n) R] (x : UnprimedVariable pt R) (V : VarSet' n) :

                          Make all unprimed vars in x corresponding to the vars in V primed. TODO : clarify the difference between all kinds of variables.

                          Equations
                          Instances For
                            @[reducible, inline]
                            abbrev Validator.Formalism.Literal {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                            Equations
                            Instances For
                              @[reducible, inline]
                              abbrev Validator.Formalism.UnprimedLiteral {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                              Equations
                              Instances For
                                Equations
                                Instances For
                                  @[simp]
                                  theorem Validator.Formalism.UnprimedLiteral.models_pos {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {x : UnprimedVariable pt R} :
                                  (pos x).val.models = (↑x).models
                                  @[simp]
                                  @[reducible, inline]
                                  abbrev Validator.Formalism.Variables {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                                  Equations
                                  Instances For
                                    def Validator.Formalism.Variables.inter {n : } {pt : STRIPS n} {R : Type} [F : Formalism pt R] (X : Variables pt R) :
                                    Equations
                                    Instances For
                                      theorem Validator.Formalism.Variables.mem_inter {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {X : Variables pt R} (s : State n) :
                                      s X.inter ∃ (M : Formula.Model (2 * n)), M.unprimedState = s xX, M x.models
                                      @[simp]
                                      @[simp]
                                      theorem Validator.Formalism.Variables.inter_single {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {x : Variable pt R} :
                                      def Validator.Formalism.Variables.union {n : } {pt : STRIPS n} {R : Type} [F : Formalism pt R] (X : Variables pt R) :
                                      Equations
                                      Instances For
                                        theorem Validator.Formalism.Variables.mem_union {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {X : Variables pt R} (s : State n) :
                                        s X.union ∃ (M : Formula.Model (2 * n)), M.unprimedState = s xX, M x.models
                                        @[simp]
                                        @[simp]
                                        theorem Validator.Formalism.Variables.union_single {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {x : Variable pt R} :
                                        @[reducible, inline]
                                        Equations
                                        Instances For
                                          Equations
                                          Instances For
                                            theorem Validator.Formalism.UnprimedVariables.val_append {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {L1 L2 : UnprimedVariables pt R} :
                                            (L1 ++ L2).val = L1.val ++ L2.val
                                            @[simp]
                                            theorem Validator.Formalism.UnprimedVariables.union_append {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {X1 X2 : UnprimedVariables pt R} :
                                            (X1 ++ X2).val.union = X1.val.union X2.val.union
                                            @[simp]
                                            theorem Validator.Formalism.UnprimedVariables.mem_inter {n : } {pt : STRIPS n} {R : Type} [F : Formalism pt R] {X : UnprimedVariables pt R} {s : State n} :
                                            s X.val.inter xX, s (↑x).toStates
                                            @[simp]
                                            @[simp]
                                            theorem Validator.Formalism.UnprimedVariables.inter_append {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {X1 X2 : UnprimedVariables pt R} :
                                            (X1 ++ X2).val.inter = X1.val.inter X2.val.inter
                                            theorem Validator.Formalism.UnprimedVariables.inter_subset_union_iff_models {n : } {pt : STRIPS n} {R : Type} [F : Formalism pt R] (X1 : Variables pt R) (X2 : UnprimedVariables pt R) :
                                            X1.inter X2.val.union ∀ (M : Formula.Model (2 * n)), (∀ xX1, M Formula.models x)xX2, M (↑x).models
                                            def Validator.Formalism.UnprimedVariables.toPrimed {n : } {pt : STRIPS n} {R : Type} [F : Formalism pt R] [Formula.Rename (2 * n) R] (X : UnprimedVariables pt R) (V : VarSet' n) :
                                            Equations
                                            Instances For
                                              theorem Validator.Formalism.UnprimedVariables.mem_inter_toPrimed {n : } {pt : STRIPS n} {R : Type} [F : Formalism pt R] [Formula.Rename (2 * n) R] {X : UnprimedVariables pt R} {V : VarSet' n} {s : State n} :
                                              s (X.toPrimed V).inter s'X.val.inter, iV, i s' i s
                                              @[reducible, inline]
                                              abbrev Validator.Formalism.Literals {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                                              Equations
                                              Instances For
                                                def Validator.Formalism.Literals.pos {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] (X : Variables pt R) :
                                                Equations
                                                Instances For
                                                  instance Validator.Formalism.Literals.instAppend {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] :
                                                  Equations
                                                  @[simp]
                                                  theorem Validator.Formalism.Literals.append_pos {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {L1 L2 : Literals pt R} :
                                                  (L1 ++ L2).1 = L1.1 ++ L2.1
                                                  @[simp]
                                                  theorem Validator.Formalism.Literals.append_neg {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {L1 L2 : Literals pt R} :
                                                  (L1 ++ L2).2 = L1.2 ++ L2.2
                                                  def Validator.Formalism.Literals.union {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] (L : Literals pt R) :
                                                  Equations
                                                  Instances For
                                                    @[simp]
                                                    theorem Validator.Formalism.Literals.mem_union {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {ls : Literals pt R} {s : State n} :
                                                    s ls.union ∃ (M : Formula.Model (2 * n)), M.unprimedState = s ((∃ xls.1, M x.models) xls.2, Mx.models)
                                                    @[simp]
                                                    theorem Validator.Formalism.Literals.union_append {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {L1 L2 : Literals pt R} :
                                                    (L1 ++ L2).union = L1.union L2.union
                                                    def Validator.Formalism.Literals.inter {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] (L : Literals pt R) :
                                                    Equations
                                                    Instances For
                                                      @[simp]
                                                      theorem Validator.Formalism.Literals.mem_inter {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {L : Literals pt R} {s : State n} :
                                                      s L.inter ∃ (M : Formula.Model (2 * n)), M.unprimedState = s (∀ xL.1, M x.models) xL.2, Mx.models
                                                      Equations
                                                      Instances For
                                                        @[reducible, inline]
                                                        Equations
                                                        Instances For
                                                          @[simp]
                                                          theorem Validator.Formalism.UnprimedLiterals.val_append {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {L1 L2 : UnprimedLiterals pt R} :
                                                          (L1 ++ L2).val = L1.val ++ L2.val
                                                          @[simp]
                                                          theorem Validator.Formalism.UnprimedLiterals.inter_append {n : } {pt : STRIPS n} {R : Type} [Formalism pt R] {L1 L2 : UnprimedLiterals pt R} :
                                                          (L1.val ++ L2.val).inter = L1.val.inter L2.val.inter

                                                          Note that this is not true for primed variables

                                                          inductive Validator.Formalism.IsVariable {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                                                          States nProp
                                                          Instances For
                                                            inductive Validator.Formalism.IsLiteral {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                                                            States nProp
                                                            Instances For
                                                              inductive Validator.Formalism.IsLiteralUnion {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                                                              States nProp
                                                              Instances For
                                                                inductive Validator.Formalism.IsVariableInter {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                                                                States nProp
                                                                Instances For
                                                                  inductive Validator.Formalism.IsLiteralInter {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                                                                  States nProp
                                                                  Instances For
                                                                    inductive Validator.Formalism.IsProgrInter {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                                                                    States nProp
                                                                    Instances For
                                                                      inductive Validator.Formalism.IsRegrInter {n : } (pt : STRIPS n) (R : Type) [Formalism pt R] :
                                                                      States nProp
                                                                      Instances For