leanprover / leanprover/lean4

solve_by_elim failure

Open
#14,014 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P-medium
Dominant language
Lean
Stars
9.2k
Forks
990
Avg merge
1d 17h
Merged PRs (30d)
175

Description

Prerequisites
Description

The solve_by_elim tactic fails on test. It should work.

def injective (f: α → β): Prop := ∀ x y, f x = f y → x = y

def surjective (f: α → β): Prop := ∀ x, ∃ y, f y = x

def bijective (f: α → β): Prop := injective f ∧ surjective f

def prod (f: α → β) (g: γ → σ): α × γ → β × σ := fun (x, y) => (f x, g y)

theorem bijective_id: bijective (id: α → α) := sorry

theorem bijective_compose {f: α → β} {g: β → γ}
  (h₁: bijective f) (h₂: bijective g): bijective (g ∘ f) := sorry

theorem bijective_product {f: α → β} {g: γ → σ} (h₁: bijective f) (h₂: bijective g): 
  bijective (prod f g) := sorry

theorem test {α β γ δ σ: Type}
  (f₀: (α → β) → γ)
  (f₁: (δ → β) → (α → β) × β)
  (f₂: γ × β → σ)
  (h₀: bijective f₀)
  (h₁: bijective f₁)
  (h₂: bijective f₂): bijective (f₂ ∘ prod f₀ id ∘ f₁) := by
   solve_by_elim [bijective_compose, bijective_product, bijective_id]
Context

Discussed during office hours with @kim-em.

Versions

4.30.0
4.29.1

Impact

Add 👍 to issues you consider important. If others are impacted by this issue, please ask them to add 👍 to it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the minimal test theorem with Lean 4 versions 4.30.0 and 4.29.1, focusing on the solve_by_elim invocation and the supplied bijectivity lemmas. Trace why solve_by_elim [bijective_compose, bijective_product, bijective_id] does not close the goal, then confirm that the original theorem succeeds without changing its intended statement.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.