Documentation

GL.Interpolation.Interpolants

Finding interpolants #

Here we show that given a finite GL-split proof, we can always find suitable interpolants.

def Split.Proof.Sequent (𝕏 : Proof) [fin_X : Fintype 𝕏.X] :

Get the entire underlying sequent of a finite proof.

Equations
Instances For
    def Split.Proof.freeVar (𝕏 : Proof) [fin_X : Fintype 𝕏.X] :

    Find n such that for all m β‰₯ n, m is not in an the variables of the proof.

    Equations
    Instances For
      theorem Split.at_in_lt_freeVar {𝕏 : Proof} [fin_X : Fintype 𝕏.X] {n : β„•} (h : at n ∈ 𝕏.Sequent) :
      n < 𝕏.freeVar
      noncomputable def Split.encodeVar {𝕏 : Proof} [Fintype 𝕏.X] :
      𝕏.X β†’ β„•

      For each x in a finite proof, find a free variable.

      Equations
      Instances For
        noncomputable def Split.unencodeVar {𝕏 : Proof} [Fintype 𝕏.X] (n : β„•) (h1 : n - 𝕏.freeVar < Fintype.card 𝕏.X) :
        𝕏.X

        Given n which is in the range of the free variables, unencode n back to its node in the proof.

        Equations
        Instances For

          The encodeVar function is injective.

          @[simp]
          theorem Split.encodeVar_inj' (𝕏 : Proof) [Fintype 𝕏.X] (x y : 𝕏.X) :

          The encodeVar function is injective. This version works better with simp than encodeVar_inj.

          theorem Split.encodeVar_inv (𝕏 : Proof) [Fintype 𝕏.X] (x : 𝕏.X) :
          unencodeVar (encodeVar x) β‹― = x

          unencodeVar is a left inverse of encodeVar.

          theorem Split.unencodeVar_inv (𝕏 : Proof) [Fintype 𝕏.X] (n : β„•) (h1 : n - 𝕏.freeVar < Fintype.card 𝕏.X) (h2 : n β‰₯ 𝕏.freeVar) :

          encodeVar is a left inverse of unencodeVar.

          theorem Split.at_in_not_encodeVar {𝕏 : Proof} [fin_X : Fintype 𝕏.X] {n : β„•} (h : at n ∈ 𝕏.Sequent) (x : 𝕏.X) :
          theorem Split.encodeVar_eq {𝕏 : Proof} {Fin_X : Fintype 𝕏.X} {x : 𝕏.X} {n : β„•} {h1 : n - 𝕏.freeVar < Fintype.card 𝕏.X} {h2 : n β‰₯ 𝕏.freeVar} :
          noncomputable def Split.equation {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : 𝕏.X) :
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem Split.encodeVar_helper₁ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] {Y : Finset 𝕏.X} {n : β„•} (h : n ∈ Finset.image encodeVar Y) :
            n - 𝕏.freeVar < Fintype.card 𝕏.X
            theorem Split.encodeVar_helperβ‚‚ {𝕏 : Proof} [fin_X : Fintype 𝕏.X] {Y : Finset 𝕏.X} {n : β„•} (h : n ∈ Finset.image encodeVar Y) :
            unencodeVar n β‹― ∈ Y
            noncomputable def Split.extend {𝕏 : Proof} [fin_X : Fintype 𝕏.X] {Y : Finset 𝕏.X} (Y_sub : Y βŠ† Fintype.elems) (Οƒ : { x : 𝕏.X // x ∈ Y } β†’ Formula) :

            Extend a substitution specific to encoded variables to all formulas.

            Equations
            Instances For
              theorem Split.partial_const {p : β„• β†’ Prop} [DecidablePred p] (Οƒ : Subtype p β†’ Formula) (A : Formula) :
              (βˆ€ n ∈ A.vocab, Β¬p n) β†’ A = partial_ Οƒ A
              @[simp]
              theorem Split.Finset.doubleton_subset_iff {Ξ± : Type} [DecidableEq Ξ±] {s : Finset Ξ±} {a b : Ξ±} :
              theorem Split.extend_in {𝕏 : Proof} [fin_X : Fintype 𝕏.X] {Y : Finset 𝕏.X} (Y_sub : Y βŠ† Fintype.elems) (Οƒ : { x : 𝕏.X // x ∈ Y } β†’ Formula) (A : Formula) :
              (βˆ€ y ∈ Y, encodeVar y βˆ‰ A.vocab) β†’ A = extend Y_sub Οƒ A
              theorem Split.encodeVar_in_equation_imp_edge {𝕏 : Proof} [fin_X : Fintype 𝕏.X] {x y : 𝕏.X} :
              encodeVar y ∈ (equation x).vocab β†’ edge 𝕏.Ξ± x y

              From the paper: If py ∈ Ο‡x then x ◁ y.

              theorem Split.var_in_equation {𝕏 : Proof} [fin_X : Fintype 𝕏.X] {x : 𝕏.X} (n : β„•) :
              n ∈ (equation x).vocab β†’ n ∈ (f (r 𝕏.Ξ± x)).left.vocab ∩ (f (r 𝕏.Ξ± x)).right.vocab ∨ βˆƒ (y : 𝕏.X), encodeVar y = n ∧ edge 𝕏.Ξ± x y

              From the paper: If p ∈ Ο‡x then p ∈ Voc(fΛ‘(x)) ∩ Voc(fΚ³(x)) or p = py and x ◁ y

              theorem Split.Solution_strong_helper {p : β„• β†’ Prop} [DecidablePred p] (Οƒ : Subtype p β†’ Formula) (n : β„•) {B A : Formula} :
              single n B (partial_ Οƒ A) = partial_ (fun (m : { m : β„• // p m ∨ m = n }) => single n B (if h : p ↑m then Οƒ βŸ¨β†‘m, h⟩ else at↑m)) A

              Helper for Solution strong, gives interaction between single substitution and partial substitution.

              @[irreducible]
              noncomputable def Split.Solution_strong {𝕏 : Proof} [fin_X : Fintype 𝕏.X] {Y : Finset 𝕏.X} (Y_sub : Y βŠ† Fintype.elems) :

              Strong solution towards finding interpolants.

              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                theorem Split.equiv_help {C D E : Formula} (h : C≅D) (g : D = E) :
                @[irreducible]
                theorem Split.Solution_strong_prop {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (Y : Finset 𝕏.X) (Y_sub : Y βŠ† Fintype.elems) (n : { n : β„• // n ∈ Finset.image encodeVar Y }) :
                (Solution_strong Y_sub n = partial_ (Solution_strong Y_sub) (equation (unencodeVar ↑n β‹―)) ∨ (Solution_strong Y_sub nβ‰…partial_ (Solution_strong Y_sub) (equation (unencodeVar ↑n β‹―)))) ∧ (βˆ€ m ∈ (Solution_strong Y_sub n).vocab, m ∈ (f (r 𝕏.Ξ± (unencodeVar ↑n β‹―))).left.vocab ∩ (f (r 𝕏.Ξ± (unencodeVar ↑n β‹―))).right.vocab βˆͺ Finset.image encodeVar Fintype.elems \ Finset.image encodeVar Y) ∧ βˆ€ (y : 𝕏.X), encodeVar y ∈ (partial_ (Solution_strong Y_sub) (at↑n)).vocab β†’ Relation.ReflTransGen (edge 𝕏.Ξ±) (unencodeVar ↑n β‹―) y

                Proves the Solution_strong satisfies the necessary properties.

                noncomputable def Split.Interpolant (𝕏 : Proof) [fin_X : Fintype 𝕏.X] :
                Equations
                Instances For
                  theorem Split.eq_chain {Ξ± : Type} {a b c d : Ξ±} {r : Ξ± β†’ Ξ± β†’ Prop} (h₁ : r a c) (hβ‚‚ : a = b) (h₃ : c = d) :
                  r b d
                  theorem Split.Interpolant_prop {𝕏 : Proof} [fin_X : Fintype 𝕏.X] (x : 𝕏.X) :
                  (Interpolant 𝕏 (at encodeVar x) = Interpolant 𝕏 (equation x) ∨ (Interpolant 𝕏 (at encodeVar x)β‰…Interpolant 𝕏 (equation x))) ∧ (Interpolant 𝕏 (at encodeVar x)).vocab βŠ† (f (r 𝕏.Ξ± x)).left.vocab ∩ (f (r 𝕏.Ξ± x)).right.vocab