rw [← Int.gcd_eq_one_iff_coprime, Int.gcd_comm, Int.gcd_val] at h
case succ
x : ℤ
n : ℕ
h : IsCoprime x ↑(Nat.succ n)
this : 0 < Nat.succ n
⊢ ↑x * (↑x)⁻¹ = 1
case succ
x : ℤ
n : ℕ
h : Int.gcd (x % ↑(Nat.succ n)) ↑(Nat.succ n) = 1
this : 0 < Nat.succ n
⊢ ↑x * (↑x)⁻¹ = 1