```python
from sympy import *
from sympy import pprint
from sympy.core.numbers import mod_inverse
a,b,c,d = symbols('a,b,c,d')
```


```python
G = Matrix([[2, 1, 3, 2],
            [4, 2, 0, 1]
           ])
```


```python
def mod(x,modulus):
    numer, denom = x.as_numer_denom()
    return numer*mod_inverse(denom,modulus) % modulus
```


```python
G_rref = G.rref(iszerofunc=lambda x: x % 5 == 0)
pprint(G_rref[0].applyfunc(lambda x: mod(x,5)))
```


```python
F = Matrix([[4,3,1,3],[2,4,1,3]])
F.rref(iszerofunc=lambda x: x % 5 == 0)
pprint(F_rref[0].applyfunc(lambda x: mod(x,5)))
```


```python

```

1208dcc54acc809022c92a560b3a1fe176d3b7c8
ipynb
Jupyter Notebook
pset_3.4_checking_work_160519.ipynb
brunston/enigma
3944fade43e100f3f631e308cf70fd28242a7b26
MIT
pset_3.4_checking_work_160519.ipynb
brunston/enigma
3944fade43e100f3f631e308cf70fd28242a7b26
MIT
pset_3.4_checking_work_160519.ipynb
brunston/enigma
3944fade43e100f3f631e308cf70fd28242a7b26
MIT
Qwen/Qwen-72B
1. YES
2. YES