Skip to content

linarith's Fourier-Motzkin implementation is subtly wrong #2717

Description

@hrmacbeth

See Zulip. Here is an example in which linarith fails to prove a fact but can successfully prove it when fewer hypotheses are around.

import Mathlib.Tactic.Linarith

example :
  (3 * x4 - x3 - x2 - x1 : ℚ) < 0 →
  x5 - x4 < 02 * (x5 - x4) < 0 →
  -x6 + x3 < 0 →
  -x6 + x2 < 02 * (x6 - x5) < 0 →
  x8 - x7 < 0 →
  -x8 + x2 < 0 →
  -x8 + x7 - x5 + x1 < 0 →
  x7 - x5 < 0-- omit this one and it works
  False := by intros; linarith

@digama0 has some code from debugging this which might be helpful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething is not workingt-metaTactics, attributes or user commands

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions