url
stringclasses
147 values
commit
stringclasses
147 values
file_path
stringlengths
7
101
full_name
stringlengths
1
94
start
stringlengths
6
10
end
stringlengths
6
11
tactic
stringlengths
1
11.2k
state_before
stringlengths
3
2.09M
state_after
stringlengths
6
2.09M
input
stringlengths
73
2.09M
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
set s : Int := gcd_c1 m n
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ s : ℤ := gcd_c1 m n ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
set t : Int := gcd_c2 m n
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ s : ℤ := gcd_c1 m n ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ s : ℤ := gcd_c1 m n ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
have h4 : s * m + t * n = gcd m n := gcd_lin_comb n m
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = ↑(gcd m n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
define at h1
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = ↑(gcd m n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = ↑(gcd m n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : rel_prime m n a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = ↑(gcd m n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
rewrite [h1, Nat.cast_one] at h4
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = ↑(gcd m n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = 1 ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = ↑(gcd m n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
set x : Int := t * n * a + s * m * b
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = 1 ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = 1 ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
have h5 : x ≡ a (MOD m) := Lemma_7_4_7_aux h4 a b
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
rewrite [add_comm] at h4
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : s * ↑m + t * ↑n = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
have h6 : s * m * b + t * n * a ≡ b (MOD n) := Lemma_7_4_7_aux h4 b a
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : s * ↑m * ↑b + t * ↑n * ↑a ≡ ↑b (MOD n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
have h7 : s * m * b + t * n * a = x := by ring
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : s * ↑m * ↑b + t * ↑n * ↑a ≡ ↑b (MOD n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : s * ↑m * ↑b + t * ↑n * ↑a ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : s * ↑m * ↑b + t * ↑n * ↑a ≡ ↑b (MOD n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
rewrite [h7] at h6
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : s * ↑m * ↑b + t * ↑n * ↑a ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : s * ↑m * ↑b + t * ↑n * ↑a ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
have h8 : m * n ≠ 0 := mul_ne_zero (NeZero.ne m) (NeZero.ne n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : m * n ≠ 0 ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x ⊢ ∃ r < m * n, ↑...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
rewrite [←neZero_iff] at h8
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : m * n ≠ 0 ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : m * n ≠ 0 ⊢...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
have h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x % ↑(m * n) (MOD m * n) := mod_cmpl_res (m * n) x
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) ⊢ ∃ r < m * n, ↑r ≡ ↑a (MOD m) ∧ ↑r ≡ ↑b (MOD n)
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
have h10 : x % ↑(m * n) < ↑(m * n) ∧ x ≡ x % ↑(m * n) (MOD m * n) := h9.right
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
set r : Nat := Int.toNat (x % ↑(m * n))
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
have h11 : x % ↑(m * n) = ↑r := (Int.toNat_of_nonneg h9.left).symm
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
rewrite [h11, Nat.cast_lt] at h10
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
apply Exists.intro r
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
apply And.intro h10.left
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
have h12 : r ≡ x (MOD (m * n)) := congr_symm h10.right
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
rewrite [Lemma_7_4_5 _ _ h1] at h12
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
apply And.intro
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n) ∧ x ≡ x %...
case left m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n)...
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m *...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
ring
m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : s * ↑m * ↑b + t * ↑n * ↑a ≡ ↑b (MOD n) ⊢ s * ↑m * ↑b + t * ↑n * ↑a = x
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : s * ↑m * ↑b + t * ↑n * ↑a ≡ ↑b (MOD n) ⊢ s * ↑m * ↑b + t * ↑n * ↑a...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
show r ≡ a (MOD m) from congr_trans h12.left h5
case left m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n)...
no goals
Please generate a tactic in lean4 to solve the state. STATE: case left m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : N...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Lemma_7_4_7
[979, 1]
[1014, 7]
show r ≡ b (MOD n) from congr_trans h12.right h6
case right m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : NeZero (m * n) h9 : 0 ≤ x % ↑(m * n) ∧ x % ↑(m * n) < ↑(m * n...
no goals
Please generate a tactic in lean4 to solve the state. STATE: case right m n : ℕ inst✝¹ : NeZero m inst✝ : NeZero n h1 : gcd m n = 1 a b : ℕ s : ℤ := gcd_c1 m n t : ℤ := gcd_c2 m n h4 : t * ↑n + s * ↑m = 1 x : ℤ := t * ↑n * ↑a + s * ↑m * ↑b h5 : x ≡ ↑a (MOD m) h6 : x ≡ ↑b (MOD n) h7 : s * ↑m * ↑b + t * ↑n * ↑a = x h8 : ...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Set_prod_def
[1016, 1]
[1017, 46]
rfl
U V : Type A : Set U B : Set V a : U b : V ⊢ (a, b) ∈ A ×ₛ B ↔ a ∈ A ∧ b ∈ B
no goals
Please generate a tactic in lean4 to solve the state. STATE: U V : Type A : Set U B : Set V a : U b : V ⊢ (a, b) ∈ A ×ₛ B ↔ a ∈ A ∧ b ∈ B TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Rel_prod_def
[1019, 1]
[1021, 53]
rfl
U V W X : Type R : Rel U V S : Rel W X u : U v : V w : W x : X ⊢ (R ×ᵣ S) (u, w) (v, x) ↔ R u v ∧ S w x
no goals
Please generate a tactic in lean4 to solve the state. STATE: U V W X : Type R : Rel U V S : Rel W X u : U v : V w : W x : X ⊢ (R ×ᵣ S) (u, w) (v, x) ↔ R u v ∧ S w x TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Theorem_8_1_2_1
[1029, 1]
[1036, 7]
obtain (R : Rel U V) (h3 : matching R A B) from h1
U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D ⊢ A ×ₛ C ∼ B ×ₛ D
U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D R : Rel U V h3 : matching R A B ⊢ A ×ₛ C ∼ B ×ₛ D
Please generate a tactic in lean4 to solve the state. STATE: U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D ⊢ A ×ₛ C ∼ B ×ₛ D TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Theorem_8_1_2_1
[1029, 1]
[1036, 7]
obtain (S : Rel W X) (h4 : matching S C D) from h2
U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D R : Rel U V h3 : matching R A B ⊢ A ×ₛ C ∼ B ×ₛ D
U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D R : Rel U V h3 : matching R A B S : Rel W X h4 : matching S C D ⊢ A ×ₛ C ∼ B ×ₛ D
Please generate a tactic in lean4 to solve the state. STATE: U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D R : Rel U V h3 : matching R A B ⊢ A ×ₛ C ∼ B ×ₛ D TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Theorem_8_1_2_1
[1029, 1]
[1036, 7]
apply Exists.intro (R ×ᵣ S)
U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D R : Rel U V h3 : matching R A B S : Rel W X h4 : matching S C D ⊢ A ×ₛ C ∼ B ×ₛ D
U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D R : Rel U V h3 : matching R A B S : Rel W X h4 : matching S C D ⊢ matching (R ×ᵣ S) (A ×ₛ C) (B ×ₛ D)
Please generate a tactic in lean4 to solve the state. STATE: U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D R : Rel U V h3 : matching R A B S : Rel W X h4 : matching S C D ⊢ A ×ₛ C ∼ B ×ₛ D TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.Theorem_8_1_2_1
[1029, 1]
[1036, 7]
show matching (R ×ᵣ S) (A ×ₛ C) (B ×ₛ D) from prod_match h3 h4
U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D R : Rel U V h3 : matching R A B S : Rel W X h4 : matching S C D ⊢ matching (R ×ᵣ S) (A ×ₛ C) (B ×ₛ D)
no goals
Please generate a tactic in lean4 to solve the state. STATE: U V W X : Type A : Set U B : Set V C : Set W D : Set X h1 : A ∼ B h2 : C ∼ D R : Rel U V h3 : matching R A B S : Rel W X h4 : matching S C D ⊢ matching (R ×ᵣ S) (A ×ₛ C) (B ×ₛ D) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.qr_def
[1038, 1]
[1038, 61]
rfl
n a : ℕ ⊢ qr n a = (a / n, a % n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: n a : ℕ ⊢ qr n a = (a / n, a % n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.qr_one_one
[1040, 1]
[1051, 7]
define
n : ℕ ⊢ one_to_one (qr n)
n : ℕ ⊢ ∀ (x1 x2 : ℕ), qr n x1 = qr n x2 → x1 = x2
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ ⊢ one_to_one (qr n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.qr_one_one
[1040, 1]
[1051, 7]
fix a1 : Nat
n : ℕ ⊢ ∀ (x1 x2 : ℕ), qr n x1 = qr n x2 → x1 = x2
n a1 : ℕ ⊢ ∀ (x2 : ℕ), qr n a1 = qr n x2 → a1 = x2
Please generate a tactic in lean4 to solve the state. STATE: n : ℕ ⊢ ∀ (x1 x2 : ℕ), qr n x1 = qr n x2 → x1 = x2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.qr_one_one
[1040, 1]
[1051, 7]
fix a2 : Nat
n a1 : ℕ ⊢ ∀ (x2 : ℕ), qr n a1 = qr n x2 → a1 = x2
n a1 a2 : ℕ ⊢ qr n a1 = qr n a2 → a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: n a1 : ℕ ⊢ ∀ (x2 : ℕ), qr n a1 = qr n x2 → a1 = x2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.qr_one_one
[1040, 1]
[1051, 7]
assume h1 : qr n a1 = qr n a2
n a1 a2 : ℕ ⊢ qr n a1 = qr n a2 → a1 = a2
n a1 a2 : ℕ h1 : qr n a1 = qr n a2 ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: n a1 a2 : ℕ ⊢ qr n a1 = qr n a2 → a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.qr_one_one
[1040, 1]
[1051, 7]
rewrite [qr_def, qr_def] at h1
n a1 a2 : ℕ h1 : qr n a1 = qr n a2 ⊢ a1 = a2
n a1 a2 : ℕ h1 : (a1 / n, a1 % n) = (a2 / n, a2 % n) ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: n a1 a2 : ℕ h1 : qr n a1 = qr n a2 ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.qr_one_one
[1040, 1]
[1051, 7]
have h2 : a1 / n = a2 / n ∧ a1 % n = a2 % n := Prod.mk.inj h1
n a1 a2 : ℕ h1 : (a1 / n, a1 % n) = (a2 / n, a2 % n) ⊢ a1 = a2
n a1 a2 : ℕ h1 : (a1 / n, a1 % n) = (a2 / n, a2 % n) h2 : a1 / n = a2 / n ∧ a1 % n = a2 % n ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: n a1 a2 : ℕ h1 : (a1 / n, a1 % n) = (a2 / n, a2 % n) ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.qr_one_one
[1040, 1]
[1051, 7]
show a1 = a2 from calc a1 _ = n * (a1 / n) + a1 % n := (Nat.div_add_mod a1 n).symm _ = n * (a2 / n) + a2 % n := by rw [h2.left, h2.right] _ = a2 := Nat.div_add_mod a2 n
n a1 a2 : ℕ h1 : (a1 / n, a1 % n) = (a2 / n, a2 % n) h2 : a1 / n = a2 / n ∧ a1 % n = a2 % n ⊢ a1 = a2
no goals
Please generate a tactic in lean4 to solve the state. STATE: n a1 a2 : ℕ h1 : (a1 / n, a1 % n) = (a2 / n, a2 % n) h2 : a1 / n = a2 / n ∧ a1 % n = a2 % n ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.qr_one_one
[1040, 1]
[1051, 7]
rw [h2.left, h2.right]
n a1 a2 : ℕ h1 : (a1 / n, a1 % n) = (a2 / n, a2 % n) h2 : a1 / n = a2 / n ∧ a1 % n = a2 % n ⊢ n * (a1 / n) + a1 % n = n * (a2 / n) + a2 % n
no goals
Please generate a tactic in lean4 to solve the state. STATE: n a1 a2 : ℕ h1 : (a1 / n, a1 % n) = (a2 / n, a2 % n) h2 : a1 / n = a2 / n ∧ a1 % n = a2 % n ⊢ n * (a1 / n) + a1 % n = n * (a2 / n) + a2 % n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.numElts_prod
[1059, 1]
[1067, 7]
rewrite [numElts_def] at h1
U V : Type A : Set U B : Set V m n : ℕ h1 : numElts A m h2 : numElts B n ⊢ numElts (A ×ₛ B) (m * n)
U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : numElts B n ⊢ numElts (A ×ₛ B) (m * n)
Please generate a tactic in lean4 to solve the state. STATE: U V : Type A : Set U B : Set V m n : ℕ h1 : numElts A m h2 : numElts B n ⊢ numElts (A ×ₛ B) (m * n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.numElts_prod
[1059, 1]
[1067, 7]
rewrite [numElts_def] at h2
U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : numElts B n ⊢ numElts (A ×ₛ B) (m * n)
U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B ⊢ numElts (A ×ₛ B) (m * n)
Please generate a tactic in lean4 to solve the state. STATE: U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : numElts B n ⊢ numElts (A ×ₛ B) (m * n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.numElts_prod
[1059, 1]
[1067, 7]
rewrite [numElts_def]
U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B ⊢ numElts (A ×ₛ B) (m * n)
U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B ⊢ I (m * n) ∼ A ×ₛ B
Please generate a tactic in lean4 to solve the state. STATE: U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B ⊢ numElts (A ×ₛ B) (m * n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.numElts_prod
[1059, 1]
[1067, 7]
have h3 : I m ×ₛ I n ∼ A ×ₛ B := Theorem_8_1_2_1 h1 h2
U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B ⊢ I (m * n) ∼ A ×ₛ B
U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B h3 : I m ×ₛ I n ∼ A ×ₛ B ⊢ I (m * n) ∼ A ×ₛ B
Please generate a tactic in lean4 to solve the state. STATE: U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B ⊢ I (m * n) ∼ A ×ₛ B TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.numElts_prod
[1059, 1]
[1067, 7]
have h4 : I (m * n) ∼ I m ×ₛ I n := I_prod m n
U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B h3 : I m ×ₛ I n ∼ A ×ₛ B ⊢ I (m * n) ∼ A ×ₛ B
U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B h3 : I m ×ₛ I n ∼ A ×ₛ B h4 : I (m * n) ∼ I m ×ₛ I n ⊢ I (m * n) ∼ A ×ₛ B
Please generate a tactic in lean4 to solve the state. STATE: U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B h3 : I m ×ₛ I n ∼ A ×ₛ B ⊢ I (m * n) ∼ A ×ₛ B TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.numElts_prod
[1059, 1]
[1067, 7]
show I (m * n) ∼ A ×ₛ B from Theorem_8_1_3_3 h4 h3
U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B h3 : I m ×ₛ I n ∼ A ×ₛ B h4 : I (m * n) ∼ I m ×ₛ I n ⊢ I (m * n) ∼ A ×ₛ B
no goals
Please generate a tactic in lean4 to solve the state. STATE: U V : Type A : Set U B : Set V m n : ℕ h1 : I m ∼ A h2 : I n ∼ B h3 : I m ×ₛ I n ∼ A ×ₛ B h4 : I (m * n) ∼ I m ×ₛ I n ⊢ I (m * n) ∼ A ×ₛ B TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_def
[1069, 1]
[1069, 75]
rfl
m n a : ℕ ⊢ mod_mod m n a = (a % m, a % n)
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n a : ℕ ⊢ mod_mod m n a = (a % m, a % n) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
define
m n : ℕ h1 : rel_prime m n ⊢ one_one_on (mod_mod m n) (Set_rp_below (m * n))
m n : ℕ h1 : rel_prime m n ⊢ ∀ ⦃x1 x2 : ℕ⦄, x1 ∈ Set_rp_below (m * n) → x2 ∈ Set_rp_below (m * n) → mod_mod m n x1 = mod_mod m n x2 → x1 = x2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n ⊢ one_one_on (mod_mod m n) (Set_rp_below (m * n)) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
fix a1 : Nat
m n : ℕ h1 : rel_prime m n ⊢ ∀ ⦃x1 x2 : ℕ⦄, x1 ∈ Set_rp_below (m * n) → x2 ∈ Set_rp_below (m * n) → mod_mod m n x1 = mod_mod m n x2 → x1 = x2
m n : ℕ h1 : rel_prime m n a1 : ℕ ⊢ ∀ ⦃x2 : ℕ⦄, a1 ∈ Set_rp_below (m * n) → x2 ∈ Set_rp_below (m * n) → mod_mod m n a1 = mod_mod m n x2 → a1 = x2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n ⊢ ∀ ⦃x1 x2 : ℕ⦄, x1 ∈ Set_rp_below (m * n) → x2 ∈ Set_rp_below (m * n) → mod_mod m n x1 = mod_mod m n x2 → x1 = x2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
fix a2 : Nat
m n : ℕ h1 : rel_prime m n a1 : ℕ ⊢ ∀ ⦃x2 : ℕ⦄, a1 ∈ Set_rp_below (m * n) → x2 ∈ Set_rp_below (m * n) → mod_mod m n a1 = mod_mod m n x2 → a1 = x2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ ⊢ a1 ∈ Set_rp_below (m * n) → a2 ∈ Set_rp_below (m * n) → mod_mod m n a1 = mod_mod m n a2 → a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 : ℕ ⊢ ∀ ⦃x2 : ℕ⦄, a1 ∈ Set_rp_below (m * n) → x2 ∈ Set_rp_below (m * n) → mod_mod m n a1 = mod_mod m n x2 → a1 = x2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
assume h2 : a1 ∈ Set_rp_below (m * n)
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ ⊢ a1 ∈ Set_rp_below (m * n) → a2 ∈ Set_rp_below (m * n) → mod_mod m n a1 = mod_mod m n a2 → a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : a1 ∈ Set_rp_below (m * n) ⊢ a2 ∈ Set_rp_below (m * n) → mod_mod m n a1 = mod_mod m n a2 → a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ ⊢ a1 ∈ Set_rp_below (m * n) → a2 ∈ Set_rp_below (m * n) → mod_mod m n a1 = mod_mod m n a2 → a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
assume h3 : a2 ∈ Set_rp_below (m * n)
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : a1 ∈ Set_rp_below (m * n) ⊢ a2 ∈ Set_rp_below (m * n) → mod_mod m n a1 = mod_mod m n a2 → a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : a1 ∈ Set_rp_below (m * n) h3 : a2 ∈ Set_rp_below (m * n) ⊢ mod_mod m n a1 = mod_mod m n a2 → a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : a1 ∈ Set_rp_below (m * n) ⊢ a2 ∈ Set_rp_below (m * n) → mod_mod m n a1 = mod_mod m n a2 → a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
assume h4 : mod_mod m n a1 = mod_mod m n a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : a1 ∈ Set_rp_below (m * n) h3 : a2 ∈ Set_rp_below (m * n) ⊢ mod_mod m n a1 = mod_mod m n a2 → a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : a1 ∈ Set_rp_below (m * n) h3 : a2 ∈ Set_rp_below (m * n) h4 : mod_mod m n a1 = mod_mod m n a2 ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : a1 ∈ Set_rp_below (m * n) h3 : a2 ∈ Set_rp_below (m * n) ⊢ mod_mod m n a1 = mod_mod m n a2 → a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
define at h2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : a1 ∈ Set_rp_below (m * n) h3 : a2 ∈ Set_rp_below (m * n) h4 : mod_mod m n a1 = mod_mod m n a2 ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : a2 ∈ Set_rp_below (m * n) h4 : mod_mod m n a1 = mod_mod m n a2 ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : a1 ∈ Set_rp_below (m * n) h3 : a2 ∈ Set_rp_below (m * n) h4 : mod_mod m n a1 = mod_mod m n a2 ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
define at h3
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : a2 ∈ Set_rp_below (m * n) h4 : mod_mod m n a1 = mod_mod m n a2 ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : mod_mod m n a1 = mod_mod m n a2 ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : a2 ∈ Set_rp_below (m * n) h4 : mod_mod m n a1 = mod_mod m n a2 ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
rewrite [mod_mod_def, mod_mod_def] at h4
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : mod_mod m n a1 = mod_mod m n a2 ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : mod_mod m n a1 = mod_mod m n a2 ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
have h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n := Prod.mk.inj h4
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
have h6 : m * n ≠ 0 := by linarith
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n h6 : m * n ≠ 0 ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
have h7 : NeZero m := left_NeZero_of_mul h6
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n h6 : m * n ≠ 0 ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n h6 : m * n ≠ 0 h7 : NeZero m ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n h6 : m * n ≠ 0 ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
have h8 : NeZero n := right_NeZero_of_mul h6
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n h6 : m * n ≠ 0 h7 : NeZero m ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n h6 : m * n ≠ 0 h7 : NeZero m ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
rewrite [←congr_iff_mod_eq_Nat, ←congr_iff_mod_eq_Nat] at h5
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : ↑a1 ≡ ↑a2 (MOD m) ∧ ↑a1 ≡ ↑a2 (MOD n) h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
rewrite [←Lemma_7_4_5 _ _ h1] at h5
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : ↑a1 ≡ ↑a2 (MOD m) ∧ ↑a1 ≡ ↑a2 (MOD n) h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : ↑a1 ≡ ↑a2 (MOD m * n) h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : ↑a1 ≡ ↑a2 (MOD m) ∧ ↑a1 ≡ ↑a2 (MOD n) h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2 TACTIC:...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
rewrite [congr_iff_mod_eq_Nat] at h5
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : ↑a1 ≡ ↑a2 (MOD m * n) h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % (m * n) = a2 % (m * n) h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : ↑a1 ≡ ↑a2 (MOD m * n) h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
rewrite [Nat.mod_eq_of_lt h2.right, Nat.mod_eq_of_lt h3.right] at h5
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % (m * n) = a2 % (m * n) h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 = a2 h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % (m * n) = a2 % (m * n) h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
show a1 = a2 from h5
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 = a2 h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 = a2 h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a1 = a2 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_one_one_on
[1093, 1]
[1112, 7]
linarith
m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n ⊢ m * n ≠ 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n a1 a2 : ℕ h2 : rel_prime (m * n) a1 ∧ a1 < m * n h3 : rel_prime (m * n) a2 ∧ a2 < m * n h4 : (a1 % m, a1 % n) = (a2 % m, a2 % n) h5 : a1 % m = a2 % m ∧ a1 % n = a2 % n ⊢ m * n ≠ 0 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_elt_Set_rp_below
[1114, 1]
[1120, 7]
define
a m : ℕ inst✝ : NeZero m h1 : rel_prime m a ⊢ a % m ∈ Set_rp_below m
a m : ℕ inst✝ : NeZero m h1 : rel_prime m a ⊢ rel_prime m (a % m) ∧ a % m < m
Please generate a tactic in lean4 to solve the state. STATE: a m : ℕ inst✝ : NeZero m h1 : rel_prime m a ⊢ a % m ∈ Set_rp_below m TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_elt_Set_rp_below
[1114, 1]
[1120, 7]
rewrite [rel_prime_mod]
a m : ℕ inst✝ : NeZero m h1 : rel_prime m a ⊢ rel_prime m (a % m) ∧ a % m < m
a m : ℕ inst✝ : NeZero m h1 : rel_prime m a ⊢ rel_prime m a ∧ a % m < m
Please generate a tactic in lean4 to solve the state. STATE: a m : ℕ inst✝ : NeZero m h1 : rel_prime m a ⊢ rel_prime m (a % m) ∧ a % m < m TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_elt_Set_rp_below
[1114, 1]
[1120, 7]
show rel_prime m a ∧ a % m < m from And.intro h1 (mod_nonzero_lt a (NeZero.ne m))
a m : ℕ inst✝ : NeZero m h1 : rel_prime m a ⊢ rel_prime m a ∧ a % m < m
no goals
Please generate a tactic in lean4 to solve the state. STATE: a m : ℕ inst✝ : NeZero m h1 : rel_prime m a ⊢ rel_prime m a ∧ a % m < m TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
apply Set.ext
m n : ℕ h1 : rel_prime m n ⊢ image (mod_mod m n) (Set_rp_below (m * n)) = Set_rp_below m ×ₛ Set_rp_below n
case h m n : ℕ h1 : rel_prime m n ⊢ ∀ (x : ℕ × ℕ), x ∈ image (mod_mod m n) (Set_rp_below (m * n)) ↔ x ∈ Set_rp_below m ×ₛ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n ⊢ image (mod_mod m n) (Set_rp_below (m * n)) = Set_rp_below m ×ₛ Set_rp_below n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
fix (b, c) : Nat × Nat
case h m n : ℕ h1 : rel_prime m n ⊢ ∀ (x : ℕ × ℕ), x ∈ image (mod_mod m n) (Set_rp_below (m * n)) ↔ x ∈ Set_rp_below m ×ₛ Set_rp_below n
case h m n : ℕ h1 : rel_prime m n b c : ℕ ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) ↔ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h m n : ℕ h1 : rel_prime m n ⊢ ∀ (x : ℕ × ℕ), x ∈ image (mod_mod m n) (Set_rp_below (m * n)) ↔ x ∈ Set_rp_below m ×ₛ Set_rp_below n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
apply Iff.intro
case h m n : ℕ h1 : rel_prime m n b c : ℕ ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) ↔ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) → (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n → (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n))
Please generate a tactic in lean4 to solve the state. STATE: case h m n : ℕ h1 : rel_prime m n b c : ℕ ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) ↔ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
assume h2 : (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n))
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) → (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) → (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
define at h2
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
obtain (a : Nat) (h3 : a ∈ Set_rp_below (m * n) ∧ mod_mod m n a = (b, c)) from h2
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : a ∈ Set_rp_below (m * n) ∧ mod_mod m n a = (b, c) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
rewrite [Set_rp_below_def, mod_mod_def] at h3
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : a ∈ Set_rp_below (m * n) ∧ mod_mod m n a = (b, c) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : a ∈ Set_rp_below (m * n) ∧ mod_mod m n a = (b, c) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
have h4 : rel_prime (m * n) a := h3.left.left
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime (m * n) a ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
rewrite [Lemma_7_4_6] at h4
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime (m * n) a ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime (m * n) a ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
have h5 : a % m = b ∧ a % n = c := Prod.mk.inj h3.right
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
define
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ b ∈ Set_rp_below m ∧ c ∈ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ (b, c) ∈ Set_rp_below m...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
rewrite [←h5.left, ←h5.right]
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ b ∈ Set_rp_below m ∧ c ∈ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ a % m ∈ Set_rp_below m ∧ a % n ∈ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ b ∈ Set_rp_below m ∧ c ...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
have h6 : m * n ≠ 0 := by linarith
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ a % m ∈ Set_rp_below m ∧ a % n ∈ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 ⊢ a % m ∈ Set_rp_below m ∧ a % n ∈ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ a % m ∈ Set_rp_below m ...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
have h7 : NeZero m := left_NeZero_of_mul h6
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 ⊢ a % m ∈ Set_rp_below m ∧ a % n ∈ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 : NeZero m ⊢ a % m ∈ Set_rp_below m ∧ a % n ∈ Set_rp_below n
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 ⊢ a % m ∈ ...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
have h8 : NeZero n := right_NeZero_of_mul h6
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 : NeZero m ⊢ a % m ∈ Set_rp_below m ∧ a % n ∈ Set_rp_below n
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a % m ∈ Set_rp_below m ∧ a % n ∈ Set_rp_b...
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 : NeZer...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
apply And.intro
case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a % m ∈ Set_rp_below m ∧ a % n ∈ Set_rp_b...
case h.mp.left m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a % m ∈ Set_rp_below m case h.mp.ri...
Please generate a tactic in lean4 to solve the state. STATE: case h.mp m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 : NeZer...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
linarith
m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ m * n ≠ 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c ⊢ m * n ≠ 0 TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
show a % m ∈ Set_rp_below m from mod_elt_Set_rp_below h4.left
case h.mp.left m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a % m ∈ Set_rp_below m
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.mp.left m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 : ...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
show a % n ∈ Set_rp_below n from mod_elt_Set_rp_below h4.right
case h.mp.right m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 : NeZero m h8 : NeZero n ⊢ a % n ∈ Set_rp_below n
no goals
Please generate a tactic in lean4 to solve the state. STATE: case h.mp.right m n : ℕ h1 : rel_prime m n b c : ℕ h2 : ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) a : ℕ h3 : (rel_prime (m * n) a ∧ a < m * n) ∧ (a % m, a % n) = (b, c) h4 : rel_prime m a ∧ rel_prime n a h5 : a % m = b ∧ a % n = c h6 : m * n ≠ 0 h7 :...
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
assume h2 : (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n → (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n))
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n))
Please generate a tactic in lean4 to solve the state. STATE: case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ ⊢ (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n → (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
rewrite [Set_prod_def, Set_rp_below_def, Set_rp_below_def] at h2
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n))
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n))
Please generate a tactic in lean4 to solve the state. STATE: case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (b, c) ∈ Set_rp_below m ×ₛ Set_rp_below n ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
define
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n))
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
Please generate a tactic in lean4 to solve the state. STATE: case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n ⊢ (b, c) ∈ image (mod_mod m n) (Set_rp_below (m * n)) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
have h3 : m ≠ 0 := by linarith
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : m ≠ 0 ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
Please generate a tactic in lean4 to solve the state. STATE: case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
have h4 : n ≠ 0 := by linarith
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : m ≠ 0 ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : m ≠ 0 h4 : n ≠ 0 ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
Please generate a tactic in lean4 to solve the state. STATE: case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : m ≠ 0 ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
rewrite [←neZero_iff] at h3
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : m ≠ 0 h4 : n ≠ 0 ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : n ≠ 0 ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
Please generate a tactic in lean4 to solve the state. STATE: case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : m ≠ 0 h4 : n ≠ 0 ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
rewrite [←neZero_iff] at h4
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : n ≠ 0 ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : NeZero n ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
Please generate a tactic in lean4 to solve the state. STATE: case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : n ≠ 0 ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
obtain (a : Nat) (h5 : a < m * n ∧ a ≡ b (MOD m) ∧ a ≡ c (MOD n)) from Lemma_7_4_7 h1 b c
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : NeZero n ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : NeZero n a : ℕ h5 : a < m * n ∧ ↑a ≡ ↑b (MOD m) ∧ ↑a ≡ ↑c (MOD n) ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
Please generate a tactic in lean4 to solve the state. STATE: case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : NeZero n ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
apply Exists.intro a
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : NeZero n a : ℕ h5 : a < m * n ∧ ↑a ≡ ↑b (MOD m) ∧ ↑a ≡ ↑c (MOD n) ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c)
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : NeZero n a : ℕ h5 : a < m * n ∧ ↑a ≡ ↑b (MOD m) ∧ ↑a ≡ ↑c (MOD n) ⊢ a ∈ Set_rp_below (m * n) ∧ mod_mod m n a = (b, c)
Please generate a tactic in lean4 to solve the state. STATE: case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : NeZero n a : ℕ h5 : a < m * n ∧ ↑a ≡ ↑b (MOD m) ∧ ↑a ≡ ↑c (MOD n) ⊢ ∃ x ∈ Set_rp_below (m * n), mod_mod m n x = (b, c) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
apply And.intro
case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : NeZero n a : ℕ h5 : a < m * n ∧ ↑a ≡ ↑b (MOD m) ∧ ↑a ≡ ↑c (MOD n) ⊢ a ∈ Set_rp_below (m * n) ∧ mod_mod m n a = (b, c)
case h.mpr.left m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : NeZero n a : ℕ h5 : a < m * n ∧ ↑a ≡ ↑b (MOD m) ∧ ↑a ≡ ↑c (MOD n) ⊢ a ∈ Set_rp_below (m * n) case h.mpr.right m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < ...
Please generate a tactic in lean4 to solve the state. STATE: case h.mpr m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n h3 : NeZero m h4 : NeZero n a : ℕ h5 : a < m * n ∧ ↑a ≡ ↑b (MOD m) ∧ ↑a ≡ ↑c (MOD n) ⊢ a ∈ Set_rp_below (m * n) ∧ mod_mod m n a = (b, c) TACTIC:
https://github.com/djvelleman/HTPILeanPackage.git
4d23e94fff351c65b5e1345c43451f2aa9908c27
HTPILib/Chap8Part2.lean
HTPI.mod_mod_image
[1122, 1]
[1182, 7]
linarith
m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n ⊢ m ≠ 0
no goals
Please generate a tactic in lean4 to solve the state. STATE: m n : ℕ h1 : rel_prime m n b c : ℕ h2 : (rel_prime m b ∧ b < m) ∧ rel_prime n c ∧ c < n ⊢ m ≠ 0 TACTIC: