Theorem: exercise4_5 (LeanCourse/Assignments/Solutions/Solutions4.lean)

State before:
n : ℕ
hn : Nat.Prime (2 ^ n - 1)
⊢ Nat.Prime n
Tactic:
by_contra h2n
State after:
n : ℕ
hn : Nat.Prime (2 ^ n - 1)
h2n : ¬Nat.Prime n
⊢ False

State before:
n : ℕ
hn : Nat.Prime (2 ^ n - 1)
h2n : ¬Nat.Prime n
⊢ False
Tactic:
rw [exercise4_4] at h2n
State after:
n : ℕ
hn : Nat.Prime (2 ^ n - 1)
h2n : n = 0 ∨ n = 1 ∨ ∃ a b, 2 ≤ a ∧ 2 ≤ b ∧ n = a * b
⊢ False

State before:
n : ℕ
hn : Nat.Prime (2 ^ n - 1)
h2n : n = 0 ∨ n = 1 ∨ ∃ a b, 2 ≤ a ∧ 2 ≤ b ∧ n = a * b
⊢ False
Tactic:
obtain rfl|rfl|⟨a, b, ha, hb, rfl⟩ := h2n
State after:
case inl
hn : Nat.Prime (2 ^ 0 - 1)
⊢ False

case inr.inl
hn : Nat.Prime (2 ^ 1 - 1)
⊢ False

case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ False

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ False
Tactic:
have h : (2 : ℤ) ^ a - 1 ∣ (2 : ℤ) ^ (a * b) - 1
State after:
case h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ 2 ^ a - 1 ∣ 2 ^ (a * b) - 1

case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ False

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ False
Tactic:
have h2 : 2 ^ 2 ≤ 2 ^ a := by gcongr; norm_num
State after:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
⊢ False

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
⊢ False
Tactic:
have h3 : 1 ≤ 2 ^ a := by linarith
State after:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
⊢ False

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
⊢ False
Tactic:
have h4 : 2 ^ a - 1 ≠ 1 := by zify; simp [h3]; linarith
State after:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
⊢ False

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
⊢ False
Tactic:
have h6' : 2 ^ 0 ≤ 2 ^ (a * b) := by gcongr; norm_num; exact?
State after:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
⊢ False

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
⊢ False
Tactic:
have h6 : 1 ≤ 2 ^ (a * b) := h6'
State after:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
⊢ False

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
⊢ False
Tactic:
have h' : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
State after:
case h'
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
⊢ 2 ^ a - 1 ∣ 2 ^ (a * b) - 1

case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
h' : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ False

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
h' : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ False
Tactic:
rw [Nat.prime_def_lt] at hn
State after:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : 2 ≤ 2 ^ (a * b) - 1 ∧ ∀ m < 2 ^ (a * b) - 1, m ∣ 2 ^ (a * b) - 1 → m = 1
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
h' : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ False

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : 2 ≤ 2 ^ (a * b) - 1 ∧ ∀ m < 2 ^ (a * b) - 1, m ∣ 2 ^ (a * b) - 1 → m = 1
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
h' : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ False
Tactic:
apply h4
State after:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : 2 ≤ 2 ^ (a * b) - 1 ∧ ∀ m < 2 ^ (a * b) - 1, m ∣ 2 ^ (a * b) - 1 → m = 1
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
h' : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ 2 ^ a - 1 = 1

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : 2 ≤ 2 ^ (a * b) - 1 ∧ ∀ m < 2 ^ (a * b) - 1, m ∣ 2 ^ (a * b) - 1 → m = 1
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
h' : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ 2 ^ a - 1 = 1
Tactic:
apply hn.2 _ h5
State after:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : 2 ≤ 2 ^ (a * b) - 1 ∧ ∀ m < 2 ^ (a * b) - 1, m ∣ 2 ^ (a * b) - 1 → m = 1
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
h' : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ 2 ^ a - 1 ∣ 2 ^ (a * b) - 1

State before:
case inr.inr.intro.intro.intro.intro
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : 2 ≤ 2 ^ (a * b) - 1 ∧ ∀ m < 2 ^ (a * b) - 1, m ∣ 2 ^ (a * b) - 1 → m = 1
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
h' : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
Tactic:
norm_cast at h
State after:
no goals

State before:
case inl
hn : Nat.Prime (2 ^ 0 - 1)
⊢ False
Tactic:
simp at hn
State after:
no goals

