  The problem of obtaining canonical Hamiltonian structures from the equations
of motion, without any knowledge of the action, is studied in the context of
the spatially flat Friedmann-Robertson-Walker models. Modifications to
Raychaudhuri equation are implemented independently as quadratic and cubic
terms of energy density without introducing additional degrees of freedom.
Depending on their sign, modifications make gravity repulsive above a curvature
scale for matter satisfying strong energy condition, or more attractive than in
the classical theory. Canonical structure of the modified theories is
determined demanding that the total Hamiltonian be a linear combination of
gravity and matter Hamiltonians. In the quadratic repulsive case, the modified
canonical phase space of gravity is a polymerized phase space with canonical
momentum as inverse trigonometric function of Hubble rate; the canonical
Hamiltonian can be identified with the effective Hamiltonian in loop quantum
cosmology. The repulsive cubic modification results in a `generalized
polymerized' canonical phase space. Both of the repulsive modifications are
found to yield singularity avoidance. In contrast, the quadratic and cubic
attractive modifications result in a canonical phase space in which canonical
momentum is non-trigonometric and singularities persist. Our results hint on
connections between repulsive/attractive nature of modifications to gravity
arising from gravitational sector and polymerized/non-polymerized gravitational
phase space.
