Theorem: Weight.condition_iff_weaker_ge (Weights/Dimension2.lean)

State before:
d : ℕ
inst✝ : NeZero d
I : BasicInterval
⊢ (∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁) ↔
    ∀ (a b : ℕ), mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
Tactic:
refine ⟨fun H a b h₁ h₂ ↦ ?_, fun H a b _ ↦ H a b⟩
State after:
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
a b : ℕ
h₁ : mem_S_ge d ↑a ↑b
h₂ : mem a b I
⊢ a * I.b₁ = b * I.a₁

State before:
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
a b : ℕ
h₁ : mem_S_ge d ↑a ↑b
h₂ : mem a b I
⊢ a * I.b₁ = b * I.a₁
Tactic:
cases' Nat.eq_zero_or_pos (Nat.gcd a b) with h₀ h₀
State after:
case inl
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
a b : ℕ
h₁ : mem_S_ge d ↑a ↑b
h₂ : mem a b I
h₀ : Nat.gcd a b = 0
⊢ a * I.b₁ = b * I.a₁

case inr
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
a b : ℕ
h₁ : mem_S_ge d ↑a ↑b
h₂ : mem a b I
h₀ : Nat.gcd a b > 0
⊢ a * I.b₁ = b * I.a₁

State before:
case inr
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
a b : ℕ
h₁ : mem_S_ge d ↑a ↑b
h₂ : mem a b I
h₀ : Nat.gcd a b > 0
⊢ a * I.b₁ = b * I.a₁
Tactic:
obtain ⟨g, a', b', hg₁, hcop, rfl, rfl⟩ := Nat.exists_coprime' h₀
State after:
case inr.intro.intro.intro.intro.intro.intro
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
g : ℕ
a' b' : ℕ
hg₁ : 0 < g
hcop : Nat.Coprime a' b'
h₁ : mem_S_ge d ↑(a' * g) ↑(b' * g)
h₂ : mem (a' * g) (b' * g) I
h₀ : Nat.gcd (a' * g) (b' * g) > 0
⊢ a' * g * I.b₁ = b' * g * I.a₁

State before:
case inr.intro.intro.intro.intro.intro.intro
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
g : ℕ
a' b' : ℕ
hg₁ : 0 < g
hcop : Nat.Coprime a' b'
h₁ : mem_S_ge d ↑(a' * g) ↑(b' * g)
h₂ : mem (a' * g) (b' * g) I
h₀ : Nat.gcd (a' * g) (b' * g) > 0
⊢ a' * g * I.b₁ = b' * g * I.a₁
Tactic:
clear h₀
State after:
case inr.intro.intro.intro.intro.intro.intro
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
g : ℕ
a' b' : ℕ
hg₁ : 0 < g
hcop : Nat.Coprime a' b'
h₁ : mem_S_ge d ↑(a' * g) ↑(b' * g)
h₂ : mem (a' * g) (b' * g) I
⊢ a' * g * I.b₁ = b' * g * I.a₁

State before:
case inr.intro.intro.intro.intro.intro.intro
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
g : ℕ
a' b' : ℕ
hg₁ : 0 < g
hcop : Nat.Coprime a' b'
h₁ : mem_S_ge d ↑(a' * g) ↑(b' * g)
h₂ : mem (a' * g) (b' * g) I
⊢ a' * g * I.b₁ = b' * g * I.a₁
Tactic:
simp_rw [mul_comm _ g, mul_assoc]
State after:
case inr.intro.intro.intro.intro.intro.intro
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
g : ℕ
a' b' : ℕ
hg₁ : 0 < g
hcop : Nat.Coprime a' b'
h₁ : mem_S_ge d ↑(a' * g) ↑(b' * g)
h₂ : mem (a' * g) (b' * g) I
⊢ g * (a' * I.b₁) = g * (b' * I.a₁)

State before:
case inl
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
a b : ℕ
h₁ : mem_S_ge d ↑a ↑b
h₂ : mem a b I
h₀ : Nat.gcd a b = 0
⊢ a * I.b₁ = b * I.a₁
Tactic:
obtain ⟨rfl, rfl⟩ := Nat.gcd_eq_zero_iff.mp h₀
State after:
case inl.intro
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
h₁ : mem_S_ge d ↑0 ↑0
h₂ : mem 0 0 I
h₀ : Nat.gcd 0 0 = 0
⊢ 0 * I.b₁ = 0 * I.a₁

State before:
case inl.intro
d : ℕ
inst✝ : NeZero d
I : BasicInterval
H : ∀ (a b : ℕ), Nat.Coprime a b → mem_S_ge d ↑a ↑b → mem a b I → a * I.b₁ = b * I.a₁
h₁ : mem_S_ge d ↑0 ↑0
h₂ : mem 0 0 I
h₀ : Nat.gcd 0 0 = 0
⊢ 0 * I.b₁ = 0 * I.a₁
Tactic:
simp only [zero_mul]
State after:
no goals