Another way to say "You can use a carpet to walk on" is "The use of a carpet is to be a surface to walk on."