Is castling possible with a pawn promoted to a rook? I was thinking about some rules and I came up with a really nice question. Is it possible to castle with a pawn promoted to a rook?

If the rules are followed-neither the king or the new rook has moved and king doesn’t move out of or through check-to me it seems to be a legal move.

If it possbile, how would this castling look like? I suspect that the king would go to e3, and the new rook would go to e2, starting from the below diagram.

[FEN "8/4P3/8/8/8/8/8/4K3 w - - 0 1"]

1. e8=R
No, according to FIDE's Laws of Chess, castling has to be done along the first rank.
§3.8.2:

3.8.2 by ‘castling’. This is a move of the king and either rook of the same
colour along the player’s first rank, counting as a single move of the
king and executed as follows: the king is transferred from its
original square two squares towards the rook on its original square,
then that rook is transferred to the square the king has just crossed.
3.8.2.1   The right to castle has been lost:
3.8.2.1.1 if the king has already moved, or
3.8.2.1.2 with a rook that has already moved.
3.8.2.2   Castling is prevented temporarily:
3.8.2.2.1 if the square on which the king stands, or the square which it must cross, or the square which it is to occupy, is attacked by one
or more of the opponent's pieces, or
3.8.2.2.2 if there is any piece between the king and the rook with which castling is to be effected.