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

State before:
d a b : ℕ
inst✝ : NeZero d
I : BasicInterval
hI : feasible d I
hcop : Nat.Coprime a b
hmem : mem a b I
hbd : a + b ≤ d
hne : a * I.b₂ ≠ b * I.a₂
⊢ a = I.a₁ ∧ b = I.b₁
Tactic:
refine Nat.eq_and_eq_of_coprime_coprime_mul_eq_mul hcop I.coprime₁ ?_
State after:
d a b : ℕ
inst✝ : NeZero d
I : BasicInterval
hI : feasible d I
hcop : Nat.Coprime a b
hmem : mem a b I
hbd : a + b ≤ d
hne : a * I.b₂ ≠ b * I.a₂
⊢ a * I.b₁ = b * I.a₁

State before:
d a b : ℕ
inst✝ : NeZero d
I : BasicInterval
hI : feasible d I
hcop : Nat.Coprime a b
hmem : mem a b I
hbd : a + b ≤ d
hne : a * I.b₂ ≠ b * I.a₂
⊢ a * I.b₁ = b * I.a₁
Tactic:
rcases eq_or_eq_or_mem_interior_of_mem hmem with left | right | interior
State after:
case inl
d a b : ℕ
inst✝ : NeZero d
I : BasicInterval
hI : feasible d I
hcop : Nat.Coprime a b
hmem : mem a b I
hbd : a + b ≤ d
hne : a * I.b₂ ≠ b * I.a₂
left : a * I.b₁ = b * I.a₁
⊢ a * I.b₁ = b * I.a₁

case inr.inl
d a b : ℕ
inst✝ : NeZero d
I : BasicInterval
hI : feasible d I
hcop : Nat.Coprime a b
hmem : mem a b I
hbd : a + b ≤ d
hne : a * I.b₂ ≠ b * I.a₂
right : a * I.b₂ = b * I.a₂
⊢ a * I.b₁ = b * I.a₁

case inr.inr
d a b : ℕ
inst✝ : NeZero d
I : BasicInterval
hI : feasible d I
hcop : Nat.Coprime a b
hmem : mem a b I
hbd : a + b ≤ d
hne : a * I.b₂ ≠ b * I.a₂
interior : BasicInterval.mem_interior a b I
⊢ a * I.b₁ = b * I.a₁

State before:
case inl
d a b : ℕ
inst✝ : NeZero d
I : BasicInterval
hI : feasible d I
hcop : Nat.Coprime a b
hmem : mem a b I
hbd : a + b ≤ d
hne : a * I.b₂ ≠ b * I.a₂
left : a * I.b₁ = b * I.a₁
⊢ a * I.b₁ = b * I.a₁
Tactic:
exact left
State after:
no goals

State before:
case inr.inl
d a b : ℕ
inst✝ : NeZero d
I : BasicInterval
hI : feasible d I
hcop : Nat.Coprime a b
hmem : mem a b I
hbd : a + b ≤ d
hne : a * I.b₂ ≠ b * I.a₂
right : a * I.b₂ = b * I.a₂
⊢ a * I.b₁ = b * I.a₁
Tactic:
contradiction
State after:
no goals

State before:
case inr.inr
d a b : ℕ
inst✝ : NeZero d
I : BasicInterval
hI : feasible d I
hcop : Nat.Coprime a b
hmem : mem a b I
hbd : a + b ≤ d
hne : a * I.b₂ ≠ b * I.a₂
interior : BasicInterval.mem_interior a b I
⊢ a * I.b₁ = b * I.a₁
Tactic:
linarith only [gt_of_mem_interior_feasible hI interior, hbd]
State after:
no goals