Primordial nucleosynthesis is one of the three historical evidences for the big bang model, together with the expansion of the universe and the cosmic microwave background. There is a good global agreement between the computed primordial abundances of helium-4, deuterium, helium-3 and their values deduced from observations. Now that the number of neutrino families and the baryonic densities have been fixed by laboratory measurements or CMB observations, the model has no free parameter and its predictions are rigid. Since this is the earliest cosmic process for which we a priori know all the physics involved, departure from its predictions could provide hints or constraints on new physics or astrophysics in the early universe. Precision on primordial abundances deduced from observations has recently been drastically improved and reach the percent level for both deuterium and helium-4. Accordingly, the BBN predictions should reach the same level of precision. For most isotopes, the dominant sources of uncertainty come from those on the laboratory thermonuclear reactions. This article focuses on helium-4 whose predicted primordial abundance depends essentially on weak interactions which control the neutron-proton ratio. The rates of the various weak interaction processes depend on the experimentally measured neutron lifetime, but also includes numerous corrections that we thoroughly investigate here. They are the radiative, zero-temperature, corrections, finite nucleon mass corrections, finite temperature radiative corrections, weak-magnetism, and QED plasma effects, which are for the first time all included and calculated in a self consistent way, allowing to take into account the correlations between them, and verifying that all satisfy detailed balance. Finally, we include the incomplete neutrino decoupling and claim to reach a 10 −4 accuracy on the helium-4 predicted mass fraction of 0.24709 ± 0.00017 (when including the uncertainty on the neutron lifetime). In addition, we provide a Mathematica primordial nucleosynthesis code that incorporates, not only these corrections but also a full network of reactions, using the best available thermonuclear reaction rates, allowing the predictions of primordial abundances of helium-4, deuterium, helium-3 and lithium-7 but also of heavier isotopes up to the CNO region. * Electronic address: pitrou@iap.fr † Electronic address: coc@csnsm.in2p3.fr ‡ Electronic address: uzan@iap.fr § Electronic address: vangioni@iap.fr G. Finite nucleon mass corrections 21 H. Weak magnetism 23 I. Effect of incomplete neutrino decoupling 23 J. Total correction to the weak rates 23 IV. Nucleosynthesis 23 A. Thermonuclear reaction rates 24 B. General form 24 C. Nuclear network and reaction rates uncertainties 25 V. Numerical results 28 A. Overview of PRIMAT 28 B. Temperature of nucleosynthesis 29 C. Effect of corrections on abundances 29 D. Dependence on main parameters 32 E. Distribution of abundance predictions 33 F. Comparison with observations 33 VI. Cosmology with BBN 36 A. Cosmological pert...