Seven machines, ideal versus real mechanical advantage and the work balance.
The science
A machine trades force for distance; it never creates energy. For every machine W_in = F d_in = W_out + W_friction, and the efficiency is eta = W_out / W_in. The ideal mechanical advantage is MA_ideal = d_in / d_out; the real one is MA = load / effort = MA_ideal * eta.
Lever: F_effort * L_e = m g * L_l (torque balance). Ramp: F = m g (sin th + mu cos th), eta = sin th / (sin th + mu cos th); the load holds itself when tan th <= mu. Pulley: n supporting rope branches give MA_ideal = n; with a rope loss factor per sheave the real value is sum_k eta^k. Wheel and axle: MA_ideal = R / r. Gear train: ratio i = prod(Z_driven / Z_driver), speed gain 1/i, torque gain i * eta. Screw: MA_ideal = 2 pi r / p, with lead-angle efficiency eta = tan(l)(1 - mu tan l)/(tan l + mu). Wedge: MA = L / t (exact 1 / (2 sin(half-angle))).
Honest simplifications: friction values for oil, dry and rusty are model numbers, not measurements; rope is massless and inextensible; levers and wheels are rigid; the ramp uses Coulomb friction. The formulas are the same module as the 3D workshop.