Elnur Hajiyev said:
So we changed the example, now I am asking: does not the time dilation formula compare elapsed time for A and B during which B is in the toilet?
As I and several other people have pointed out, time dilation compares two different things:
- Elapsed time on a single clock in one frame.
- Computed time differences between a pair of synchronized clocks in another frame.
So it's not a comparison of two different elapsed times.
Here's a drawing showing time dilation from two different frames, illustrating these two different types of time comparisons. We have two identical rockets, one at rest in frame 1 and the other at rest in frame 2. Their relative speed is 0.866c, leading to a time dilation factor and a length contraction factor of 2. In the first rocket, there is clock A on the left end and clock B on the right end. In the second rocket, there is clock C on the left end and clock D on the right end. At event 1, clocks A and D pass each other, and they both show time 12:00. At event 2, clocks A and C pass each other, and clock A shows time 12:30, while clock C shows time 1:00. At event 2, clocks B and D pass each other, and clock B shows time 1:00 while clock D shows time 12:30.
Both frames 1 and 2 agree on the above facts. What they don't agree about is what is going on elsewhere at the same time as the above events. In particular:
- They disagree about the locations and times of clocks C and B at the time of event 1. According to frame 1, C is only half a rocket length away from clock D, and is not synchronized with clock D, showing time 12:45 instead of 12:00. According to frame 2, B is only half a rocket length away from clock A, and is not synchronized with clock A, showing time 12:45.
- They disagree about the locations and times of clocks B and D at the time of event 2. According to frame 1, D is only halfway between A and B, and is showing time 12:15. According to frame 2, A is only halfway between C and D and is showing time 12:15.
- They disagree about the locations and times of clocks A and C at the time of event 3. According to frame 1, clock C is halfway between A and B, and is showing time 1:15. According to frame 2, clock B is halfway between C and D and is showing time 1:15.
Note: the two frames also disagree about whether event 2 happens before or after event 3.
Time dilation compares the 30 minutes between events 1 and 2, as calculated by the single clock, A, with the 1 hour between those events, as measured using the pair of clocks, C and D. (We subtract the time of event 2, according to clock C, from the time of event 1, according to clock D, to get 1 hour). The single clock shows less elapsed time.
Time dilation compares the 30 minutes between events 1 and 3, as calculated by the single clock, D, with the 1 hour between those events, as measured using the pair of clocks, A and B. (We subtract the time of event 3, according to clock B, from the time of event 1, according to clock A.) Again, the single clock shows less elapsed time.
So time dilation is not a comparison of two different elapsed times---it's a comparison of a one-clock time measurement to a two-clock time measurement.