Documentation

Linglib.Core.Discourse.Goal

Discourse Goals and Plans #

@cite{bratman-1987} @cite{portner-2004} @cite{roberts-2023}

The interlocutors' publicly evident goals, plans, and priorities — the G component of @cite{roberts-2023}'s scoreboard K = ⟨I, M, ≺, CG, QUD, G⟩.

@cite{bratman-1987}: intentions are commitments to action, organized hierarchically into plans. Goals subserve other goals, and an agent's priorities induce a partial order over them.

@cite{portner-2004}'s ToDo list is a special case: an unstructured set of properties the addressee is committed to realizing. The present formalization follows @cite{roberts-2023} in giving G richer internal structure — conditional goals with priority ordering — while remaining compatible with Portner's interface (a GoalSet projects to a flat property list).

Key Design Choices #

  1. Goals are conditional: realized only when applicable circumstances obtain (@cite{roberts-2023} §2.1.1). We represent the condition as a proposition (the modal base propositions that must hold).
  2. Goals carry priority: a natural number where lower = higher priority. @cite{roberts-2023}: "i's priorities are reflected in additional structure over G_i."
  3. Goal sets are per-agent: G = {G_i | i ∈ I}, one set per interlocutor.
structure Core.Discourse.Goal (W : Type u_2) :
Type u_2

A single goal: a proposition the agent is committed to realizing, conditional on certain circumstances obtaining.

@cite{roberts-2023} §2.1.1: "for all g ∈ G_i, g is a conditional goal, its presence in G_i representing i's intention to achieve the goal should certain conditions obtain in the actual world at some future time t' > t."

  • content : WProp

    The content: what the agent aims to bring about

  • condition : WProp

    The condition: circumstances under which this goal is active. λ _ => True for unconditional goals.

  • priority :

    Priority level: 0 = highest priority. @cite{roberts-2023}: goals are hierarchically organized to reflect plans and priorities.

Instances For
    @[implicit_reducible]
    instance Core.Discourse.instInhabitedGoal {a✝ : Type u_2} :
    Inhabited (Goal a✝)
    Equations
    Equations
    Instances For
      structure Core.Discourse.GoalSet (W : Type u_2) :
      Type u_2

      An agent's goal set: the publicly evident goals, plans, and priorities.

      @cite{roberts-2023} §2.1.1: "G_i is the set of i's evident goals, including those which i is publicly committed at t to trying to realize." Goals are organized to reflect plans and priorities.

      • goals : List (Goal W)

        The goals, ordered by priority (lower index = mentioned earlier, not necessarily higher priority — use Goal.priority for ranking).

      Instances For
        @[implicit_reducible]
        instance Core.Discourse.instInhabitedGoalSet {a✝ : Type u_2} :
        Inhabited (GoalSet a✝)
        Equations

        The empty goal set.

        Equations
        Instances For
          def Core.Discourse.GoalSet.add {W : Type u_1} (gs : GoalSet W) (g : Goal W) :

          Add a goal to the set.

          Equations
          Instances For
            @[simp]
            theorem Core.Discourse.GoalSet.add_goals {W : Type u_1} (gs : GoalSet W) (g : Goal W) :
            (gs.add g).goals = g :: gs.goals
            def Core.Discourse.GoalSet.addSimple {W : Type u_1} (gs : GoalSet W) (content : WProp) (priority : := 0) :

            Add an unconditional goal with given priority.

            Equations
            • gs.addSimple content priority = gs.add { content := content, priority := priority }
            Instances For
              def Core.Discourse.GoalSet.remove {W : Type u_1} (gs : GoalSet W) (shouldRemove : Goal WBool) :

              Remove goals whose content matches a predicate (e.g., realized or abandoned).

              Equations
              Instances For
                @[simp]
                theorem Core.Discourse.GoalSet.remove_goals {W : Type u_1} (gs : GoalSet W) (f : Goal WBool) :
                (gs.remove f).goals = List.filter (fun (g : Goal W) => !f g) gs.goals
                noncomputable def Core.Discourse.GoalSet.activeGoals {W : Type u_1} (gs : GoalSet W) (w : W) :
                List (Goal W)

                Goals active in circumstance w (condition satisfied).

                Equations
                Instances For
                  @[simp]
                  theorem Core.Discourse.GoalSet.mem_activeGoals_iff {W : Type u_1} (gs : GoalSet W) (w : W) (g : Goal W) :
                  g gs.activeGoals w g gs.goals g.condition w
                  noncomputable def Core.Discourse.GoalSet.activeContents {W : Type u_1} (gs : GoalSet W) (w : W) :
                  List (WProp)

                  Active goal contents at w, sorted by priority (ascending = most important first).

                  Equations
                  Instances For
                    def Core.Discourse.GoalSet.toPropertyList {W : Type u_1} (gs : GoalSet W) :
                    List (WProp)

                    Project to a flat list of contents (@cite{portner-2004} ToDo list interface).

                    Equations
                    Instances For
                      @[simp]
                      def Core.Discourse.GoalSet.isEmpty {W : Type u_1} (gs : GoalSet W) :
                      Bool

                      Whether the goal set is empty.

                      Equations
                      Instances For
                        theorem Core.Discourse.GoalSet.isEmpty_iff {W : Type u_1} (gs : GoalSet W) :
                        gs.isEmpty = true gs.goals = []
                        def Core.Discourse.GoalSet.size {W : Type u_1} (gs : GoalSet W) :

                        Number of goals.

                        Equations
                        Instances For
                          @[simp]
                          theorem Core.Discourse.GoalSet.size_eq {W : Type u_1} (gs : GoalSet W) :
                          gs.size = gs.goals.length
                          @[simp]
                          theorem Core.Discourse.GoalSet.add_size {W : Type u_1} (gs : GoalSet W) (g : Goal W) :
                          (gs.add g).size = gs.size + 1