LeanPool.ErdosTuzaValtr.Lib.List.Lemmas #
Imported Lean Pool material for LeanPool.ErdosTuzaValtr.Lib.List.Lemmas.
@[simp]
@[simp]
@[simp]
@[simp]
Split a list of length at least 2 into its first two elements and the rest.
Equations
- List.takeHead2 h = absurd h ⋯
- List.takeHead2 h = absurd h ⋯
- List.takeHead2 x_2 = ⟨a, ⟨b, ⟨t, ⋯⟩⟩⟩
Instances For
Split a list of length at least 3 into its first three elements and the rest.
Equations
- List.takeHead3 h = absurd h ⋯
- List.takeHead3 h = absurd h ⋯
- List.takeHead3 h = absurd h ⋯
- List.takeHead3 x_2 = ⟨a, ⟨b, ⟨c, ⟨t, ⋯⟩⟩⟩⟩
Instances For
Split off the last element of a list given a witness that a is its last element.
Equations
- List.takeLast' h = absurd h ⋯
- List.takeLast' h = ⟨[], ⋯⟩
- List.takeLast' h = match List.takeLast' ⋯ with | ⟨l'', hl''⟩ => ⟨b :: l'', ⋯⟩
Instances For
Split a nonempty list into its last element and the preceding prefix.
Equations
Instances For
Split a list of length at least 2 into its last two elements and the preceding prefix.
Equations
Instances For
Split a list of length at least 3 into its last three elements and the preceding prefix.