I hope this question is well-posed.
Let $(X, f)$(X, f) be a discrete dynamical system such that every $x \in X$x in X has finite period, i.e. there is some $n$n such that $f^n(x) = x$f^n(x) = x. Let $Div(X)$Div(X) be the free abelian group on the orbits of $X$X. When $X$X is a nonsingular algebraic curve over the algebraic closure of a finite field $k$k and $f$f is the Frobenius map, $Div(X)$Div(X) is naturally isomorphic to the group of fractional ideals of $k(X)$k(X) (at least, I think; correct me if I'm wrong). There is a distinguished subgroup $Prin(X)$Prin(X) consisting of the preimage of the principal ideals, and $Div(X)/Prin(X)$Div(X)/Prin(X) is the divisor class group.
Is there a canonical definition of $Prin(X)$Prin(X) for general dynamical systems? If not, how much extra structure does $X$X need to have for a construction like this to make sense and give some kind of useful information about $X\ ?$X?
The case I'm interested in is that $X$X is the set of aperiodic closed walks on a finite graph with a distinguished point and f moves the distinguished point.