Documentation

Pdl.Sequent

Sequents #

Optional loaded formulas (Olfs) #

@[reducible, inline]
abbrev Olf :

In nodes we optionally have a negated loaded formula on the left or right.

Equations
Instances For
    def Olf.voc :
    Equations
    Instances For
      @[instance_reducible]
      Equations
      @[simp]
      theorem Option.some_subseteq {α : Type u_1} {x : α} {O : Option α} :
      some x O some x = O
      @[simp]
      theorem Option.none_subseteq {α : Type u_1} {O : Option α} :
      @[instance_reducible]
      instance Option.instDecidableSubset {α : Type u_1} [DecidableEq α] (o1 o2 : Option α) :
      Decidable (o1 o2)

      The subset relation on Option α from Option.instHasSubsetOption is decidable.

      Equations
      @[instance_reducible]
      instance Option.insHasSdiff {α : Type u_1} [DecidableEq α] :

      Instance that is used to say (O : Olf) \ (O' : Olf).

      Equations
      • One or more equations did not get rendered due to their size.
      @[simp]
      theorem Option.insHasSdiff_none {α : Type u_1} {o : Option α} [DecidableEq α] :
      @[simp]
      theorem Option.insHasSdiff_remove_none_cancel {α : Type u_1} {o : Option α} [DecidableEq α] :
      o \ none = o
      @[simp]
      theorem Option.insHasSdiff_remove_sem_eq_none {α : Type u_1} {x : α} [DecidableEq α] :
      Equations
      Instances For
        @[simp]
        theorem Olf.L_none :
        @[simp]
        theorem Olf.L_inr {lf : NegLoadFormula} :
        L (some (Sum.inr lf)) =
        @[simp]
        theorem Olf.L_inl {lf : NegLoadFormula} :
        L (some (Sum.inl lf)) = {~lf.1.unload}
        theorem Olf.L_subset_of_subset {O1 O2 : Olf} (h : O1 O2) :
        O1.LO2.L
        theorem Olf.L_sdiff_subset {O Ocond : Olf} :
        (O \ Ocond).LO.L
        Equations
        Instances For
          @[simp]
          theorem Olf.R_none :
          @[simp]
          theorem Olf.R_inl {lf : NegLoadFormula} :
          R (some (Sum.inl lf)) =
          @[simp]
          theorem Olf.R_inr {lf : NegLoadFormula} :
          R (some (Sum.inr lf)) = {~lf.1.unload}
          theorem Olf.R_subset_of_subset {O1 O2 : Olf} (h : O1 O2) :
          O1.RO2.R
          theorem Olf.R_sdiff_subset {O Ocond : Olf} :
          (O \ Ocond).RO.R
          def Option.overwrite {α : Type u_1} :
          Option αOption αOption α
          Equations
          Instances For
            def Olf.change (oldO Ocond newO : Olf) :
            Equations
            Instances For
              @[simp]
              theorem Olf.change_old_none_none {oldO : Olf} :
              oldO.change none none = oldO
              @[simp]
              theorem Olf.change_none_none_new {newO : Olf} :
              change none none newO = newO
              @[simp]
              theorem Olf.change_some {oldO whatever : Olf} {wnlf : NegLoadFormula NegLoadFormula} :
              oldO.change whatever (some wnlf) = some wnlf
              @[simp]
              theorem Olf.change_some_some_eq { : NegLoadFormula NegLoadFormula} {Onew : Olf} :
              change (some ) (some ) Onew = Onew
              @[instance_reducible]
              Equations
              • One or more equations did not get rendered due to their size.
              @[instance_reducible]
              Equations
              • One or more equations did not get rendered due to their size.
              @[instance_reducible]
              Equations
              • One or more equations did not get rendered due to their size.

              Sequents and their (multi)set quality #

              @[implicit_reducible]

              A tableau node is labelled with two finite sets of formulas and an Olf. Each formula is placed on the left or right and up to one formula may be loaded.

              Equations
              Instances For
                @[instance_reducible]
                unsafe instance instReprSequent :
                Equations

                Components and sides of sequents #

                Equations
                Instances For
                  Equations
                  Instances For
                    Equations
                    Instances For
                      @[simp]
                      theorem Sequent.L_eq {L R : Finset Formula} {O : Olf} :
                      @[simp]
                      theorem Sequent.R_eq {L R : Finset Formula} {O : Olf} :
                      @[simp]
                      theorem Sequent.O_eq {L R : Finset Formula} {O : Olf} :
                      Equations
                      Instances For
                        Equations
                        Instances For
                          @[simp]
                          theorem Sequent.left_eq {L R : Finset Formula} {O : Olf} :
                          left (L, R, O) = L O.L
                          @[simp]
                          theorem Sequent.right_eq {L R : Finset Formula} {O : Olf} :
                          right (L, R, O) = R O.R

                          (Joint) vocabulary of sequents #

                          Like Olf.voc but without the ⊕ inside.

                          Equations
                          Instances For
                            Equations
                            Instances For

                              Finset version of lfovoc.

                              Equations
                              Instances For
                                def jvoc (X : Sequent) :

                                The joint vocabulary occurring on both the left and the right side.

                                Equations
                                Instances For
                                  theorem jvoc_sub_of_voc_sub {Y X : Sequent} (hl : Y.left.fvocX.left.fvoc) (hr : Y.right.fvocX.right.fvoc) :
                                  jvoc Yjvoc X

                                  Formulas as elements of sequents #

                                  @[instance_reducible]
                                  Equations
                                  @[simp]
                                  theorem Sequent.mem_def {φ : Formula} {X : Sequent} :
                                  φ X φ X.L φ X.R
                                  @[instance_reducible]
                                  Equations
                                  @[instance_reducible]
                                  Equations
                                  • One or more equations did not get rendered due to their size.
                                  Equations
                                  Instances For
                                    @[instance_reducible]
                                    Equations

                                    Closed, basic, loaded and free sequents #

                                    A sequent is closed iff it contains or contains a formula and its negation.

                                    Equations
                                    Instances For

                                      A sequent is basic iff it only contains basic formulas and is not closed.

                                      Equations
                                      Instances For
                                        @[instance_reducible]
                                        instance Fintype.decidableExistsConjFintype {α : Type u_1} {p q : αProp} [DecidablePred q] [Fintype (Subtype p)] :
                                        Decidable (∃ (a : α), p a q a)

                                        A variant of Fintype.decidableExistsFintype, used by instDecidableClosed.

                                        Equations
                                        @[instance_reducible]
                                        Equations
                                        @[instance_reducible]
                                        Equations
                                        Equations
                                        Instances For
                                          theorem Sequent.isRight_of_not_isLeft_isLoaded {X : Sequent} (h1 : ¬X.2.2.isLeft) (h2 : X.isLoaded) :
                                          X.2.2.isRight

                                          A loaded sequent that is not loaded on the left is loaded on the right.

                                          @[instance_reducible]
                                          Equations
                                          • One or more equations did not get rendered due to their size.
                                          Equations
                                          Instances For
                                            @[instance_reducible]
                                            Equations
                                            • One or more equations did not get rendered due to their size.

                                            Semantics of sequents #

                                            @[instance_reducible]
                                            Equations
                                            @[instance_reducible]
                                            Equations
                                            theorem vDash_setEqTo_iff {W : Type} {X Y : Sequent} (h : X = Y) (M : KripkeModel W) (w : W) :
                                            (M, w) X (M, w) Y

                                            Removing loaded formulas from sequents #

                                            @[simp]
                                            theorem Sequent.isFree_then_without_isFree (LRO : Sequent) :
                                            LRO.isFree∀ (anf : AnyNegFormula), (LRO.without anf).isFree
                                            inductive Side :
                                            Instances For
                                              def sideOf {α : Type u_1} :
                                              α αSide
                                              Equations
                                              Instances For
                                                Equations
                                                Instances For
                                                  theorem Sequent.isLoaded_of_negAnyFormula_loaded {α : Program} {ξ : AnyFormula} {side : Side} {X : Sequent} (negLoad_in : (~''(AnyFormula.loaded (αξ))).in_side side X) :

                                                  Whatever formulas #

                                                  A type to describe all formulas that can occur in a sequent, without losing information about whether they are loaded or not.

                                                  Unfortunately our AnyFormula type does not include negated loaded formulas, so this is yet another type to describe "whatever formula" can be in a sequent, without losing information.

                                                  Instances For
                                                    Equations
                                                    • One or more equations did not get rendered due to their size.
                                                    Instances For

                                                      A normal formula is in X.wForms iff it is on the left or on the right of X. (Note that the Olf part of X only contributes negated loaded formulas.)

                                                      In a basic sequent all free diamonds are atomic.

                                                      A negated loaded formula is in X.wForms iff it is the loaded formula of X.

                                                      In a basic sequent all loaded diamonds are atomic.

                                                      Sorting Finsets of Sequents #

                                                      Lexicographic orders on lists and pairs #

                                                      NOTE: The following two definitions and their properties are general, i.e. not about PDL at all. These could be moved to a separate file (or even might be in newer versions of Mathlib?).

                                                      def listLex {α : Type} (le : ααProp) :
                                                      List αList αProp

                                                      Lexicographic extension of a relation le to lists: shorter lists come first, and lists of the same shape are compared element-wise from left to right.

                                                      Equations
                                                      Instances For
                                                        @[instance_reducible]
                                                        instance listLex.instDecidableRel {α : Type} [DecidableEq α] (le : ααProp) [DecidableRel le] :
                                                        Equations
                                                        theorem listLex_refl {α : Type} {le : ααProp} (hrefl : ∀ (a : α), le a a) (as : List α) :
                                                        listLex le as as
                                                        theorem listLex_antisymm {α : Type} {le : ααProp} (hanti : ∀ (a b : α), le a ble b aa = b) (as bs : List α) :
                                                        listLex le as bslistLex le bs asas = bs
                                                        theorem listLex_trans {α : Type} {le : ααProp} (hanti : ∀ (a b : α), le a ble b aa = b) (htrans : ∀ (a b c : α), le a ble b cle a c) (as bs cs : List α) :
                                                        listLex le as bslistLex le bs cslistLex le as cs
                                                        theorem listLex_total {α : Type} {le : ααProp} (hrefl : ∀ (a : α), le a a) (htotal : ∀ (a b : α), le a b le b a) (as bs : List α) :
                                                        listLex le as bs listLex le bs as
                                                        def prodLex {α β : Type} (le1 : ααProp) (le2 : ββProp) :
                                                        α × βα × βProp

                                                        Lexicographic combination of two relations on a product type.

                                                        Equations
                                                        Instances For
                                                          @[instance_reducible]
                                                          instance prodLex.instDecidableRel {α β : Type} [DecidableEq α] (le1 : ααProp) (le2 : ββProp) [DecidableRel le1] [DecidableRel le2] :
                                                          Equations
                                                          theorem prodLex_refl {α β : Type} {le1 : ααProp} {le2 : ββProp} (h1 : ∀ (a : α), le1 a a) (h2 : ∀ (b : β), le2 b b) (x : α × β) :
                                                          prodLex le1 le2 x x
                                                          theorem prodLex_antisymm {α β : Type} {le1 : ααProp} {le2 : ββProp} (h1 : ∀ (a a' : α), le1 a a'le1 a' aa = a') (h2 : ∀ (b b' : β), le2 b b'le2 b' bb = b') (x y : α × β) :
                                                          prodLex le1 le2 x yprodLex le1 le2 y xx = y
                                                          theorem prodLex_trans {α β : Type} {le1 : ααProp} {le2 : ββProp} (hanti1 : ∀ (a a' : α), le1 a a'le1 a' aa = a') (htrans1 : ∀ (a a' a'' : α), le1 a a'le1 a' a''le1 a a'') (htrans2 : ∀ (b b' b'' : β), le2 b b'le2 b' b''le2 b b'') (x y z : α × β) :
                                                          prodLex le1 le2 x yprodLex le1 le2 y zprodLex le1 le2 x z
                                                          theorem prodLex_total {α β : Type} {le1 : ααProp} {le2 : ββProp} (hrefl1 : ∀ (a : α), le1 a a) (htotal1 : ∀ (a a' : α), le1 a a' le1 a' a) (htotal2 : ∀ (b b' : β), le2 b b' le2 b' b) (x y : α × β) :
                                                          prodLex le1 le2 x y prodLex le1 le2 y x

                                                          An order on loaded formulas, via a key #

                                                          Every loaded formula is a non-empty sequence of loading boxes followed by a normal formula. The key of a loaded formula records exactly this data, and hence determines it uniquely. NOTE: This could be moved to Pdl/Syntax.lean.

                                                          Equations
                                                          Instances For

                                                            Inverse of LoadFormula.key, see LoadFormula.ofKey_key. (The value for the empty list of programs is arbitrary.) NOTE: This could be moved to Pdl/Syntax.lean.

                                                            Equations
                                                            Instances For

                                                              The key of a loaded formula determines it.

                                                              theorem LoadFormula.key_injective {χ χ' : LoadFormula} (h : χ.key = χ'.key) :
                                                              χ = χ'

                                                              An order on sequents, via a key #

                                                              Key of an Olf: which side (if any) is loaded, together with the key of the loaded formula.

                                                              Equations
                                                              Instances For
                                                                theorem Olf.key_injective {O O' : Olf} :
                                                                O.key = O'.keyO = O'

                                                                Key of a sequent: the sorted lists of the left and right side, and the key of the Olf.

                                                                Equations
                                                                Instances For
                                                                  theorem Finset.fsort_injective {X Y : Finset Formula} (h : X.fsort = Y.fsort) :
                                                                  X = Y

                                                                  Finsets of formulas with the same fsort are equal. NOTE: This could be moved to Pdl/Syntax.lean.

                                                                  theorem Sequent.key_injective {X Y : Sequent} (h : X.key = Y.key) :
                                                                  X = Y

                                                                  Order used to compare the keys of Olfs.

                                                                  Equations
                                                                  Instances For
                                                                    theorem olfKeyLe_antisymm (x y : × List Program × Formula) (h1 : olfKeyLe x y) (h2 : olfKeyLe y x) :
                                                                    x = y
                                                                    theorem olfKeyLe_trans (x y z : × List Program × Formula) (h1 : olfKeyLe x y) (h2 : olfKeyLe y z) :
                                                                    def Sequent.le (X Y : Sequent) :

                                                                    A linear order on sequents, used to define Finset.seqSort.

                                                                    Equations
                                                                    Instances For

                                                                      Sort a finite set of sequents into a list, using Sequent.le.

                                                                      Equations
                                                                      Instances For
                                                                        @[simp]
                                                                        theorem Finset.mem_seqSort {X : Sequent} (A : Finset Sequent) :
                                                                        X A.seqSort X A