Documentation

Thesis.InfReductionSeq

theorem Thesis.InfReductionSeq.trans_chain {α : Type u_1} {r : Rel α α} {a b : α} :
r a b∃ (l : List α), l.getLast? = some b List.Chain r a l

A single transitive step r⁺ a b can be expanded to a list of reducts l, ending in b, such that List.Chain r a l.

noncomputable def Thesis.InfReductionSeq.trans_chain' {α : Type u_1} {r : Rel α α} {a b : α} :
r a bList α

trans_chain' chooses a list that has the properties given by trans_chain.

Equations
Instances For

    The list returned by trans_chain' has the properties given by trans_chain.

    theorem Thesis.InfReductionSeq.trans_chain'.nonempty {α : Type u_1} {r : Rel α α} {a b : α} {h : r a b} :

    trans_chain' h is nonempty.

    noncomputable def Thesis.InfReductionSeq.inf_trans_lists {α : Type u_1} {r : Rel α α} (f : α) (hf : Thesis.reduction_seq r f) :
    List α

    An infinite r⁺-reduction sequence can be turned into an infinite sequence of lists of reducts, as given by trans_chain'.

    Equations
    Instances For

      Each of the lists in inf_trans_lists f hf is nonempty.

      @[irreducible]
      def Thesis.InfReductionSeq.aux {α : Type u_1} (l_seq : List α) (hne : ∀ (n : ), l_seq n []) (list_idx elem_idx : ) :
      α

      Starting at list no. list_idx, get the elem_idxth element, going to the next list if elem_idx ≥ (l_seq list_idx).length.

      This definition is largely due to Edward van de Meent on the Lean Zulip.

      Equations
      • One or more equations did not get rendered due to their size.
      Instances For
        theorem Thesis.InfReductionSeq.aux_skip {α : Type u_1} (l_seq : List α) (hne : ∀ (n : ), l_seq n []) (m k : ) :
        ∃ (n : ), Thesis.InfReductionSeq.aux l_seq hne m (k + n) = Thesis.InfReductionSeq.aux l_seq hne (m + 1) k

        If x := aux l_seq hne (m + 1) k, i.e. the kth element starting from list m + 1, we can get the same element starting from the previous list m by adding some n, which is the length of list m.

        theorem Thesis.InfReductionSeq.aux_skip_i {α : Type u_1} (l_seq : List α) (hne : ∀ (n : ), l_seq n []) (i m k : ) :
        ∃ (n : ), Thesis.InfReductionSeq.aux l_seq hne m (k + n) = Thesis.InfReductionSeq.aux l_seq hne (m + i) k

        An extension of aux_skip; we can get the kth element starting from list m + i by starting from list m and getting the k + nth element, where n is the sum of the lengths of the intermediate lists.

        theorem Thesis.InfReductionSeq.aux_elem' {α : Type u_1} {r : Rel α α} (f : α) (hf : Thesis.reduction_seq r f) (n : ) (hn : n > 0) :
        let ls := Thesis.InfReductionSeq.inf_trans_lists f hf; f n = Thesis.InfReductionSeq.aux ls (n - 1) ((ls (n - 1)).length - 1)

        If f is an infinite transitive reduction sequence, each element > 0 appears as the last element of the n - 1th list in the sequence generated by aux ....

        theorem Thesis.InfReductionSeq.aux_elem {α : Type u_1} {r : Rel α α} (f : α) (hf : Thesis.reduction_seq r f) (n : ) (hn : n > 0) :

        By aux_skip_i, aux_elem' can be modified to prove each element of f is reachable from the first list. Given that aux _ _ 0 is the basis of our eventual sequence, this essentially proves that all elements in f (except f 0) appear in the expanded sequence.

        noncomputable def Thesis.InfReductionSeq.seq {α : Type u_1} {r : Rel α α} (f : α) (hf : Thesis.reduction_seq r f) :
        α

        We form our expanded sequence by starting with f 0, and then continuing with all reducts of f 0 in the infinite transitive sequence, as generated by aux.

        Equations
        Instances For
          theorem Thesis.InfReductionSeq.seq_contains_elems {α : Type u_1} {r : Rel α α} (f : α) (hf : Thesis.reduction_seq r f) (n : ) :
          ∃ (m : ), f n = Thesis.InfReductionSeq.seq f hf m

          seq contains all elements of the infinite transitive sequence.

          seq f hf forms an infinite r-reduction sequence.

          theorem Thesis.InfReductionSeq.exists_regular_of_trans {α : Type u_1} {r : Rel α α} (f : α) (hf : Thesis.reduction_seq r f) :
          ∃ (f' : α), Thesis.reduction_seq r f' (∀ (n : ), ∃ (m : ), f n = f' m) f 0 = f' 0

          Any infinite r⁺-reduction sequence has a corresponding infinite r-reduction sequence, which contains all of the elements of the transitive sequence and starts with the same element.

          def Thesis.reduction_seq.degenerate {α : Type u_1} {r : Rel α α} {f : α} (hseq : Thesis.reduction_seq r f) :

          We call an infinite reduction sequence degenerate if, from some point onwards, it only contains steps from one element to itself.

          Equations
          • hseq.degenerate = ∃ (n : ), mn, f m = f (m + 1)
          Instances For
            def Thesis.InfReductionSeq.transitive_step_guarantee {α : Type u_1} {r : Rel α α} {f : α} (hseq : Thesis.reduction_seq r f) :
            Equations
            Instances For
              theorem Thesis.InfReductionSeq.tsg_of_not_degenerate {α : Type u_1} {r : Rel α α} {f : α} (hseq : Thesis.reduction_seq r f) (hndeg : ¬hseq.degenerate) :
              noncomputable def Thesis.InfReductionSeq.trans_idx_step {α : Type u_1} {r : Rel α α} {f : α} (hf : Thesis.reduction_seq r f) (htsg : Thesis.InfReductionSeq.transitive_step_guarantee hf) (n : ) :

              From some index n we step to a next index choose (htsg n) + 1, which is the end of a transitive step.

              Equations
              Instances For
                noncomputable def Thesis.InfReductionSeq.trans_idxs {α : Type u_1} {r : Rel α α} {f : α} (hf : Thesis.reduction_seq r f) (htsg : Thesis.InfReductionSeq.transitive_step_guarantee hf) (n : ) :

                By iterating trans_idx_step, we can generate a sequence of indices into f which represent all transitive steps in f.

                Equations
                Instances For
                  noncomputable def Thesis.InfReductionSeq.trans_seq {α : Type u_1} {r : Rel α α} {f : α} (hf : Thesis.reduction_seq r f) (htsg : Thesis.InfReductionSeq.transitive_step_guarantee hf) (n : ) :
                  α

                  We form the sequence by getting the element at each index given by trans_idxs

                  Equations
                  Instances For

                    Taking a step from index k yields an index greater than k.

                    Doing an extra iteration of trans_idx_step yields a larger index.

                    For all n, there is an element of trans_idxs that is larger than n.

                    If n is inbetween trans_idxs f hgs k and trans_idxs f hgs (k + 1), then f n must be equal to f (trans_idxs f hgs k). Hence f n is an element of trans_seq f hgs.

                    All n are sandwiched by two subsequent elements in trans_idxs f hgs. Combining this lemma with trans_idxs_inbetween above yields the proof that trans_seq f hgs contains all elements of f.

                    trans_seq f hgs contains all elements of f.

                    theorem Thesis.InfReductionSeq.exists_inf_regular_seq_of_not_degenerate {α : Type u_1} {r : Rel α α} {f : α} (hf : Thesis.reduction_seq r f) (hnd : ¬hf.degenerate) :
                    ∃ (f' : α), Thesis.reduction_seq r f' (∀ (n : ), ∃ (m : ), f n = f' m) f 0 = f' 0

                    If hf is not degenerate, there must be an infinite r-reduction sequence which contains all elements of f and starts with f 0.

                    This lemma first translates hf to an infinite r⁺-reduction sequence, and then uses the techniques for transitive reduction sequences developed above.

                    theorem Thesis.InfReductionSeq.finite_of_degenerate {α : Type u_1} {r : Rel α α} (f : α) (hf : Thesis.reduction_seq r f) (hdg : hf.degenerate) :
                    ∃ (N : ) (f' : α), Thesis.reduction_seq r (↑N) f' (∀ (n : ), mN, f' m = f n) f' 0 = f 0

                    If the infinite r∗-reduction sequence is degenerate, there must be some finite r∗-reduction sequence which contains all of the elements of the infinite r∗-reduction sequence, and starts with the same element.

                    theorem Thesis.InfReductionSeq.finite_seq_flatten {α : Type u_1} {r : Rel α α} (N : ) (f : α) (hrs : Thesis.reduction_seq r (↑N) f) :
                    ∃ (N' : ) (f' : α), Thesis.reduction_seq r (↑N') f' f' 0 = f 0 nN, m < N' + 1, f' m = f n

                    We can flatten a finite r∗-reduction sequence, by round-tripping through the inductive ReductionSeq definition.

                    theorem Thesis.InfReductionSeq.regular_seq_of_rt_seq {α : Type u_1} {r : Rel α α} (f : α) (hf : Thesis.reduction_seq r f) :
                    ∃ (N : ℕ∞) (f' : α), Thesis.reduction_seq r N f' (∀ (n : ), ∃ (m : ) (_ : m < N + 1), f n = f' m) f 0 = f' 0

                    A statement that is "obvious" when written down in a pen-and-paper proof, but which is non-trivial to formalize:

                    If we have an infinite r∗-reduction sequence a₀ ->* a₁ ->* a₂ ... there must be some (finite or infinite) reduction sequence a₀ -> ... -> a₁ -> ... -> a₂ -> ...