Documentation

ISAR.HFSetEncoding

Encodings: constructed Gödel / Ackermann, constructed quotient bijection #

ISK Gödel numbering via Mathlib pairing #

Equations
Instances For

    Ackermann coding NatHF #

    def ISAR.fromNatInsert (n : ) (rec : (m : ) → m < nHF) :
    HF
    Equations
    Instances For
      @[irreducible]
      def ISAR.fromNat (n : ) :
      Equations
      Instances For
        theorem ISAR.nat_lt_two_pow (k : ) :
        k < 2 ^ k
        theorem ISAR.fromNatInsert_testBit (n : ) (rec : (m : ) → m < nHF) (hrec : ∀ (m : ) (hm : m < n), toNat (rec m hm) = m) (k i : ) :
        (toNat (fromNatInsert n rec k)).testBit i = (decide (i < k) && n.testBit i)

        Syntactic HF trees are not unique; Ackermann codes identify extensionally equal sets.

        Countable bijection on the OperEq quotient (min-Gödel enumeration) #

        The OperEq class of the ISK term with Gödel number n. Surjective, not injective.

        Equations
        Instances For
          noncomputable def ISAR.minCode (q : InvariantLayer) :

          Least Gödel number of an OperEq class.

          Equations
          Instances For
            theorem ISAR.minCode_min {q : InvariantLayer} {m : } (hm : m < minCode q) :

            n is the least Gödel number of its class.

            Equations
            Instances For
              noncomputable def ISAR.minCodeRank (n : ) :

              Rank of a min-code among all strictly smaller min-codes.

              Equations
              Instances For
                theorem ISAR.minCodeRank_mono {n m : } (hn : isMinCode n) (hlt : n < m) :
                theorem ISAR.minCodeRank_inj {n m : } (hn : isMinCode n) (hm : isMinCode m) (heq : minCodeRank n = minCodeRank m) :
                n = m
                Equations
                Instances For
                  theorem ISAR.kSpine_injective {i j : } (h : kSpine i = kSpine j) :
                  i = j
                  theorem ISAR.kSpine_OperEq_eq {i j : } (h : OperEq (kSpineSub i) (kSpineSub j)) :
                  i = j
                  noncomputable def ISAR.minCodeEnum (k : ) :

                  k-th least min-Gödel code (enumeration of distinct OperEq classes).

                  Equations
                  Instances For
                    noncomputable def ISAR.layerToNat (q : InvariantLayer) :

                    Index of an OperEq class in min-Gödel order. Not the raw Gödel number.

                    Equations
                    Instances For
                      noncomputable def ISAR.natToLayer (k : ) :

                      The k-th OperEq class in min-Gödel order. Not Quotient.mk (natToSub k).

                      Equations
                      Instances For

                        Raw Gödel number 3 is norm · norm, which joins to norm (code 0). The inverse is therefore not rfl on non-minimal codes.

                        noncomputable def ISAR.HF_encode (c : HF) :
                        Equations
                        Instances For
                          noncomputable def ISAR.encode_raw (c : HF) :
                          Equations
                          Instances For
                            noncomputable def ISAR.decode_layer (q : InvariantLayer) :
                            Equations
                            Instances For
                              noncomputable def ISAR.decode_term (t : ISKSubtype) :
                              Equations
                              Instances For
                                theorem ISAR.HF_encode_eq_of_ExtEq {c1 c2 : HF} (h : ExtEq c1 c2) :