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 at_in_lt_freeVar {𝕏 : Split.Proof} [fin_X : Fintype 𝕏.X] {n : β„•} (h : at n ∈ 𝕏.Sequent) :
      n < 𝕏.freeVar
      noncomputable def encodeVar {𝕏 : Split.Proof} [Fintype 𝕏.X] :
      𝕏.X β†’ β„•

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

      Equations
      Instances For
        noncomputable def unencodeVar {𝕏 : Split.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 encodeVar_inj' (𝕏 : Split.Proof) [Fintype 𝕏.X] (x y : 𝕏.X) :

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

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

          unencodeVar is a left inverse of encodeVar.

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

          encodeVar is a left inverse of unencodeVar.

          theorem at_in_not_encodeVar {𝕏 : Split.Proof} [fin_X : Fintype 𝕏.X] {n : β„•} (h : at n ∈ 𝕏.Sequent) (x : 𝕏.X) :
          theorem encodeVar_eq {𝕏 : Split.Proof} {Fin_X : Fintype 𝕏.X} {x : 𝕏.X} {n : β„•} {h1 : n - 𝕏.freeVar < Fintype.card 𝕏.X} {h2 : n β‰₯ 𝕏.freeVar} :
          noncomputable def equation {𝕏 : Split.Proof} [fin_X : Fintype 𝕏.X] (x : 𝕏.X) :
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            theorem encodeVar_helper₁ {𝕏 : Split.Proof} [fin_X : Fintype 𝕏.X] {Y : Finset 𝕏.X} {n : β„•} (h : n ∈ Finset.image encodeVar Y) :
            n - 𝕏.freeVar < Fintype.card 𝕏.X
            theorem encodeVar_helperβ‚‚ {𝕏 : Split.Proof} [fin_X : Fintype 𝕏.X] {Y : Finset 𝕏.X} {n : β„•} (h : n ∈ Finset.image encodeVar Y) :
            unencodeVar n β‹― ∈ Y
            noncomputable def extend {𝕏 : Split.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 partial_const {p : β„• β†’ Prop} [DecidablePred p] (Οƒ : Subtype p β†’ Formula) (A : Formula) :
              (βˆ€ n ∈ A.vocab, Β¬p n) β†’ A = partial_ Οƒ A
              @[simp]
              theorem Finset.doubleton_subset_iff {Ξ± : Type} [DecidableEq Ξ±] {s : Finset Ξ±} {a b : Ξ±} :
              theorem extend_in {𝕏 : Split.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 encodeVar_in_equation_imp_edge {𝕏 : Split.Proof} [fin_X : Fintype 𝕏.X] {x y : 𝕏.X} :
              encodeVar y ∈ (equation x).vocab β†’ Split.edge 𝕏.Ξ± x y

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

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

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

              theorem interpolant_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 interpolant_strong {𝕏 : Split.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
                @[irreducible]
                theorem interpolant_strong_prop {𝕏 : Split.Proof} [fin_X : Fintype 𝕏.X] (Y : Finset 𝕏.X) (Y_sub : Y βŠ† Fintype.elems) (n : { n : β„• // n ∈ Finset.image encodeVar Y }) :
                (interpolant_strong Y_sub n = partial_ (interpolant_strong Y_sub) (equation (unencodeVar ↑n β‹―)) ∨ (interpolant_strong Y_sub nβ‰…partial_ (interpolant_strong Y_sub) (equation (unencodeVar ↑n β‹―)))) ∧ (βˆ€ m ∈ (interpolant_strong Y_sub n).vocab, m ∈ (Split.f (Split.r 𝕏.Ξ± (unencodeVar ↑n β‹―))).left.vocab ∩ (Split.f (Split.r 𝕏.Ξ± (unencodeVar ↑n β‹―))).right.vocab βˆͺ Finset.image encodeVar Fintype.elems \ Finset.image encodeVar Y) ∧ βˆ€ (y : 𝕏.X), encodeVar y ∈ (partial_ (interpolant_strong Y_sub) (at↑n)).vocab β†’ Relation.ReflTransGen (Split.edge 𝕏.Ξ±) (unencodeVar ↑n β‹―) y

                Proves that interpolant_strong satisfies the necessary properties.

                noncomputable def interpolant (𝕏 : Split.Proof) [fin_X : Fintype 𝕏.X] :
                Equations
                Instances For
                  theorem interpolant_prop {𝕏 : Split.Proof} [fin_X : Fintype 𝕏.X] (x : 𝕏.X) :