Theorems · Definition
List.destutter
{α : Type u_1} → (R : α → α → Prop) → [DecidableRel R] → List α → List αGreedily create a sublist of l such that, for every two adjacent elements a, b ∈ l,
R a b holds. Mostly used with ≠; for example, destutter (≠) [1, 2, 2, 1, 1] = [1, 2, 1],
destutter (≠) [1, 2, 3, 3] = [1, 2, 3], destutter (<) [1, 2, 5, 2, 3, 4, 9] = [1, 2, 5, 9].
- Defined in
- Mathlib.Data.List.Defs
- Cited by
- 25 results in Mathlib
- Foundations
- Depth 8 from the axioms · uses no axioms
- Assumes
- DecidableRel
Around this declaration
Dashed lines are statement dependencies; solid lines are citations in proofs.
Cites1
Mathlib declarations this one mentions in its statement or cites explicitly in its proof. Plumbing is filtered out.
- List.destutter'proof · cited by 23
Cited by26
Results whose statement or proof uses this declaration.
- Polynomial.signVariationsproof · cited by 13
- List.destutter.congr_simpstatement and proof · cited by 6
- Polynomial.signVariations_negproof · cited by 2
- List.map_destutterstatement · cited by 1
- List.IsChain.length_le_length_destutterstatement · cited by 1
- List.destutter_cons'statement · cited by 1
- List.destutter_cons_consstatement · cited by 1
- List.destutter_of_isChainstatement and proof · cited by 1
- List.destutter_pairstatement · cited by 1
- Polynomial.signVariations_eq_eraseLead_add_iteproof · cited by 1
- Polynomial.succ_signVariations_le_X_sub_C_mulproof · cited by 1
- List.isChain_destutterstatement and proof · cited by 1