Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

let linear_combination solve goals #12685

Open
hrmacbeth opened this issue Mar 14, 2022 · 0 comments
Open

let linear_combination solve goals #12685

hrmacbeth opened this issue Mar 14, 2022 · 0 comments
Labels
feature-request This issue is a feature request, either for mathematics, tactics, or CI modifies-tactic-syntax This PR adds a new interactive tactic or modifies the syntax of an existing tactic. t-meta Tactics, attributes or user commands

Comments

@hrmacbeth
Copy link
Member

Goals a ≠ b turn up quite often when working over general fields, notably goals a ≠ 0 to allow for the use of field_simp with a denominator a.

Often this can be solved by contrapose! followed by linear_combination. It would be nice to fold the contrapose! into a preprocessing step of linear_combination.

Example:

example {x y z : K} (h₁ : (x - y) ^ 20) (h₂ : y = z) : -x ^ 2 + 2 * x * z ≠ y ^ 2 :=
begin
  contrapose! h₁,
  linear_combination (h₁, -1) (h₂, - 2 * x),
end

(current mathlib) should become

example {x y z : K} (h₁ : (x - y) ^ 20) (h₂ : y = z) : -x ^ 2 + 2 * x * z ≠ y ^ 2 :=
by linear_combination (h₁, -1) (h₂, - 2 * x)

https://leanprover.zulipchat.com/#narrow/stream/116395-maths/topic/.60linear_combination.60.20for.20.20.E2.89.A0.20goals

@hrmacbeth hrmacbeth added t-meta Tactics, attributes or user commands feature-request This issue is a feature request, either for mathematics, tactics, or CI modifies-tactic-syntax This PR adds a new interactive tactic or modifies the syntax of an existing tactic. labels Mar 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request This issue is a feature request, either for mathematics, tactics, or CI modifies-tactic-syntax This PR adds a new interactive tactic or modifies the syntax of an existing tactic. t-meta Tactics, attributes or user commands
Projects
None yet
Development

No branches or pull requests

1 participant