Documentation

Linglib.Logic.Natural.Monotonicity.Defs

Marked types for the monotonicity calculus #

This file defines the type system of the [IMT17] monotonicity calculus: simple types over a set of base types, with each arrow marked as monotone (+), antitone (), or unmarked (·).

Main declarations #

References #

Markings #

A monotonicity marking: pos (+, monotone), neg (, antitone), or unmarked (·, no information) ([IMT17] Definition 3.1).

Instances For
    @[instance_reducible]
    Equations
    def NaturalLogic.instReprMarking.repr :
    MarkingStd.Format
    Equations
    Instances For
      @[instance_reducible]
      Equations
      • One or more equations did not get rendered due to their size.

      The information order: + ⊑ · and − ⊑ ·.

      Equations
      Instances For
        @[instance_reducible]
        Equations
        • One or more equations did not get rendered due to their size.
        @[instance_reducible]
        instance NaturalLogic.Marking.decidableLE (a b : Marking) :
        Decidable (a b)
        Equations
        @[instance_reducible]
        Equations
        • One or more equations did not get rendered due to their size.

        Marked types #

        inductive NaturalLogic.Ty (B : Type u_1) :
        Type u_1

        Simple types over base types B, with marked arrows ([IMT17] Definition 3.1): arr σ m τ is the type of m-behaved functions from σ to τ.

        Instances For
          def NaturalLogic.instDecidableEqTy.decEq {B✝ : Type u_1} [DecidableEq B✝] (x✝ x✝¹ : Ty B✝) :
          Decidable (x✝ = x✝¹)
          Equations
          Instances For
            @[instance_reducible]
            instance NaturalLogic.instDecidableEqTy {B✝ : Type u_1} [DecidableEq B✝] :
            DecidableEq (Ty B✝)
            Equations
            inductive NaturalLogic.Ty.LE {B : Type u_1} :
            Ty BTy BProp

            The subtyping order ([IMT17] Definition 3.2): contravariant in domains, covariant in codomains and markings, so that every +- or -typed function can also be considered ·-typed.

            Instances For
              @[instance_reducible]
              instance NaturalLogic.Ty.instLE {B : Type u_1} :
              LE (Ty B)
              Equations
              theorem NaturalLogic.Ty.LE.refl {B : Type u_1} (σ : Ty B) :
              σ.LE σ
              theorem NaturalLogic.Ty.LE.trans {B : Type u_1} {σ τ μ : Ty B} :
              σ.LE ττ.LE μσ.LE μ
              theorem NaturalLogic.Ty.LE.antisymm {B : Type u_1} {σ τ : Ty B} :
              σ.LE ττ.LE σσ = τ
              @[instance_reducible]
              instance NaturalLogic.Ty.instPartialOrder {B : Type u_1} :
              PartialOrder (Ty B)
              Equations
              • One or more equations did not get rendered due to their size.
              @[simp]
              theorem NaturalLogic.Ty.base_le_base {B : Type u_1} {b b' : B} :
              base b base b' b = b'
              @[simp]
              theorem NaturalLogic.Ty.not_base_le_arr {B : Type u_1} {b : B} {σ τ : Ty B} {m : Marking} :
              ¬base b σ.arr m τ
              @[simp]
              theorem NaturalLogic.Ty.not_arr_le_base {B : Type u_1} {b : B} {σ τ : Ty B} {m : Marking} :
              ¬σ.arr m τ base b
              @[simp]
              theorem NaturalLogic.Ty.arr_le_arr {B : Type u_1} {σ σ' τ τ' : Ty B} {m m' : Marking} :
              σ.arr m τ σ'.arr m' τ' σ' σ τ τ' m m'
              @[irreducible]
              instance NaturalLogic.Ty.decidableLE {B : Type u_1} [DecidableEq B] (σ τ : Ty B) :
              Decidable (σ τ)
              Equations

              Compatibility join and marking erasure #

              def NaturalLogic.Ty.sup? {B : Type u_1} [DecidableEq B] :
              Ty BTy BOption (Ty B)

              The partial join of compatible types ([IMT17] Definition 3.3): defined when the two types share their unmarked skeleton and their domains exactly, joining the markings along the codomain spine.

              Equations
              Instances For
                @[simp]
                theorem NaturalLogic.Ty.sup?_self {B : Type u_1} [DecidableEq B] (σ : Ty B) :
                σ.sup? σ = some σ
                theorem NaturalLogic.Ty.le_of_mem_sup?_left {B : Type u_1} [DecidableEq B] {σ τ μ : Ty B} :
                σ.sup? τ = some μσ μ

                Both compatible types lie below their join.

                def NaturalLogic.Ty.unmark {B : Type u_1} :
                Ty BTy B

                Erase the markings along the codomain spine ([IMT17] Definition 3.3, their σ̂).

                Equations
                Instances For
                  theorem NaturalLogic.Ty.le_unmark {B : Type u_1} (σ : Ty B) :
                  σ σ.unmark

                  Every type embeds into its marking erasure.