“Not logically possible to appoint a man as the Pope of a church that did not yet exist.”
I’m not sure I agree. You can definitely appoint someone as your successor for an event that hasn’t yet happened, or of a specific role in an organization that isn’t yet formed as a physical, public entity. I don’t see that as illogical at all.
I’m not dead yet, but I can appoint someone in my will to take over as writer in my unfinished book series if I should die before they’re finished. Heirs are named to succeed a king that hasn’t died yet. A group of people can come together and take on specific roles as they work to found a company.
And wouldn’t it have been rather pointless to give Peter the keys, if that didn’t get hold any meaning or weight since the Church wasn’t yet formed?
And going by Scripture, Christ had marked and appointed Peter for a special role in the future Church, in giving him the keys to the kingdom that he didn’t give to the rest of the apostles. That role, of course, would eventually be termed the papacy.
Was Peter yet acting in that role when he denied Jesus? No, because the Church as an entity didn’t yet exist as such, and wouldn’t until after Jesus 's Ascension and the event of Pentecost. Thus, Peter couldn’t be acting as Pope when he denied Jesus at the crucifixion, much less making a pronouncement from his chair that didn’t exist yet.
Which was the point of my initial post, but I seem to have worded it poorly when trying to expand on that in subsequent ones. I think we actually agree that Peter wasn’t acting as Pope at that time, I just fouled up what I was saying, somehow. I was entertaining the what if part of the OP’s question a bit, and trying to make the point that even if Peter had been able to speak infallibly at that point in time, he wouldn’t have, out of deference to Christ, who was still with them. Therefore, there wasn’t any need to speak infallible yet, as they could still get teaching and pronouncements straight from the mouth of Jesus, at that point.
All of this is rather a disraction, though. As was pointed out further up thread, the real heart of the matter is that the OP doesn’t understand the papacy and how it functions. If he or she understood that, then his or her questions about Peter’s denial in relation to papal infallibility would be moot. The OP seems to be making the common mistake of thinking infallibility means impeccability, or sinlessness.