Zulip Chat Archive
Stream: lean4
Topic: nodup of snd
Jared green (Aug 26 2024 at 00:24):
how can i prove s_nodup here?
import Init.Data.List
import Init.PropLemmas
import Mathlib.Algebra.BigOperators.Group.List
import Mathlib.Data.List.Dedup
import Mathlib.Data.List.Pairwise
import Mathlib.Data.List.Join
import Mathlib.Data.List.Basic
import Mathlib.Data.List.Defs
import Mathlib.Data.List.Infix
import Mathlib.Data.List.Lattice
import Mathlib.Data.List.Lemmas
import Mathlib.Data.Bool.AllAny
import Mathlib.Data.Bool.Basic
import Mathlib.Logic.Basic
import Batteries.Data.List.Lemmas
import Aesop
open Classical
variable {α : Type}[h : DecidableEq α]
inductive normalizable α (pred : α -> Prop)
where
| atom : α -> (normalizable α pred)
| And : (normalizable α pred) -> (normalizable α pred) -> normalizable α pred
| Or : (normalizable α pred) -> (normalizable α pred) -> normalizable α pred
| Not : normalizable α pred -> normalizable α pred
deriving DecidableEq
namespace normalizable
theorem s_nodup : ∀ s : List (Bool × normalizable α pred), ((∀ w : Bool × normalizable α pred,∀ x : Bool × normalizable α pred, w ∈ s ∧ x ∈ s ->
w.snd == x.snd -> w.fst == x.fst) ∧ s.Nodup) -> (s.map Prod.snd).Nodup :=
by
sorry
Jared green (Aug 26 2024 at 02:57):
i find i cannot unfold Pairwise. why?
theorem s_nodup : ∀ s : List (Bool × normalizable α pred), ((∀ w : Bool × normalizable α pred,∀ x : Bool × normalizable α pred, w ∈ s ∧ x ∈ s ->
w.snd == x.snd -> w.fst == x.fst) ∧ s.Nodup) -> (s.map Prod.snd).Nodup :=
by
intro s hs
obtain ⟨ hcond, hnodup ⟩ := hs
induction' s with hd tl ht
simp
unfold List.Nodup
unfold List.Pairwise --this doesnt work
sorry
Chris Bailey (Aug 26 2024 at 04:04):
As the docstring for unfold
says, unfold works on definitions. You can't unfold an inductive type, there's nothing to unfold to.
Last updated: May 02 2025 at 03:31 UTC