Documentation

Linglib.Semantics.Degree.Defs

Degree semantics: core types and classification carriers #

Foundational definitions for degree-based analyses of gradable expressions [Hei01] [Ken07] [Sch08f] [Bel25]:

Positive-form semantics is in Basic.lean; Kennedy 2007's interpretive economy is in Kennedy.lean. The abstract theory works with plain measure functions μ : E → α into a linear order — there is no measure typeclass. Klein-style delineation [Kle80] has no measure function and lives in Gradability/Delineation.lean.

Main definitions #

Adjectival surface-construction types (AdjectivalConstruction) live in Gradability/Construction.lean.

Discrete bounded scales #

Degree max wraps Fin (max + 1) with LinearOrder, BoundedOrder, Fintype; Threshold max wraps Fin max with a coercion to Degree max. These are the discretized carriers used by the gradable-adjective RSA fragment.

structure Degree.Degree (max : ) :

A degree on a scale from 0 to max — a discretized continuous value (height, temperature, …).

  • value : Fin (max + 1)
Instances For
    def Degree.instReprDegree.repr {max✝ : } :
    Degree max✝Std.Format
    Equations
    • Degree.instReprDegree.repr x✝ prec✝ = Std.Format.bracket "{ " (Std.Format.nil ++ Std.Format.text "value" ++ Std.Format.text " := " ++ (Std.Format.nest 9 (repr x✝.value)).group) " }"
    Instances For
      @[implicit_reducible]
      instance Degree.instReprDegree {max✝ : } :
      Repr (Degree max✝)
      Equations
      def Degree.instDecidableEqDegree.decEq {max✝ : } (x✝ x✝¹ : Degree max✝) :
      Decidable (x✝ = x✝¹)
      Equations
      Instances For
        @[implicit_reducible]
        instance Degree.instDecidableEqDegree {max✝ : } :
        DecidableEq (Degree max✝)
        Equations
        @[implicit_reducible]
        instance Degree.instInhabitedDegree {n : } :
        Inhabited (Degree n)
        Equations
        @[implicit_reducible]
        instance Degree.instLinearOrderDegree {max : } :
        LinearOrder (Degree max)

        Degree max inherits a linear order from Fin (max + 1).

        Equations
        @[implicit_reducible]
        instance Degree.instBoundedOrderDegree {max : } :
        BoundedOrder (Degree max)

        Degree max is bounded: 0 is the minimum, max the maximum.

        Equations
        def Degree.allDegrees (max : ) :
        List (Degree max)

        All degrees from 0 to max.

        Equations
        • Degree.allDegrees max = List.map (fun (x : Fin (max + 1)) => { value := x }) (List.finRange (max + 1))
        Instances For
          def Degree.Degree.ofNat (max n : ) :
          Degree max

          Degree from Nat (clamped to max).

          Equations
          Instances For
            def Degree.Degree.toNat {max : } (d : Degree max) :

            The numeric value of a degree.

            Equations
            Instances For
              structure Degree.Threshold (max : ) :

              A threshold for a gradable adjective: x is "tall" iff degree x > threshold.

              • value : Fin max
              Instances For
                @[implicit_reducible]
                instance Degree.instReprThreshold {max✝ : } :
                Repr (Threshold max✝)
                Equations
                def Degree.instReprThreshold.repr {max✝ : } :
                Threshold max✝Std.Format
                Equations
                • Degree.instReprThreshold.repr x✝ prec✝ = Std.Format.bracket "{ " (Std.Format.nil ++ Std.Format.text "value" ++ Std.Format.text " := " ++ (Std.Format.nest 9 (repr x✝.value)).group) " }"
                Instances For
                  def Degree.instDecidableEqThreshold.decEq {max✝ : } (x✝ x✝¹ : Threshold max✝) :
                  Decidable (x✝ = x✝¹)
                  Equations
                  Instances For
                    @[implicit_reducible]
                    instance Degree.instDecidableEqThreshold {max✝ : } :
                    DecidableEq (Threshold max✝)
                    Equations
                    @[implicit_reducible]
                    instance Degree.instInhabitedThresholdOfNeZeroNat {n : } [NeZero n] :
                    Inhabited (Threshold n)
                    Equations
                    @[implicit_reducible]
                    instance Degree.instLinearOrderThreshold {max : } :
                    LinearOrder (Threshold max)

                    Threshold max inherits a linear order from Fin max.

                    Equations
                    def Degree.allThresholds (max : ) :
                    autoParam (0 < max) allThresholds._auto_1List (Threshold max)

                    All thresholds from 0 to max - 1.

                    Equations
                    Instances For
                      def Degree.Threshold.toNat {max : } (t : Threshold max) :

                      The numeric value of a threshold.

                      Equations
                      Instances For
                        @[implicit_reducible]
                        instance Degree.instFintypeDegree {max : } :
                        Fintype (Degree max)
                        Equations
                        @[implicit_reducible]
                        instance Degree.instFintypeThresholdOfNeZeroNat {max : } [NeZero max] :
                        Fintype (Threshold max)
                        Equations
                        @[implicit_reducible]
                        instance Degree.instCoeThresholdDegree {max : } :
                        Coe (Threshold max) (Degree max)

                        Coercion: a Threshold embeds into Degree via Fin.castSucc.

                        Equations
                        theorem Degree.coe_threshold_toNat {max : } (t : Threshold max) :
                        { value := t.value.castSucc }.toNat = t.toNat
                        @[reducible, inline]
                        abbrev Degree.deg (n : ) {max : } (h : n max := by omega) :
                        Degree max

                        Construct a degree by literal: deg 5 : Degree 10.

                        Equations
                        Instances For
                          @[reducible, inline]
                          abbrev Degree.thr (n : ) {max : } (h : n < max := by omega) :

                          Construct a threshold by literal: thr 5 : Threshold 10.

                          Equations
                          Instances For

                            DegP compositional taxonomy #

                            The compositional structure of a Degree Phrase (DegP).

                            In all degree frameworks, DegP is the syntactic locus where degree comparison happens. The internal structure varies — Kennedy posits [DegP [Deg -er/as/est] [DegComplement than-clause]], Heim posits a sentential -er operator — but the framework-independent taxonomy is captured here.

                            Instances For
                              @[implicit_reducible]
                              Equations
                              @[implicit_reducible]
                              Equations
                              def Degree.instReprDegPType.repr :
                              DegPTypeStd.Format
                              Equations
                              Instances For

                                Kennedy-style classification carriers #

                                Positive form standard: how the contextual threshold is determined. For open scales, the standard is the contextual norm ([Ken07]); for closed scales, it is the relevant endpoint fixed by Interpretive Economy.

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

                                    Whether the positive standard depends on contextual domain information.

                                    [Ken07] argues the comparison class is not a semantic argument of pos (contra [Kle80]), replacing it with the standard-fixing function s: ⟦pos⟧ = λg.λx. g(x) ≥ s(g). For relative (open-scale) adjectives, s still requires contextual domain information; for absolute (closed-scale) adjectives the standard comes from scale endpoints via Interpretive Economy.

                                    Equations
                                    Instances For

                                      Kennedy's adjective classification by scale structure and standard type [Ken07] [KMcN05], plus a nonGradable case for adjectives outside the degree-based fragment.

                                      • relativeGradable : AdjectiveClass

                                        Standard varies with comparison class — tall, expensive, big.

                                      • absoluteMaximum : AdjectiveClass

                                        Threshold fixed at scale maximum — full, straight, closed, dry.

                                      • absoluteMinimum : AdjectiveClass

                                        Threshold fixed at scale minimum — wet, bent, open, dirty.

                                      • mildlyPositive : AdjectiveClass

                                        Necessity-relative threshold — decent, acceptable ([Bel25]).

                                      • nonGradable : AdjectiveClass

                                        Non-gradable: no degree argument, no scale — atomic, prime, deceased, pregnant. Outside the gradable (DirectedMeasure) system; consumers that classify a general adjective should map non-gradables here rather than coercing them into a gradable class.

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

                                          Coarse two-way classification: relative vs absolute. Collapses absoluteMaximum and absoluteMinimum.

                                          Equations
                                          Instances For