leanprover-community / mathlib

  • Home
  • Zulip archive
  • API documentation
  • Lean web editor
  • Links

Zulip Chat Archive

Stream: general

Topic: generalize_proofs failed


Patrick Johnson (Mar 29 2022 at 07:04):

It doesn't make new hypothesis h in this example:

import tactic

noncomputable theory
open_locale classical

def a : ℕ := if h : ∃ (k : ℕ), k = 1 then h.some else 0

example : a = 1 :=
begin
  rw [a, dif_pos], swap, { exact ⟨1, rfl⟩ },
  generalize_proofs h,
  sorry
end

Mario Carneiro (Mar 29 2022 at 09:02):

#13025


Last updated: May 02 2025 at 03:31 UTC

Theme Simple by wildflame © 2016 Powered by jekyll