Zulip Chat Archive
Stream: new members
Topic: patterns with coerced var
Ralf Stephan (Apr 28 2024 at 17:27):
Can you please help? How to find out what is wrong?
import Mathlib
set_option autoImplicit false
open Finset PNat BigOperators Function
lemma prod_Icc_succ_div {n x : ℕ+} : ∀ n : ℕ+,
(∏ x in Icc 1 n, ((1 + x) : ℝ) / (x : ℝ)) = n + 1 := by
rw [prod_div_distrib (s := Icc 1 n)
(f := fun x : ℕ+ ↦ ((1 + x) : ℝ))
(g := fun x : ℕ+ ↦ (x : ℝ))]
tactic 'rewrite' failed, did not find instance of the pattern in the target expression
∏ x in Icc 1 n, (1 + ↑↑x) / ↑↑x
n x : ℕ+
⊢ ∀ (n : ℕ+), ∏ x in Icc 1 n, (1 + ↑↑x) / ↑↑x = ↑↑n + 1
The pattern seems identical, but it's not? Would it be possible to give information what doesn't match in the error message? This is so frustrating. Thanks for any hint.
Ruben Van de Velde (Apr 28 2024 at 17:46):
You're confusing yourself by having two n
s
Ralf Stephan (Apr 28 2024 at 17:50):
But when I remove the second \N+ so that it reads ∀ n,
I get
failed to synthesize instance
LocallyFiniteOrder ℝ
Ralf Stephan (Apr 28 2024 at 17:55):
Ah, you mean competely without \forall. That works. Thanks!
Ralf Stephan (Apr 28 2024 at 18:04):
Can't different variables with same name be labelled on error output? Should I open an issue?
Last updated: May 02 2025 at 03:31 UTC