data.list.forall2
⟷
Mathlib.Data.List.Forall2
The following section lists changes to this file in mathlib3 and mathlib4 that occured after the initial port. Most recent changes are shown first. Hovering over a commit will show all commits associated with the same mathlib3 commit.
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(no changes)
(last sync)
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -131,7 +131,7 @@ theorem forall₂_and_left {p : α → Prop} :
simp only [forall₂_nil_left_iff, forall_prop_of_false (not_mem_nil _), imp_true_iff,
true_and_iff]
| a :: l, u => by
- simp only [forall₂_and_left l, forall₂_cons_left_iff, forall_mem_cons, and_assoc', and_comm',
+ simp only [forall₂_and_left l, forall₂_cons_left_iff, forall_mem_cons, and_assoc, and_comm,
and_left_comm, exists_and_distrib_left.symm]
#align list.forall₂_and_left List.forall₂_and_left
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/65a1391a0106c9204fe45bc73a039f056558cb83
@@ -266,7 +266,7 @@ theorem forall₂_take_append (l : List α) (l₁ : List β) (l₂ : List β) (h
by
have h' : Forall₂ R (take (length l₁) l) (take (length l₁) (l₁ ++ l₂)) :=
forall₂_take (length l₁) h
- rwa [take_left] at h'
+ rwa [take_left] at h'
#align list.forall₂_take_append List.forall₂_take_append
-/
@@ -276,7 +276,7 @@ theorem forall₂_drop_append (l : List α) (l₁ : List β) (l₂ : List β) (h
by
have h' : Forall₂ R (drop (length l₁) l) (drop (length l₁) (l₁ ++ l₂)) :=
forall₂_drop (length l₁) h
- rwa [drop_left] at h'
+ rwa [drop_left] at h'
#align list.forall₂_drop_append List.forall₂_drop_append
-/
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce64cd319bb6b3e82f31c2d38e79080d377be451
@@ -3,7 +3,7 @@ Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Johannes Hölzl
-/
-import Mathbin.Data.List.Infix
+import Data.List.Infix
#align_import data.list.forall2 from "leanprover-community/mathlib"@"10708587e81b68c763fcdb7505f279d52e569768"
mathlib commit https://github.com/leanprover-community/mathlib/commit/8ea5598db6caeddde6cb734aa179cc2408dbd345
@@ -2,14 +2,11 @@
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Johannes Hölzl
-
-! This file was ported from Lean 3 source module data.list.forall2
-! leanprover-community/mathlib commit 10708587e81b68c763fcdb7505f279d52e569768
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathbin.Data.List.Infix
+#align_import data.list.forall2 from "leanprover-community/mathlib"@"10708587e81b68c763fcdb7505f279d52e569768"
+
/-!
# Double universal quantification on a list
mathlib commit https://github.com/leanprover-community/mathlib/commit/9fb8964792b4237dac6200193a0d533f1b3f7423
@@ -32,27 +32,35 @@ open Relator
mk_iff_of_inductive_prop List.Forall₂ List.forall₂_iff
+#print List.forall₂_cons /-
@[simp]
theorem forall₂_cons {a b l₁ l₂} : Forall₂ R (a :: l₁) (b :: l₂) ↔ R a b ∧ Forall₂ R l₁ l₂ :=
⟨fun h => by cases' h with h₁ h₂ <;> constructor <;> assumption, fun ⟨h₁, h₂⟩ =>
Forall₂.cons h₁ h₂⟩
#align list.forall₂_cons List.forall₂_cons
+-/
+#print List.Forall₂.imp /-
theorem Forall₂.imp (H : ∀ a b, R a b → S a b) {l₁ l₂} (h : Forall₂ R l₁ l₂) : Forall₂ S l₁ l₂ := by
induction h <;> constructor <;> solve_by_elim
#align list.forall₂.imp List.Forall₂.imp
+-/
+#print List.Forall₂.mp /-
theorem Forall₂.mp {Q : α → β → Prop} (h : ∀ a b, Q a b → R a b → S a b) :
∀ {l₁ l₂}, Forall₂ Q l₁ l₂ → Forall₂ R l₁ l₂ → Forall₂ S l₁ l₂
| [], [], forall₂.nil, forall₂.nil => Forall₂.nil
| a :: l₁, b :: l₂, forall₂.cons hr hrs, forall₂.cons hq hqs =>
Forall₂.cons (h a b hr hq) (forall₂.mp hrs hqs)
#align list.forall₂.mp List.Forall₂.mp
+-/
+#print List.Forall₂.flip /-
theorem Forall₂.flip : ∀ {a b}, Forall₂ (flip R) b a → Forall₂ R a b
| _, _, forall₂.nil => Forall₂.nil
| a :: as, b :: bs, forall₂.cons h₁ h₂ => Forall₂.cons h₁ h₂.flip
#align list.forall₂.flip List.Forall₂.flip
+-/
#print List.forall₂_same /-
@[simp]
@@ -86,11 +94,14 @@ theorem forall₂_nil_left_iff {l} : Forall₂ R nil l ↔ l = nil :=
#align list.forall₂_nil_left_iff List.forall₂_nil_left_iff
-/
+#print List.forall₂_nil_right_iff /-
@[simp]
theorem forall₂_nil_right_iff {l} : Forall₂ R l nil ↔ l = nil :=
⟨fun H => by cases H <;> rfl, by rintro rfl <;> exact forall₂.nil⟩
#align list.forall₂_nil_right_iff List.forall₂_nil_right_iff
+-/
+#print List.forall₂_cons_left_iff /-
theorem forall₂_cons_left_iff {a l u} :
Forall₂ R (a :: l) u ↔ ∃ b u', R a b ∧ Forall₂ R l u' ∧ u = b :: u' :=
Iff.intro
@@ -101,6 +112,7 @@ theorem forall₂_cons_left_iff {a l u} :
match u, h with
| _, ⟨b, u', h₁, h₂, rfl⟩ => Forall₂.cons h₁ h₂
#align list.forall₂_cons_left_iff List.forall₂_cons_left_iff
+-/
#print List.forall₂_cons_right_iff /-
theorem forall₂_cons_right_iff {b l u} :
@@ -115,6 +127,7 @@ theorem forall₂_cons_right_iff {b l u} :
#align list.forall₂_cons_right_iff List.forall₂_cons_right_iff
-/
+#print List.forall₂_and_left /-
theorem forall₂_and_left {p : α → Prop} :
∀ l u, Forall₂ (fun a b => p a ∧ R a b) l u ↔ (∀ a ∈ l, p a) ∧ Forall₂ R l u
| [], u => by
@@ -124,6 +137,7 @@ theorem forall₂_and_left {p : α → Prop} :
simp only [forall₂_and_left l, forall₂_cons_left_iff, forall_mem_cons, and_assoc', and_comm',
and_left_comm, exists_and_distrib_left.symm]
#align list.forall₂_and_left List.forall₂_and_left
+-/
#print List.forall₂_map_left_iff /-
@[simp]
@@ -134,50 +148,67 @@ theorem forall₂_map_left_iff {f : γ → α} :
#align list.forall₂_map_left_iff List.forall₂_map_left_iff
-/
+#print List.forall₂_map_right_iff /-
@[simp]
theorem forall₂_map_right_iff {f : γ → β} :
∀ {l u}, Forall₂ R l (map f u) ↔ Forall₂ (fun a c => R a (f c)) l u
| _, [] => by simp only [map, forall₂_nil_right_iff]
| _, b :: u => by simp only [map, forall₂_cons_right_iff, forall₂_map_right_iff]
#align list.forall₂_map_right_iff List.forall₂_map_right_iff
+-/
+#print List.left_unique_forall₂' /-
theorem left_unique_forall₂' (hr : LeftUnique R) : ∀ {a b c}, Forall₂ R a c → Forall₂ R b c → a = b
| a₀, nil, a₁, forall₂.nil, forall₂.nil => rfl
| a₀ :: l₀, b :: l, a₁ :: l₁, forall₂.cons ha₀ h₀, forall₂.cons ha₁ h₁ =>
hr ha₀ ha₁ ▸ left_unique_forall₂' h₀ h₁ ▸ rfl
#align list.left_unique_forall₂' List.left_unique_forall₂'
+-/
+#print Relator.LeftUnique.forall₂ /-
theorem Relator.LeftUnique.forall₂ (hr : LeftUnique R) : LeftUnique (Forall₂ R) :=
@left_unique_forall₂' _ _ _ hr
#align relator.left_unique.forall₂ Relator.LeftUnique.forall₂
+-/
+#print List.right_unique_forall₂' /-
theorem right_unique_forall₂' (hr : RightUnique R) :
∀ {a b c}, Forall₂ R a b → Forall₂ R a c → b = c
| nil, a₀, a₁, forall₂.nil, forall₂.nil => rfl
| b :: l, a₀ :: l₀, a₁ :: l₁, forall₂.cons ha₀ h₀, forall₂.cons ha₁ h₁ =>
hr ha₀ ha₁ ▸ right_unique_forall₂' h₀ h₁ ▸ rfl
#align list.right_unique_forall₂' List.right_unique_forall₂'
+-/
+#print Relator.RightUnique.forall₂ /-
theorem Relator.RightUnique.forall₂ (hr : RightUnique R) : RightUnique (Forall₂ R) :=
@right_unique_forall₂' _ _ _ hr
#align relator.right_unique.forall₂ Relator.RightUnique.forall₂
+-/
+#print Relator.BiUnique.forall₂ /-
theorem Relator.BiUnique.forall₂ (hr : BiUnique R) : BiUnique (Forall₂ R) :=
⟨hr.left.forall₂, hr.right.forall₂⟩
#align relator.bi_unique.forall₂ Relator.BiUnique.forall₂
+-/
+#print List.Forall₂.length_eq /-
theorem Forall₂.length_eq : ∀ {l₁ l₂}, Forall₂ R l₁ l₂ → length l₁ = length l₂
| _, _, forall₂.nil => rfl
| _, _, forall₂.cons h₁ h₂ => congr_arg succ (forall₂.length_eq h₂)
#align list.forall₂.length_eq List.Forall₂.length_eq
+-/
+#print List.Forall₂.nthLe /-
theorem Forall₂.nthLe :
∀ {x : List α} {y : List β} (h : Forall₂ R x y) ⦃i : ℕ⦄ (hx : i < x.length) (hy : i < y.length),
R (x.nthLe i hx) (y.nthLe i hy)
| a₁ :: l₁, a₂ :: l₂, forall₂.cons ha hl, 0, hx, hy => ha
| a₁ :: l₁, a₂ :: l₂, forall₂.cons ha hl, succ i, hx, hy => hl.nthLe _ _
#align list.forall₂.nth_le List.Forall₂.nthLe
+-/
+#print List.forall₂_of_length_eq_of_nthLe /-
theorem forall₂_of_length_eq_of_nthLe :
∀ {x : List α} {y : List β},
x.length = y.length → (∀ i h₁ h₂, R (x.nthLe i h₁) (y.nthLe i h₂)) → Forall₂ R x y
@@ -187,17 +218,23 @@ theorem forall₂_of_length_eq_of_nthLe :
(forall₂_of_length_eq_of_nth_le (succ.inj hl) fun i h₁ h₂ =>
h i.succ (succ_lt_succ h₁) (succ_lt_succ h₂))
#align list.forall₂_of_length_eq_of_nth_le List.forall₂_of_length_eq_of_nthLe
+-/
+#print List.forall₂_iff_nthLe /-
theorem forall₂_iff_nthLe {l₁ : List α} {l₂ : List β} :
Forall₂ R l₁ l₂ ↔ l₁.length = l₂.length ∧ ∀ i h₁ h₂, R (l₁.nthLe i h₁) (l₂.nthLe i h₂) :=
⟨fun h => ⟨h.length_eq, h.nthLe⟩, And.ndrec forall₂_of_length_eq_of_nthLe⟩
#align list.forall₂_iff_nth_le List.forall₂_iff_nthLe
+-/
+#print List.forall₂_zip /-
theorem forall₂_zip : ∀ {l₁ l₂}, Forall₂ R l₁ l₂ → ∀ {a b}, (a, b) ∈ zip l₁ l₂ → R a b
| _, _, forall₂.cons h₁ h₂, x, y, Or.inl rfl => h₁
| _, _, forall₂.cons h₁ h₂, x, y, Or.inr h₃ => forall₂_zip h₂ h₃
#align list.forall₂_zip List.forall₂_zip
+-/
+#print List.forall₂_iff_zip /-
theorem forall₂_iff_zip {l₁ l₂} :
Forall₂ R l₁ l₂ ↔ length l₁ = length l₂ ∧ ∀ {a b}, (a, b) ∈ zip l₁ l₂ → R a b :=
⟨fun h => ⟨Forall₂.length_eq h, @forall₂_zip _ _ _ _ _ h⟩, fun h =>
@@ -208,19 +245,25 @@ theorem forall₂_iff_zip {l₁ l₂} :
· cases' l₂ with b l₂ <;> injection h₁ with h₁
exact forall₂.cons (h₂ <| Or.inl rfl) (IH h₁ fun a b h => h₂ <| Or.inr h)⟩
#align list.forall₂_iff_zip List.forall₂_iff_zip
+-/
+#print List.forall₂_take /-
theorem forall₂_take : ∀ (n) {l₁ l₂}, Forall₂ R l₁ l₂ → Forall₂ R (take n l₁) (take n l₂)
| 0, _, _, _ => by simp only [forall₂.nil, take]
| n + 1, _, _, forall₂.nil => by simp only [forall₂.nil, take]
| n + 1, _, _, forall₂.cons h₁ h₂ => by simp [And.intro h₁ h₂, forall₂_take n]
#align list.forall₂_take List.forall₂_take
+-/
+#print List.forall₂_drop /-
theorem forall₂_drop : ∀ (n) {l₁ l₂}, Forall₂ R l₁ l₂ → Forall₂ R (drop n l₁) (drop n l₂)
| 0, _, _, h => by simp only [drop, h]
| n + 1, _, _, forall₂.nil => by simp only [forall₂.nil, drop]
| n + 1, _, _, forall₂.cons h₁ h₂ => by simp [And.intro h₁ h₂, forall₂_drop n]
#align list.forall₂_drop List.forall₂_drop
+-/
+#print List.forall₂_take_append /-
theorem forall₂_take_append (l : List α) (l₁ : List β) (l₂ : List β) (h : Forall₂ R l (l₁ ++ l₂)) :
Forall₂ R (List.take (length l₁) l) l₁ :=
by
@@ -228,7 +271,9 @@ theorem forall₂_take_append (l : List α) (l₁ : List β) (l₂ : List β) (h
forall₂_take (length l₁) h
rwa [take_left] at h'
#align list.forall₂_take_append List.forall₂_take_append
+-/
+#print List.forall₂_drop_append /-
theorem forall₂_drop_append (l : List α) (l₁ : List β) (l₂ : List β) (h : Forall₂ R l (l₁ ++ l₂)) :
Forall₂ R (List.drop (length l₁) l) l₂ :=
by
@@ -236,22 +281,30 @@ theorem forall₂_drop_append (l : List α) (l₁ : List β) (l₂ : List β) (h
forall₂_drop (length l₁) h
rwa [drop_left] at h'
#align list.forall₂_drop_append List.forall₂_drop_append
+-/
+#print List.rel_mem /-
theorem rel_mem (hr : BiUnique R) : (R ⇒ Forall₂ R ⇒ Iff) (· ∈ ·) (· ∈ ·)
| a, b, h, [], [], forall₂.nil => by simp only [not_mem_nil]
| a, b, h, a' :: as, b' :: bs, forall₂.cons h₁ h₂ => rel_or (rel_eq hr h h₁) (rel_mem h h₂)
#align list.rel_mem List.rel_mem
+-/
+#print List.rel_map /-
theorem rel_map : ((R ⇒ P) ⇒ Forall₂ R ⇒ Forall₂ P) map map
| f, g, h, [], [], forall₂.nil => Forall₂.nil
| f, g, h, a :: as, b :: bs, forall₂.cons h₁ h₂ => Forall₂.cons (h h₁) (rel_map (@h) h₂)
#align list.rel_map List.rel_map
+-/
+#print List.rel_append /-
theorem rel_append : (Forall₂ R ⇒ Forall₂ R ⇒ Forall₂ R) append append
| [], [], h, l₁, l₂, hl => hl
| a :: as, b :: bs, forall₂.cons h₁ h₂, l₁, l₂, hl => Forall₂.cons h₁ (rel_append h₂ hl)
#align list.rel_append List.rel_append
+-/
+#print List.rel_reverse /-
theorem rel_reverse : (Forall₂ R ⇒ Forall₂ R) reverse reverse
| [], [], forall₂.nil => Forall₂.nil
| a :: as, b :: bs, forall₂.cons h₁ h₂ =>
@@ -259,32 +312,44 @@ theorem rel_reverse : (Forall₂ R ⇒ Forall₂ R) reverse reverse
simp only [reverse_cons]
exact rel_append (rel_reverse h₂) (forall₂.cons h₁ forall₂.nil)
#align list.rel_reverse List.rel_reverse
+-/
+#print List.forall₂_reverse_iff /-
@[simp]
theorem forall₂_reverse_iff {l₁ l₂} : Forall₂ R (reverse l₁) (reverse l₂) ↔ Forall₂ R l₁ l₂ :=
Iff.intro (fun h => by rw [← reverse_reverse l₁, ← reverse_reverse l₂]; exact rel_reverse h)
fun h => rel_reverse h
#align list.forall₂_reverse_iff List.forall₂_reverse_iff
+-/
+#print List.rel_join /-
theorem rel_join : (Forall₂ (Forall₂ R) ⇒ Forall₂ R) join join
| [], [], forall₂.nil => Forall₂.nil
| a :: as, b :: bs, forall₂.cons h₁ h₂ => rel_append h₁ (rel_join h₂)
#align list.rel_join List.rel_join
+-/
+#print List.rel_bind /-
theorem rel_bind : (Forall₂ R ⇒ (R ⇒ Forall₂ P) ⇒ Forall₂ P) List.bind List.bind :=
fun a b h₁ f g h₂ => rel_join (rel_map (@h₂) h₁)
#align list.rel_bind List.rel_bind
+-/
+#print List.rel_foldl /-
theorem rel_foldl : ((P ⇒ R ⇒ P) ⇒ P ⇒ Forall₂ R ⇒ P) foldl foldl
| f, g, hfg, _, _, h, _, _, forall₂.nil => h
| f, g, hfg, x, y, hxy, _, _, forall₂.cons hab hs => rel_foldl (@hfg) (hfg hxy hab) hs
#align list.rel_foldl List.rel_foldl
+-/
+#print List.rel_foldr /-
theorem rel_foldr : ((R ⇒ P ⇒ P) ⇒ P ⇒ Forall₂ R ⇒ P) foldr foldr
| f, g, hfg, _, _, h, _, _, forall₂.nil => h
| f, g, hfg, x, y, hxy, _, _, forall₂.cons hab hs => hfg hab (rel_foldr (@hfg) hxy hs)
#align list.rel_foldr List.rel_foldr
+-/
+#print List.rel_filter /-
theorem rel_filter {p : α → Prop} {q : β → Prop} [DecidablePred p] [DecidablePred q]
(hpq : (R ⇒ (· ↔ ·)) p q) : (Forall₂ R ⇒ Forall₂ R) (filter p) (filter q)
| _, _, forall₂.nil => Forall₂.nil
@@ -296,7 +361,9 @@ theorem rel_filter {p : α → Prop} {q : β → Prop} [DecidablePred p] [Decida
· have : ¬q b := by rwa [← hpq h₁]
simp only [filter_cons_of_neg _ h, filter_cons_of_neg _ this, rel_filter h₂]
#align list.rel_filter List.rel_filter
+-/
+#print List.rel_filterMap /-
theorem rel_filterMap : ((R ⇒ Option.Rel P) ⇒ Forall₂ R ⇒ Forall₂ P) filterMap filterMap
| f, g, hfg, _, _, forall₂.nil => Forall₂.nil
| f, g, hfg, a :: as, b :: bs, forall₂.cons h₁ h₂ => by
@@ -306,13 +373,16 @@ theorem rel_filterMap : ((R ⇒ Option.Rel P) ⇒ Forall₂ R ⇒ Forall₂ P) f
| _, _, Option.Rel.none => rel_filter_map (@hfg) h₂
| _, _, Option.Rel.some h => forall₂.cons h (rel_filter_map (@hfg) h₂)
#align list.rel_filter_map List.rel_filterMap
+-/
+#print List.rel_prod /-
@[to_additive]
theorem rel_prod [Monoid α] [Monoid β] (h : R 1 1) (hf : (R ⇒ R ⇒ R) (· * ·) (· * ·)) :
(Forall₂ R ⇒ R) prod prod :=
rel_foldl hf h
#align list.rel_prod List.rel_prod
#align list.rel_sum List.rel_sum
+-/
#print List.SublistForall₂ /-
/-- Given a relation `R`, `sublist_forall₂ r l₁ l₂` indicates that there is a sublist of `l₂` such
@@ -324,6 +394,7 @@ inductive SublistForall₂ (R : α → β → Prop) : List α → List β → Pr
#align list.sublist_forall₂ List.SublistForall₂
-/
+#print List.sublistForall₂_iff /-
theorem sublistForall₂_iff {l₁ : List α} {l₂ : List β} :
SublistForall₂ R l₁ l₂ ↔ ∃ l, Forall₂ R l₁ l ∧ l <+ l₂ :=
by
@@ -343,6 +414,7 @@ theorem sublistForall₂_iff {l₁ : List α} {l₂ : List β} :
· cases' hl1 with _ _ _ _ hr hl _
exact sublist_forall₂.cons hr (ih hl)
#align list.sublist_forall₂_iff List.sublistForall₂_iff
+-/
#print List.SublistForall₂.is_refl /-
instance SublistForall₂.is_refl [IsRefl α Rₐ] : IsRefl (List α) (SublistForall₂ Rₐ) :=
mathlib commit https://github.com/leanprover-community/mathlib/commit/cca40788df1b8755d5baf17ab2f27dacc2e17acb
@@ -226,7 +226,7 @@ theorem forall₂_take_append (l : List α) (l₁ : List β) (l₂ : List β) (h
by
have h' : Forall₂ R (take (length l₁) l) (take (length l₁) (l₁ ++ l₂)) :=
forall₂_take (length l₁) h
- rwa [take_left] at h'
+ rwa [take_left] at h'
#align list.forall₂_take_append List.forall₂_take_append
theorem forall₂_drop_append (l : List α) (l₁ : List β) (l₂ : List β) (h : Forall₂ R l (l₁ ++ l₂)) :
@@ -234,7 +234,7 @@ theorem forall₂_drop_append (l : List α) (l₁ : List β) (l₂ : List β) (h
by
have h' : Forall₂ R (drop (length l₁) l) (drop (length l₁) (l₁ ++ l₂)) :=
forall₂_drop (length l₁) h
- rwa [drop_left] at h'
+ rwa [drop_left] at h'
#align list.forall₂_drop_append List.forall₂_drop_append
theorem rel_mem (hr : BiUnique R) : (R ⇒ Forall₂ R ⇒ Iff) (· ∈ ·) (· ∈ ·)
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -32,34 +32,16 @@ open Relator
mk_iff_of_inductive_prop List.Forall₂ List.forall₂_iff
-/- warning: list.forall₂_cons -> List.forall₂_cons is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {a : α} {b : β} {l₁ : List.{u1} α} {l₂ : List.{u2} β}, Iff (List.Forall₂.{u1, u2} α β R (List.cons.{u1} α a l₁) (List.cons.{u2} β b l₂)) (And (R a b) (List.Forall₂.{u1, u2} α β R l₁ l₂))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {a : α} {b : β} {l₁ : List.{u2} α} {l₂ : List.{u1} β}, Iff (List.Forall₂.{u2, u1} α β R (List.cons.{u2} α a l₁) (List.cons.{u1} β b l₂)) (And (R a b) (List.Forall₂.{u2, u1} α β R l₁ l₂))
-Case conversion may be inaccurate. Consider using '#align list.forall₂_cons List.forall₂_consₓ'. -/
@[simp]
theorem forall₂_cons {a b l₁ l₂} : Forall₂ R (a :: l₁) (b :: l₂) ↔ R a b ∧ Forall₂ R l₁ l₂ :=
⟨fun h => by cases' h with h₁ h₂ <;> constructor <;> assumption, fun ⟨h₁, h₂⟩ =>
Forall₂.cons h₁ h₂⟩
#align list.forall₂_cons List.forall₂_cons
-/- warning: list.forall₂.imp -> List.Forall₂.imp is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {S : α -> β -> Prop}, (forall (a : α) (b : β), (R a b) -> (S a b)) -> (forall {l₁ : List.{u1} α} {l₂ : List.{u2} β}, (List.Forall₂.{u1, u2} α β R l₁ l₂) -> (List.Forall₂.{u1, u2} α β S l₁ l₂))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {S : α -> β -> Prop}, (forall (a : α) (b : β), (R a b) -> (S a b)) -> (forall {l₁ : List.{u2} α} {l₂ : List.{u1} β}, (List.Forall₂.{u2, u1} α β R l₁ l₂) -> (List.Forall₂.{u2, u1} α β S l₁ l₂))
-Case conversion may be inaccurate. Consider using '#align list.forall₂.imp List.Forall₂.impₓ'. -/
theorem Forall₂.imp (H : ∀ a b, R a b → S a b) {l₁ l₂} (h : Forall₂ R l₁ l₂) : Forall₂ S l₁ l₂ := by
induction h <;> constructor <;> solve_by_elim
#align list.forall₂.imp List.Forall₂.imp
-/- warning: list.forall₂.mp -> List.Forall₂.mp is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {S : α -> β -> Prop} {Q : α -> β -> Prop}, (forall (a : α) (b : β), (Q a b) -> (R a b) -> (S a b)) -> (forall {l₁ : List.{u1} α} {l₂ : List.{u2} β}, (List.Forall₂.{u1, u2} α β Q l₁ l₂) -> (List.Forall₂.{u1, u2} α β R l₁ l₂) -> (List.Forall₂.{u1, u2} α β S l₁ l₂))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {S : α -> β -> Prop} {Q : α -> β -> Prop}, (forall (a : α) (b : β), (Q a b) -> (R a b) -> (S a b)) -> (forall {l₁ : List.{u2} α} {l₂ : List.{u1} β}, (List.Forall₂.{u2, u1} α β Q l₁ l₂) -> (List.Forall₂.{u2, u1} α β R l₁ l₂) -> (List.Forall₂.{u2, u1} α β S l₁ l₂))
-Case conversion may be inaccurate. Consider using '#align list.forall₂.mp List.Forall₂.mpₓ'. -/
theorem Forall₂.mp {Q : α → β → Prop} (h : ∀ a b, Q a b → R a b → S a b) :
∀ {l₁ l₂}, Forall₂ Q l₁ l₂ → Forall₂ R l₁ l₂ → Forall₂ S l₁ l₂
| [], [], forall₂.nil, forall₂.nil => Forall₂.nil
@@ -67,12 +49,6 @@ theorem Forall₂.mp {Q : α → β → Prop} (h : ∀ a b, Q a b → R a b →
Forall₂.cons (h a b hr hq) (forall₂.mp hrs hqs)
#align list.forall₂.mp List.Forall₂.mp
-/- warning: list.forall₂.flip -> List.Forall₂.flip is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {a : List.{u1} α} {b : List.{u2} β}, (List.Forall₂.{u2, u1} β α (flip.{succ u1, succ u2, 1} α β Prop R) b a) -> (List.Forall₂.{u1, u2} α β R a b)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {a : List.{u2} α} {b : List.{u1} β}, (List.Forall₂.{u1, u2} β α (flip.{succ u2, succ u1, 1} α β Prop R) b a) -> (List.Forall₂.{u2, u1} α β R a b)
-Case conversion may be inaccurate. Consider using '#align list.forall₂.flip List.Forall₂.flipₓ'. -/
theorem Forall₂.flip : ∀ {a b}, Forall₂ (flip R) b a → Forall₂ R a b
| _, _, forall₂.nil => Forall₂.nil
| a :: as, b :: bs, forall₂.cons h₁ h₂ => Forall₂.cons h₁ h₂.flip
@@ -110,23 +86,11 @@ theorem forall₂_nil_left_iff {l} : Forall₂ R nil l ↔ l = nil :=
#align list.forall₂_nil_left_iff List.forall₂_nil_left_iff
-/
-/- warning: list.forall₂_nil_right_iff -> List.forall₂_nil_right_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {l : List.{u1} α}, Iff (List.Forall₂.{u1, u2} α β R l (List.nil.{u2} β)) (Eq.{succ u1} (List.{u1} α) l (List.nil.{u1} α))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {l : List.{u2} α}, Iff (List.Forall₂.{u2, u1} α β R l (List.nil.{u1} β)) (Eq.{succ u2} (List.{u2} α) l (List.nil.{u2} α))
-Case conversion may be inaccurate. Consider using '#align list.forall₂_nil_right_iff List.forall₂_nil_right_iffₓ'. -/
@[simp]
theorem forall₂_nil_right_iff {l} : Forall₂ R l nil ↔ l = nil :=
⟨fun H => by cases H <;> rfl, by rintro rfl <;> exact forall₂.nil⟩
#align list.forall₂_nil_right_iff List.forall₂_nil_right_iff
-/- warning: list.forall₂_cons_left_iff -> List.forall₂_cons_left_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {a : α} {l : List.{u1} α} {u : List.{u2} β}, Iff (List.Forall₂.{u1, u2} α β R (List.cons.{u1} α a l) u) (Exists.{succ u2} β (fun (b : β) => Exists.{succ u2} (List.{u2} β) (fun (u' : List.{u2} β) => And (R a b) (And (List.Forall₂.{u1, u2} α β R l u') (Eq.{succ u2} (List.{u2} β) u (List.cons.{u2} β b u'))))))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {a : α} {l : List.{u2} α} {u : List.{u1} β}, Iff (List.Forall₂.{u2, u1} α β R (List.cons.{u2} α a l) u) (Exists.{succ u1} β (fun (b : β) => Exists.{succ u1} (List.{u1} β) (fun (u' : List.{u1} β) => And (R a b) (And (List.Forall₂.{u2, u1} α β R l u') (Eq.{succ u1} (List.{u1} β) u (List.cons.{u1} β b u'))))))
-Case conversion may be inaccurate. Consider using '#align list.forall₂_cons_left_iff List.forall₂_cons_left_iffₓ'. -/
theorem forall₂_cons_left_iff {a l u} :
Forall₂ R (a :: l) u ↔ ∃ b u', R a b ∧ Forall₂ R l u' ∧ u = b :: u' :=
Iff.intro
@@ -151,12 +115,6 @@ theorem forall₂_cons_right_iff {b l u} :
#align list.forall₂_cons_right_iff List.forall₂_cons_right_iff
-/
-/- warning: list.forall₂_and_left -> List.forall₂_and_left is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {p : α -> Prop} (l : List.{u1} α) (u : List.{u2} β), Iff (List.Forall₂.{u1, u2} α β (fun (a : α) (b : β) => And (p a) (R a b)) l u) (And (forall (a : α), (Membership.Mem.{u1, u1} α (List.{u1} α) (List.hasMem.{u1} α) a l) -> (p a)) (List.Forall₂.{u1, u2} α β R l u))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {p : α -> Prop} (l : List.{u2} α) (u : List.{u1} β), Iff (List.Forall₂.{u2, u1} α β (fun (a : α) (b : β) => And (p a) (R a b)) l u) (And (forall (a : α), (Membership.mem.{u2, u2} α (List.{u2} α) (List.instMembershipList.{u2} α) a l) -> (p a)) (List.Forall₂.{u2, u1} α β R l u))
-Case conversion may be inaccurate. Consider using '#align list.forall₂_and_left List.forall₂_and_leftₓ'. -/
theorem forall₂_and_left {p : α → Prop} :
∀ l u, Forall₂ (fun a b => p a ∧ R a b) l u ↔ (∀ a ∈ l, p a) ∧ Forall₂ R l u
| [], u => by
@@ -176,12 +134,6 @@ theorem forall₂_map_left_iff {f : γ → α} :
#align list.forall₂_map_left_iff List.forall₂_map_left_iff
-/
-/- warning: list.forall₂_map_right_iff -> List.forall₂_map_right_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {R : α -> β -> Prop} {f : γ -> β} {l : List.{u1} α} {u : List.{u3} γ}, Iff (List.Forall₂.{u1, u2} α β R l (List.map.{u3, u2} γ β f u)) (List.Forall₂.{u1, u3} α γ (fun (a : α) (c : γ) => R a (f c)) l u)
-but is expected to have type
- forall {α : Type.{u3}} {β : Type.{u1}} {γ : Type.{u2}} {R : α -> β -> Prop} {f : γ -> β} {l : List.{u3} α} {u : List.{u2} γ}, Iff (List.Forall₂.{u3, u1} α β R l (List.map.{u2, u1} γ β f u)) (List.Forall₂.{u3, u2} α γ (fun (a : α) (c : γ) => R a (f c)) l u)
-Case conversion may be inaccurate. Consider using '#align list.forall₂_map_right_iff List.forall₂_map_right_iffₓ'. -/
@[simp]
theorem forall₂_map_right_iff {f : γ → β} :
∀ {l u}, Forall₂ R l (map f u) ↔ Forall₂ (fun a c => R a (f c)) l u
@@ -189,34 +141,16 @@ theorem forall₂_map_right_iff {f : γ → β} :
| _, b :: u => by simp only [map, forall₂_cons_right_iff, forall₂_map_right_iff]
#align list.forall₂_map_right_iff List.forall₂_map_right_iff
-/- warning: list.left_unique_forall₂' -> List.left_unique_forall₂' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, (Relator.LeftUnique.{u1, u2} α β R) -> (forall {a : List.{u1} α} {b : List.{u1} α} {c : List.{u2} β}, (List.Forall₂.{u1, u2} α β R a c) -> (List.Forall₂.{u1, u2} α β R b c) -> (Eq.{succ u1} (List.{u1} α) a b))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, (Relator.LeftUnique.{u2, u1} α β R) -> (forall {a : List.{u2} α} {b : List.{u2} α} {c : List.{u1} β}, (List.Forall₂.{u2, u1} α β R a c) -> (List.Forall₂.{u2, u1} α β R b c) -> (Eq.{succ u2} (List.{u2} α) a b))
-Case conversion may be inaccurate. Consider using '#align list.left_unique_forall₂' List.left_unique_forall₂'ₓ'. -/
theorem left_unique_forall₂' (hr : LeftUnique R) : ∀ {a b c}, Forall₂ R a c → Forall₂ R b c → a = b
| a₀, nil, a₁, forall₂.nil, forall₂.nil => rfl
| a₀ :: l₀, b :: l, a₁ :: l₁, forall₂.cons ha₀ h₀, forall₂.cons ha₁ h₁ =>
hr ha₀ ha₁ ▸ left_unique_forall₂' h₀ h₁ ▸ rfl
#align list.left_unique_forall₂' List.left_unique_forall₂'
-/- warning: relator.left_unique.forall₂ -> Relator.LeftUnique.forall₂ is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, (Relator.LeftUnique.{u1, u2} α β R) -> (Relator.LeftUnique.{u1, u2} (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, (Relator.LeftUnique.{u2, u1} α β R) -> (Relator.LeftUnique.{u2, u1} (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R))
-Case conversion may be inaccurate. Consider using '#align relator.left_unique.forall₂ Relator.LeftUnique.forall₂ₓ'. -/
theorem Relator.LeftUnique.forall₂ (hr : LeftUnique R) : LeftUnique (Forall₂ R) :=
@left_unique_forall₂' _ _ _ hr
#align relator.left_unique.forall₂ Relator.LeftUnique.forall₂
-/- warning: list.right_unique_forall₂' -> List.right_unique_forall₂' is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, (Relator.RightUnique.{u1, u2} α β R) -> (forall {a : List.{u1} α} {b : List.{u2} β} {c : List.{u2} β}, (List.Forall₂.{u1, u2} α β R a b) -> (List.Forall₂.{u1, u2} α β R a c) -> (Eq.{succ u2} (List.{u2} β) b c))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, (Relator.RightUnique.{u2, u1} α β R) -> (forall {a : List.{u2} α} {b : List.{u1} β} {c : List.{u1} β}, (List.Forall₂.{u2, u1} α β R a b) -> (List.Forall₂.{u2, u1} α β R a c) -> (Eq.{succ u1} (List.{u1} β) b c))
-Case conversion may be inaccurate. Consider using '#align list.right_unique_forall₂' List.right_unique_forall₂'ₓ'. -/
theorem right_unique_forall₂' (hr : RightUnique R) :
∀ {a b c}, Forall₂ R a b → Forall₂ R a c → b = c
| nil, a₀, a₁, forall₂.nil, forall₂.nil => rfl
@@ -224,43 +158,19 @@ theorem right_unique_forall₂' (hr : RightUnique R) :
hr ha₀ ha₁ ▸ right_unique_forall₂' h₀ h₁ ▸ rfl
#align list.right_unique_forall₂' List.right_unique_forall₂'
-/- warning: relator.right_unique.forall₂ -> Relator.RightUnique.forall₂ is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, (Relator.RightUnique.{u1, u2} α β R) -> (Relator.RightUnique.{u1, u2} (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, (Relator.RightUnique.{u2, u1} α β R) -> (Relator.RightUnique.{u2, u1} (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R))
-Case conversion may be inaccurate. Consider using '#align relator.right_unique.forall₂ Relator.RightUnique.forall₂ₓ'. -/
theorem Relator.RightUnique.forall₂ (hr : RightUnique R) : RightUnique (Forall₂ R) :=
@right_unique_forall₂' _ _ _ hr
#align relator.right_unique.forall₂ Relator.RightUnique.forall₂
-/- warning: relator.bi_unique.forall₂ -> Relator.BiUnique.forall₂ is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, (Relator.BiUnique.{u1, u2} α β R) -> (Relator.BiUnique.{u1, u2} (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, (Relator.BiUnique.{u2, u1} α β R) -> (Relator.BiUnique.{u2, u1} (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R))
-Case conversion may be inaccurate. Consider using '#align relator.bi_unique.forall₂ Relator.BiUnique.forall₂ₓ'. -/
theorem Relator.BiUnique.forall₂ (hr : BiUnique R) : BiUnique (Forall₂ R) :=
⟨hr.left.forall₂, hr.right.forall₂⟩
#align relator.bi_unique.forall₂ Relator.BiUnique.forall₂
-/- warning: list.forall₂.length_eq -> List.Forall₂.length_eq is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {l₁ : List.{u1} α} {l₂ : List.{u2} β}, (List.Forall₂.{u1, u2} α β R l₁ l₂) -> (Eq.{1} Nat (List.length.{u1} α l₁) (List.length.{u2} β l₂))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {l₁ : List.{u2} α} {l₂ : List.{u1} β}, (List.Forall₂.{u2, u1} α β R l₁ l₂) -> (Eq.{1} Nat (List.length.{u2} α l₁) (List.length.{u1} β l₂))
-Case conversion may be inaccurate. Consider using '#align list.forall₂.length_eq List.Forall₂.length_eqₓ'. -/
theorem Forall₂.length_eq : ∀ {l₁ l₂}, Forall₂ R l₁ l₂ → length l₁ = length l₂
| _, _, forall₂.nil => rfl
| _, _, forall₂.cons h₁ h₂ => congr_arg succ (forall₂.length_eq h₂)
#align list.forall₂.length_eq List.Forall₂.length_eq
-/- warning: list.forall₂.nth_le -> List.Forall₂.nthLe is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {x : List.{u1} α} {y : List.{u2} β}, (List.Forall₂.{u1, u2} α β R x y) -> (forall {{i : Nat}} (hx : LT.lt.{0} Nat Nat.hasLt i (List.length.{u1} α x)) (hy : LT.lt.{0} Nat Nat.hasLt i (List.length.{u2} β y)), R (List.nthLe.{u1} α x i hx) (List.nthLe.{u2} β y i hy))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {x : List.{u2} α} {y : List.{u1} β}, (List.Forall₂.{u2, u1} α β R x y) -> (forall {{i : Nat}} (hx : LT.lt.{0} Nat instLTNat i (List.length.{u2} α x)) (hy : LT.lt.{0} Nat instLTNat i (List.length.{u1} β y)), R (List.nthLe.{u2} α x i hx) (List.nthLe.{u1} β y i hy))
-Case conversion may be inaccurate. Consider using '#align list.forall₂.nth_le List.Forall₂.nthLeₓ'. -/
theorem Forall₂.nthLe :
∀ {x : List α} {y : List β} (h : Forall₂ R x y) ⦃i : ℕ⦄ (hx : i < x.length) (hy : i < y.length),
R (x.nthLe i hx) (y.nthLe i hy)
@@ -268,12 +178,6 @@ theorem Forall₂.nthLe :
| a₁ :: l₁, a₂ :: l₂, forall₂.cons ha hl, succ i, hx, hy => hl.nthLe _ _
#align list.forall₂.nth_le List.Forall₂.nthLe
-/- warning: list.forall₂_of_length_eq_of_nth_le -> List.forall₂_of_length_eq_of_nthLe is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {x : List.{u1} α} {y : List.{u2} β}, (Eq.{1} Nat (List.length.{u1} α x) (List.length.{u2} β y)) -> (forall (i : Nat) (h₁ : LT.lt.{0} Nat Nat.hasLt i (List.length.{u1} α x)) (h₂ : LT.lt.{0} Nat Nat.hasLt i (List.length.{u2} β y)), R (List.nthLe.{u1} α x i h₁) (List.nthLe.{u2} β y i h₂)) -> (List.Forall₂.{u1, u2} α β R x y)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {x : List.{u2} α} {y : List.{u1} β}, (Eq.{1} Nat (List.length.{u2} α x) (List.length.{u1} β y)) -> (forall (i : Nat) (h₁ : LT.lt.{0} Nat instLTNat i (List.length.{u2} α x)) (h₂ : LT.lt.{0} Nat instLTNat i (List.length.{u1} β y)), R (List.nthLe.{u2} α x i h₁) (List.nthLe.{u1} β y i h₂)) -> (List.Forall₂.{u2, u1} α β R x y)
-Case conversion may be inaccurate. Consider using '#align list.forall₂_of_length_eq_of_nth_le List.forall₂_of_length_eq_of_nthLeₓ'. -/
theorem forall₂_of_length_eq_of_nthLe :
∀ {x : List α} {y : List β},
x.length = y.length → (∀ i h₁ h₂, R (x.nthLe i h₁) (y.nthLe i h₂)) → Forall₂ R x y
@@ -284,34 +188,16 @@ theorem forall₂_of_length_eq_of_nthLe :
h i.succ (succ_lt_succ h₁) (succ_lt_succ h₂))
#align list.forall₂_of_length_eq_of_nth_le List.forall₂_of_length_eq_of_nthLe
-/- warning: list.forall₂_iff_nth_le -> List.forall₂_iff_nthLe is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {l₁ : List.{u1} α} {l₂ : List.{u2} β}, Iff (List.Forall₂.{u1, u2} α β R l₁ l₂) (And (Eq.{1} Nat (List.length.{u1} α l₁) (List.length.{u2} β l₂)) (forall (i : Nat) (h₁ : LT.lt.{0} Nat Nat.hasLt i (List.length.{u1} α l₁)) (h₂ : LT.lt.{0} Nat Nat.hasLt i (List.length.{u2} β l₂)), R (List.nthLe.{u1} α l₁ i h₁) (List.nthLe.{u2} β l₂ i h₂)))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {l₁ : List.{u2} α} {l₂ : List.{u1} β}, Iff (List.Forall₂.{u2, u1} α β R l₁ l₂) (And (Eq.{1} Nat (List.length.{u2} α l₁) (List.length.{u1} β l₂)) (forall (i : Nat) (h₁ : LT.lt.{0} Nat instLTNat i (List.length.{u2} α l₁)) (h₂ : LT.lt.{0} Nat instLTNat i (List.length.{u1} β l₂)), R (List.nthLe.{u2} α l₁ i h₁) (List.nthLe.{u1} β l₂ i h₂)))
-Case conversion may be inaccurate. Consider using '#align list.forall₂_iff_nth_le List.forall₂_iff_nthLeₓ'. -/
theorem forall₂_iff_nthLe {l₁ : List α} {l₂ : List β} :
Forall₂ R l₁ l₂ ↔ l₁.length = l₂.length ∧ ∀ i h₁ h₂, R (l₁.nthLe i h₁) (l₂.nthLe i h₂) :=
⟨fun h => ⟨h.length_eq, h.nthLe⟩, And.ndrec forall₂_of_length_eq_of_nthLe⟩
#align list.forall₂_iff_nth_le List.forall₂_iff_nthLe
-/- warning: list.forall₂_zip -> List.forall₂_zip is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {l₁ : List.{u1} α} {l₂ : List.{u2} β}, (List.Forall₂.{u1, u2} α β R l₁ l₂) -> (forall {a : α} {b : β}, (Membership.Mem.{max u1 u2, max u1 u2} (Prod.{u1, u2} α β) (List.{max u1 u2} (Prod.{u1, u2} α β)) (List.hasMem.{max u1 u2} (Prod.{u1, u2} α β)) (Prod.mk.{u1, u2} α β a b) (List.zip.{u1, u2} α β l₁ l₂)) -> (R a b))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {l₁ : List.{u2} α} {l₂ : List.{u1} β}, (List.Forall₂.{u2, u1} α β R l₁ l₂) -> (forall {a : α} {b : β}, (Membership.mem.{max u1 u2, max u1 u2} (Prod.{u2, u1} α β) (List.{max u1 u2} (Prod.{u2, u1} α β)) (List.instMembershipList.{max u1 u2} (Prod.{u2, u1} α β)) (Prod.mk.{u2, u1} α β a b) (List.zip.{u2, u1} α β l₁ l₂)) -> (R a b))
-Case conversion may be inaccurate. Consider using '#align list.forall₂_zip List.forall₂_zipₓ'. -/
theorem forall₂_zip : ∀ {l₁ l₂}, Forall₂ R l₁ l₂ → ∀ {a b}, (a, b) ∈ zip l₁ l₂ → R a b
| _, _, forall₂.cons h₁ h₂, x, y, Or.inl rfl => h₁
| _, _, forall₂.cons h₁ h₂, x, y, Or.inr h₃ => forall₂_zip h₂ h₃
#align list.forall₂_zip List.forall₂_zip
-/- warning: list.forall₂_iff_zip -> List.forall₂_iff_zip is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {l₁ : List.{u1} α} {l₂ : List.{u2} β}, Iff (List.Forall₂.{u1, u2} α β R l₁ l₂) (And (Eq.{1} Nat (List.length.{u1} α l₁) (List.length.{u2} β l₂)) (forall {a : α} {b : β}, (Membership.Mem.{max u1 u2, max u1 u2} (Prod.{u1, u2} α β) (List.{max u1 u2} (Prod.{u1, u2} α β)) (List.hasMem.{max u1 u2} (Prod.{u1, u2} α β)) (Prod.mk.{u1, u2} α β a b) (List.zip.{u1, u2} α β l₁ l₂)) -> (R a b)))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {l₁ : List.{u2} α} {l₂ : List.{u1} β}, Iff (List.Forall₂.{u2, u1} α β R l₁ l₂) (And (Eq.{1} Nat (List.length.{u2} α l₁) (List.length.{u1} β l₂)) (forall {a : α} {b : β}, (Membership.mem.{max u1 u2, max u1 u2} (Prod.{u2, u1} α β) (List.{max u1 u2} (Prod.{u2, u1} α β)) (List.instMembershipList.{max u1 u2} (Prod.{u2, u1} α β)) (Prod.mk.{u2, u1} α β a b) (List.zip.{u2, u1} α β l₁ l₂)) -> (R a b)))
-Case conversion may be inaccurate. Consider using '#align list.forall₂_iff_zip List.forall₂_iff_zipₓ'. -/
theorem forall₂_iff_zip {l₁ l₂} :
Forall₂ R l₁ l₂ ↔ length l₁ = length l₂ ∧ ∀ {a b}, (a, b) ∈ zip l₁ l₂ → R a b :=
⟨fun h => ⟨Forall₂.length_eq h, @forall₂_zip _ _ _ _ _ h⟩, fun h =>
@@ -323,36 +209,18 @@ theorem forall₂_iff_zip {l₁ l₂} :
exact forall₂.cons (h₂ <| Or.inl rfl) (IH h₁ fun a b h => h₂ <| Or.inr h)⟩
#align list.forall₂_iff_zip List.forall₂_iff_zip
-/- warning: list.forall₂_take -> List.forall₂_take is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} (n : Nat) {l₁ : List.{u1} α} {l₂ : List.{u2} β}, (List.Forall₂.{u1, u2} α β R l₁ l₂) -> (List.Forall₂.{u1, u2} α β R (List.take.{u1} α n l₁) (List.take.{u2} β n l₂))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} (n : Nat) {l₁ : List.{u2} α} {l₂ : List.{u1} β}, (List.Forall₂.{u2, u1} α β R l₁ l₂) -> (List.Forall₂.{u2, u1} α β R (List.take.{u2} α n l₁) (List.take.{u1} β n l₂))
-Case conversion may be inaccurate. Consider using '#align list.forall₂_take List.forall₂_takeₓ'. -/
theorem forall₂_take : ∀ (n) {l₁ l₂}, Forall₂ R l₁ l₂ → Forall₂ R (take n l₁) (take n l₂)
| 0, _, _, _ => by simp only [forall₂.nil, take]
| n + 1, _, _, forall₂.nil => by simp only [forall₂.nil, take]
| n + 1, _, _, forall₂.cons h₁ h₂ => by simp [And.intro h₁ h₂, forall₂_take n]
#align list.forall₂_take List.forall₂_take
-/- warning: list.forall₂_drop -> List.forall₂_drop is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} (n : Nat) {l₁ : List.{u1} α} {l₂ : List.{u2} β}, (List.Forall₂.{u1, u2} α β R l₁ l₂) -> (List.Forall₂.{u1, u2} α β R (List.drop.{u1} α n l₁) (List.drop.{u2} β n l₂))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} (n : Nat) {l₁ : List.{u2} α} {l₂ : List.{u1} β}, (List.Forall₂.{u2, u1} α β R l₁ l₂) -> (List.Forall₂.{u2, u1} α β R (List.drop.{u2} α n l₁) (List.drop.{u1} β n l₂))
-Case conversion may be inaccurate. Consider using '#align list.forall₂_drop List.forall₂_dropₓ'. -/
theorem forall₂_drop : ∀ (n) {l₁ l₂}, Forall₂ R l₁ l₂ → Forall₂ R (drop n l₁) (drop n l₂)
| 0, _, _, h => by simp only [drop, h]
| n + 1, _, _, forall₂.nil => by simp only [forall₂.nil, drop]
| n + 1, _, _, forall₂.cons h₁ h₂ => by simp [And.intro h₁ h₂, forall₂_drop n]
#align list.forall₂_drop List.forall₂_drop
-/- warning: list.forall₂_take_append -> List.forall₂_take_append is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} (l : List.{u1} α) (l₁ : List.{u2} β) (l₂ : List.{u2} β), (List.Forall₂.{u1, u2} α β R l (Append.append.{u2} (List.{u2} β) (List.hasAppend.{u2} β) l₁ l₂)) -> (List.Forall₂.{u1, u2} α β R (List.take.{u1} α (List.length.{u2} β l₁) l) l₁)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} (l : List.{u2} α) (l₁ : List.{u1} β) (l₂ : List.{u1} β), (List.Forall₂.{u2, u1} α β R l (HAppend.hAppend.{u1, u1, u1} (List.{u1} β) (List.{u1} β) (List.{u1} β) (instHAppend.{u1} (List.{u1} β) (List.instAppendList.{u1} β)) l₁ l₂)) -> (List.Forall₂.{u2, u1} α β R (List.take.{u2} α (List.length.{u1} β l₁) l) l₁)
-Case conversion may be inaccurate. Consider using '#align list.forall₂_take_append List.forall₂_take_appendₓ'. -/
theorem forall₂_take_append (l : List α) (l₁ : List β) (l₂ : List β) (h : Forall₂ R l (l₁ ++ l₂)) :
Forall₂ R (List.take (length l₁) l) l₁ :=
by
@@ -361,12 +229,6 @@ theorem forall₂_take_append (l : List α) (l₁ : List β) (l₂ : List β) (h
rwa [take_left] at h'
#align list.forall₂_take_append List.forall₂_take_append
-/- warning: list.forall₂_drop_append -> List.forall₂_drop_append is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} (l : List.{u1} α) (l₁ : List.{u2} β) (l₂ : List.{u2} β), (List.Forall₂.{u1, u2} α β R l (Append.append.{u2} (List.{u2} β) (List.hasAppend.{u2} β) l₁ l₂)) -> (List.Forall₂.{u1, u2} α β R (List.drop.{u1} α (List.length.{u2} β l₁) l) l₂)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} (l : List.{u2} α) (l₁ : List.{u1} β) (l₂ : List.{u1} β), (List.Forall₂.{u2, u1} α β R l (HAppend.hAppend.{u1, u1, u1} (List.{u1} β) (List.{u1} β) (List.{u1} β) (instHAppend.{u1} (List.{u1} β) (List.instAppendList.{u1} β)) l₁ l₂)) -> (List.Forall₂.{u2, u1} α β R (List.drop.{u2} α (List.length.{u1} β l₁) l) l₂)
-Case conversion may be inaccurate. Consider using '#align list.forall₂_drop_append List.forall₂_drop_appendₓ'. -/
theorem forall₂_drop_append (l : List α) (l₁ : List β) (l₂ : List β) (h : Forall₂ R l (l₁ ++ l₂)) :
Forall₂ R (List.drop (length l₁) l) l₂ :=
by
@@ -375,45 +237,21 @@ theorem forall₂_drop_append (l : List α) (l₁ : List β) (l₂ : List β) (h
rwa [drop_left] at h'
#align list.forall₂_drop_append List.forall₂_drop_append
-/- warning: list.rel_mem -> List.rel_mem is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, (Relator.BiUnique.{u1, u2} α β R) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β ((List.{u1} α) -> Prop) ((List.{u2} β) -> Prop) R (Relator.LiftFun.{succ u1, succ u2, 1, 1} (List.{u1} α) (List.{u2} β) Prop Prop (List.Forall₂.{u1, u2} α β R) Iff) (Membership.Mem.{u1, u1} α (List.{u1} α) (List.hasMem.{u1} α)) (Membership.Mem.{u2, u2} β (List.{u2} β) (List.hasMem.{u2} β)))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, (Relator.BiUnique.{u2, u1} α β R) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β ((List.{u2} α) -> Prop) ((List.{u1} β) -> Prop) R (Relator.LiftFun.{succ u2, succ u1, 1, 1} (List.{u2} α) (List.{u1} β) Prop Prop (List.Forall₂.{u2, u1} α β R) Iff) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5043 : α) (x._@.Mathlib.Data.List.Forall2._hyg.5045 : List.{u2} α) => Membership.mem.{u2, u2} α (List.{u2} α) (List.instMembershipList.{u2} α) x._@.Mathlib.Data.List.Forall2._hyg.5043 x._@.Mathlib.Data.List.Forall2._hyg.5045) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5058 : β) (x._@.Mathlib.Data.List.Forall2._hyg.5060 : List.{u1} β) => Membership.mem.{u1, u1} β (List.{u1} β) (List.instMembershipList.{u1} β) x._@.Mathlib.Data.List.Forall2._hyg.5058 x._@.Mathlib.Data.List.Forall2._hyg.5060))
-Case conversion may be inaccurate. Consider using '#align list.rel_mem List.rel_memₓ'. -/
theorem rel_mem (hr : BiUnique R) : (R ⇒ Forall₂ R ⇒ Iff) (· ∈ ·) (· ∈ ·)
| a, b, h, [], [], forall₂.nil => by simp only [not_mem_nil]
| a, b, h, a' :: as, b' :: bs, forall₂.cons h₁ h₂ => rel_or (rel_eq hr h h₁) (rel_mem h h₂)
#align list.rel_mem List.rel_mem
-/- warning: list.rel_map -> List.rel_map is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} {R : α -> β -> Prop} {P : γ -> δ -> Prop}, Relator.LiftFun.{max (succ u1) (succ u3), max (succ u2) (succ u4), max (succ u1) (succ u3), max (succ u2) (succ u4)} (α -> γ) (β -> δ) ((List.{u1} α) -> (List.{u3} γ)) ((List.{u2} β) -> (List.{u4} δ)) (Relator.LiftFun.{succ u1, succ u2, succ u3, succ u4} α β γ δ R P) (Relator.LiftFun.{succ u1, succ u2, succ u3, succ u4} (List.{u1} α) (List.{u2} β) (List.{u3} γ) (List.{u4} δ) (List.Forall₂.{u1, u2} α β R) (List.Forall₂.{u3, u4} γ δ P)) (List.map.{u1, u3} α γ) (List.map.{u2, u4} β δ)
-but is expected to have type
- forall {α : Type.{u4}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u1}} {R : α -> β -> Prop} {P : γ -> δ -> Prop}, Relator.LiftFun.{max (succ u4) (succ u3), max (succ u2) (succ u1), max (succ u4) (succ u3), max (succ u2) (succ u1)} (α -> γ) (β -> δ) ((List.{u4} α) -> (List.{u3} γ)) ((List.{u2} β) -> (List.{u1} δ)) (Relator.LiftFun.{succ u4, succ u2, succ u3, succ u1} α β γ δ R P) (Relator.LiftFun.{succ u4, succ u2, succ u3, succ u1} (List.{u4} α) (List.{u2} β) (List.{u3} γ) (List.{u1} δ) (List.Forall₂.{u4, u2} α β R) (List.Forall₂.{u3, u1} γ δ P)) (List.map.{u4, u3} α γ) (List.map.{u2, u1} β δ)
-Case conversion may be inaccurate. Consider using '#align list.rel_map List.rel_mapₓ'. -/
theorem rel_map : ((R ⇒ P) ⇒ Forall₂ R ⇒ Forall₂ P) map map
| f, g, h, [], [], forall₂.nil => Forall₂.nil
| f, g, h, a :: as, b :: bs, forall₂.cons h₁ h₂ => Forall₂.cons (h h₁) (rel_map (@h) h₂)
#align list.rel_map List.rel_map
-/- warning: list.rel_append -> List.rel_append is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) ((List.{u1} α) -> (List.{u1} α)) ((List.{u2} β) -> (List.{u2} β)) (List.Forall₂.{u1, u2} α β R) (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R) (List.Forall₂.{u1, u2} α β R)) (Append.append.{u1} (List.{u1} α) (List.hasAppend.{u1} α)) (Append.append.{u2} (List.{u2} β) (List.hasAppend.{u2} β))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) ((List.{u2} α) -> (List.{u2} α)) ((List.{u1} β) -> (List.{u1} β)) (List.Forall₂.{u2, u1} α β R) (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R)) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5746 : List.{u2} α) (x._@.Mathlib.Data.List.Forall2._hyg.5748 : List.{u2} α) => HAppend.hAppend.{u2, u2, u2} (List.{u2} α) (List.{u2} α) (List.{u2} α) (instHAppend.{u2} (List.{u2} α) (List.instAppendList.{u2} α)) x._@.Mathlib.Data.List.Forall2._hyg.5746 x._@.Mathlib.Data.List.Forall2._hyg.5748) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5761 : List.{u1} β) (x._@.Mathlib.Data.List.Forall2._hyg.5763 : List.{u1} β) => HAppend.hAppend.{u1, u1, u1} (List.{u1} β) (List.{u1} β) (List.{u1} β) (instHAppend.{u1} (List.{u1} β) (List.instAppendList.{u1} β)) x._@.Mathlib.Data.List.Forall2._hyg.5761 x._@.Mathlib.Data.List.Forall2._hyg.5763)
-Case conversion may be inaccurate. Consider using '#align list.rel_append List.rel_appendₓ'. -/
theorem rel_append : (Forall₂ R ⇒ Forall₂ R ⇒ Forall₂ R) append append
| [], [], h, l₁, l₂, hl => hl
| a :: as, b :: bs, forall₂.cons h₁ h₂, l₁, l₂, hl => Forall₂.cons h₁ (rel_append h₂ hl)
#align list.rel_append List.rel_append
-/- warning: list.rel_reverse -> List.rel_reverse is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R) (List.Forall₂.{u1, u2} α β R) (List.reverse.{u1} α) (List.reverse.{u2} β)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R) (List.reverse.{u2} α) (List.reverse.{u1} β)
-Case conversion may be inaccurate. Consider using '#align list.rel_reverse List.rel_reverseₓ'. -/
theorem rel_reverse : (Forall₂ R ⇒ Forall₂ R) reverse reverse
| [], [], forall₂.nil => Forall₂.nil
| a :: as, b :: bs, forall₂.cons h₁ h₂ =>
@@ -422,67 +260,31 @@ theorem rel_reverse : (Forall₂ R ⇒ Forall₂ R) reverse reverse
exact rel_append (rel_reverse h₂) (forall₂.cons h₁ forall₂.nil)
#align list.rel_reverse List.rel_reverse
-/- warning: list.forall₂_reverse_iff -> List.forall₂_reverse_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {l₁ : List.{u1} α} {l₂ : List.{u2} β}, Iff (List.Forall₂.{u1, u2} α β R (List.reverse.{u1} α l₁) (List.reverse.{u2} β l₂)) (List.Forall₂.{u1, u2} α β R l₁ l₂)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {l₁ : List.{u2} α} {l₂ : List.{u1} β}, Iff (List.Forall₂.{u2, u1} α β R (List.reverse.{u2} α l₁) (List.reverse.{u1} β l₂)) (List.Forall₂.{u2, u1} α β R l₁ l₂)
-Case conversion may be inaccurate. Consider using '#align list.forall₂_reverse_iff List.forall₂_reverse_iffₓ'. -/
@[simp]
theorem forall₂_reverse_iff {l₁ l₂} : Forall₂ R (reverse l₁) (reverse l₂) ↔ Forall₂ R l₁ l₂ :=
Iff.intro (fun h => by rw [← reverse_reverse l₁, ← reverse_reverse l₂]; exact rel_reverse h)
fun h => rel_reverse h
#align list.forall₂_reverse_iff List.forall₂_reverse_iff
-/- warning: list.rel_join -> List.rel_join is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} (List.{u1} α)) (List.{u2} (List.{u2} β)) (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R)) (List.Forall₂.{u1, u2} α β R) (List.join.{u1} α) (List.join.{u2} β)
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} (List.{u2} α)) (List.{u1} (List.{u1} β)) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R)) (List.Forall₂.{u2, u1} α β R) (List.join.{u2} α) (List.join.{u1} β)
-Case conversion may be inaccurate. Consider using '#align list.rel_join List.rel_joinₓ'. -/
theorem rel_join : (Forall₂ (Forall₂ R) ⇒ Forall₂ R) join join
| [], [], forall₂.nil => Forall₂.nil
| a :: as, b :: bs, forall₂.cons h₁ h₂ => rel_append h₁ (rel_join h₂)
#align list.rel_join List.rel_join
-/- warning: list.rel_bind -> List.rel_bind is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} {R : α -> β -> Prop} {P : γ -> δ -> Prop}, Relator.LiftFun.{succ u1, succ u2, max (succ u1) (succ u3), max (succ u2) (succ u4)} (List.{u1} α) (List.{u2} β) ((α -> (List.{u3} γ)) -> (List.{u3} γ)) ((β -> (List.{u4} δ)) -> (List.{u4} δ)) (List.Forall₂.{u1, u2} α β R) (Relator.LiftFun.{max (succ u1) (succ u3), max (succ u2) (succ u4), succ u3, succ u4} (α -> (List.{u3} γ)) (β -> (List.{u4} δ)) (List.{u3} γ) (List.{u4} δ) (Relator.LiftFun.{succ u1, succ u2, succ u3, succ u4} α β (List.{u3} γ) (List.{u4} δ) R (List.Forall₂.{u3, u4} γ δ P)) (List.Forall₂.{u3, u4} γ δ P)) (List.bind.{u1, u3} α γ) (List.bind.{u2, u4} β δ)
-but is expected to have type
- forall {α : Type.{u4}} {β : Type.{u3}} {γ : Type.{u2}} {δ : Type.{u1}} {R : α -> β -> Prop} {P : γ -> δ -> Prop}, Relator.LiftFun.{succ u4, succ u3, max (succ u4) (succ u2), max (succ u3) (succ u1)} (List.{u4} α) (List.{u3} β) ((α -> (List.{u2} γ)) -> (List.{u2} γ)) ((β -> (List.{u1} δ)) -> (List.{u1} δ)) (List.Forall₂.{u4, u3} α β R) (Relator.LiftFun.{max (succ u4) (succ u2), max (succ u3) (succ u1), succ u2, succ u1} (α -> (List.{u2} γ)) (β -> (List.{u1} δ)) (List.{u2} γ) (List.{u1} δ) (Relator.LiftFun.{succ u4, succ u3, succ u2, succ u1} α β (List.{u2} γ) (List.{u1} δ) R (List.Forall₂.{u2, u1} γ δ P)) (List.Forall₂.{u2, u1} γ δ P)) (List.bind.{u4, u2} α γ) (List.bind.{u3, u1} β δ)
-Case conversion may be inaccurate. Consider using '#align list.rel_bind List.rel_bindₓ'. -/
theorem rel_bind : (Forall₂ R ⇒ (R ⇒ Forall₂ P) ⇒ Forall₂ P) List.bind List.bind :=
fun a b h₁ f g h₂ => rel_join (rel_map (@h₂) h₁)
#align list.rel_bind List.rel_bind
-/- warning: list.rel_foldl -> List.rel_foldl is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} {R : α -> β -> Prop} {P : γ -> δ -> Prop}, Relator.LiftFun.{max (succ u1) (succ u3), max (succ u2) (succ u4), max (succ u1) (succ u3), max (succ u2) (succ u4)} (γ -> α -> γ) (δ -> β -> δ) (γ -> (List.{u1} α) -> γ) (δ -> (List.{u2} β) -> δ) (Relator.LiftFun.{succ u3, succ u4, max (succ u1) (succ u3), max (succ u2) (succ u4)} γ δ (α -> γ) (β -> δ) P (Relator.LiftFun.{succ u1, succ u2, succ u3, succ u4} α β γ δ R P)) (Relator.LiftFun.{succ u3, succ u4, max (succ u1) (succ u3), max (succ u2) (succ u4)} γ δ ((List.{u1} α) -> γ) ((List.{u2} β) -> δ) P (Relator.LiftFun.{succ u1, succ u2, succ u3, succ u4} (List.{u1} α) (List.{u2} β) γ δ (List.Forall₂.{u1, u2} α β R) P)) (List.foldl.{u3, u1} γ α) (List.foldl.{u4, u2} δ β)
-but is expected to have type
- forall {α : Type.{u4}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u1}} {R : α -> β -> Prop} {P : γ -> δ -> Prop}, Relator.LiftFun.{max (succ u4) (succ u3), max (succ u2) (succ u1), max (succ u4) (succ u3), max (succ u2) (succ u1)} (γ -> α -> γ) (δ -> β -> δ) (γ -> (List.{u4} α) -> γ) (δ -> (List.{u2} β) -> δ) (Relator.LiftFun.{succ u3, succ u1, max (succ u4) (succ u3), max (succ u2) (succ u1)} γ δ (α -> γ) (β -> δ) P (Relator.LiftFun.{succ u4, succ u2, succ u3, succ u1} α β γ δ R P)) (Relator.LiftFun.{succ u3, succ u1, max (succ u4) (succ u3), max (succ u2) (succ u1)} γ δ ((List.{u4} α) -> γ) ((List.{u2} β) -> δ) P (Relator.LiftFun.{succ u4, succ u2, succ u3, succ u1} (List.{u4} α) (List.{u2} β) γ δ (List.Forall₂.{u4, u2} α β R) P)) (List.foldl.{u3, u4} γ α) (List.foldl.{u1, u2} δ β)
-Case conversion may be inaccurate. Consider using '#align list.rel_foldl List.rel_foldlₓ'. -/
theorem rel_foldl : ((P ⇒ R ⇒ P) ⇒ P ⇒ Forall₂ R ⇒ P) foldl foldl
| f, g, hfg, _, _, h, _, _, forall₂.nil => h
| f, g, hfg, x, y, hxy, _, _, forall₂.cons hab hs => rel_foldl (@hfg) (hfg hxy hab) hs
#align list.rel_foldl List.rel_foldl
-/- warning: list.rel_foldr -> List.rel_foldr is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} {R : α -> β -> Prop} {P : γ -> δ -> Prop}, Relator.LiftFun.{max (succ u1) (succ u3), max (succ u2) (succ u4), max (succ u1) (succ u3), max (succ u2) (succ u4)} (α -> γ -> γ) (β -> δ -> δ) (γ -> (List.{u1} α) -> γ) (δ -> (List.{u2} β) -> δ) (Relator.LiftFun.{succ u1, succ u2, succ u3, succ u4} α β (γ -> γ) (δ -> δ) R (Relator.LiftFun.{succ u3, succ u4, succ u3, succ u4} γ δ γ δ P P)) (Relator.LiftFun.{succ u3, succ u4, max (succ u1) (succ u3), max (succ u2) (succ u4)} γ δ ((List.{u1} α) -> γ) ((List.{u2} β) -> δ) P (Relator.LiftFun.{succ u1, succ u2, succ u3, succ u4} (List.{u1} α) (List.{u2} β) γ δ (List.Forall₂.{u1, u2} α β R) P)) (List.foldr.{u1, u3} α γ) (List.foldr.{u2, u4} β δ)
-but is expected to have type
- forall {α : Type.{u4}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u1}} {R : α -> β -> Prop} {P : γ -> δ -> Prop}, Relator.LiftFun.{max (succ u4) (succ u3), max (succ u2) (succ u1), max (succ u4) (succ u3), max (succ u2) (succ u1)} (α -> γ -> γ) (β -> δ -> δ) (γ -> (List.{u4} α) -> γ) (δ -> (List.{u2} β) -> δ) (Relator.LiftFun.{succ u4, succ u2, succ u3, succ u1} α β (γ -> γ) (δ -> δ) R (Relator.LiftFun.{succ u3, succ u1, succ u3, succ u1} γ δ γ δ P P)) (Relator.LiftFun.{succ u3, succ u1, max (succ u4) (succ u3), max (succ u2) (succ u1)} γ δ ((List.{u4} α) -> γ) ((List.{u2} β) -> δ) P (Relator.LiftFun.{succ u4, succ u2, succ u3, succ u1} (List.{u4} α) (List.{u2} β) γ δ (List.Forall₂.{u4, u2} α β R) P)) (List.foldr.{u4, u3} α γ) (List.foldr.{u2, u1} β δ)
-Case conversion may be inaccurate. Consider using '#align list.rel_foldr List.rel_foldrₓ'. -/
theorem rel_foldr : ((R ⇒ P ⇒ P) ⇒ P ⇒ Forall₂ R ⇒ P) foldr foldr
| f, g, hfg, _, _, h, _, _, forall₂.nil => h
| f, g, hfg, x, y, hxy, _, _, forall₂.cons hab hs => hfg hab (rel_foldr (@hfg) hxy hs)
#align list.rel_foldr List.rel_foldr
-/- warning: list.rel_filter -> List.rel_filter is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {p : α -> Prop} {q : β -> Prop} [_inst_1 : DecidablePred.{succ u1} α p] [_inst_2 : DecidablePred.{succ u2} β q], (Relator.LiftFun.{succ u1, succ u2, 1, 1} α β Prop Prop R Iff p q) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R) (List.Forall₂.{u1, u2} α β R) (List.filterₓ.{u1} α p (fun (a : α) => _inst_1 a)) (List.filterₓ.{u2} β q (fun (a : β) => _inst_2 a)))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {p : α -> Bool} {q : β -> Bool}, (Relator.LiftFun.{succ u2, succ u1, 1, 1} α β Prop Prop R (fun (x._@.Mathlib.Data.List.Forall2._hyg.7279 : Prop) (x._@.Mathlib.Data.List.Forall2._hyg.7281 : Prop) => Iff x._@.Mathlib.Data.List.Forall2._hyg.7279 x._@.Mathlib.Data.List.Forall2._hyg.7281) (fun (x : α) => Eq.{1} Bool (p x) Bool.true) (fun (x : β) => Eq.{1} Bool (q x) Bool.true)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R) (List.filter.{u2} α p) (List.filter.{u1} β q))
-Case conversion may be inaccurate. Consider using '#align list.rel_filter List.rel_filterₓ'. -/
theorem rel_filter {p : α → Prop} {q : β → Prop} [DecidablePred p] [DecidablePred q]
(hpq : (R ⇒ (· ↔ ·)) p q) : (Forall₂ R ⇒ Forall₂ R) (filter p) (filter q)
| _, _, forall₂.nil => Forall₂.nil
@@ -495,12 +297,6 @@ theorem rel_filter {p : α → Prop} {q : β → Prop} [DecidablePred p] [Decida
simp only [filter_cons_of_neg _ h, filter_cons_of_neg _ this, rel_filter h₂]
#align list.rel_filter List.rel_filter
-/- warning: list.rel_filter_map -> List.rel_filterMap is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u4}} {R : α -> β -> Prop} {P : γ -> δ -> Prop}, Relator.LiftFun.{max (succ u1) (succ u3), max (succ u2) (succ u4), max (succ u1) (succ u3), max (succ u2) (succ u4)} (α -> (Option.{u3} γ)) (β -> (Option.{u4} δ)) ((List.{u1} α) -> (List.{u3} γ)) ((List.{u2} β) -> (List.{u4} δ)) (Relator.LiftFun.{succ u1, succ u2, succ u3, succ u4} α β (Option.{u3} γ) (Option.{u4} δ) R (Option.Rel.{u3, u4} γ δ P)) (Relator.LiftFun.{succ u1, succ u2, succ u3, succ u4} (List.{u1} α) (List.{u2} β) (List.{u3} γ) (List.{u4} δ) (List.Forall₂.{u1, u2} α β R) (List.Forall₂.{u3, u4} γ δ P)) (List.filterMap.{u1, u3} α γ) (List.filterMap.{u2, u4} β δ)
-but is expected to have type
- forall {α : Type.{u4}} {β : Type.{u2}} {γ : Type.{u3}} {δ : Type.{u1}} {R : α -> β -> Prop} {P : γ -> δ -> Prop}, Relator.LiftFun.{max (succ u4) (succ u3), max (succ u2) (succ u1), max (succ u4) (succ u3), max (succ u2) (succ u1)} (α -> (Option.{u3} γ)) (β -> (Option.{u1} δ)) ((List.{u4} α) -> (List.{u3} γ)) ((List.{u2} β) -> (List.{u1} δ)) (Relator.LiftFun.{succ u4, succ u2, succ u3, succ u1} α β (Option.{u3} γ) (Option.{u1} δ) R (Option.Rel.{u3, u1} γ δ P)) (Relator.LiftFun.{succ u4, succ u2, succ u3, succ u1} (List.{u4} α) (List.{u2} β) (List.{u3} γ) (List.{u1} δ) (List.Forall₂.{u4, u2} α β R) (List.Forall₂.{u3, u1} γ δ P)) (List.filterMap.{u4, u3} α γ) (List.filterMap.{u2, u1} β δ)
-Case conversion may be inaccurate. Consider using '#align list.rel_filter_map List.rel_filterMapₓ'. -/
theorem rel_filterMap : ((R ⇒ Option.Rel P) ⇒ Forall₂ R ⇒ Forall₂ P) filterMap filterMap
| f, g, hfg, _, _, forall₂.nil => Forall₂.nil
| f, g, hfg, a :: as, b :: bs, forall₂.cons h₁ h₂ => by
@@ -511,12 +307,6 @@ theorem rel_filterMap : ((R ⇒ Option.Rel P) ⇒ Forall₂ R ⇒ Forall₂ P) f
| _, _, Option.Rel.some h => forall₂.cons h (rel_filter_map (@hfg) h₂)
#align list.rel_filter_map List.rel_filterMap
-/- warning: list.rel_prod -> List.rel_prod is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u1} α] [_inst_2 : Monoid.{u2} β], (R (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)))))) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β α β R R) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)))) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))))) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) α β (List.Forall₂.{u1, u2} α β R) R (List.prod.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))) (List.prod.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u2} α] [_inst_2 : Monoid.{u1} β], (R (OfNat.ofNat.{u2} α 1 (One.toOfNat1.{u2} α (Monoid.toOne.{u2} α _inst_1))) (OfNat.ofNat.{u1} β 1 (One.toOfNat1.{u1} β (Monoid.toOne.{u1} β _inst_2)))) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β α β R R) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8144 : α) (x._@.Mathlib.Data.List.Forall2._hyg.8146 : α) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1))) x._@.Mathlib.Data.List.Forall2._hyg.8144 x._@.Mathlib.Data.List.Forall2._hyg.8146) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8159 : β) (x._@.Mathlib.Data.List.Forall2._hyg.8161 : β) => HMul.hMul.{u1, u1, u1} β β β (instHMul.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2))) x._@.Mathlib.Data.List.Forall2._hyg.8159 x._@.Mathlib.Data.List.Forall2._hyg.8161)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) α β (List.Forall₂.{u2, u1} α β R) R (List.prod.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1)) (Monoid.toOne.{u2} α _inst_1)) (List.prod.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2)) (Monoid.toOne.{u1} β _inst_2)))
-Case conversion may be inaccurate. Consider using '#align list.rel_prod List.rel_prodₓ'. -/
@[to_additive]
theorem rel_prod [Monoid α] [Monoid β] (h : R 1 1) (hf : (R ⇒ R ⇒ R) (· * ·) (· * ·)) :
(Forall₂ R ⇒ R) prod prod :=
@@ -534,12 +324,6 @@ inductive SublistForall₂ (R : α → β → Prop) : List α → List β → Pr
#align list.sublist_forall₂ List.SublistForall₂
-/
-/- warning: list.sublist_forall₂_iff -> List.sublistForall₂_iff is a dubious translation:
-lean 3 declaration is
- forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {l₁ : List.{u1} α} {l₂ : List.{u2} β}, Iff (List.SublistForall₂.{u1, u2} α β R l₁ l₂) (Exists.{succ u2} (List.{u2} β) (fun (l : List.{u2} β) => And (List.Forall₂.{u1, u2} α β R l₁ l) (List.Sublist.{u2} β l l₂)))
-but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {l₁ : List.{u2} α} {l₂ : List.{u1} β}, Iff (List.SublistForall₂.{u2, u1} α β R l₁ l₂) (Exists.{succ u1} (List.{u1} β) (fun (l : List.{u1} β) => And (List.Forall₂.{u2, u1} α β R l₁ l) (List.Sublist.{u1} β l l₂)))
-Case conversion may be inaccurate. Consider using '#align list.sublist_forall₂_iff List.sublistForall₂_iffₓ'. -/
theorem sublistForall₂_iff {l₁ : List α} {l₂ : List β} :
SublistForall₂ R l₁ l₂ ↔ ∃ l, Forall₂ R l₁ l ∧ l <+ l₂ :=
by
mathlib commit https://github.com/leanprover-community/mathlib/commit/917c3c072e487b3cccdbfeff17e75b40e45f66cb
@@ -98,12 +98,8 @@ theorem forall₂_eq_eq_eq : Forall₂ ((· = ·) : α → α → Prop) = (· =
by
funext a b; apply propext
constructor
- · intro h
- induction h
- · rfl
- simp only [*] <;> constructor <;> rfl
- · rintro rfl
- exact forall₂_refl _
+ · intro h; induction h; · rfl; simp only [*] <;> constructor <;> rfl
+ · rintro rfl; exact forall₂_refl _
#align list.forall₂_eq_eq_eq List.forall₂_eq_eq_eq
-/
@@ -322,8 +318,7 @@ theorem forall₂_iff_zip {l₁ l₂} :
by
cases' h with h₁ h₂
induction' l₁ with a l₁ IH generalizing l₂
- · cases length_eq_zero.1 h₁.symm
- constructor
+ · cases length_eq_zero.1 h₁.symm; constructor
· cases' l₂ with b l₂ <;> injection h₁ with h₁
exact forall₂.cons (h₂ <| Or.inl rfl) (IH h₁ fun a b h => h₂ <| Or.inr h)⟩
#align list.forall₂_iff_zip List.forall₂_iff_zip
@@ -435,10 +430,7 @@ but is expected to have type
Case conversion may be inaccurate. Consider using '#align list.forall₂_reverse_iff List.forall₂_reverse_iffₓ'. -/
@[simp]
theorem forall₂_reverse_iff {l₁ l₂} : Forall₂ R (reverse l₁) (reverse l₂) ↔ Forall₂ R l₁ l₂ :=
- Iff.intro
- (fun h => by
- rw [← reverse_reverse l₁, ← reverse_reverse l₂]
- exact rel_reverse h)
+ Iff.intro (fun h => by rw [← reverse_reverse l₁, ← reverse_reverse l₂]; exact rel_reverse h)
fun h => rel_reverse h
#align list.forall₂_reverse_iff List.forall₂_reverse_iff
mathlib commit https://github.com/leanprover-community/mathlib/commit/95a87616d63b3cb49d3fe678d416fbe9c4217bf4
@@ -384,7 +384,7 @@ theorem forall₂_drop_append (l : List α) (l₁ : List β) (l₂ : List β) (h
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, (Relator.BiUnique.{u1, u2} α β R) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β ((List.{u1} α) -> Prop) ((List.{u2} β) -> Prop) R (Relator.LiftFun.{succ u1, succ u2, 1, 1} (List.{u1} α) (List.{u2} β) Prop Prop (List.Forall₂.{u1, u2} α β R) Iff) (Membership.Mem.{u1, u1} α (List.{u1} α) (List.hasMem.{u1} α)) (Membership.Mem.{u2, u2} β (List.{u2} β) (List.hasMem.{u2} β)))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, (Relator.BiUnique.{u2, u1} α β R) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β ((List.{u2} α) -> Prop) ((List.{u1} β) -> Prop) R (Relator.LiftFun.{succ u2, succ u1, 1, 1} (List.{u2} α) (List.{u1} β) Prop Prop (List.Forall₂.{u2, u1} α β R) Iff) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5023 : α) (x._@.Mathlib.Data.List.Forall2._hyg.5025 : List.{u2} α) => Membership.mem.{u2, u2} α (List.{u2} α) (List.instMembershipList.{u2} α) x._@.Mathlib.Data.List.Forall2._hyg.5023 x._@.Mathlib.Data.List.Forall2._hyg.5025) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5038 : β) (x._@.Mathlib.Data.List.Forall2._hyg.5040 : List.{u1} β) => Membership.mem.{u1, u1} β (List.{u1} β) (List.instMembershipList.{u1} β) x._@.Mathlib.Data.List.Forall2._hyg.5038 x._@.Mathlib.Data.List.Forall2._hyg.5040))
+ forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, (Relator.BiUnique.{u2, u1} α β R) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β ((List.{u2} α) -> Prop) ((List.{u1} β) -> Prop) R (Relator.LiftFun.{succ u2, succ u1, 1, 1} (List.{u2} α) (List.{u1} β) Prop Prop (List.Forall₂.{u2, u1} α β R) Iff) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5043 : α) (x._@.Mathlib.Data.List.Forall2._hyg.5045 : List.{u2} α) => Membership.mem.{u2, u2} α (List.{u2} α) (List.instMembershipList.{u2} α) x._@.Mathlib.Data.List.Forall2._hyg.5043 x._@.Mathlib.Data.List.Forall2._hyg.5045) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5058 : β) (x._@.Mathlib.Data.List.Forall2._hyg.5060 : List.{u1} β) => Membership.mem.{u1, u1} β (List.{u1} β) (List.instMembershipList.{u1} β) x._@.Mathlib.Data.List.Forall2._hyg.5058 x._@.Mathlib.Data.List.Forall2._hyg.5060))
Case conversion may be inaccurate. Consider using '#align list.rel_mem List.rel_memₓ'. -/
theorem rel_mem (hr : BiUnique R) : (R ⇒ Forall₂ R ⇒ Iff) (· ∈ ·) (· ∈ ·)
| a, b, h, [], [], forall₂.nil => by simp only [not_mem_nil]
@@ -406,7 +406,7 @@ theorem rel_map : ((R ⇒ P) ⇒ Forall₂ R ⇒ Forall₂ P) map map
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) ((List.{u1} α) -> (List.{u1} α)) ((List.{u2} β) -> (List.{u2} β)) (List.Forall₂.{u1, u2} α β R) (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R) (List.Forall₂.{u1, u2} α β R)) (Append.append.{u1} (List.{u1} α) (List.hasAppend.{u1} α)) (Append.append.{u2} (List.{u2} β) (List.hasAppend.{u2} β))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) ((List.{u2} α) -> (List.{u2} α)) ((List.{u1} β) -> (List.{u1} β)) (List.Forall₂.{u2, u1} α β R) (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R)) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5724 : List.{u2} α) (x._@.Mathlib.Data.List.Forall2._hyg.5726 : List.{u2} α) => HAppend.hAppend.{u2, u2, u2} (List.{u2} α) (List.{u2} α) (List.{u2} α) (instHAppend.{u2} (List.{u2} α) (List.instAppendList.{u2} α)) x._@.Mathlib.Data.List.Forall2._hyg.5724 x._@.Mathlib.Data.List.Forall2._hyg.5726) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5739 : List.{u1} β) (x._@.Mathlib.Data.List.Forall2._hyg.5741 : List.{u1} β) => HAppend.hAppend.{u1, u1, u1} (List.{u1} β) (List.{u1} β) (List.{u1} β) (instHAppend.{u1} (List.{u1} β) (List.instAppendList.{u1} β)) x._@.Mathlib.Data.List.Forall2._hyg.5739 x._@.Mathlib.Data.List.Forall2._hyg.5741)
+ forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) ((List.{u2} α) -> (List.{u2} α)) ((List.{u1} β) -> (List.{u1} β)) (List.Forall₂.{u2, u1} α β R) (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R)) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5746 : List.{u2} α) (x._@.Mathlib.Data.List.Forall2._hyg.5748 : List.{u2} α) => HAppend.hAppend.{u2, u2, u2} (List.{u2} α) (List.{u2} α) (List.{u2} α) (instHAppend.{u2} (List.{u2} α) (List.instAppendList.{u2} α)) x._@.Mathlib.Data.List.Forall2._hyg.5746 x._@.Mathlib.Data.List.Forall2._hyg.5748) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5761 : List.{u1} β) (x._@.Mathlib.Data.List.Forall2._hyg.5763 : List.{u1} β) => HAppend.hAppend.{u1, u1, u1} (List.{u1} β) (List.{u1} β) (List.{u1} β) (instHAppend.{u1} (List.{u1} β) (List.instAppendList.{u1} β)) x._@.Mathlib.Data.List.Forall2._hyg.5761 x._@.Mathlib.Data.List.Forall2._hyg.5763)
Case conversion may be inaccurate. Consider using '#align list.rel_append List.rel_appendₓ'. -/
theorem rel_append : (Forall₂ R ⇒ Forall₂ R ⇒ Forall₂ R) append append
| [], [], h, l₁, l₂, hl => hl
@@ -489,7 +489,7 @@ theorem rel_foldr : ((R ⇒ P ⇒ P) ⇒ P ⇒ Forall₂ R ⇒ P) foldr foldr
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {p : α -> Prop} {q : β -> Prop} [_inst_1 : DecidablePred.{succ u1} α p] [_inst_2 : DecidablePred.{succ u2} β q], (Relator.LiftFun.{succ u1, succ u2, 1, 1} α β Prop Prop R Iff p q) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R) (List.Forall₂.{u1, u2} α β R) (List.filterₓ.{u1} α p (fun (a : α) => _inst_1 a)) (List.filterₓ.{u2} β q (fun (a : β) => _inst_2 a)))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {p : α -> Bool} {q : β -> Bool}, (Relator.LiftFun.{succ u2, succ u1, 1, 1} α β Prop Prop R (fun (x._@.Mathlib.Data.List.Forall2._hyg.7252 : Prop) (x._@.Mathlib.Data.List.Forall2._hyg.7254 : Prop) => Iff x._@.Mathlib.Data.List.Forall2._hyg.7252 x._@.Mathlib.Data.List.Forall2._hyg.7254) (fun (x : α) => Eq.{1} Bool (p x) Bool.true) (fun (x : β) => Eq.{1} Bool (q x) Bool.true)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R) (List.filter.{u2} α p) (List.filter.{u1} β q))
+ forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {p : α -> Bool} {q : β -> Bool}, (Relator.LiftFun.{succ u2, succ u1, 1, 1} α β Prop Prop R (fun (x._@.Mathlib.Data.List.Forall2._hyg.7279 : Prop) (x._@.Mathlib.Data.List.Forall2._hyg.7281 : Prop) => Iff x._@.Mathlib.Data.List.Forall2._hyg.7279 x._@.Mathlib.Data.List.Forall2._hyg.7281) (fun (x : α) => Eq.{1} Bool (p x) Bool.true) (fun (x : β) => Eq.{1} Bool (q x) Bool.true)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R) (List.filter.{u2} α p) (List.filter.{u1} β q))
Case conversion may be inaccurate. Consider using '#align list.rel_filter List.rel_filterₓ'. -/
theorem rel_filter {p : α → Prop} {q : β → Prop} [DecidablePred p] [DecidablePred q]
(hpq : (R ⇒ (· ↔ ·)) p q) : (Forall₂ R ⇒ Forall₂ R) (filter p) (filter q)
@@ -523,7 +523,7 @@ theorem rel_filterMap : ((R ⇒ Option.Rel P) ⇒ Forall₂ R ⇒ Forall₂ P) f
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u1} α] [_inst_2 : Monoid.{u2} β], (R (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)))))) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β α β R R) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)))) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))))) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) α β (List.Forall₂.{u1, u2} α β R) R (List.prod.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))) (List.prod.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u2} α] [_inst_2 : Monoid.{u1} β], (R (OfNat.ofNat.{u2} α 1 (One.toOfNat1.{u2} α (Monoid.toOne.{u2} α _inst_1))) (OfNat.ofNat.{u1} β 1 (One.toOfNat1.{u1} β (Monoid.toOne.{u1} β _inst_2)))) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β α β R R) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8113 : α) (x._@.Mathlib.Data.List.Forall2._hyg.8115 : α) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1))) x._@.Mathlib.Data.List.Forall2._hyg.8113 x._@.Mathlib.Data.List.Forall2._hyg.8115) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8128 : β) (x._@.Mathlib.Data.List.Forall2._hyg.8130 : β) => HMul.hMul.{u1, u1, u1} β β β (instHMul.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2))) x._@.Mathlib.Data.List.Forall2._hyg.8128 x._@.Mathlib.Data.List.Forall2._hyg.8130)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) α β (List.Forall₂.{u2, u1} α β R) R (List.prod.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1)) (Monoid.toOne.{u2} α _inst_1)) (List.prod.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2)) (Monoid.toOne.{u1} β _inst_2)))
+ forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u2} α] [_inst_2 : Monoid.{u1} β], (R (OfNat.ofNat.{u2} α 1 (One.toOfNat1.{u2} α (Monoid.toOne.{u2} α _inst_1))) (OfNat.ofNat.{u1} β 1 (One.toOfNat1.{u1} β (Monoid.toOne.{u1} β _inst_2)))) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β α β R R) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8144 : α) (x._@.Mathlib.Data.List.Forall2._hyg.8146 : α) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1))) x._@.Mathlib.Data.List.Forall2._hyg.8144 x._@.Mathlib.Data.List.Forall2._hyg.8146) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8159 : β) (x._@.Mathlib.Data.List.Forall2._hyg.8161 : β) => HMul.hMul.{u1, u1, u1} β β β (instHMul.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2))) x._@.Mathlib.Data.List.Forall2._hyg.8159 x._@.Mathlib.Data.List.Forall2._hyg.8161)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) α β (List.Forall₂.{u2, u1} α β R) R (List.prod.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1)) (Monoid.toOne.{u2} α _inst_1)) (List.prod.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2)) (Monoid.toOne.{u1} β _inst_2)))
Case conversion may be inaccurate. Consider using '#align list.rel_prod List.rel_prodₓ'. -/
@[to_additive]
theorem rel_prod [Monoid α] [Monoid β] (h : R 1 1) (hf : (R ⇒ R ⇒ R) (· * ·) (· * ·)) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/ce86f4e05e9a9b8da5e316b22c76ce76440c56a1
@@ -384,7 +384,7 @@ theorem forall₂_drop_append (l : List α) (l₁ : List β) (l₂ : List β) (h
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, (Relator.BiUnique.{u1, u2} α β R) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β ((List.{u1} α) -> Prop) ((List.{u2} β) -> Prop) R (Relator.LiftFun.{succ u1, succ u2, 1, 1} (List.{u1} α) (List.{u2} β) Prop Prop (List.Forall₂.{u1, u2} α β R) Iff) (Membership.Mem.{u1, u1} α (List.{u1} α) (List.hasMem.{u1} α)) (Membership.Mem.{u2, u2} β (List.{u2} β) (List.hasMem.{u2} β)))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, (Relator.BiUnique.{u2, u1} α β R) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β ((List.{u2} α) -> Prop) ((List.{u1} β) -> Prop) R (Relator.LiftFun.{succ u2, succ u1, 1, 1} (List.{u2} α) (List.{u1} β) Prop Prop (List.Forall₂.{u2, u1} α β R) Iff) (fun (x._@.Mathlib.Data.List.Forall2._hyg.4975 : α) (x._@.Mathlib.Data.List.Forall2._hyg.4977 : List.{u2} α) => Membership.mem.{u2, u2} α (List.{u2} α) (List.instMembershipList.{u2} α) x._@.Mathlib.Data.List.Forall2._hyg.4975 x._@.Mathlib.Data.List.Forall2._hyg.4977) (fun (x._@.Mathlib.Data.List.Forall2._hyg.4990 : β) (x._@.Mathlib.Data.List.Forall2._hyg.4992 : List.{u1} β) => Membership.mem.{u1, u1} β (List.{u1} β) (List.instMembershipList.{u1} β) x._@.Mathlib.Data.List.Forall2._hyg.4990 x._@.Mathlib.Data.List.Forall2._hyg.4992))
+ forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, (Relator.BiUnique.{u2, u1} α β R) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β ((List.{u2} α) -> Prop) ((List.{u1} β) -> Prop) R (Relator.LiftFun.{succ u2, succ u1, 1, 1} (List.{u2} α) (List.{u1} β) Prop Prop (List.Forall₂.{u2, u1} α β R) Iff) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5023 : α) (x._@.Mathlib.Data.List.Forall2._hyg.5025 : List.{u2} α) => Membership.mem.{u2, u2} α (List.{u2} α) (List.instMembershipList.{u2} α) x._@.Mathlib.Data.List.Forall2._hyg.5023 x._@.Mathlib.Data.List.Forall2._hyg.5025) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5038 : β) (x._@.Mathlib.Data.List.Forall2._hyg.5040 : List.{u1} β) => Membership.mem.{u1, u1} β (List.{u1} β) (List.instMembershipList.{u1} β) x._@.Mathlib.Data.List.Forall2._hyg.5038 x._@.Mathlib.Data.List.Forall2._hyg.5040))
Case conversion may be inaccurate. Consider using '#align list.rel_mem List.rel_memₓ'. -/
theorem rel_mem (hr : BiUnique R) : (R ⇒ Forall₂ R ⇒ Iff) (· ∈ ·) (· ∈ ·)
| a, b, h, [], [], forall₂.nil => by simp only [not_mem_nil]
@@ -406,7 +406,7 @@ theorem rel_map : ((R ⇒ P) ⇒ Forall₂ R ⇒ Forall₂ P) map map
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) ((List.{u1} α) -> (List.{u1} α)) ((List.{u2} β) -> (List.{u2} β)) (List.Forall₂.{u1, u2} α β R) (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R) (List.Forall₂.{u1, u2} α β R)) (Append.append.{u1} (List.{u1} α) (List.hasAppend.{u1} α)) (Append.append.{u2} (List.{u2} β) (List.hasAppend.{u2} β))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) ((List.{u2} α) -> (List.{u2} α)) ((List.{u1} β) -> (List.{u1} β)) (List.Forall₂.{u2, u1} α β R) (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R)) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5676 : List.{u2} α) (x._@.Mathlib.Data.List.Forall2._hyg.5678 : List.{u2} α) => HAppend.hAppend.{u2, u2, u2} (List.{u2} α) (List.{u2} α) (List.{u2} α) (instHAppend.{u2} (List.{u2} α) (List.instAppendList.{u2} α)) x._@.Mathlib.Data.List.Forall2._hyg.5676 x._@.Mathlib.Data.List.Forall2._hyg.5678) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5691 : List.{u1} β) (x._@.Mathlib.Data.List.Forall2._hyg.5693 : List.{u1} β) => HAppend.hAppend.{u1, u1, u1} (List.{u1} β) (List.{u1} β) (List.{u1} β) (instHAppend.{u1} (List.{u1} β) (List.instAppendList.{u1} β)) x._@.Mathlib.Data.List.Forall2._hyg.5691 x._@.Mathlib.Data.List.Forall2._hyg.5693)
+ forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop}, Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) ((List.{u2} α) -> (List.{u2} α)) ((List.{u1} β) -> (List.{u1} β)) (List.Forall₂.{u2, u1} α β R) (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R)) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5724 : List.{u2} α) (x._@.Mathlib.Data.List.Forall2._hyg.5726 : List.{u2} α) => HAppend.hAppend.{u2, u2, u2} (List.{u2} α) (List.{u2} α) (List.{u2} α) (instHAppend.{u2} (List.{u2} α) (List.instAppendList.{u2} α)) x._@.Mathlib.Data.List.Forall2._hyg.5724 x._@.Mathlib.Data.List.Forall2._hyg.5726) (fun (x._@.Mathlib.Data.List.Forall2._hyg.5739 : List.{u1} β) (x._@.Mathlib.Data.List.Forall2._hyg.5741 : List.{u1} β) => HAppend.hAppend.{u1, u1, u1} (List.{u1} β) (List.{u1} β) (List.{u1} β) (instHAppend.{u1} (List.{u1} β) (List.instAppendList.{u1} β)) x._@.Mathlib.Data.List.Forall2._hyg.5739 x._@.Mathlib.Data.List.Forall2._hyg.5741)
Case conversion may be inaccurate. Consider using '#align list.rel_append List.rel_appendₓ'. -/
theorem rel_append : (Forall₂ R ⇒ Forall₂ R ⇒ Forall₂ R) append append
| [], [], h, l₁, l₂, hl => hl
@@ -489,7 +489,7 @@ theorem rel_foldr : ((R ⇒ P ⇒ P) ⇒ P ⇒ Forall₂ R ⇒ P) foldr foldr
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} {p : α -> Prop} {q : β -> Prop} [_inst_1 : DecidablePred.{succ u1} α p] [_inst_2 : DecidablePred.{succ u2} β q], (Relator.LiftFun.{succ u1, succ u2, 1, 1} α β Prop Prop R Iff p q) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) (List.{u1} α) (List.{u2} β) (List.Forall₂.{u1, u2} α β R) (List.Forall₂.{u1, u2} α β R) (List.filterₓ.{u1} α p (fun (a : α) => _inst_1 a)) (List.filterₓ.{u2} β q (fun (a : β) => _inst_2 a)))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {p : α -> Bool} {q : β -> Bool}, (Relator.LiftFun.{succ u2, succ u1, 1, 1} α β Prop Prop R (fun (x._@.Mathlib.Data.List.Forall2._hyg.7204 : Prop) (x._@.Mathlib.Data.List.Forall2._hyg.7206 : Prop) => Iff x._@.Mathlib.Data.List.Forall2._hyg.7204 x._@.Mathlib.Data.List.Forall2._hyg.7206) (fun (x : α) => Eq.{1} Bool (p x) Bool.true) (fun (x : β) => Eq.{1} Bool (q x) Bool.true)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R) (List.filter.{u2} α p) (List.filter.{u1} β q))
+ forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} {p : α -> Bool} {q : β -> Bool}, (Relator.LiftFun.{succ u2, succ u1, 1, 1} α β Prop Prop R (fun (x._@.Mathlib.Data.List.Forall2._hyg.7252 : Prop) (x._@.Mathlib.Data.List.Forall2._hyg.7254 : Prop) => Iff x._@.Mathlib.Data.List.Forall2._hyg.7252 x._@.Mathlib.Data.List.Forall2._hyg.7254) (fun (x : α) => Eq.{1} Bool (p x) Bool.true) (fun (x : β) => Eq.{1} Bool (q x) Bool.true)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) (List.{u2} α) (List.{u1} β) (List.Forall₂.{u2, u1} α β R) (List.Forall₂.{u2, u1} α β R) (List.filter.{u2} α p) (List.filter.{u1} β q))
Case conversion may be inaccurate. Consider using '#align list.rel_filter List.rel_filterₓ'. -/
theorem rel_filter {p : α → Prop} {q : β → Prop} [DecidablePred p] [DecidablePred q]
(hpq : (R ⇒ (· ↔ ·)) p q) : (Forall₂ R ⇒ Forall₂ R) (filter p) (filter q)
@@ -523,7 +523,7 @@ theorem rel_filterMap : ((R ⇒ Option.Rel P) ⇒ Forall₂ R ⇒ Forall₂ P) f
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u1} α] [_inst_2 : Monoid.{u2} β], (R (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)))))) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β α β R R) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)))) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))))) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) α β (List.Forall₂.{u1, u2} α β R) R (List.prod.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))) (List.prod.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u2} α] [_inst_2 : Monoid.{u1} β], (R (OfNat.ofNat.{u2} α 1 (One.toOfNat1.{u2} α (Monoid.toOne.{u2} α _inst_1))) (OfNat.ofNat.{u1} β 1 (One.toOfNat1.{u1} β (Monoid.toOne.{u1} β _inst_2)))) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β α β R R) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8065 : α) (x._@.Mathlib.Data.List.Forall2._hyg.8067 : α) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1))) x._@.Mathlib.Data.List.Forall2._hyg.8065 x._@.Mathlib.Data.List.Forall2._hyg.8067) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8080 : β) (x._@.Mathlib.Data.List.Forall2._hyg.8082 : β) => HMul.hMul.{u1, u1, u1} β β β (instHMul.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2))) x._@.Mathlib.Data.List.Forall2._hyg.8080 x._@.Mathlib.Data.List.Forall2._hyg.8082)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) α β (List.Forall₂.{u2, u1} α β R) R (List.prod.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1)) (Monoid.toOne.{u2} α _inst_1)) (List.prod.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2)) (Monoid.toOne.{u1} β _inst_2)))
+ forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u2} α] [_inst_2 : Monoid.{u1} β], (R (OfNat.ofNat.{u2} α 1 (One.toOfNat1.{u2} α (Monoid.toOne.{u2} α _inst_1))) (OfNat.ofNat.{u1} β 1 (One.toOfNat1.{u1} β (Monoid.toOne.{u1} β _inst_2)))) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β α β R R) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8113 : α) (x._@.Mathlib.Data.List.Forall2._hyg.8115 : α) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1))) x._@.Mathlib.Data.List.Forall2._hyg.8113 x._@.Mathlib.Data.List.Forall2._hyg.8115) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8128 : β) (x._@.Mathlib.Data.List.Forall2._hyg.8130 : β) => HMul.hMul.{u1, u1, u1} β β β (instHMul.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2))) x._@.Mathlib.Data.List.Forall2._hyg.8128 x._@.Mathlib.Data.List.Forall2._hyg.8130)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) α β (List.Forall₂.{u2, u1} α β R) R (List.prod.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1)) (Monoid.toOne.{u2} α _inst_1)) (List.prod.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2)) (Monoid.toOne.{u1} β _inst_2)))
Case conversion may be inaccurate. Consider using '#align list.rel_prod List.rel_prodₓ'. -/
@[to_additive]
theorem rel_prod [Monoid α] [Monoid β] (h : R 1 1) (hf : (R ⇒ R ⇒ R) (· * ·) (· * ·)) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/38f16f960f5006c6c0c2bac7b0aba5273188f4e5
@@ -523,7 +523,7 @@ theorem rel_filterMap : ((R ⇒ Option.Rel P) ⇒ Forall₂ R ⇒ Forall₂ P) f
lean 3 declaration is
forall {α : Type.{u1}} {β : Type.{u2}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u1} α] [_inst_2 : Monoid.{u2} β], (R (OfNat.ofNat.{u1} α 1 (OfNat.mk.{u1} α 1 (One.one.{u1} α (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))))) (OfNat.ofNat.{u2} β 1 (OfNat.mk.{u2} β 1 (One.one.{u2} β (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)))))) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} α β α β R R) (HMul.hMul.{u1, u1, u1} α α α (instHMul.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)))) (HMul.hMul.{u2, u2, u2} β β β (instHMul.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))))) -> (Relator.LiftFun.{succ u1, succ u2, succ u1, succ u2} (List.{u1} α) (List.{u2} β) α β (List.Forall₂.{u1, u2} α β R) R (List.prod.{u1} α (MulOneClass.toHasMul.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1)) (MulOneClass.toHasOne.{u1} α (Monoid.toMulOneClass.{u1} α _inst_1))) (List.prod.{u2} β (MulOneClass.toHasMul.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2)) (MulOneClass.toHasOne.{u2} β (Monoid.toMulOneClass.{u2} β _inst_2))))
but is expected to have type
- forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u2} α] [_inst_2 : Monoid.{u1} β], (R (OfNat.ofNat.{u2} α 1 (One.toOfNat1.{u2} α (Monoid.toOne.{u2} α _inst_1))) (OfNat.ofNat.{u1} β 1 (One.toOfNat1.{u1} β (Monoid.toOne.{u1} β _inst_2)))) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β α β R R) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8067 : α) (x._@.Mathlib.Data.List.Forall2._hyg.8069 : α) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1))) x._@.Mathlib.Data.List.Forall2._hyg.8067 x._@.Mathlib.Data.List.Forall2._hyg.8069) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8082 : β) (x._@.Mathlib.Data.List.Forall2._hyg.8084 : β) => HMul.hMul.{u1, u1, u1} β β β (instHMul.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2))) x._@.Mathlib.Data.List.Forall2._hyg.8082 x._@.Mathlib.Data.List.Forall2._hyg.8084)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) α β (List.Forall₂.{u2, u1} α β R) R (List.prod.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1)) (Monoid.toOne.{u2} α _inst_1)) (List.prod.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2)) (Monoid.toOne.{u1} β _inst_2)))
+ forall {α : Type.{u2}} {β : Type.{u1}} {R : α -> β -> Prop} [_inst_1 : Monoid.{u2} α] [_inst_2 : Monoid.{u1} β], (R (OfNat.ofNat.{u2} α 1 (One.toOfNat1.{u2} α (Monoid.toOne.{u2} α _inst_1))) (OfNat.ofNat.{u1} β 1 (One.toOfNat1.{u1} β (Monoid.toOne.{u1} β _inst_2)))) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β (α -> α) (β -> β) R (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} α β α β R R) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8065 : α) (x._@.Mathlib.Data.List.Forall2._hyg.8067 : α) => HMul.hMul.{u2, u2, u2} α α α (instHMul.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1))) x._@.Mathlib.Data.List.Forall2._hyg.8065 x._@.Mathlib.Data.List.Forall2._hyg.8067) (fun (x._@.Mathlib.Data.List.Forall2._hyg.8080 : β) (x._@.Mathlib.Data.List.Forall2._hyg.8082 : β) => HMul.hMul.{u1, u1, u1} β β β (instHMul.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2))) x._@.Mathlib.Data.List.Forall2._hyg.8080 x._@.Mathlib.Data.List.Forall2._hyg.8082)) -> (Relator.LiftFun.{succ u2, succ u1, succ u2, succ u1} (List.{u2} α) (List.{u1} β) α β (List.Forall₂.{u2, u1} α β R) R (List.prod.{u2} α (MulOneClass.toMul.{u2} α (Monoid.toMulOneClass.{u2} α _inst_1)) (Monoid.toOne.{u2} α _inst_1)) (List.prod.{u1} β (MulOneClass.toMul.{u1} β (Monoid.toMulOneClass.{u1} β _inst_2)) (Monoid.toOne.{u1} β _inst_2)))
Case conversion may be inaccurate. Consider using '#align list.rel_prod List.rel_prodₓ'. -/
@[to_additive]
theorem rel_prod [Monoid α] [Monoid β] (h : R 1 1) (hf : (R ⇒ R ⇒ R) (· * ·) (· * ·)) :
mathlib commit https://github.com/leanprover-community/mathlib/commit/bd9851ca476957ea4549eb19b40e7b5ade9428cc
Sublist
(#12326)
tail_sublist
to Basic
sublist_of_cons_sublist_cons
to Sublist.of_cons_cos
cons_sublist_cons_iff
to cons_sublist_cons
Sublist.tail
, drop_sublist_drop_left
, Sublist.drop
@@ -3,7 +3,7 @@ Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Johannes Hölzl
-/
-import Mathlib.Data.List.Infix
+import Mathlib.Data.List.Basic
#align_import data.list.forall2 from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec"
@@ -29,11 +29,6 @@ mk_iff_of_inductive_prop List.Forall₂ List.forall₂_iff
#align list.forall₂.nil List.Forall₂.nil
#align list.forall₂.cons List.Forall₂.cons
-
-@[simp]
-theorem forall₂_cons {a b l₁ l₂} : Forall₂ R (a :: l₁) (b :: l₂) ↔ R a b ∧ Forall₂ R l₁ l₂ :=
- ⟨fun h => by cases' h with h₁ h₂; constructor <;> assumption, fun ⟨h₁, h₂⟩ =>
- Forall₂.cons h₁ h₂⟩
#align list.forall₂_cons List.forall₂_cons
theorem Forall₂.imp (H : ∀ a b, R a b → S a b) {l₁ l₂} (h : Forall₂ R l₁ l₂) : Forall₂ S l₁ l₂ := by
refine
s (#10762)
I replaced a few "terminal" refine/refine'
s with exact
.
The strategy was very simple-minded: essentially any refine
whose following line had smaller indentation got replaced by exact
and then I cleaned up the mess.
This PR certainly leaves some further terminal refine
s, but maybe the current change is beneficial.
@@ -326,7 +326,7 @@ theorem sublistForall₂_iff {l₁ : List α} {l₂ : List β} :
· induction' h with _ a b l1 l2 rab _ ih b l1 l2 _ ih
· exact ⟨nil, Forall₂.nil, nil_sublist _⟩
· obtain ⟨l, hl1, hl2⟩ := ih
- refine' ⟨b :: l, Forall₂.cons rab hl1, hl2.cons_cons b⟩
+ exact ⟨b :: l, Forall₂.cons rab hl1, hl2.cons_cons b⟩
· obtain ⟨l, hl1, hl2⟩ := ih
exact ⟨l, hl1, hl2.trans (Sublist.cons _ (Sublist.refl _))⟩
· obtain ⟨l, hl1, hl2⟩ := h
@@ -202,7 +202,7 @@ theorem forall₂_iff_zip {l₁ l₂} :
· simp at h₁
· simp only [length_cons, succ.injEq] at h₁
exact Forall₂.cons (h₂ <| by simp [zip])
- (IH h₁ <| fun h => h₂ <| by
+ (IH h₁ fun h => h₂ <| by
simp only [zip, zipWith, find?, mem_cons, Prod.mk.injEq]; right
simpa [zip] using h)⟩
#align list.forall₂_iff_zip List.forall₂_iff_zip
Currently Data.List.Defs
depends on Algebra.Group.Defs
, rather unnecessarily.
(This then prevents importing Data.List.Defs
into Tactic.Common
, without breaking various assert_not_exists
statements.)
Co-authored-by: Scott Morrison <scott.morrison@gmail.com> Co-authored-by: thorimur <68410468+thorimur@users.noreply.github.com>
@@ -309,13 +309,6 @@ theorem rel_filterMap : ((R ⇒ Option.Rel P) ⇒ Forall₂ R ⇒ Forall₂ P) f
| _, _, Option.Rel.some h => Forall₂.cons h (rel_filterMap (@hfg) h₂)
#align list.rel_filter_map List.rel_filterMap
-@[to_additive]
-theorem rel_prod [Monoid α] [Monoid β] (h : R 1 1) (hf : (R ⇒ R ⇒ R) (· * ·) (· * ·)) :
- (Forall₂ R ⇒ R) prod prod :=
- rel_foldl hf h
-#align list.rel_prod List.rel_prod
-#align list.rel_sum List.rel_sum
-
/-- Given a relation `R`, `sublist_forall₂ r l₁ l₂` indicates that there is a sublist of `l₂` such
that `forall₂ r l₁ l₂`. -/
inductive SublistForall₂ (R : α → β → Prop) : List α → List β → Prop
Type _
and Sort _
(#6499)
We remove all possible occurences of Type _
and Sort _
in favor of Type*
and Sort*
.
This has nice performance benefits.
@@ -20,7 +20,7 @@ open Nat Function
namespace List
-variable {α β γ δ : Type _} {R S : α → β → Prop} {P : γ → δ → Prop} {Rₐ : α → α → Prop}
+variable {α β γ δ : Type*} {R S : α → β → Prop} {P : γ → δ → Prop} {Rₐ : α → α → Prop}
open Relator
@@ -245,7 +245,7 @@ theorem rel_map : ((R ⇒ P) ⇒ Forall₂ R ⇒ Forall₂ P) map map
| _, _, h, _ :: _, _ :: _, Forall₂.cons h₁ h₂ => Forall₂.cons (h h₁) (rel_map (@h) h₂)
#align list.rel_map List.rel_map
-theorem rel_append : (Forall₂ R ⇒ Forall₂ R ⇒ Forall₂ R) (. ++ .) (. ++ .)
+theorem rel_append : (Forall₂ R ⇒ Forall₂ R ⇒ Forall₂ R) (· ++ ·) (· ++ ·)
| [], [], _, _, _, hl => hl
| _, _, Forall₂.cons h₁ h₂, _, _, hl => Forall₂.cons h₁ (rel_append h₂ hl)
#align list.rel_append List.rel_append
@@ -2,14 +2,11 @@
Copyright (c) 2018 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro, Johannes Hölzl
-
-! This file was ported from Lean 3 source module data.list.forall2
-! leanprover-community/mathlib commit 5a3e819569b0f12cbec59d740a2613018e7b8eec
-! Please do not edit these lines, except to modify the commit id
-! if you have ported upstream changes.
-/
import Mathlib.Data.List.Infix
+#align_import data.list.forall2 from "leanprover-community/mathlib"@"5a3e819569b0f12cbec59d740a2613018e7b8eec"
+
/-!
# Double universal quantification on a list
This PR is the result of running
find . -type f -name "*.lean" -exec sed -i -E 's/^( +)\. /\1· /' {} \;
find . -type f -name "*.lean" -exec sed -i -E 'N;s/^( +·)\n +(.*)$/\1 \2/;P;D' {} \;
which firstly replaces .
focusing dots with ·
and secondly removes isolated instances of such dots, unifying them with the following line. A new rule is placed in the style linter to verify this.
@@ -202,8 +202,8 @@ theorem forall₂_iff_zip {l₁ l₂} :
· cases length_eq_zero.1 h₁.symm
constructor
· cases' l₂ with b l₂
- . simp at h₁
- . simp only [length_cons, succ.injEq] at h₁
+ · simp at h₁
+ · simp only [length_cons, succ.injEq] at h₁
exact Forall₂.cons (h₂ <| by simp [zip])
(IH h₁ <| fun h => h₂ <| by
simp only [zip, zipWith, find?, mem_cons, Prod.mk.injEq]; right
by
s! (#3825)
This PR puts, with one exception, every single remaining by
that lies all by itself on its own line to the previous line, thus matching the current behaviour of start-port.sh
. The exception is when the by
begins the second or later argument to a tuple or anonymous constructor; see https://github.com/leanprover-community/mathlib4/pull/3825#discussion_r1186702599.
Essentially this is s/\n *by$/ by/g
, but with manual editing to satisfy the linter's max-100-char-line requirement. The Python style linter is also modified to catch these "isolated by
s".
@@ -196,8 +196,7 @@ theorem forall₂_zip : ∀ {l₁ l₂}, Forall₂ R l₁ l₂ → ∀ {a b}, (a
theorem forall₂_iff_zip {l₁ l₂} :
Forall₂ R l₁ l₂ ↔ length l₁ = length l₂ ∧ ∀ {a b}, (a, b) ∈ zip l₁ l₂ → R a b :=
- ⟨fun h => ⟨Forall₂.length_eq h, @forall₂_zip _ _ _ _ _ h⟩, fun h =>
- by
+ ⟨fun h => ⟨Forall₂.length_eq h, @forall₂_zip _ _ _ _ _ h⟩, fun h => by
cases' h with h₁ h₂
induction' l₁ with a l₁ IH generalizing l₂
· cases length_eq_zero.1 h₁.symm
@@ -256,8 +255,7 @@ theorem rel_append : (Forall₂ R ⇒ Forall₂ R ⇒ Forall₂ R) (. ++ .) (. +
theorem rel_reverse : (Forall₂ R ⇒ Forall₂ R) reverse reverse
| [], [], Forall₂.nil => Forall₂.nil
- | _, _, Forall₂.cons h₁ h₂ =>
- by
+ | _, _, Forall₂.cons h₁ h₂ => by
simp only [reverse_cons]
exact rel_append (rel_reverse h₂) (Forall₂.cons h₁ Forall₂.nil)
#align list.rel_reverse List.rel_reverse
This PR fixes two things:
align
statements for definitions and theorems and instances that are separated by two newlines from the relevant declaration (s/\n\n#align/\n#align
). This is often seen in the mathport output after ending calc
blocks.#align
statements. (This was needed for a script I wrote for #3630.)@@ -118,7 +118,6 @@ theorem forall₂_and_left {p : α → Prop} :
simp only [forall₂_and_left l, forall₂_cons_left_iff, forall_mem_cons, and_assoc,
@and_comm _ (p a), @and_left_comm _ (p a), exists_and_left]
simp only [and_comm, and_assoc, and_left_comm, ← exists_and_right]
-
#align list.forall₂_and_left List.forall₂_and_left
@[simp]
@@ -297,7 +297,7 @@ theorem rel_filter {p : α → Bool} {q : β → Bool}
| _, _, Forall₂.nil => Forall₂.nil
| a :: as, b :: bs, Forall₂.cons h₁ h₂ => by
dsimp [LiftFun] at hpq
- by_cases p a
+ by_cases h : p a
· have : q b := by rwa [← hpq h₁]
simp only [filter_cons_of_pos _ h, filter_cons_of_pos _ this, forall₂_cons, h₁, true_and_iff,
rel_filter hpq h₂]
This PR is the result of a slight variant on the following "algorithm"
_
and make all uppercase letters into lowercase_
and make all uppercase letters into lowercase(original_lean3_name, OriginalLean4Name)
#align
statement just before the next empty line#align
statement to have been inserted too early)@@ -28,6 +28,7 @@ variable {α β γ δ : Type _} {R S : α → β → Prop} {P : γ → δ → Pr
open Relator
mk_iff_of_inductive_prop List.Forall₂ List.forall₂_iff
+#align list.forall₂_iff List.forall₂_iff
#align list.forall₂.nil List.Forall₂.nil
#align list.forall₂.cons List.Forall₂.cons
IsTrans α r → Trans r r r
and Trans r r r → IsTrans α r
(#1522)
Now Trans.trans
conflicts with _root_.trans
.
@@ -368,7 +368,7 @@ instance SublistForall₂.is_trans [IsTrans α Rₐ] : IsTrans (List α) (Sublis
exact SublistForall₂.nil
· cases' h1 with _ _ _ _ _ hab tab _ _ _ atb
· exact SublistForall₂.nil
- · exact SublistForall₂.cons (trans hab hbc) (ih _ _ tab tbc)
+ · exact SublistForall₂.cons (_root_.trans hab hbc) (ih _ _ tab tbc)
· exact SublistForall₂.cons_right (ih _ _ atb tbc)
· exact SublistForall₂.cons_right (ih _ _ h1 btc)⟩
#align list.sublist_forall₂.is_trans List.SublistForall₂.is_trans
@@ -319,6 +319,7 @@ theorem rel_prod [Monoid α] [Monoid β] (h : R 1 1) (hf : (R ⇒ R ⇒ R) (· *
(Forall₂ R ⇒ R) prod prod :=
rel_foldl hf h
#align list.rel_prod List.rel_prod
+#align list.rel_sum List.rel_sum
/-- Given a relation `R`, `sublist_forall₂ r l₁ l₂` indicates that there is a sublist of `l₂` such
that `forall₂ r l₁ l₂`. -/
by
line breaks (#1523)
During porting, I usually fix the desired format we seem to want for the line breaks around by
with
awk '{do {{if (match($0, "^ by$") && length(p) < 98) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}' Mathlib/File/Im/Working/On.lean
I noticed there are some more files that slipped through.
This pull request is the result of running this command:
grep -lr "^ by\$" Mathlib | xargs -n 1 awk -i inplace '{do {{if (match($0, "^ by$") && length(p) < 98 && not (match(p, "^[ \t]*--"))) {p=p " by";} else {if (NR!=1) {print p}; p=$0}}} while (getline == 1) if (getline==0) print p}'
Co-authored-by: Moritz Firsching <firsching@google.com>
@@ -65,8 +65,7 @@ theorem forall₂_refl [IsRefl α Rₐ] (l : List α) : Forall₂ Rₐ l l :=
#align list.forall₂_refl List.forall₂_refl
@[simp]
-theorem forall₂_eq_eq_eq : Forall₂ ((· = ·) : α → α → Prop) = Eq :=
- by
+theorem forall₂_eq_eq_eq : Forall₂ ((· = ·) : α → α → Prop) = Eq := by
funext a b; apply propext
constructor
· intro h
@@ -225,16 +224,14 @@ theorem forall₂_drop : ∀ (n) {l₁ l₂}, Forall₂ R l₁ l₂ → Forall
#align list.forall₂_drop List.forall₂_drop
theorem forall₂_take_append (l : List α) (l₁ : List β) (l₂ : List β) (h : Forall₂ R l (l₁ ++ l₂)) :
- Forall₂ R (List.take (length l₁) l) l₁ :=
- by
+ Forall₂ R (List.take (length l₁) l) l₁ := by
have h' : Forall₂ R (take (length l₁) l) (take (length l₁) (l₁ ++ l₂)) :=
forall₂_take (length l₁) h
rwa [take_left] at h'
#align list.forall₂_take_append List.forall₂_take_append
theorem forall₂_drop_append (l : List α) (l₁ : List β) (l₂ : List β) (h : Forall₂ R l (l₁ ++ l₂)) :
- Forall₂ R (List.drop (length l₁) l) l₂ :=
- by
+ Forall₂ R (List.drop (length l₁) l) l₂ := by
have h' : Forall₂ R (drop (length l₁) l) (drop (length l₁) (l₁ ++ l₂)) :=
forall₂_drop (length l₁) h
rwa [drop_left] at h'
@@ -335,8 +332,7 @@ inductive SublistForall₂ (R : α → β → Prop) : List α → List β → Pr
#align list.sublist_forall₂.cons_right List.SublistForall₂.cons_right
theorem sublistForall₂_iff {l₁ : List α} {l₂ : List β} :
- SublistForall₂ R l₁ l₂ ↔ ∃ l, Forall₂ R l₁ l ∧ l <+ l₂ :=
- by
+ SublistForall₂ R l₁ l₂ ↔ ∃ l, Forall₂ R l₁ l ∧ l <+ l₂ := by
constructor <;> intro h
· induction' h with _ a b l1 l2 rab _ ih b l1 l2 _ ih
· exact ⟨nil, Forall₂.nil, nil_sublist _⟩
@@ -65,7 +65,7 @@ theorem forall₂_refl [IsRefl α Rₐ] (l : List α) : Forall₂ Rₐ l l :=
#align list.forall₂_refl List.forall₂_refl
@[simp]
-theorem forall₂_eq_eq_eq : Forall₂ ((· = ·) : α → α → Prop) = (· = ·) :=
+theorem forall₂_eq_eq_eq : Forall₂ ((· = ·) : α → α → Prop) = Eq :=
by
funext a b; apply propext
constructor
Co-authored-by: Scott Morrison <scott.morrison@gmail.com>
@@ -117,7 +117,7 @@ theorem forall₂_and_left {p : α → Prop} :
| a :: l, u => by
simp only [forall₂_and_left l, forall₂_cons_left_iff, forall_mem_cons, and_assoc,
@and_comm _ (p a), @and_left_comm _ (p a), exists_and_left]
- simp only [and_comm, and_assoc, and_left_comm, iff_self, ← exists_and_right]
+ simp only [and_comm, and_assoc, and_left_comm, ← exists_and_right]
#align list.forall₂_and_left List.forall₂_and_left