lean4-htt/tests/elab/grind_def_eq_inv_issue.lean
Leonardo de Moura 1b23b051f3
fix: missing proof hints in grind propagators (#13623)
This PR fixes proof construction issues in the `grind` projection
propagators.
2026-05-03 14:51:03 +00:00

36 lines
966 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

namespace Sigma
def map (f₁ : α₁ → α₂) (f₂ : ∀ a, β₁ a → β₂ (f₁ a)) (x : Sigma β₁) : Sigma β₂ :=
⟨f₁ x.1, f₂ x.1 x.2⟩
end Sigma
public section
namespace List
variable {α : Type} {α' : Type} {β : α → Type} {β' : α' → Type} {l l₁ l₂ : List (Sigma β)}
opaque keys : List (Sigma β) → List α
variable [DecidableEq α] [DecidableEq α']
/--
error: `grind` failed
case grind
α : Type
β β' : α → Type
f : (a : α) → β a → β' a
head : (a : α) × β a
tail : List ((a : α) × β a)
tail_ih : (map (Sigma.map id f) tail).keys = tail.keys
h : ¬(map (Sigma.map id f) (head :: tail)).keys = (head :: tail).keys
⊢ False
-/
#guard_msgs in
set_option grind.debug true in
omit [DecidableEq α] in
theorem map₂_keys {β β' : α → Type} (f : (a : α) → β a → β' a) (l : List (Σ a, β a)) :
(l.map (.map id f)).keys = l.keys := by
induction l
· sorry
· grind -verbose [Sigma.map]