S1 : L1 is recursive implies L2 is recursive
Since L1 is recursive there exists a decider for L1 which can halt and accept for members of L1 and halt and reject for non members of L1.
Now to prove L2 is also recursive we just need to veify whether we can construct a decider for L2 or not.
L2 Input: u # v
│
▼
[ L1 Decider ] ──► (Checks if both u and v belong to L1)
│
├─► If NO ──► Halt & REJECT immediately (Safe termination)
│
└─► If YES ──► Pass control to...
│
▼
[ Enumerator ] ──► (Prints words w1, w2, w3... until it hits u and v)
│
├─► Hits 'u' first ──► Halt & ACCEPT (i < j)
└─► Hits 'v' first ──► Halt & REJECT (i ≥ j)
We can clearly construct a decider for L2 therefore L2 is recursive. S1 is true...
Similarly to prove if L2 is recursive then L1 is recursive we just need to prove if we can construct a decider which halt and accepts for members of L1 and halt and reject for non members of L1. This can be done as follow using the help of L2 decider.
Input string: x
│
▼
[ Get w1 from Enumerator ]
│
├──► Is x = w1? ──► YES ──► Halt & ACCEPT immediately
│
└──► NO ──► Construct string: y = w1 # x
│
▼
[ L2 Decider ] ──► (Checks if w1 # x is in L2)
│
├──► If YES ──► Halt & ACCEPT x into L1
└──► If NO ──► Halt & REJECT x from L1
Since a decider can be constructed for L1, therefore L1 is recursive. S2 is also true...