The science
Each photon enters beam splitter BS1 (unitary U = [[t, ir],[ir, t]], r² = R) and is in a superposition of both arms. A phase shifter adds eiφ in one arm, and BS2 recombines them. The probability at detector D0 follows from the density matrix ρ after each element.
A which-path marker with state overlap √(1-D²) multiplies the off-diagonal coherence of ρ by that factor. The fringe visibility becomes V = 2√(R(1-R))·√(1-D²), and for a balanced BS1 V² + D² = 1 (Englert duality). With BS2 removed the arm is revealed and no fringes appear (the delayed-choice variant is an ordinary calculation, no retrocausation needed).
Simplifications: ideal lossless components, a single spatial mode, a toy marker model.