Math is generally pure logic, but based upon arbitrary rules or unproven assumptions. In your example you assume the bag is empty and that it can hold at least 5 things.
For example, Euclidean geometry is based on the concepts of points, lines, and planes. All of those are assumed to exist as defined with no proof.
In a similar vein, philosophy generally defines a base assumption as true and works from there to form a framework.
Math is generally pure logic, but based upon arbitrary rules or unproven assumptions. In your example you assume the bag is empty and that it can hold at least 5 things.
For example, Euclidean geometry is based on the concepts of points, lines, and planes. All of those are assumed to exist as defined with no proof.
In a similar vein, philosophy generally defines a base assumption as true and works from there to form a framework.