State before:
case inr.inl
hn : Nat.Prime (2 ^ 1 - 1)
⊢ False
Tactic:
norm_num at hn
State after:
no goals

State before:
case h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
Tactic:
rw [← Int.modEq_zero_iff_dvd]
State after:
case h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ 2 ^ (a * b) - 1 ≡ 0 [ZMOD 2 ^ a - 1]

State before:
case h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ 2 ^ (a * b) - 1 ≡ 0 [ZMOD 2 ^ a - 1]
Tactic:
calc (2 : ℤ) ^ (a * b) - 1
    ≡ ((2 : ℤ) ^ a) ^ b - 1 [ZMOD (2 : ℤ) ^ a - 1] := by rw [pow_mul]
  _ ≡ (1 : ℤ) ^ b - 1 [ZMOD (2 : ℤ) ^ a - 1] := by gcongr; exact?
  _ ≡ 0 [ZMOD (2 : ℤ) ^ a - 1] := by simp
State after:
no goals

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ 2 ^ (a * b) - 1 ≡ (2 ^ a) ^ b - 1 [ZMOD 2 ^ a - 1]
Tactic:
rw [pow_mul]
State after:
no goals

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ (2 ^ a) ^ b - 1 ≡ 1 ^ b - 1 [ZMOD 2 ^ a - 1]
Tactic:
gcongr
State after:
case h.h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ 2 ^ a ≡ 1 [ZMOD 2 ^ a - 1]

State before:
case h.h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ 2 ^ a ≡ 1 [ZMOD 2 ^ a - 1]
Tactic:
exact?
State after:
no goals

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
⊢ 1 ^ b - 1 ≡ 0 [ZMOD 2 ^ a - 1]
Tactic:
simp
State after:
no goals

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ 2 ^ 2 ≤ 2 ^ a
Tactic:
gcongr
State after:
case ha
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ 1 ≤ 2

State before:
case ha
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
⊢ 1 ≤ 2
Tactic:
norm_num
State after:
no goals

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
⊢ 1 ≤ 2 ^ a
Tactic:
linarith
State after:
no goals

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
⊢ 2 ^ a - 1 ≠ 1
Tactic:
zify
State after:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
⊢ ↑(2 ^ a - 1) ≠ 1

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
⊢ ↑(2 ^ a - 1) ≠ 1
Tactic:
simp [h3]
State after:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
⊢ ¬2 ^ a - 1 = 1

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
⊢ ¬2 ^ a - 1 = 1
Tactic:
linarith
State after:
no goals

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
⊢ 2 ^ a - 1 < 2 ^ (a * b) - 1
Tactic:
apply tsub_lt_tsub_right_of_le h3
State after:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
⊢ 2 ^ a < 2 ^ (a * b)

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
⊢ 2 ^ a < 2 ^ (a * b)
Tactic:
gcongr
State after:
case h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
⊢ 1 < 2

case h2
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
⊢ a < a * b

State before:
case h2
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
⊢ a < a * b
Tactic:
refine lt_mul_right ?h2.hn hb
State after:
case h2.hn
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
⊢ 0 < a

State before:
case h2.hn
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
⊢ 0 < a
Tactic:
linarith
State after:
no goals

State before:
case h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
⊢ 1 < 2
Tactic:
norm_num
State after:
no goals

State before:
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
⊢ 2 ^ 0 ≤ 2 ^ (a * b)
Tactic:
gcongr
State after:
case ha
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
⊢ 1 ≤ 2

case h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
⊢ 0 ≤ a * b

State before:
case ha
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
⊢ 1 ≤ 2

case h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
⊢ 0 ≤ a * b
Tactic:
norm_num
State after:
case h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
⊢ 0 ≤ a * b

State before:
case h
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
⊢ 0 ≤ a * b
Tactic:
exact?
State after:
no goals

State before:
case h'
a b : ℕ
ha : 2 ≤ a
hb : 2 ≤ b
hn : Nat.Prime (2 ^ (a * b) - 1)
h : 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
h2 : 2 ^ 2 ≤ 2 ^ a
h3 : 1 ≤ 2 ^ a
h4 : 2 ^ a - 1 ≠ 1
h5 : 2 ^ a - 1 < 2 ^ (a * b) - 1
h6' : 2 ^ 0 ≤ 2 ^ (a * b)
h6 : 1 ≤ 2 ^ (a * b)
⊢ 2 ^ a - 1 ∣ 2 ^ (a * b) - 1
Tactic:
norm_cast at h
State after:
no goals