Documentation

Marginis.manyOne

Many-one reducibility and its automorphisms #

Main statements:

structure mon :

An arbitrary monoid.

  • func : ()Prop

    The functions under consideration (computable, primitive recursive, hyperarithmetic, etc.)

  • id : self.func _root_.id
  • comp {f g : } : self.func fself.func gself.func (f g)
Instances For
    def m_reducible {m : mon} (A B : Bool) :

    Mapping (many-one) reducibility.

    Equations
    Instances For
      def m_equivalent {m : mon} (A B : Bool) :

      A ≡ₘ B ↔ A ≤ₘ B and B ≤ₘ A.

      Equations
      Instances For

        A ≤ₘ B iff A is many-one reducible to B.

        Equations
        Instances For

          A ≡ₘ B iff A is many-one equivalent to B.

          Equations
          Instances For

            m-reducibility is reflexive.

            @[implicit_reducible]

            To do calc proofs with m-reducibility we create a Trans instance.

            Equations

            m-reducibility is transitive.

            @[reducible, inline]
            abbrev 𝓓setoid {m : mon} :

            The degree structure 𝓓ₘ, using quotients #

            Quot is like Quotient when the relation is not necessarily an equivalence. We could do: def 𝓓ₘ' := Quot m_equivalent

            Equations
            Instances For

              Many-one "equivalence" is indeed an equivalence relation.

              Equations
              • =
              Instances For
                @[reducible, inline]
                abbrev 𝓓 {m : mon} :

                The many-one degrees.

                Equations
                Instances For
                  theorem upper_cones_eq {m : mon} (A B : Bool) (h : A ≡ₘ B) :

                  Equivalent reals have equal upper cones.

                  theorem degrees_eq {m : mon} (A B : Bool) (h : A ≡ₘ B) :

                  Equivalent reals have equal degrees.

                  theorem m_reducible_congr_equiv {m : mon} (A C D : Bool) (hCD : C ≡ₘ D) :
                  (A ≤ₘ C) = (A ≤ₘ D)
                  def le_m' {m : mon} (A : Bool) (b : 𝓓) :

                  As an auxiliary notion, we define [A]ₘ ≤ b.

                  Equations
                  Instances For
                    theorem m_reducible_congr_equiv' {m : mon} (b : 𝓓) (C D : Bool) (hCD : C ≡ₘ D) :
                    le_m' C b = le_m' D b
                    def le_m {m : mon} (a b : 𝓓) :

                    The ordering of the m-degrees.

                    Equations
                    Instances For
                      theorem le_m_refl {m : mon} :

                      The ordering of m-degrees is reflexive.

                      theorem le_m_trans {m : mon} :

                      The ordering of m-degrees is transitive.

                      @[reducible]

                      m-reducibility is a preorder.

                      Equations
                      Instances For
                        @[implicit_reducible]

                        For example 𝓓₁ is a partial order (if not a semilattice).

                        Equations
                        @[implicit_reducible]
                        instance instZero𝓓 {m : mon} :

                        The nontrivial computable sets form the m-degree 0.

                        Equations
                        @[implicit_reducible]
                        instance instBot𝓓 {m : mon} :

                        The degree ⟦∅⟧ₘ = ⊤.

                        Equations
                        @[implicit_reducible]
                        instance instTop𝓓 {m : mon} :

                        The degree ⟦ℕ⟧ₘ = ⊤.

                        Equations
                        def join (A B : Bool) (k : ) :

                        The recursive join A ⊕ B. #

                        (However, the symbol ⊕ has a different meaning in Lean.) It is really a shuffle or ♯ (backslash sha).

                        Equations
                        Instances For

                          Make sure ♯ binds stronger than ≤ₘ.

                          Equations
                          Instances For
                            def inlFun :

                            Embedding on the left over ℕ.

                            Equations
                            Instances For
                              def inrFun :

                              Embedding on the right over ℕ.

                              Equations
                              Instances For
                                theorem join_inl' (A B : Bool) :
                                (A B) inlFun = A
                                theorem join_inl (A B : Bool) (k : ) :
                                (A B) (inlFun k) = A k

                                Join works as desired on the left.

                                theorem join_inr (A B : Bool) (k : ) :
                                (A B) (inrFun k) = B k

                                Join works as desired on the right.

                                theorem join_inr' (A B : Bool) :
                                (A B) inrFun = B

                                The unit monoid consists of id only. The corresponding degree structure has equality as its equivalence.

                                Equations
                                Instances For
                                  structure mon₁extends mon :

                                  A monoid in which we can prove ⊕ is an upper bound, even if not the least one.

                                  Instances For
                                    theorem join_left {m : mon₁} (A B : Bool) :
                                    A ≤ₘ A B

                                    A ≤ₘ A ⊕ B.

                                    theorem join_right {m : mon₁} (A B : Bool) :
                                    B ≤ₘ A B

                                    B ≤ₘ A ⊕ B.

                                    noncomputable def botSwap {m : mon} :

                                    A map on 𝓓ₘ that swaps ∅ and ℕ.

                                    Equations
                                    Instances For

                                      Swapping ∅ and ℕ is injective on 𝓓ₘ.

                                      Swapping ∅ and ℕ is surjective on 𝓓ₘ.

                                      theorem emp_not_below {m : mon} :

                                      In 𝓓ₘ, ⊥ is not below ⊤.

                                      theorem univ_not_below {m : mon} :

                                      In 𝓓ₘ, ⊤ is not below ⊥.

                                      theorem emp_min {m : mon} (a : 𝓓) (h : a ) :
                                      a =

                                      In 𝓓ₘ, ⊥ is a minimal element.

                                      theorem univ_min {m : mon} (a : 𝓓) (h : a ) :
                                      a =

                                      In 𝓓ₘ, ⊤ is a minimal element.

                                      def automorphism {α : Type} [PartialOrder α] (π : αα) :

                                      An automorphism of a partial order is a bijection that preserves and reflects the order.

                                      Equations
                                      Instances For
                                        def cpl :
                                        (Bool)Bool

                                        The complement map on ℕ → Bool.

                                        Equations
                                        Instances For
                                          def complementMap {m : mon} :

                                          The complement map on 𝓓ₘ.

                                          Equations
                                          Instances For
                                            def induces {m : mon} (f : 𝓓𝓓) (F : (Bool)Bool) :
                                            Equations
                                            Instances For
                                              def induced {m : mon} (f : 𝓓𝓓) :
                                              Equations
                                              Instances For
                                                def induced₀ {m : mon} (π : 𝓓𝓓) :

                                                Induced by a function on ℕ.

                                                Equations
                                                Instances For

                                                  The identity automorphism is induced by a function on ℕ.

                                                  The complement automorphism is not induced by a function on ℕ.

                                                  In 𝓓ₘ, ⊥ ≠ ⊤.

                                                  The (⊥,⊤) swap map is not the identity.

                                                  def rigid (α : Type) [PartialOrder α] :

                                                  A partial order is rigid if there are no nontrivial automorphisms.

                                                  Equations
                                                  Instances For
                                                    theorem half_primrec :
                                                    Primrec fun (k : ) => k / 2

                                                    Dividing-by-two is primitive recursive.

                                                    theorem primrec_even_equiv :
                                                    PrimrecPred fun (k : ) => k / 2 * 2 = k

                                                    An arithmetical characterization of "Even" is primitive recursive.

                                                    theorem even_div_two (a : ) :
                                                    a / 2 * 2 = a Even a

                                                    Characterizing "Even" arithmetically.

                                                    "Even" is a primitive recursive predicate.

                                                    theorem primrec_join {f₁ f₂ : } (hf₁ : Primrec f₁) (hf₂ : Primrec f₂) :
                                                    Primrec fun (k : ) => if Even k then f₁ (k / 2) else f₂ (k / 2)

                                                    The usual join of functions on ℕ is primitive recursive.

                                                    theorem computable_join {f₁ f₂ : } (hf₁ : Computable f₁) (hf₂ : Computable f₂) :
                                                    Computable fun (k : ) => if Even k then f₁ (k / 2) else f₂ (k / 2)

                                                    The usual join of functions on ℕ is computable.

                                                    theorem getHasIte {m : mon₁} (hasIte₂ : ∀ {f₁ f₂ : }, m.func f₁m.func f₂m.func fun (k : ) => if Even k then f₁ (k / 2) else f₂ (k / 2)) (f : ) :
                                                    m.func fm.func fun (k : ) => if Even k then f (k / 2) * 2 else k

                                                    An auxiliary lemma for proving that the join A₀ ⊕ A₁ is monotone in A₀ within the context of the monoid class mon₁.

                                                    def joinFun (f₁ f₂ : ) (k : ) :

                                                    Coding two functions into one.

                                                    Equations
                                                    Instances For
                                                      structure monₘextends mon₁ :

                                                      Requirement for a semilattice like 𝓓ₘ.

                                                      Instances For
                                                        theorem botSwap_is_induced_helper {m : monₘ} {A B : Bool} (hAB : A ≡ₘ B) :
                                                        (if A = fun (x : ) => false then fun (x : ) => true else if A = fun (x : ) => true then fun (x : ) => false else A) ≤ₘ if B = fun (x : ) => false then fun (x : ) => true else if B = fun (x : ) => true then fun (x : ) => false else B

                                                        The botSwap automorphism is induced by a function on reals.

                                                        The computable functions satisfy the requirement for a semilattice like 𝓓ₘ.

                                                        Equations
                                                        Instances For

                                                          The primitive recursive functions satisfy the requirement for a semilattice like 𝓓ₘ.

                                                          Equations
                                                          Instances For

                                                            The all-monoid, which will give us only three degrees, ⊥, ⊤ and 0.

                                                            Equations
                                                            Instances For
                                                              theorem join_le_join {m : monₘ} {A₀ A₁ : Bool} (h : A₀ ≤ₘ A₁) (B : Bool) :
                                                              A₀ B ≤ₘ A₁ B

                                                              The join A₀ ⊕ A₁ is monotone in A₀.

                                                              theorem join_le {m : monₘ} {A B C : Bool} (h₁ : A ≤ₘ C) (h₂ : B ≤ₘ C) :
                                                              A B ≤ₘ C

                                                              The join is bounded by each upper bound.

                                                              def join' {m : monₘ} (A : Bool) (b : Quot m_equivalent) :

                                                              The m-degree [A]ₘ ⊔ b.

                                                              Equations
                                                              Instances For
                                                                @[implicit_reducible]

                                                                𝓓ₘ is a join-semilattice.

                                                                Equations
                                                                • One or more equations did not get rendered due to their size.
                                                                theorem emp_univ {m : monₘ} (B : Bool) (h_2 : ¬B = ) :

                                                                If b ≠ ⊥ then ⊤ ≤ b. This is false for 1-degrees. However, the complementing automorphism works there.

                                                                theorem univ_emp {m : monₘ} (B : Bool) (h_2 : B ) :

                                                                In the m-degrees, if ⟦B⟧ ≠ ⊤ then ⊥ ≤ ⟦B⟧.

                                                                The complement map is not the identity map of 𝓓ₘ.

                                                                The complement map is a surjective map of 𝓓ₘ.

                                                                The complement map is an injective map of 𝓓ₘ.

                                                                theorem cplAuto {m : mon} (A B : Bool) :

                                                                Complementation is an automorphism not only of the partial order 𝓓ₘ, but of the preorder m_reducible! (That is true for Turing degrees too. To rule out that there is an automorphism of the preorder for Turing degrees that maps something to an element of a different Turing degree we would have to rule out e.g. a homeomorphism inducing an automorphism. )

                                                                The complement map is an automorphism of 𝓓ₘ.

                                                                theorem notrigid {m : mon} :

                                                                𝓓ₘ is not rigid.

                                                                Over a rich enough monoid, botSwap is an automorphism.

                                                                theorem emp_lt_zero {m : monₘ} :
                                                                < 0

                                                                In 𝓓ₘ, the degree of ∅ is less than 0.

                                                                theorem zero_one_m {E : monₘ} {b : Bool} (A : Bool) :
                                                                (A fun (x : ) => b) (fun (x : ) => !b) ≤ₘ A

                                                                ∅ and ℕ are the minimal elements of 𝓓ₘ, since A ≠ ⊥ ↔ ⊤ ≤ A and A ≠ ⊤ ↔ ⊥ ≤ A.

                                                                theorem bot_property {E : monₘ} (a : 𝓓) :
                                                                theorem top_property {E : monₘ} (a : 𝓓) :
                                                                def is_minimal {α : Type u_1} [PartialOrder α] (a : α) :
                                                                Equations
                                                                Instances For

                                                                  April 17, 2025

                                                                  def is_least {α : Type u_1} [PartialOrder α] (a : α) :
                                                                  Equations
                                                                  Instances For
                                                                    theorem no_least_if_two_minimal {α : Type u_1} [PartialOrder α] (u v : α) (huv : u v) (hu : is_minimal u) (hv : is_minimal v) (a : α) :
                                                                    noncomputable def φ {e : Nat.Partrec.Code} :
                                                                    Bool

                                                                    The eth r.e. set

                                                                    Equations
                                                                    Instances For
                                                                      noncomputable def K :
                                                                      Bool

                                                                      Defining the halting set K as {e | φₑ(0)↓}. (There are other possible, essentially equivalent, definitions.)

                                                                      Equations
                                                                      Instances For
                                                                        theorem Kbar_not_computable :
                                                                        ¬Computable fun (k : ) => !K k

                                                                        The complement of the halting set K is not computable.

                                                                        The halting set K is not computable.

                                                                        Equations
                                                                        Instances For
                                                                          theorem compute_closed_m_downward (A B : Bool) (h : Computable B) (h₀ : A ≤ₘ B) :

                                                                          If B is computable and A ≤ₘ B then A is computable.

                                                                          theorem Kbar_not_below_K :
                                                                          ¬(fun (k : ) => decide ((!K k) = true)) ≤ₘ K

                                                                          The complement of K is not m-reducible to K.

                                                                          noncomputable def Km :
                                                                          Equations
                                                                          Instances For
                                                                            noncomputable def Kbarm :
                                                                            Equations
                                                                            Instances For
                                                                              def automorphic {m : mon} (a b : 𝓓) :

                                                                              Two m-degrees are automorphic if some automorphism maps one to the other.

                                                                              Equations
                                                                              Instances For
                                                                                theorem bijinvfun {α : Type u_1} [Nonempty α] (f : αα) (h : Function.Bijective f) :

                                                                                Surely this should already exist in Mathlib?

                                                                                theorem automorphism_comp {m : mon} (π : 𝓓𝓓) ( : automorphism π) (ρ : 𝓓𝓓) ( : automorphism ρ) :
                                                                                Equations
                                                                                • =
                                                                                Instances For
                                                                                  def automorphic_le {m : mon} (a b : 𝓓) :
                                                                                  Equations
                                                                                  Instances For
                                                                                    @[implicit_reducible]
                                                                                    Equations
                                                                                    def automorphic_equiv {m : mon} (a b : 𝓓) :

                                                                                    is this the same as just automorphic?

                                                                                    Equations
                                                                                    Instances For