Open condition theorem

Let $X$, $Y$ be schemes, and possibly some arrows, satisfying the following conditions:

• $f$ locally of finite presentation, flat
Then
• $f$ open