I am working through Sipser's Introduction to the theory of computation on my own, so I don't have access to a teacher. Hopefully you can help me! Giving hints is highly appreciated.
This question is about problem 1.49a, and the chapter is belongs to is about finite automata, regular languages, pumping lemma. We learned how to prove a language is regular (a finite automaton exists) and how to disprove that (using pumping lemma and/or that regular languages are closed under union, intersection, star, complement).
$ B = \{1^{k}y$ $|$ $y \in \{0,1\}^{*}$ and y contains at least $k$ 1's, for $k \geq 1 \} $
Show that B is a regular language.
I found another question here that answers how to find the regular expression / automaton to recognize this language.
But it seems I found a proof that B is actually not regular: the string $1^{p}01^{p}$ is in B, but by applying the pumping lemma, for pumping length $p$ this string cannot be pumped. Pumping it could make the first string of 1's longer than the second, making the condition in de definition of B where y must contain at least the same amount of 1's as the first string, untrue, and therefore the pumped string is not in B.
Obviously I am not as smart as M. Sipser, and in the question I linked to a proof of regularity has been shown, so I am doing something wrong. What?