Theorem: Beatty.no_collision
File: Mathlib/NumberTheory/Rayleigh.lean

tactic: rw [Set.disjoint_left]
state_before: r s : ℝ
hrs : r.IsConjExponent s
j k : ℤ
⊢ Disjoint {x | ∃ k, beattySeq r k = x} {x | ∃ k, beattySeq' s k = x}
state_after: r s : ℝ
hrs : r.IsConjExponent s
j k : ℤ
⊢ ∀ ⦃a : ℤ⦄, a ∈ {x | ∃ k, beattySeq r k = x} → a ∉ {x | ∃ k, beattySeq' s k = x}

tactic: intro j ⟨k, h₁⟩ ⟨m, h₂⟩
state_before: r s : ℝ
hrs : r.IsConjExponent s
j k : ℤ
⊢ ∀ ⦃a : ℤ⦄, a ∈ {x | ∃ k, beattySeq r k = x} → a ∉ {x | ∃ k, beattySeq' s k = x}
state_after: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : beattySeq r k = j
m : ℤ
h₂ : beattySeq' s m = j
⊢ False

tactic: rw [beattySeq, Int.floor_eq_iff, ← div_le_iff hrs.pos, ← lt_div_iff hrs.pos] at h₁
state_before: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : beattySeq r k = j
m : ℤ
h₂ : beattySeq' s m = j
⊢ False
state_after: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : beattySeq' s m = j
⊢ False

tactic: rw [beattySeq', sub_eq_iff_eq_add, Int.ceil_eq_iff, Int.cast_add, Int.cast_one,
  add_sub_cancel_right, ← div_lt_iff hrs.symm.pos, ← le_div_iff hrs.symm.pos] at h₂
state_before: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : beattySeq' s m = j
⊢ False
state_after: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
⊢ False

tactic: have h₃ := add_lt_add_of_le_of_lt h₁.1 h₂.1
state_before: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
⊢ False
state_after: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
h₃ : ↑j / r + ↑j / s < ↑k + ↑m
⊢ False

tactic: have h₄ := add_lt_add_of_lt_of_le h₁.2 h₂.2
state_before: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
h₃ : ↑j / r + ↑j / s < ↑k + ↑m
⊢ False
state_after: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
h₃ : ↑j / r + ↑j / s < ↑k + ↑m
h₄ : ↑k + ↑m < (↑j + 1) / r + (↑j + 1) / s
⊢ False

tactic: simp_rw [div_eq_inv_mul, ← right_distrib, hrs.inv_add_inv_conj, one_mul] at h₃ h₄
state_before: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
h₃ : ↑j / r + ↑j / s < ↑k + ↑m
h₄ : ↑k + ↑m < (↑j + 1) / r + (↑j + 1) / s
⊢ False
state_after: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
h₃ : ↑j < ↑k + ↑m
h₄ : ↑k + ↑m < ↑j + 1
⊢ False

tactic: rw [← Int.cast_one] at h₄
state_before: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
h₃ : ↑j < ↑k + ↑m
h₄ : ↑k + ↑m < ↑j + 1
⊢ False
state_after: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
h₃ : ↑j < ↑k + ↑m
h₄ : ↑k + ↑m < ↑j + ↑1
⊢ False

tactic: simp_rw [← Int.cast_add, Int.cast_lt, Int.lt_add_one_iff] at h₃ h₄
state_before: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
h₃ : ↑j < ↑k + ↑m
h₄ : ↑k + ↑m < ↑j + ↑1
⊢ False
state_after: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
h₃ : j < k + m
h₄ : k + m ≤ j
⊢ False

tactic: exact h₄.not_lt h₃
state_before: r s : ℝ
hrs : r.IsConjExponent s
j✝ k✝ j k : ℤ
h₁ : ↑j / r ≤ ↑k ∧ ↑k < (↑j + 1) / r
m : ℤ
h₂ : ↑j / s < ↑m ∧ ↑m ≤ (↑j + 1) / s
h₃ : j < k + m
h₄ : k + m ≤ j
⊢ False
state_after: no goals