Skip to content

Commit 3074be8

Browse files
committed
Add any_eq
1 parent f353aea commit 3074be8

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/Init/Data/List/Perm.lean

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -602,13 +602,10 @@ theorem sum_nat {l₁ l₂ : List Nat} (h : l₁ ~ l₂) : l₁.sum = l₂.sum :
602602
| trans _ _ ih₁ ih₂ => simp [ih₁, ih₂]
603603

604604
theorem all_eq {l₁ l₂ : List α} {f : α → Bool} (hp : l₁.Perm l₂) : l₁.all f = l₂.all f := by
605-
rw [Bool.eq_iff_iff, Bool.eq_iff_iff, List.all_eq_true, List.all_eq_true]
606-
simp only [iff_true]
607-
constructor
608-
· intro hyp e mem
609-
exact hyp e (@Perm.mem_iff _ e l₁ l₂ hp |>.2 mem)
610-
· intro hyp e mem
611-
exact hyp e (@Perm.mem_iff _ e l₂ l₁ hp.symm |>.2 mem)
605+
rw [Bool.eq_iff_iff]; simp [hp.mem_iff]
606+
607+
theorem any_eq {l₁ l₂ : List α} {f : α → Bool} (hp : l₁.Perm l₂) : l₁.any f = l₂.any f := by
608+
rw [Bool.eq_iff_iff]; simp [hp.mem_iff]
612609

613610
grind_pattern Perm.sum_nat => l₁ ~ l₂, l₁.sum
614611
grind_pattern Perm.sum_nat => l₁ ~ l₂, l₂.sum

0 commit comments

Comments
 (0)