Documentation

Pdl.Interpolation.ClusterItp

The interpolant of a cluster root and its correctness #

This file continues the development of Pdl.PreInterpolant with

Definition 10.2 and Lemma 10.3 are in Pdl.ClusterRho.

Two small vocabulary lemmas #

@[simp]
theorem Program.voc_steps (as : List Program) :
(steps as).voc = as.pvoc

Entailment from the left component of a node #

def FinePathIn.leftEntails {Hist : History} {Y : Sequent} {tab : Tableau Hist Y} (t : FinePathIn tab) (φ : Formula) :

Λ₁(t) ⊨ φ: the formula φ follows from the left component of the fine node t.

Equations
Instances For

    The vocabulary of a Q-formula #

    The pre-interpolants of Definition 9.18 are QFormulas, i.e. they contain the internal variables q_x as a separate constructor. Their vocabulary therefore splits into two parts: the ordinary vocabulary QFormula.voc, made up of the proposition letters and atomic programs occurring in the formula, and the internal variables QFormula.vars. Lemma 10.1 below bounds the two parts separately, which is exactly the statement voc(ι_x) ⊆ (voc(Γ₁) ∩ voc(Γ₂)) ∪ { q_{c(z)} | z ∈ cycs(x) } of the paper.

    def QFormula.voc {Var : Type} :
    QFormula VarVocab

    The ordinary vocabulary of a Q-formula, i.e. the proposition letters and atomic programs occurring in it. The internal variables are not included; they are given by QFormula.vars.

    Equations
    Instances For
      @[simp]
      theorem QFormula.voc_fma {Var : Type} {ψ : Formula} :
      (fma ψ).voc = ψ.voc
      @[simp]
      theorem QFormula.voc_var {Var : Type} {q : Var} :
      (var q).voc =
      @[simp]
      theorem QFormula.voc_and {Var : Type} {ι1 ι2 : QFormula Var} :
      (ι1.and ι2).voc = ι1.voc ι2.voc
      @[simp]
      theorem QFormula.voc_boxes {Var : Type} {as : List Program} {ι : QFormula Var} :
      (boxes as ι).voc = as.pvoc ι.voc
      @[simp]
      theorem QFormula.vars_fma {Var : Type} {ψ : Formula} :
      (fma ψ).vars = []
      @[simp]
      theorem QFormula.vars_var {Var : Type} {q : Var} :
      (var q).vars = [q]
      @[simp]
      theorem QFormula.vars_and {Var : Type} {ι1 ι2 : QFormula Var} :
      (ι1.and ι2).vars = ι1.vars ++ ι2.vars
      @[simp]
      theorem QFormula.vars_boxes {Var : Type} {as : List Program} {ι : QFormula Var} :
      (boxes as ι).vars = ι.vars
      theorem QFormula.voc_subst_subset {Var : Type} {σ : VarFormula} {V : Vocab} ( : ∀ (q : Var), (σ q).vocV) (ι : QFormula Var) :
      (subst σ ι).vocι.voc V

      Substituting formulas whose vocabulary is inside V for the internal variables gives a formula whose vocabulary is inside voc(ι) ∪ V.

      theorem QFormula.voc_subst_top {Var : Type} (ι : QFormula Var) :
      (subst (fun (x : Var) => ) ι).vocι.voc

      Substituting for all internal variables does not add anything to the vocabulary.

      The vocabulary of conjunctions, of Spl and of the fixpoint gfp #

      theorem QFormula.voc_conj {Var : Type} {n : } (L : List (QFormula Var)) :
      n (conj L).vocιL, n ι.voc
      theorem QFormula.vars_conj {Var : Type} {v : Var} (L : List (QFormula Var)) :
      v (conj L).varsιL, v ι.vars
      @[simp]
      @[simp]
      theorem QFormula.voc_of_mem_Spl {Var : Type} (ι : QFormula Var) (s : QSimple Var) :
      s ι.Spls.toQ.vocι.voc

      The ordinary vocabulary of the simple conjuncts of ι is inside that of ι.

      theorem QFormula.vars_of_mem_Spl {Var : Type} (ι : QFormula Var) (s : QSimple Var) :
      s ι.Splvs.toQ.vars, v ι.vars

      The internal variables of the simple conjuncts of ι are variables of ι.

      theorem QFormula.voc_dropVar {Var : Type} [DecidableEq Var] (x : Var) (ι : QFormula Var) :
      (dropVar x ι).vocι.voc
      theorem QFormula.vars_dropVar {Var : Type} [DecidableEq Var] (x : Var) (ι : QFormula Var) (v : Var) :
      v (dropVar x ι).varsv ι.vars
      theorem QFormula.voc_unions (L : List Program) (n : ) :
      n (Program.unions L).vocαL, n α.voc
      theorem QFormula.voc_loopProgs {Var : Type} [DecidableEq Var] (x : Var) (ι : QFormula Var) (α : Program) :
      α loopProgs x ια.vocι.voc
      theorem QFormula.voc_gfp {Var : Type} [DecidableEq Var] (x : Var) (ι : QFormula Var) :
      (gfp x ι).vocι.voc

      The fixpoint used at companion nodes does not add anything to the vocabulary.

      theorem QFormula.vars_gfp {Var : Type} [DecidableEq Var] (x : Var) (ι : QFormula Var) (v : Var) :
      v (gfp x ι).varsv ι.vars

      The fixpoint used at companion nodes does not add internal variables.

      More facts about the nodes of a quasi-tableau #

      theorem QuasiTab.companion?_qlt {q : QuasiTab} {x c : List } (h : q.companion? x = some c) :
      qlt c x

      The companion of a node is a proper ancestor of it.

      theorem QuasiTab.mem_cycs_self {q : QuasiTab} {x : List } (h : q.isRepeatLeaf x = true) :
      x q.cycs x

      A repeat leaf is one of its own cycles.

      theorem QuasiTab.mem_cycs_of_qedge_of_companion_ne {q : QuasiTab} {x y z : List } (hxy : q.qedge x y) (hz : z q.cycs y) (hne : q.companion? z some x) :
      z q.cycs x

      A generalisation of QuasiTab.cycs_subset_of_qedge: a cycle of a child y of x is a cycle of x, unless its companion is x itself.

      theorem QuasiTab.isLeafAt_of_at? {q : QuasiTab} {x : List } {Δ : Sequent} {k : Typ} (h : q.at? x = some (QNode k Δ [])) :

      The node at address x is a leaf of type 1 when it is QNode one Δ [].

      theorem QuasiTab.typAt_of_at? {q : QuasiTab} {x : List } {n : QuasiTab} (h : q.at? x = some n) :
      q.typAt x = some n.typ
      theorem QuasiTab.at?_child {q : QuasiTab} {x : List } {Δ : Sequent} {k : Typ} {next : List QuasiTab} {i : } (h : q.at? x = some (QNode k Δ next)) (hi : i < next.length) :
      q.at? (x ++ [i]) = some next[i]

      Going to the child with index i, at the level of addresses.

      theorem QuasiTab.qedge_snoc {q : QuasiTab} {x : List } {Δ : Sequent} {k : Typ} {next : List QuasiTab} {i : } (h : q.at? x = some (QNode k Δ next)) (hi : i < next.length) :
      q.qedge x (x ++ [i])

      Two more unfolding lemmas for Definition 9.18 #

      These are the two cases where the data type allows a node without children although the definition of the quasi-tableau provides one; see Remark 9.9.

      theorem LoadedCluster.iitp_two_leaf {X : Sequent} {tab : Tableau [] X} {C : LoadedCluster tab} {θ : FinePathIn tabFormula} {x : List } {Δ : Sequent} (h : C.Q.at? x = some (QuasiTab.QNode Typ.two Δ [])) :
      theorem LoadedCluster.iitp_three_basic_leaf {X : Sequent} {tab : Tableau [] X} {C : LoadedCluster tab} {θ : FinePathIn tabFormula} {x : List } {Δ : Sequent} (h : C.Q.at? x = some (QuasiTab.QNode Typ.three Δ [])) (hb : Δ.basic) :

      Definition 9.20: the interpolant of the root of the cluster #

      noncomputable def LoadedCluster.itp {X : Sequent} {tab : Tableau [] X} (C : LoadedCluster tab) (θ : FinePathIn tabFormula) :

      Def 9.20: the interpolant θ_r of the root r of the cluster C.

      If the left component Γ₁ of the root is empty then θ_r := ⊤ (see Remark 9.19), and otherwise θ_r is the pre-interpolant ι_{r_Q} of the root of the quasi-tableau. The latter is a QFormula, i.e. it may still contain internal variables; by Lemma 10.1 (iitp_vars) it does not, so it does not matter which substitution we use to read it as a Formula, and we simply substitute .

      Equations
      Instances For

        Facts about the cluster that are used but not yet formalised #

        structure LoadedCluster.PaperFacts {X : Sequent} {tab : Tableau [] X} (C : LoadedCluster tab) :

        Facts about the cluster C that the paper establishes elsewhere, but that are not available in this Lean development yet. They are collected here so that the results below can list them as a single hypothesis.

        • proper says that the cluster is proper, as assumed throughout Section 9.
        • exists_right is Lemma 9.7 (d): if C_Δ is non-empty then so is C^R_Δ.
        • vocL and vocR are instances of the fact that the vocabulary of both components only shrinks along a tableau; here applied to the nodes of C⁺, all of which are below the root r of the cluster.
        • loadedProgVoc says that the leading atomic program a of the loaded formula of a basic Δ ∈ Λ₂[C] is in the joint vocabulary of the root. That a ∈ voc(Γ₂) is again vocabulary preservation. That a ∈ voc(Γ₁) — which the paper does not mention, but which its Lemma 10.1 needs — holds when Γ₁ ≠ ∅ because by Lemma 9.7 (e) the modal rule is applied at some t ∈ C^R_Δ and its child u is again in C, so that Λ₁(u) = (Λ₁(t))_a is non-empty by Lemma 9.5 (b), which forces a box ⌈a⌉ψ in Λ₁(t). Note that for Γ₁ = ∅ the claim is false, which is why Definition 9.20 treats that case separately.
        Instances For
          theorem LoadedCluster.thetaOf_voc_sub_jvoc {X : Sequent} {tab : Tableau [] X} (C : LoadedCluster tab) (hF : C.PaperFacts) (θ : FinePathIn tabFormula) ( : fC.fineExits, isPartInterpolant f.label (θ f)) (Δ : Sequent) :
          (C.thetaOf θ Δ).vocjvoc (nodeAt C.root)

          The vocabulary of θ_Δ is inside the joint vocabulary of the root of the cluster. This is Lemma 9.14 (c) together with vocabulary preservation.

          Lemma 10.1: the vocabulary of the pre-interpolants #

          theorem LoadedCluster.mem_iitpList {X : Sequent} {tab : Tableau [] X} {C : LoadedCluster tab} {θ : FinePathIn tabFormula} {x : List } {Δ : Sequent} {next : List QuasiTab} (h : C.Q.at? x = some (QuasiTab.QNode Typ.three Δ next)) {ι : QFormula (List )} ( : ι C.Q.iitpList (C.thetaOf θ) next x 0) :
          ∃ (i : ) (_ : i < next.length), ι = C.iitp θ (x ++ [i])

          The conjuncts in the case k(x) = 3 with Δ_x not basic are the pre-interpolants of the children of x.

          theorem LoadedCluster.iitp_voc_aux {X : Sequent} {tab : Tableau [] X} (C : LoadedCluster tab) (hF : C.PaperFacts) (θ : FinePathIn tabFormula) ( : fC.fineExits, isPartInterpolant f.label (θ f)) (hΓ₁ : (nodeAt C.root).left ) (m : ) (n : QuasiTab) :
          sizeOf n m∀ (x : List ), C.Q.at? x = some n(C.iitp θ x).vocjvoc (nodeAt C.root) v(C.iitp θ x).vars, zC.Q.cycs x, C.Q.companion? z = some v

          Lemma 10.1: the vocabulary of the pre-interpolant of a node x of the quasi-tableau consists of the joint vocabulary of the root of the cluster and of internal variables q_{c(z)} for cycles z ∈ cycs(x).

          Here the two parts are stated separately: voc(ι_x) ⊆ voc(Γ₁) ∩ voc(Γ₂) for the ordinary vocabulary, and the internal variables of ι_x are companions of elements of cycs(x).

          The hypothesis Γ₁ ≠ ∅ is needed: for Γ₁ = ∅ the claim would say that ι_x has no ordinary vocabulary at all, which fails at nodes of type 3 with a basic label. Definition 9.20 covers that case separately, see Remark 9.19.

          theorem LoadedCluster.iitp_voc {X : Sequent} {tab : Tableau [] X} (C : LoadedCluster tab) (hF : C.PaperFacts) (θ : FinePathIn tabFormula) ( : fC.fineExits, isPartInterpolant f.label (θ f)) (hΓ₁ : (nodeAt C.root).left ) (x : List ) :
          (C.iitp θ x).vocjvoc (nodeAt C.root)

          Lemma 10.1, first part: for every node x of the quasi-tableau, the ordinary vocabulary of the pre-interpolant ι_x is inside voc(Γ₁) ∩ voc(Γ₂). See LoadedCluster.iitp_voc_aux for the hypothesis Γ₁ ≠ ∅.

          theorem LoadedCluster.iitp_vars {X : Sequent} {tab : Tableau [] X} (C : LoadedCluster tab) (hF : C.PaperFacts) (θ : FinePathIn tabFormula) ( : fC.fineExits, isPartInterpolant f.label (θ f)) (hΓ₁ : (nodeAt C.root).left ) (x v : List ) :
          v (C.iitp θ x).varszC.Q.cycs x, C.Q.companion? z = some v

          Lemma 10.1, second part: the internal variables occurring in the pre-interpolant ι_x are the companions q_{c(z)} of cycles z ∈ cycs(x).

          theorem LoadedCluster.rootIitp_vars {X : Sequent} {tab : Tableau [] X} (C : LoadedCluster tab) (hF : C.PaperFacts) (θ : FinePathIn tabFormula) ( : fC.fineExits, isPartInterpolant f.label (θ f)) (hΓ₁ : (nodeAt C.root).left ) :
          (C.rootIitp θ).vars = []

          The pre-interpolant of the root of the quasi-tableau contains no internal variables, because cycs(r_Q) = ∅ (Lemma 9.12 (b)).

          theorem LoadedCluster.itp_voc {X : Sequent} {tab : Tableau [] X} (C : LoadedCluster tab) (hF : C.PaperFacts) (θ : FinePathIn tabFormula) ( : fC.fineExits, isPartInterpolant f.label (θ f)) :
          (C.itp θ).vocjvoc (nodeAt C.root)

          Lemma 10.1, the corollary: the interpolant of the root of the cluster only uses the joint vocabulary of Γ₁ and Γ₂.