Documentation

Linglib.Fragments.English.Scales

English Scales #

[Hor72] [Ken07] [Chi13] [Fox07] [Spe16]Horn scales for quantifiers, modals, and degrees.

Main definitions #

structure English.Scales.Scale (α : Type) :

Horn scale: ordered list from weak to strong.

  • items : List α
  • name : String
Instances For
    def English.Scales.Scale.alternatives {α : Type} [BEq α] (s : Scale α) (x : α) :
    List α
    Equations
    • s.alternatives x = match List.dropWhile (fun (x_1 : α) => x_1 != x) s.items with | [] => [] | head :: rest => rest
    Instances For
      def English.Scales.Scale.strongest {α : Type} (s : Scale α) :
      Option α
      Equations
      Instances For
        def English.Scales.Scale.weakest {α : Type} (s : Scale α) :
        Option α
        Equations
        Instances For
          def English.Scales.Scale.weaker {α : Type} [BEq α] (s : Scale α) (x y : α) :
          Bool
          Equations
          • One or more equations did not get rendered due to their size.
          Instances For
            Instances For
              Equations
              • One or more equations did not get rendered due to their size.
              Instances For
                @[implicit_reducible]
                Equations
                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    @[implicit_reducible]
                    Equations
                    Instances For
                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        @[implicit_reducible]
                        Equations

                        Degree/gradable adjective expressions

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

                            The ⟨warm, hot⟩ scale

                            Equations
                            Instances For

                              The ⟨good, excellent⟩ scale

                              Equations
                              Instances For

                                The ⟨like, love⟩ scale

                                Equations
                                Instances For

                                  Evaluative adjective expressions for quality judgments.

                                  This scale is used in:

                                  • [YTGF20] politeness model
                                  • Review/feedback contexts

                                  The scale goes from strongly negative to strongly positive: ⟨terrible, bad, good, amazing⟩

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

                                      The ⟨terrible, bad, good, amazing⟩ evaluative scale

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

                                        Negated evaluative: "not terrible", "not amazing", etc.

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

                                            Combined evaluative utterance type (positive + negated).

                                            This is the full utterance set for politeness scenarios: 8 utterances = 4 positive + 4 negated.

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

                                                All evaluative utterances (positive and negated)

                                                Equations
                                                • One or more equations did not get rendered due to their size.
                                                Instances For
                                                  def English.Scales.numerals (n : ) :
                                                  Scale

                                                  Build a numeral scale from 1 to n

                                                  Equations
                                                  • English.Scales.numerals n = { items := List.map (fun (x : ) => x + 1) (List.range n), name := toString "⟨1, ..., " ++ toString n ++ toString "⟩" }
                                                  Instances For
                                                    def English.Scales.scalarImplicatures {α : Type} [BEq α] [Repr α] (s : Scale α) (x : α) :
                                                    List (String × α)

                                                    Compute scalar implicature: x implicates ¬y for each stronger y

                                                    Equations
                                                    Instances For

                                                      Closure Under Conjunction #

                                                      A crucial property for exhaustification: whether the alternative set is CLOSED UNDER CONJUNCTION.

                                                      [Spe16] Theorem 9 #

                                                      When alternatives are closed under ∧, the two exhaustivity operators exh_mw and exh_ie are EQUIVALENT.

                                                      [Chi13] EFCI Analysis #

                                                      The puzzle of Free Choice Items depends on alternatives NOT being closed:

                                                      When domain alternatives are NOT closed, exhaustification can lead to contradiction (the EFCI puzzle), which is then resolved by rescue mechanisms.

                                                      Insight #

                                                      Alternative TypeClosed?Exhaustification Result
                                                      Scalar ⟨some, all⟩Clean SI: "some but not all"
                                                      Domain {P(d)}Contradiction (needs rescue)

                                                      Conjunction operation on propositions (semantic level).

                                                      Equations
                                                      Instances For

                                                        A set of alternatives is closed under conjunction if conjoining any two members yields another member (or a stronger proposition in the set).

                                                        For semantic alternatives as propositions, this means: ∀ p q ∈ ALT, p ∧ q ∈ ALT (or is entailed by something in ALT)

                                                        • alts : List α

                                                          The set of alternatives

                                                        • conj : ααα

                                                          The conjunction operation

                                                        • isClosed : Bool

                                                          Is it closed?

                                                        • nonClosureWitness : Option (α × α × String)

                                                          Witness to non-closure (if not closed)

                                                        Instances For

                                                          Standard scalar alternatives are closed under conjunction.

                                                          For ⟨some, all⟩:

                                                          • some ∧ some = some ✓
                                                          • some ∧ all = all ✓ (entailed by all)
                                                          • all ∧ all = all ✓
                                                          Equations
                                                          • One or more equations did not get rendered due to their size.
                                                          Instances For

                                                            Connective alternatives are closed.

                                                            For ⟨or, and⟩:

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

                                                              Domain alternatives (singleton domains) are NOT closed under conjunction.

                                                              For domain D = {a, b, c} with predicate P:

                                                              • Alternatives: {P(a), P(b), P(c)}
                                                              • P(a) ∧ P(b) = "exactly a and b" is NOT in the set
                                                              • This non-closure causes the EFCI puzzle

                                                              Represented symbolically: conjoining "exactly a" with "exactly b" gives a proposition NOT in the original alternative set.

                                                              • domain : List Entity

                                                                The domain

                                                              • isClosed : Bool

                                                                Is it closed under conjunction?

                                                              • explanation : String

                                                                Why not closed?

                                                              Instances For

                                                                Example: three-element domain shows non-closure.

                                                                Equations
                                                                Instances For

                                                                  Closure status affects exhaustification behavior.

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

                                                                      Predict exhaustification effect from closure status.

                                                                      Equations
                                                                      Instances For

                                                                        Spector's Theorem 9 #

                                                                        Theorem 9: When ALT is closed under conjunction, exh_mw = exh_ie.

                                                                        This is proven in Semantics/Exhaustification/Operators/Basic.lean.

                                                                        The closure property ensures that the different ways of computing "what to exclude" all converge to the same result.

                                                                        Practical Implication #

                                                                        For standard scalar alternatives (which ARE closed):

                                                                        For EFCI alternatives (which are NOT closed):

                                                                        Summary of closure and its effects.

                                                                        • altType : String

                                                                          Alternative type

                                                                        • isClosed : Bool

                                                                          Is it closed?

                                                                        • effect : String

                                                                          Effect on exhaustification

                                                                        • reference : String

                                                                          Relevant theory reference

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