Documentation

Linglib.Semantics.Dynamic.DRS.Basic

DRS structural API: functorial renaming and merge algebra #

[KR93]

Structural operations and lemmas over the faithful DRS core (DRS/Defs.lean):

Functorial renaming #

def DRT.DRS.map {L : FirstOrder.Language} {V : Type w} {W : Type x} [DecidableEq W] (f : VW) :
DRS L VDRS L W

Rename discourse referents along f : V → W throughout a DRS.

Equations
Instances For
    def DRT.Condition.map {L : FirstOrder.Language} {V : Type w} {W : Type x} [DecidableEq W] (f : VW) :
    Condition L VCondition L W

    Rename discourse referents along f throughout a condition.

    Equations
    Instances For
      def DRT.Condition.mapList {L : FirstOrder.Language} {V : Type w} {W : Type x} [DecidableEq W] (f : VW) :
      List (Condition L V)List (Condition L W)

      Rename along f throughout a list of conditions. A List helper (not conds.map (Condition.map f)) because the higher-order form fails the nested-inductive structural-recursion checker.

      Equations
      Instances For
        @[simp]
        theorem DRT.DRS.map_id {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (K : DRS L V) :
        map id K = K

        Renaming along the identity is the identity.

        @[simp]
        theorem DRT.Condition.map_id {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (c : Condition L V) :
        map id c = c

        Renaming a condition along the identity is the identity.

        theorem DRT.Condition.mapList_id {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (cs : List (Condition L V)) :
        mapList id cs = cs

        Merge algebra #

        @[simp]
        theorem DRT.DRS.empty_merge {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (K : DRS L V) :
        empty.merge K = K
        @[simp]
        theorem DRT.DRS.merge_empty {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (K : DRS L V) :
        K.merge empty = K
        theorem DRT.DRS.merge_assoc {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (K₁ K₂ K₃ : DRS L V) :
        (K₁.merge K₂).merge K₃ = K₁.merge (K₂.merge K₃)

        Properness (no free discourse referent) #

        def DRT.DRS.Bound {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (b : Finset V) :
        DRS L VProp

        Bound b K: every discourse referent occurring in K is bound — present in b or introduced by K's universe or by an ancestor reachable "left and up" (the antecedent of a threads its referents into the consequent).

        Equations
        Instances For
          def DRT.Condition.Bound {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (b : Finset V) :
          Condition L VProp

          b-boundedness of a condition.

          Equations
          Instances For
            def DRT.Condition.BoundAll {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (b : Finset V) :
            List (Condition L V)Prop

            b-boundedness of a list of conditions. A List helper (not List.Forall (Condition.Bound b)) — the higher-order form fails the nested-inductive structural-recursion checker.

            Equations
            Instances For
              def DRT.DRS.IsProper {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (K : DRS L V) :

              A DRS is proper iff it has no free discourse referent ([KR93], Def. 1.4.2–1.4.3): every occurring referent is bound at its position.

              Equations
              Instances For

                Occurring referents #

                def DRT.Condition.occ {L : FirstOrder.Language} {V : Type w} [DecidableEq V] :
                Condition L VFinset V

                Occurring referents (free or bound) in a condition, as a Finset — the DRS analogue of mathlib's Term.varFinset. Membership x ∈ occ c is decidable, so downstream consumers get decidable occurrence for free.

                Equations
                Instances For
                  def DRT.DRS.occ {L : FirstOrder.Language} {V : Type w} [DecidableEq V] :
                  DRS L VFinset V

                  Occurring referents in a DRS (its universe and those of its conditions).

                  Equations
                  Instances For
                    def DRT.Condition.occL {L : FirstOrder.Language} {V : Type w} [DecidableEq V] :
                    List (Condition L V)Finset V

                    Occurring referents in a list of conditions.

                    Equations
                    Instances For

                      Accessibility (decidable, host-relative) #

                      Accessibility ([KR93], Def. 1.4.11) is intrinsically relative to a host DRS: "u accessible at box B" means u lies in the universe of B or of a box on the path from the host down to B. A host-free ∃ D, WeakSubordinate K D ∧ u ∈ D.referents is vacuous — a superordinate D introducing any referent can always be manufactured. So accessibility is computed top-down, threading the in-scope referents (the same threading as DRS.Bound), which is also decidable.

                      def DRT.DRS.accScope {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (s : Finset V) :
                      DRS L VVOption (Finset V)

                      Descend T, accumulating in-scope referents s ("left and up"); on reaching the box introducing x, return that box's in-scope set s ∪ U. The -consequent additionally sees the antecedent's universe.

                      Equations
                      Instances For
                        def DRT.Condition.accScope {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (s : Finset V) :
                        Condition L VVOption (Finset V)

                        Accessibility threading through a condition.

                        Equations
                        Instances For
                          def DRT.Condition.accScopeL {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (s : Finset V) :
                          List (Condition L V)VOption (Finset V)

                          Accessibility threading through a list of conditions (mutual helper).

                          Equations
                          Instances For
                            def DRT.DRS.accessibleFrom {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (T : DRS L V) (u : V) :
                            Finset V

                            The referents accessible from u's introduction in T ([KR93], Def. 1.4.11), as a decidable Finset; if u is not introduced in T.

                            Equations
                            Instances For
                              def DRT.DRS.Accessible {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (T : DRS L V) (u v : V) :

                              v is accessible from u's position in T. Decidable (Finset membership).

                              Equations
                              Instances For
                                @[implicit_reducible]
                                instance DRT.instDecidableAccessible {L : FirstOrder.Language} {V : Type w} [DecidableEq V] (T : DRS L V) (u v : V) :
                                Decidable (T.Accessible u v)
                                Equations