Documentation

Studies.Shieber1985

Shieber (1985): Evidence Against the Context-Freeness of Natural Language #

This file proves Shieber's theorem that a language meeting his four claims about Swiss German subordinate clauses is not context-free. The homomorphism f sends the words of the clauses to letters, and the image of the language intersected with the regular language r = w a* b* x c* d* y is w aᵐ bⁿ x cᵐ dⁿ y. Erasing w, x and y leaves aᵐ bⁿ cᵐ dⁿ, which is not context-free, and the context-free languages are closed under homomorphisms and under intersection with regular languages.

Main definitions #

Main results #

Implementation notes #

The letters put the accusative d'chind and laa before the dative em Hans and hälfe, as the schema of Claim 2 and f do; the prose of Claim 2 puts the datives first. In the data, a verb requires the case of its entry in German.Zurich.Verbs, and a noun phrase bears the case its gloss marks.

TODO #

Note 4 restricts Claim 3 to clauses with as many noun phrases as verbs, which does not suffice: the image, with the frame erased, can then be {aᵖ bᵠ cʳ dᵘ | p + q ≠ r + u} ∪ {aᵐ bⁿ cᵐ dⁿ}, the union of the context-free {aᵖ bᵠ cʳ dᵘ | p + q ≠ r + u} and {aᵏ bʲ cᵏ dˡ}. Stating the counterexample needs the closure of the context-free languages under union.

References #

The letters and the regular language r #

Letter is the alphabet of the image of f, its letters declared in the order of r = w a* b* x c* d* y.

  • w : Letter

    w is the image of Jan säit das mer 'Jan says that we'.

  • a : Letter

    a is the image of the accusative d'chind 'the children'.

  • b : Letter

    b is the image of the dative em Hans 'Hans'.

  • x : Letter

    x is the image of es huus haend wele 'the house have wanted'.

  • c : Letter

    c is the image of laa 'let', which requires an accusative.

  • d : Letter

    d is the image of hälfe 'help', which requires a dative.

  • y : Letter

    y is the image of aastriiche 'paint'.

  • z : Letter

    z is the image of any other word.

Instances For
    @[instance_reducible]
    Equations
    def Shieber1985.instReprLetter.repr :
    Letter → ℕ → Std.Format
    Equations
    Instances For
      @[instance_reducible]
      Equations
      def Shieber1985.clause (p q r u : ℕ) :
      List Letter

      clause p q r u is w aᵖ bᵠ x cʳ dᵘ y, the image of the clause with p d'chind, q em Hans, r laa and u hälfe.

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

        schema is w (a|b)* x (c|d)* y, the images of the clauses of the schema of Claim 1.

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

          caseSorted is the regular language r = w a* b* x c* d* y, the images of the clauses of the schema of Claim 2.

          Equations
          Instances For

            crossSerial is the language w aᵐ bⁿ x cᵐ dⁿ y.

            Equations
            Instances For
              theorem Shieber1985.sortedLE_clause (p q r u : ℕ) :
              (clause p q r u).SortedLE
              theorem Shieber1985.count_clause (p q r u : ℕ) (ℓ : Letter) :
              List.count ℓ (clause p q r u) = match ℓ with | Letter.w => 1 | Letter.x => 1 | Letter.y => 1 | Letter.a => p | Letter.b => q | Letter.c => r | Letter.d => u | Letter.z => 0
              theorem Shieber1985.clause_mem_schema (p q r u : ℕ) :
              clause p q r u ∈ schema
              theorem Shieber1985.mem_caseSorted_iff {l : List Letter} :
              l ∈ caseSorted ↔ l.SortedLE ∧ List.count Letter.w l = 1 ∧ List.count Letter.x l = 1 ∧ List.count Letter.y l = 1 ∧ List.count Letter.z l = 0

              A word is in r iff it is sorted with one w, one x, one y and no z, since a sorted word is determined by its letter counts.

              The image of note 5 #

              theorem Shieber1985.flatMap_eraseFrame_clause (p q r u : ℕ) :
              List.flatMap eraseFrame (clause p q r u) = List.replicate p Letter.a ++ List.replicate q Letter.b ++ List.replicate r Letter.c ++ List.replicate u Letter.d

              w aᵐ bⁿ x cᵐ dⁿ y is not context-free, since erasing the frame leaves aᵐ bⁿ cᵐ dⁿ.

              The claims and the argument #

              structure Shieber1985.Claims {W : Type u_1} (f : W → Letter) (L : Language W) :

              Claims f L states the four claims of §3 about a language L over a vocabulary W whose words f sends to letters.

              • exists_mem (m n : ℕ) : ∃ s ∈ L, List.map f s = clause m n m n

                By Claims 1, 2 and 4, some clause w aᵐ bⁿ x cᵐ dⁿ y is grammatical for all m, n.

              • count_eq (s : List W) : s ∈ L → List.map f s ∈ schema → List.count Letter.a (List.map f s) = List.count Letter.c (List.map f s) ∧ List.count Letter.b (List.map f s) = List.count Letter.d (List.map f s)

                By Claim 3, a clause of the schema has as many c (laa) as a (d'chind) and as many d (hälfe) as b (em Hans).

              Instances For
                theorem Shieber1985.Claims.map_inf_caseSorted {W : Type u_1} {f : W → Letter} {L : Language W} (h : Claims f L) :
                (Language.map f) L ⊓ caseSorted = crossSerial

                The image of a language meeting the claims, intersected with r, is w aᵐ bⁿ x cᵐ dⁿ y.

                theorem Shieber1985.Claims.not_isContextFree {W : Type u_1} {f : W → Letter} {L : Language W} (h : Claims f L) :
                ¬L.IsContextFree

                A language meeting the four claims is not context-free.

                theorem Shieber1985.not_isContextFree_of_count_le {W : Type u_1} {f : W → Letter} {L : Language W} (hmem : ∀ (n : ℕ), ∃ s ∈ L, List.map f s = clause n n n n) (hle : ∀ s ∈ L, List.map f s ∈ schema → List.count Letter.a (List.map f s) ≤ List.count Letter.c (List.map f s) ∧ List.count Letter.b (List.map f s) ≤ List.count Letter.d (List.map f s)) :
                ¬L.IsContextFree

                A language is not context-free if every clause w aⁿ bⁿ x cⁿ dⁿ y is grammatical and every object noun phrase of a clause of the schema has a verb requiring its case, objects being optional.

                The claims are consistent and not idle #

                countMatched is the language of the words that meet Claim 3 if they are in the schema.

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

                  The claims are consistent, since countMatched meets them.

                  Claim 3 excludes the full language, which is context-free.

                  The paper's clauses (1)–(22) #

                  def Shieber1985.npCase? (np : String) :

                  npCase? np is the case the article of the noun phrase np marks: a word article followed by its noun, or a clitic article, written with a final apostrophe, attached to it.

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

                    objectCases e lists the cases the articles of the clause e mark on its noun phrases.

                    Equations
                    Instances For

                      requiredCases e lists the cases the verbs of the clause e require of their objects.

                      Equations
                      • One or more equations did not get rendered due to their size.
                      Instances For
                        theorem Shieber1985.length_objectCases_eq (e : Datum) :
                        e ∈ Examples.all → (objectCases e).length = (requiredCases e).length

                        As note 4 observes, every clause of the paper has as many objects as its verbs require.

                        Among clauses (1)–(22), cross-serial or not, the acceptable ones are exactly those whose objects bear the cases their verbs require, as many of each.