Documentation

Linglib.Core.NestedRestriction

Nested Restriction #

A NestedRestriction S D is a monotone family of predicates on D indexed by an ordered scale S, where going up the scale gives a superset. The top of the scale contains everything.

This structure unifies two independently-developed formalizations:

  1. Domain restriction (@cite{ritchie-schiller-2024}): spatial regions induce nested candidate domain restrictors for quantifiers. S = SpatialScale, D = Entity.

  2. Comparison class inference (@cite{tessler-goodman-2022}): comparison classes (subordinate vs. superordinate) induce nested reference populations for adjective thresholds. S = ComparisonClass, D = Person.

The downstream applications differ — quantifier domain filtering vs. threshold derivation from population distribution — but the nesting structure is identical: a monotone map from an ordered scale to predicates on a domain.

structure Core.NestedRestriction (S : Type u_1) (D : Type u_2) [Preorder S] [OrderTop S] :
Type (max u_1 u_2)

A monotone family of predicates indexed by an ordered scale.

Each scale level s : S induces a predicate region s : D → Bool. The family is monotone: if s₁ ≤ s₂, then region s₁ is contained in region s₂. The top element contains everything.

Field names match DDRP exactly so that abbrev DDRP := NestedRestriction is a drop-in replacement with zero downstream breakage.

  • region : SDBool

    Each scale level induces a predicate on the domain.

  • monotone {s₁ s₂ : S} : s₁ s₂∀ (d : D), self.region s₁ d = trueself.region s₂ d = true

    Nesting: smaller scale ⊆ larger scale.

  • top_total (d : D) : self.region d = true

    The top scale contains everything.

Instances For
    theorem Core.NestedRestriction.subset_of_le {S : Type u_1} {D : Type u_2} [Preorder S] [OrderTop S] (nr : NestedRestriction S D) {s₁ s₂ : S} (h : s₁ s₂) (d : D) :
    nr.region s₁ d = truenr.region s₂ d = true

    Unwraps monotone: if s₁ ≤ s₂ then the s₁-region is a subset of the s₂-region. Trivial but documents the pattern for downstream use.

    theorem Core.NestedRestriction.forall_nesting {S : Type u_1} {D : Type u_2} [Preorder S] [OrderTop S] (nr : NestedRestriction S D) {s₁ s₂ : S} (h : s₁ s₂) {P : DProp} (hP : ∀ (d : D), nr.region s₂ d = trueP d) (d : D) :
    nr.region s₁ d = trueP d

    If a property holds for all elements of a larger region, it holds for all elements of any smaller region.

    This is the abstract pattern behind DDRP.every_nesting: ⟦every⟧ under a larger scale entails ⟦every⟧ under any smaller scale (restrictor ↓MON).

    theorem Core.NestedRestriction.exists_nesting {S : Type u_1} {D : Type u_2} [Preorder S] [OrderTop S] (nr : NestedRestriction S D) {s₁ s₂ : S} (h : s₁ s₂) {P : DProp} (hP : ∃ (d : D), nr.region s₁ d = true P d) :
    ∃ (d : D), nr.region s₂ d = true P d

    If some element of a smaller region satisfies a property, some element of any larger region does too.

    This is the abstract pattern behind DDRP.some_nesting: ⟦some⟧ under a smaller scale entails ⟦some⟧ under any larger scale (restrictor ↑MON).

    inductive Core.TwoLevel :

    A two-level scale for comparison class restrictions: restrictedfull.

    Used by comparisonClassRestriction to build a generic nested restriction from any relevance predicate.

    Instances For
      Equations
      Instances For

        Generic constructor: given any relevance predicate isRelevant : D → Bool, build a 2-level NestedRestriction where the bottom level filters by isRelevant and the top level is universal.

        This captures the comparison class pattern: the subordinate class restricts to a subpopulation (e.g., basketball players), while the superordinate class includes everyone.

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