Documentation

Mathlib.ModelTheory.Encoding

Encodings and Cardinality of First-Order Syntax #

Main Definitions #

Main Results #

TODO #

def FirstOrder.Language.Term.listEncode {L : FirstOrder.Language} {α : Type u'} :
FirstOrder.Language.Term L αList (α (i : ) × L.Functions i)

Encodes a term as a list of variables and function symbols.

Equations
Instances For
    def FirstOrder.Language.Term.listDecode {L : FirstOrder.Language} {α : Type u'} :
    List (α (i : ) × L.Functions i)List (Option (FirstOrder.Language.Term L α))

    Decodes a list of variables and function symbols as a list of terms.

    Equations
    Instances For
      @[simp]
      theorem FirstOrder.Language.Term.encoding_Γ {L : FirstOrder.Language} {α : Type u'} :
      FirstOrder.Language.Term.encoding = (α (i : ) × L.Functions i)
      @[simp]
      theorem FirstOrder.Language.Term.encoding_decode {L : FirstOrder.Language} {α : Type u'} (l : List (α (i : ) × L.Functions i)) :
      FirstOrder.Language.Term.encoding.decode l = Option.join (List.head? (FirstOrder.Language.Term.listDecode l))
      @[simp]
      theorem FirstOrder.Language.Term.encoding_encode {L : FirstOrder.Language} {α : Type u'} :
      ∀ (a : FirstOrder.Language.Term L α), FirstOrder.Language.Term.encoding.encode a = FirstOrder.Language.Term.listEncode a

      An encoding of terms as lists.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem FirstOrder.Language.Term.listEncode_injective {L : FirstOrder.Language} {α : Type u'} :
        Function.Injective FirstOrder.Language.Term.listEncode
        Equations
        • One or more equations did not get rendered due to their size.

        Encodes a bounded formula as a list of symbols.

        Equations
        Instances For

          Applies the forall quantifier to an element of (Σ n, L.BoundedFormula α n), or returns default if not possible.

          Equations
          Instances For

            Applies imp to two elements of (Σ n, L.BoundedFormula α n), or returns default if not possible.

            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              def FirstOrder.Language.BoundedFormula.listDecode {L : FirstOrder.Language} {α : Type u'} (l : List ((k : ) × FirstOrder.Language.Term L (α Fin k) (n : ) × L.Relations n )) :
              ((n : ) × FirstOrder.Language.BoundedFormula L α n) × { l' : List ((k : ) × FirstOrder.Language.Term L (α Fin k) (n : ) × L.Relations n ) // sizeOf l' max 1 (sizeOf l) }

              Decodes a list of symbols as a list of formulas.

              Instances For
                @[simp]
                theorem FirstOrder.Language.BoundedFormula.encoding_encode {L : FirstOrder.Language} {α : Type u'} (φ : (n : ) × FirstOrder.Language.BoundedFormula L α n) :
                FirstOrder.Language.BoundedFormula.encoding.encode φ = FirstOrder.Language.BoundedFormula.listEncode φ.snd
                @[simp]
                theorem FirstOrder.Language.BoundedFormula.encoding_Γ {L : FirstOrder.Language} {α : Type u'} :
                FirstOrder.Language.BoundedFormula.encoding = ((k : ) × FirstOrder.Language.Term L (α Fin k) (n : ) × L.Relations n )
                @[simp]
                theorem FirstOrder.Language.BoundedFormula.encoding_decode {L : FirstOrder.Language} {α : Type u'} (l : List ((k : ) × FirstOrder.Language.Term L (α Fin k) (n : ) × L.Relations n )) :
                FirstOrder.Language.BoundedFormula.encoding.decode l = some (FirstOrder.Language.BoundedFormula.listDecode l).1

                An encoding of bounded formulas as lists.

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