Zulip Chat Archive
Stream: mathlib4
Topic: congr hogging up holes
Eric Rodriguez (Dec 10 2023 at 00:48):
import Mathlib.Tactic.Convert
example (h : False) : False := by
have : 1 + 1 = 3 := by
convert rfl
contradiction
rw [iff_self ?h]
/- synthetic hole has already been defined and assigned to value incompatible with the current context
h_congr_thm✝ Nat (1 + 1) (1 + 1) (Eq.refl (1 + 1)) 3 (1 + 1) (absurd h (of_decide_eq_false (Eq.refl (decide False)))) -/
h_congr_thm
seems to be from congr!
, but I can't seem to get a simple mwe with congr!
.
Kyle Miller (Dec 10 2023 at 18:52):
Here's with congr!
:
example (h : False) : False := by
have : (1 + 1 = 3) = (?a = ?a) := by
congr!
contradiction
rw [iff_self ?h]
Kyle Miller (Dec 10 2023 at 18:53):
There's nothing in congr!
that's directly using the name h
, but maybe somehow there's an h
in a parameter name to the congruence theorem that is being applied, and so this apply
is responsible for it indirectly?
Last updated: Dec 20 2023 at 11:08 UTC