Zulip Chat Archive
Stream: lean4
Topic: PANIC at Lean.Meta.whnfEasyCases
Scott Morrison (Nov 16 2022 at 22:59):
lean4#1842 reports a PANIC that I encountered trying to bump std4/mathlib4 to the latest nightly, so I could finish logic.equiv.defs
which is waiting on other fixes to lean4.
variable (R : α → α → Prop)
inductive List.Pairwise : List α → Prop
| nil : Pairwise []
| cons : ∀ {a : α} {l : List α}, (∀ {a} (_ : a' ∈ l), R a a') → Pairwise l → Pairwise (a :: l)
theorem and_assoc : (a ∧ b) ∧ c ↔ a ∧ (b ∧ c) :=
⟨fun ⟨⟨ha, hb⟩, hc⟩ => ⟨ha, hb, hc⟩, fun ⟨ha, hb, hc⟩ => ⟨⟨ha, hb⟩, hc⟩⟩
theorem and_left_comm : a ∧ (b ∧ c) ↔ b ∧ (a ∧ c) := by
rw [← and_assoc, ← and_assoc, @And.comm a b]
exact Iff.rfl
theorem pairwise_append {l₁ l₂ : List α} :
(l₁ ++ l₂).Pairwise R ↔ l₁.Pairwise R ∧ l₂.Pairwise R ∧ ∀ {a} (_ : a ∈ l₁), ∀ {b} (_ : b ∈ l₂), R a b := by
induction l₁ <;> simp [*, and_left_comm]
(The proof given here should have unsolved goals, but no panic.)
Kevin Buzzard (Nov 16 2022 at 23:05):
(This code seems to work in mathlib4, which is on 4.0.0-nightly-2022-11-14
; the issue reports that it doesn't work on 4.0.0-nightly-2022-11-16
)
Gabriel Ebner (Nov 16 2022 at 23:22):
This is a fallout from the fix for 1815, which was merged yesterday.
Leonardo de Moura (Nov 17 2022 at 01:30):
Pushed a fix for this.
Last updated: Dec 20 2023 at 11:08 UTC