Documentation

Pdl.Distance

structure DecidableKripkeModel (W : Type) :

A Kripke model where the relation and valuation are decidable. Moreover, to get computable composition and transitive closure we want the type of worlds to be finite and enumerable. In fact, to avoid choice, we want a list of all worlds. -- TODO: weaken List to Fintype, should still be possible to define distance?

Instances For
    theorem Finset.sdiff_ssubset_sdiff {α : Type u_1} [DecidableEq α] {A B C : Finset α} (h1 : B A) (h3 : C B) :
    A \ B A \ C
    theorem reachableFrom_terminationHelper {α : Type u_1} (r : ααProp) [DecidableRel r] [DecidableEq α] [α_fin : Fintype α] (here : Finset α) (h : (Finset.filter (fun (y : α) => xhere, yhere r x y) Fintype.elems).Nonempty) :
    (Fintype.elems \ (here Finset.filter (fun (y : α) => xhere, yhere r x y) Fintype.elems)).card < (Fintype.elems \ here).card
    @[irreducible]
    def reachableFrom {α : Type u_1} (r : ααProp) [DecidableRel r] [DecidableEq α] [α_fin : Fintype α] (here : Finset α) :

    Computable definition to close a finset under the reflexive transitive closure of a relation.

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For
      @[irreducible]
      theorem reachableFrom.subset {α : Type u_1} (r : ααProp) [DecidableRel r] [DecidableEq α] [α_fin : Fintype α] (here : Finset α) :
      here reachableFrom r here
      @[irreducible]
      theorem reachableFrom.mem_iff {α : Type u_1} (r : ααProp) [DecidableRel r] [DecidableEq α] [α_fin : Fintype α] (here : Finset α) (y : α) :
      y reachableFrom r here xhere, Relation.ReflTransGen r x y

      Used for case star in relate.instDecidable below.

      Equations

      In models of size n this is a strict upper bound for the distance. Used only for the termination proofs below.

      Equations
      Instances For
        theorem distance_helper (x y k : ) (h : k y) (h2 : x 0) :
        x + y + k < 1 + x + y * x + y
        @[irreducible]
        noncomputable def distance {W : Type} (Mod : DecidableKripkeModel W) (v w : W) (α : Program) :
        Equations
        Instances For
          @[irreducible]
          noncomputable def distance.mdist {W : Type} (Mod : DecidableKripkeModel W) (v : W) (α : Program) (k : ) :
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            noncomputable def distance_list {W : Type} (Mod : DecidableKripkeModel W) (v w : W) (δ : List Program) :
            Equations
            Instances For
              theorem distance_iff_relate {W : Type} (Mod : DecidableKripkeModel W) (α : Program) (v w : W) :
              distance Mod v w α relate Mod.M α v w
              theorem relate_existsH_distance {W : Type} {v w : W} (Mod : DecidableKripkeModel W) (α : Program) (v_α_w : relate Mod.M α v w) :
              H α, evaluate Mod.M v (Con .1) distance_list Mod v w .2 = distance Mod v w α