File: Mathlib/Order/Disjointed.lean

full_name: disjointed
code: /-- If `f : ℕ → α` is a sequence of elements, then `disjointed f` is the sequence formed by
subtracting each element from the nexts. This is the unique disjoint sequence whose partial sups
are the same as the original sequence. -/
def disjointed (f : ℕ → α) : ℕ → α
  
goal: ℕ → α

full_name: disjointed_zero
code: @[simp]
theorem disjointed_zero (f : ℕ → α) : disjointed f 0 = f 0 
goal: disjointed f 0 = f 0

full_name: disjointed_succ
code: theorem disjointed_succ (f : ℕ → α) (n : ℕ) : disjointed f (n + 1) = f (n + 1) \ partialSups f n 
goal: disjointed f (n + 1) = f (n + 1) \ (partialSups f) n

full_name: disjointed_le_id
code: theorem disjointed_le_id : disjointed ≤ (id : (ℕ → α) → ℕ → α) 
goal: disjointed ≤ id

full_name: disjointed_le
code: theorem disjointed_le (f : ℕ → α) : disjointed f ≤ f 
goal: disjointed f ≤ f

full_name: disjoint_disjointed
code: theorem disjoint_disjointed (f : ℕ → α) : Pairwise (Disjoint on disjointed f) 
goal: Pairwise (Disjoint on disjointed f)

full_name: disjointedRec
code: /-- An induction principle for `disjointed`. To define/prove something on `disjointed f n`, it's
enough to define/prove it for `f n` and being able to extend through diffs. -/
def disjointedRec {f : ℕ → α} {p : α → Sort*} (hdiff : ∀ ⦃t i⦄, p t → p (t \ f i)) :
    ∀ ⦃n⦄, p (f n) → p (disjointed f n)
  
goal: p (f n) → p (disjointed f n)

full_name: disjointedRec_zero
code: @[simp]
theorem disjointedRec_zero {f : ℕ → α} {p : α → Sort*} (hdiff : ∀ ⦃t i⦄, p t → p (t \ f i))
    (h₀ : p (f 0)) : disjointedRec hdiff h₀ = h₀ 
goal: disjointedRec hdiff h₀ = h₀

full_name: Monotone.disjointed_succ
code: protected lemma Monotone.disjointed_succ {f : ℕ → α} (hf : Monotone f) (n : ℕ) :
    disjointed f (n + 1) = f (n + 1) \ f n 
goal: disjointed f (n + 1) = f (n + 1) \ f n

full_name: Monotone.disjointed_succ_sup
code: protected lemma Monotone.disjointed_succ_sup {f : ℕ → α} (hf : Monotone f) (n : ℕ) :
    disjointed f (n + 1) ⊔ f n = f (n + 1) 
goal: disjointed f (n + 1) ⊔ f n = f (n + 1)

full_name: partialSups_disjointed
code: @[simp]
theorem partialSups_disjointed (f : ℕ → α) : partialSups (disjointed f) = partialSups f 
goal: partialSups (disjointed f) = partialSups f

full_name: disjointed_unique
code: /-- `disjointed f` is the unique sequence that is pairwise disjoint and has the same partial sups
as `f`. -/
theorem disjointed_unique {f d : ℕ → α} (hdisj : Pairwise (Disjoint on d))
    (hsups : partialSups d = partialSups f) : d = disjointed f 
goal: d = disjointed f

full_name: iSup_disjointed
code: theorem iSup_disjointed (f : ℕ → α) : ⨆ n, disjointed f n = ⨆ n, f n 
goal: ⨆ n, disjointed f n = ⨆ n, f n

full_name: disjointed_eq_inf_compl
code: theorem disjointed_eq_inf_compl (f : ℕ → α) (n : ℕ) : disjointed f n = f n ⊓ ⨅ i < n, (f i)ᶜ 
goal: disjointed f n = f n ⊓ ⨅ i, ⨅ (_ : i < n), (f i)ᶜ

full_name: disjointed_subset
code: theorem disjointed_subset (f : ℕ → Set α) (n : ℕ) : disjointed f n ⊆ f n 
goal: disjointed f n ⊆ f n

full_name: iUnion_disjointed
code: theorem iUnion_disjointed {f : ℕ → Set α} : ⋃ n, disjointed f n = ⋃ n, f n 
goal: ⋃ n, disjointed f n = ⋃ n, f n

full_name: disjointed_eq_inter_compl
code: theorem disjointed_eq_inter_compl (f : ℕ → Set α) (n : ℕ) :
    disjointed f n = f n ∩ ⋂ i < n, (f i)ᶜ 
goal: disjointed f n = f n ∩ ⋂ i, ⋂ (_ : i < n), (f i)ᶜ

full_name: preimage_find_eq_disjointed
code: theorem preimage_find_eq_disjointed (s : ℕ → Set α) (H : ∀ x, ∃ n, x ∈ s n)
    [∀ x n, Decidable (x ∈ s n)] (n : ℕ) : (fun x => Nat.find (H x)) ⁻¹' {n} = disjointed s n 
goal: (fun x => Nat.find ⋯) ⁻¹' {n} = disjointed s n