Are these pedal signs? I have never seen one in bach pieces
This edition of the score calls for two pedals.
- The script "P" is the instruction to use the damper pedal1, and the lines are instructions for pressing, holding, and releasing that pedal2. It's anachronistic to Bach, but the editor was clearly considering how they thought the piece should be executed to make use of the piano.3
- The una corda is the instruction to (also) use the una corda pedal — a.k.a the soft pedal. That pedal is just held throughout; there is likely a tre corde instruction later in the piece indicating the pedal should be released. The lines related only to the damper pedal, not the una corda.
3) There are several questions regarding the use of pedal when playing Bach on the piano. Try the search bach piano pedal is:question. Strictly speaking, Bach wrote for keyboard instruments that did not have a sustain pedal (harpsichord, organ, clavichord), so there is endless debate among pianists about whether it's appropriate to use pedal when playing Bach on the piano. The strictest purists would not play Bach on the piano in the first place, while a "True Romantic" (which the editor of this edition likely was) might choose to make use of the piano's full capabilities in the interest of enhancing (in their view) the music.
The very first one says 'una corda' - meaning soft pedal. On a grand, it does just that - the hammers move sideways to hit only one string of two or three. On a studio, it brings the whole bank of hammers closer to the strings. Can't for the life of me think why it would need releasing and deploying again and again, though. That's usually kept for the sustain or damper pedal (on the right), to stop muddiness.
EDIT: it's not crystal clear here, but may well be explained as una chorda is applied all through (piece is marked dolce), and the rest is actually sustain pedal. Although playing staccato notes with pedal deployed has always been a mystery to me.