1

Let the notation $[a]_n$ stand for $\{a + kn \mid k \in \mathbb{Z}\}$. If $n = 0$, this is $\{a\}$; otherwise, this is $\{b \mid b \equiv a \pmod{n}\}$.

We can define a lattice $L$ whose elements are of the form $[a]_n$. The top element is $\top = [0]_1 = \mathbb{Z}$. We can also add a bottom element $\bot = \varnothing$.

We can compute joins as follows: given $x = [a]_m$ and $y = [b]_n$, let $g = \gcd(m, n, |a - b|)$. Then $x \vee y = [a]_g = [b]_g$. (And as usual, $x \vee \bot = \bot \vee x = x$.)

I am interested in doing some data flow analysis with this lattice as the abstract domain, so it's useful to perform arithmetic with elements of this lattice. E.g. for addition, I'd like an operation $x + y = z$ on lattices that is compatible with integer addition, i.e. $r \in x, s \in y \implies (r + s) \in z$. One possible definition is: $$ [a]_m + [b]_n = [a + b]_{\gcd(m, n)} $$ and I think that's as precise as possible.

I'd also to define multiplication of lattice elements. So far I've come up with $$ [a]_m [b]_n = [ab]_0 + [0]_{an} + [0]_{bm} + [0]_{mn}. $$ Is there a better (more precise and/or simpler) definition of multiplication over $L$? It's been a while since I did discrete math but most of what I remember only applies to the $m = n$ case. The only tool I know for handling different moduli is Chinese remaindering but I don't see how it would help here.

And more generally: is there an established name for $L$? Or books/papers that discuss it?

  • If I understand your question correctly, I don't think that $[a]m [b]_n = [ab]_0 + [0]{an} + [0]{bm} + [0]{mn}$ holds. Take $a=2,m=3,b=1,n=4$ for example. LHS does not have $1$ as an element while RHS has. In other words, there are no integers $s,t$ such that $(2+3s)(1+4t)=2+8t+3s+12st=1$ while there are integers $x,y,z$ such that $2+8x+3y+12z=1$. I think this is where the difficulty lies. I got only partial results. – mathlove Apr 18 '23 at 17:28
  • @mathlove Yes I think it's unavoidable that multiplication overapproximates, but that's okay. I only need $[a]_m [b]_n \supseteq {(a + j m) (b + k n) \mid j, k \in \mathbb{Z} }$ for correctness. – Tavian Barnes Apr 18 '23 at 19:36

1 Answers1

1

I only need $[a]_m[b]_n\supseteq\{(a+jm)(b+kn)\mid j,k\in\mathbb Z\}$

Then, how about the following?

$$[a]_m [b]_n=[ab]_{\gcd(an,bm,mn)}$$

which might be simpler.


Another way is

$$[a]_m [b]_n=[ab]_{\gcd(m,n)}$$

If $\gcd\bigg(\frac{an}{\gcd(m,n)},\frac{mn}{\gcd(m,n)}\bigg)=1$ or $\gcd\bigg(\frac{bm}{\gcd(m,n)},\frac{mn}{\gcd(m,n)}\bigg)=1$, then we have $$[a]_m[b]_n=\{(a+jm)(b+kn)\mid j,k\in\mathbb Z\}$$

Examples :

  • $[1]_3[5]_6=\{(1+3j)(5+6k)\mid j,k\in\mathbb Z\}$

  • $[5]_6[7]_8\supset \{(5+6j)(7+8k)\mid j,k\in\mathbb Z\}$

mathlove
  • 139,939