Martingale theory