Documentation

Linglib.Semantics.Dynamic.DPL

Dynamic Predicate Logic #

The DPL substrate ([groenendijk-stokhof-1991]): meanings are relations between total assignments (Rel, the paper's Definition 2), truth is having an output (Definition 3), and closes a meaning to its test (Definition 17). Conjunction is relational composition and the existential is random reassignment — the two externally dynamic constants; negation, implication, disjunction, and the universal are tests. The paper's results about the system (scope extension, donkey equivalence, the restricted double-negation laws, interdefinability) are proved in Studies/GroenendijkStokhof1991.lean.

Main definitions #

def DPL.Rel (E : Type u_2) :
Type u_2

DPL semantic type (Definition 2): ⟦φ⟧ g h means that starting from input assignment g, the formula φ can update to output h.

Equations
Instances For
    @[instance_reducible]
    instance DPL.instCompleteLatticeRel {E : Type u_1} :
    CompleteLattice (Rel E)
    Equations
    • One or more equations did not get rendered due to their size.
    def DPL.Rel.atom {E : Type u_1} (p : (E)Prop) :
    Rel E

    Atomic predicate (clauses 1–2): test the input without changing it.

    Equations
    Instances For
      def DPL.Rel.conj {E : Type u_1} (φ ψ : Rel E) :
      Rel E

      Conjunction (clause 4): relation composition — ⟦φ ∧ ψ⟧ g h iff ∃k, ⟦φ⟧ g k ∧ ⟦ψ⟧ k h.

      Equations
      • φ.conj ψ g h = ∃ (k : E), φ g k ψ k h
      Instances For
        def DPL.Rel.exists_ {E : Type u_1} (x : ) (φ : Rel E) :
        Rel E

        Existential quantification (clause 7): random assignment at x, then the scope — ⟦∃x φ⟧ g h iff ∃d, ⟦φ⟧ g[x↦d] h.

        Equations
        • DPL.Rel.exists_ x φ g h = ∃ (d : E), φ (fun (n : ) => if n = x then d else g n) h
        Instances For
          def DPL.Rel.neg {E : Type u_1} (φ : Rel E) :
          Rel E

          Negation (clause 3): the test that no output is reachable — ⟦¬φ⟧ g h iff g = h ∧ ¬∃k, ⟦φ⟧ g k. Not DNE-valid: see Studies/GroenendijkStokhof1991.lean.

          Equations
          • φ.neg g h = (g = h ¬∃ (k : E), φ g k)
          Instances For
            def DPL.Rel.impl {E : Type u_1} (φ ψ : Rel E) :
            Rel E

            Implication (clause 6): internally dynamic, externally static — every output of the antecedent can be extended by the consequent. The antecedent passes bindings to the consequent, giving its existentials universal force (donkey sentences).

            Equations
            • φ.impl ψ g h = (g = h ∀ (k : E), φ g k∃ (j : E), ψ k j)
            Instances For
              def DPL.Rel.disj {E : Type u_1} (φ ψ : Rel E) :
              Rel E

              Disjunction (clause 5): externally and internally static — no anaphoric relations across or out of the disjuncts.

              Equations
              • φ.disj ψ g h = (g = h ∃ (k : E), φ g k ψ g k)
              Instances For
                def DPL.Rel.forall_ {E : Type u_1} (x : ) (φ : Rel E) :
                Rel E

                Universal quantification (clause 8): a test — for every value at x, the scope can be processed. Externally static.

                Equations
                • DPL.Rel.forall_ x φ g h = (g = h ∀ (d : E), ∃ (m : E), φ (fun (n : ) => if n = x then d else g n) m)
                Instances For
                  def DPL.Rel.close {E : Type u_1} (φ : Rel E) :
                  Rel E

                  Closure (Definition 17): ⟦♦φ⟧ g h iff g = h and φ can be successfully processed — the test with φ's truth conditions.

                  Equations
                  • φ.close g h = (g = h ∃ (k : E), φ g k)
                  Instances For

                    Agreement relations #

                    def DPL.agreeOn {E : Type u_1} (V : Set ) :
                    Rel E

                    Agreement on V: relate the assignments equal on V ([Vis98], Definition 2.2).

                    Equations
                    Instances For
                      def DPL.reset {E : Type u_1} (x : ) :
                      Rel E

                      The random reset k[x]g of the existential clause: agree everywhere but x, [Vis98]'s [x].

                      Equations
                      Instances For
                        theorem DPL.le_agreeOn_conj {E : Type u_1} (R : Rel E) (V W : Set ) :
                        R (agreeOn V).conj (R.conj (agreeOn W))

                        A relation embeds in its composition with agreement on either side.

                        theorem DPL.agreeOn_conj_agreeOn {E : Type u_1} (V W : Set ) :
                        (agreeOn V).conj (agreeOn W) = agreeOn (V W)

                        Agreements compose to agreement on the intersection.

                        theorem DPL.agreeOn_inf_agreeOn {E : Type u_1} (V W : Set ) :
                        agreeOn VagreeOn W = agreeOn (V W)

                        Agreements meet in agreement on the union.

                        theorem DPL.agreeOn_empty {E : Type u_1} :
                        agreeOn =

                        Agreement on no variables is trivial.

                        Semantic notions (Definitions 3, 6, 9) #

                        def DPL.Rel.trueAt {E : Type u_1} (φ : Rel E) (g : E) :

                        Truth (Definition 3): φ is true w.r.t. g iff it has an output.

                        Equations
                        • φ.trueAt g = ∃ (h : E), φ g h
                        Instances For
                          def DPL.Rel.satisfactionSet {E : Type u_1} (φ : Rel E) :
                          Set (E)

                          Satisfaction set (Definition 6): inputs from which φ succeeds.

                          Equations
                          Instances For
                            def DPL.Rel.productionSet {E : Type u_1} (φ : Rel E) :
                            Set (E)

                            Production set (Definition 9): possible outputs of φ.

                            Equations
                            Instances For

                              DPL as dynamic Ty2 #

                              DPL embeds directly into dynamic Ty2 at S = Assignment E: DPL assignments are Ty2 states, DPL relations are Update meanings, and each connective matches its spine combinator.

                              @[reducible, inline]
                              abbrev DPL.extend {E : Type u_1} (g : Assignment E) (n : ) (e : E) :

                              DPL extend is Function.update.

                              Equations
                              Instances For

                                A DPL relation is an Update over Assignment E.

                                Equations
                                Instances For

                                  An Update is a DPL relation.

                                  Equations
                                  Instances For
                                    @[simp]
                                    theorem DPL.toDRS_ofDRS {E : Type u_1} (φ : Rel E) :
                                    ofDRS (toDRS φ) = φ
                                    @[simp]
                                    theorem DPL.ofDRS_toDRS {E : Type u_1} (D : DynamicSemantics.Update (Assignment E)) :
                                    toDRS (ofDRS D) = D
                                    theorem DPL.toDRS_atom {E : Type u_1} (p : Assignment EProp) :
                                    theorem DPL.toDRS_conj {E : Type u_1} (φ ψ : Rel E) :
                                    toDRS (φ.conj ψ) = (toDRS φ).seq (toDRS ψ)
                                    theorem DPL.toDRS_exists_ {E : Type u_1} (x : ) (φ : Rel E) :
                                    toDRS (Rel.exists_ x φ) = fun (g h : Assignment E) => ∃ (d : E), toDRS φ (extend g x d) h
                                    theorem DPL.exists_eq_reset_conj {E : Type u_1} (x : ) (φ : Rel E) :
                                    Rel.exists_ x φ = (reset x).conj φ

                                    The existential clause factored through the reset: ∃x φ is the random reset at x composed with the scope.

                                    theorem DPL.toDRS_impl {E : Type u_1} (φ ψ : Rel E) :

                                    DPL implication is the test of dynamic implication.

                                    theorem DPL.toDRS_disj {E : Type u_1} (φ ψ : Rel E) :

                                    DPL disjunction is the test of dynamic disjunction.

                                    DPL closure is the test of existential closure.

                                    theorem DPL.toDRS_agreeOn_univ {E : Type u_1} :
                                    toDRS (agreeOn Set.univ) = 1

                                    Total agreement is the unit update — the trivial test.

                                    theorem DPL.trueAt_iff_closure {E : Type u_1} (φ : Rel E) (g : Assignment E) :
                                    φ.trueAt g (toDRS φ).closure g

                                    DPL truth is existential closure.