adverb
Used at the beginning of a conditional clause, often paired with ~たら, ~ば, or ~なら. Marks a hypothetical or uncertain situation.
もし雨が降ったら、試合は中止です。
If it rains, the game will be canceled.
もしよろしければ、ご一緒にいかが
If you don't mind, how about joining us?
万一 is more formal and emphasizes a very unlikely or worst-case scenario, while もし is a general conditional marker.
仮に explicitly sets up a hypothetical premise for argument's sake, often used in logical or abstract discussions.
The historical derivation is uncertain; it has been used as a conditional particle since Old Japanese.