Let's denote the total number of books on the shelf as 'total_books', and the number of new books as 'new_books'.
The number of used books can be calculated as the difference between the total number of books and the number of new books:
used_books = total_books - new_books
To find the ratio of used books to all books on the shelf, we divide the number of used books by the total number of books:
Ratio of used books to all books = used_books / total_books
Substituting the expression for used_books, we have:
Ratio of used books to all books = (total_books - new_books) / total_books
Simplifying further:
Ratio of used books to all books = 1 - (new_books / total_books)
Therefore, the ratio of used books to all books on the shelf is equal to 1 minus the ratio of new books to total books.