state stringlengths 0 159k | srcUpToTactic stringlengths 387 167k | nextTactic stringlengths 3 9k | declUpToTactic stringlengths 22 11.5k | declId stringlengths 38 95 | decl stringlengths 16 1.89k | file_tag stringlengths 17 73 |
|---|---|---|---|---|---|---|
case pos
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
h : ∀ (i : ι), l i < u i
⊢ ↑↑{ lower := l, upper := u, lower_lt_upper := h } = Set.pi univ fun i => Ioc (l i) (u i) | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | exact coe_eq_pi _ | @[simp]
theorem coe_mk' (l u : ι → ℝ) : (mk' l u : Set (ι → ℝ)) = pi univ fun i ↦ Ioc (l i) (u i) := by
rw [mk']; split_ifs with h
· | Mathlib.Analysis.BoxIntegral.Box.Basic.328_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_mk' (l u : ι → ℝ) : (mk' l u : Set (ι → ℝ)) = pi univ fun i ↦ Ioc (l i) (u i) | Mathlib_Analysis_BoxIntegral_Box_Basic |
case neg
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
h : ¬∀ (i : ι), l i < u i
⊢ ↑⊥ = Set.pi univ fun i => Ioc (l i) (u i) | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | rcases not_forall.mp h with ⟨i, hi⟩ | @[simp]
theorem coe_mk' (l u : ι → ℝ) : (mk' l u : Set (ι → ℝ)) = pi univ fun i ↦ Ioc (l i) (u i) := by
rw [mk']; split_ifs with h
· exact coe_eq_pi _
· | Mathlib.Analysis.BoxIntegral.Box.Basic.328_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_mk' (l u : ι → ℝ) : (mk' l u : Set (ι → ℝ)) = pi univ fun i ↦ Ioc (l i) (u i) | Mathlib_Analysis_BoxIntegral_Box_Basic |
case neg.intro
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
h : ¬∀ (i : ι), l i < u i
i : ι
hi : ¬l i < u i
⊢ ↑⊥ = Set.pi univ fun i => Ioc (l i) (u i) | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | rw [coe_bot, univ_pi_eq_empty] | @[simp]
theorem coe_mk' (l u : ι → ℝ) : (mk' l u : Set (ι → ℝ)) = pi univ fun i ↦ Ioc (l i) (u i) := by
rw [mk']; split_ifs with h
· exact coe_eq_pi _
· rcases not_forall.mp h with ⟨i, hi⟩
| Mathlib.Analysis.BoxIntegral.Box.Basic.328_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_mk' (l u : ι → ℝ) : (mk' l u : Set (ι → ℝ)) = pi univ fun i ↦ Ioc (l i) (u i) | Mathlib_Analysis_BoxIntegral_Box_Basic |
case neg.intro
ι : Type u_1
I J : Box ι
x y l u : ι → ℝ
h : ¬∀ (i : ι), l i < u i
i : ι
hi : ¬l i < u i
⊢ Ioc (l ?m.488822) (u ?m.488822) = ∅
ι : Type u_1 I J : Box ι x y l u : ι → ℝ h : ¬∀ (i : ι), l i < u i i : ι hi : ¬l i < u i ⊢ ι | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | exact Ioc_eq_empty hi | @[simp]
theorem coe_mk' (l u : ι → ℝ) : (mk' l u : Set (ι → ℝ)) = pi univ fun i ↦ Ioc (l i) (u i) := by
rw [mk']; split_ifs with h
· exact coe_eq_pi _
· rcases not_forall.mp h with ⟨i, hi⟩
rw [coe_bot, univ_pi_eq_empty]
| Mathlib.Analysis.BoxIntegral.Box.Basic.328_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_mk' (l u : ι → ℝ) : (mk' l u : Set (ι → ℝ)) = pi univ fun i ↦ Ioc (l i) (u i) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
I J : WithBot (Box ι)
⊢ ↑(I ⊓ J) = ↑I ∩ ↑J | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | induction I using WithBot.recBotCoe | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J := by
| Mathlib.Analysis.BoxIntegral.Box.Basic.342_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J | Mathlib_Analysis_BoxIntegral_Box_Basic |
case bot
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
⊢ ↑(⊥ ⊓ J) = ↑⊥ ∩ ↑J | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | change ∅ = _ | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J := by
induction I using WithBot.recBotCoe
· | Mathlib.Analysis.BoxIntegral.Box.Basic.342_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J | Mathlib_Analysis_BoxIntegral_Box_Basic |
case bot
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
⊢ ∅ = ↑⊥ ∩ ↑J | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | simp | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J := by
induction I using WithBot.recBotCoe
· change ∅ = _
| Mathlib.Analysis.BoxIntegral.Box.Basic.342_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J | Mathlib_Analysis_BoxIntegral_Box_Basic |
case coe
ι : Type u_1
I J✝ : Box ι
x y : ι → ℝ
J : WithBot (Box ι)
a✝ : Box ι
⊢ ↑(↑a✝ ⊓ J) = ↑↑a✝ ∩ ↑J | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | induction J using WithBot.recBotCoe | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J := by
induction I using WithBot.recBotCoe
· change ∅ = _
simp
| Mathlib.Analysis.BoxIntegral.Box.Basic.342_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J | Mathlib_Analysis_BoxIntegral_Box_Basic |
case coe.bot
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝ : Box ι
⊢ ↑(↑a✝ ⊓ ⊥) = ↑↑a✝ ∩ ↑⊥ | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | change ∅ = _ | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J := by
induction I using WithBot.recBotCoe
· change ∅ = _
simp
induction J using WithBot.recBotCoe
· | Mathlib.Analysis.BoxIntegral.Box.Basic.342_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J | Mathlib_Analysis_BoxIntegral_Box_Basic |
case coe.bot
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝ : Box ι
⊢ ∅ = ↑↑a✝ ∩ ↑⊥ | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | simp | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J := by
induction I using WithBot.recBotCoe
· change ∅ = _
simp
induction J using WithBot.recBotCoe
· change ∅ = _
| Mathlib.Analysis.BoxIntegral.Box.Basic.342_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J | Mathlib_Analysis_BoxIntegral_Box_Basic |
case coe.coe
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝¹ a✝ : Box ι
⊢ ↑(↑a✝¹ ⊓ ↑a✝) = ↑↑a✝¹ ∩ ↑↑a✝ | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | change ((mk' _ _ : WithBot (Box ι)) : Set (ι → ℝ)) = _ | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J := by
induction I using WithBot.recBotCoe
· change ∅ = _
simp
induction J using WithBot.recBotCoe
· change ∅ = _
simp
| Mathlib.Analysis.BoxIntegral.Box.Basic.342_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J | Mathlib_Analysis_BoxIntegral_Box_Basic |
case coe.coe
ι : Type u_1
I J : Box ι
x y : ι → ℝ
a✝¹ a✝ : Box ι
⊢ ↑(mk' (fun i => (a✝¹.lower ⊔ a✝.lower) i) fun i => (a✝¹.upper ⊓ a✝.upper) i) = ↑↑a✝¹ ∩ ↑↑a✝ | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | simp only [coe_eq_pi, ← pi_inter_distrib, Ioc_inter_Ioc, Pi.sup_apply, Pi.inf_apply, coe_mk',
coe_coe] | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J := by
induction I using WithBot.recBotCoe
· change ∅ = _
simp
induction J using WithBot.recBotCoe
· change ∅ = _
simp
change ((mk' _ _ : WithBot (Box ι)) : Set (ι → ℝ)) = _
| Mathlib.Analysis.BoxIntegral.Box.Basic.342_0.huZHUvFo9Qi2rb8 | @[simp]
theorem coe_inf (I J : WithBot (Box ι)) : (↑(I ⊓ J) : Set (ι → ℝ)) = (I : Set _) ∩ J | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J : WithBot (Box ι)
⊢ I ⊓ J ≤ I | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | rw [← withBotCoe_subset_iff, coe_inf] | instance : Lattice (WithBot (Box ι)) :=
{ WithBot.semilatticeSup,
Box.WithBot.inf with
inf_le_left := fun I J ↦ by
| Mathlib.Analysis.BoxIntegral.Box.Basic.355_0.huZHUvFo9Qi2rb8 | instance : Lattice (WithBot (Box ι)) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J : WithBot (Box ι)
⊢ ↑I ∩ ↑J ⊆ ↑I | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | exact inter_subset_left _ _ | instance : Lattice (WithBot (Box ι)) :=
{ WithBot.semilatticeSup,
Box.WithBot.inf with
inf_le_left := fun I J ↦ by
rw [← withBotCoe_subset_iff, coe_inf]
| Mathlib.Analysis.BoxIntegral.Box.Basic.355_0.huZHUvFo9Qi2rb8 | instance : Lattice (WithBot (Box ι)) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J : WithBot (Box ι)
⊢ I ⊓ J ≤ J | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | rw [← withBotCoe_subset_iff, coe_inf] | instance : Lattice (WithBot (Box ι)) :=
{ WithBot.semilatticeSup,
Box.WithBot.inf with
inf_le_left := fun I J ↦ by
rw [← withBotCoe_subset_iff, coe_inf]
exact inter_subset_left _ _
inf_le_right := fun I J ↦ by
| Mathlib.Analysis.BoxIntegral.Box.Basic.355_0.huZHUvFo9Qi2rb8 | instance : Lattice (WithBot (Box ι)) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J : WithBot (Box ι)
⊢ ↑I ∩ ↑J ⊆ ↑J | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | exact inter_subset_right _ _ | instance : Lattice (WithBot (Box ι)) :=
{ WithBot.semilatticeSup,
Box.WithBot.inf with
inf_le_left := fun I J ↦ by
rw [← withBotCoe_subset_iff, coe_inf]
exact inter_subset_left _ _
inf_le_right := fun I J ↦ by
rw [← withBotCoe_subset_iff, coe_inf]
| Mathlib.Analysis.BoxIntegral.Box.Basic.355_0.huZHUvFo9Qi2rb8 | instance : Lattice (WithBot (Box ι)) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J₁ J₂ : WithBot (Box ι)
h₁ : I ≤ J₁
h₂ : I ≤ J₂
⊢ I ≤ J₁ ⊓ J₂ | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | simp only [← withBotCoe_subset_iff, coe_inf] at * | instance : Lattice (WithBot (Box ι)) :=
{ WithBot.semilatticeSup,
Box.WithBot.inf with
inf_le_left := fun I J ↦ by
rw [← withBotCoe_subset_iff, coe_inf]
exact inter_subset_left _ _
inf_le_right := fun I J ↦ by
rw [← withBotCoe_subset_iff, coe_inf]
exact inter_subset_right _ _
l... | Mathlib.Analysis.BoxIntegral.Box.Basic.355_0.huZHUvFo9Qi2rb8 | instance : Lattice (WithBot (Box ι)) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
src✝¹ : SemilatticeSup (WithBot (Box ι)) := WithBot.semilatticeSup
src✝ : Inf (WithBot (Box ι)) := WithBot.inf
I J₁ J₂ : WithBot (Box ι)
h₁ : ↑I ⊆ ↑J₁
h₂ : ↑I ⊆ ↑J₂
⊢ ↑I ⊆ ↑J₁ ∩ ↑J₂ | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | exact subset_inter h₁ h₂ | instance : Lattice (WithBot (Box ι)) :=
{ WithBot.semilatticeSup,
Box.WithBot.inf with
inf_le_left := fun I J ↦ by
rw [← withBotCoe_subset_iff, coe_inf]
exact inter_subset_left _ _
inf_le_right := fun I J ↦ by
rw [← withBotCoe_subset_iff, coe_inf]
exact inter_subset_right _ _
l... | Mathlib.Analysis.BoxIntegral.Box.Basic.355_0.huZHUvFo9Qi2rb8 | instance : Lattice (WithBot (Box ι)) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
I J : WithBot (Box ι)
⊢ Disjoint ↑I ↑J ↔ Disjoint I J | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | simp only [disjoint_iff_inf_le, ← withBotCoe_subset_iff, coe_inf] | @[simp, norm_cast]
theorem disjoint_withBotCoe {I J : WithBot (Box ι)} :
Disjoint (I : Set (ι → ℝ)) J ↔ Disjoint I J := by
| Mathlib.Analysis.BoxIntegral.Box.Basic.368_0.huZHUvFo9Qi2rb8 | @[simp, norm_cast]
theorem disjoint_withBotCoe {I J : WithBot (Box ι)} :
Disjoint (I : Set (ι → ℝ)) J ↔ Disjoint I J | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
I J : WithBot (Box ι)
⊢ ↑I ⊓ ↑J ≤ ⊥ ↔ ↑I ∩ ↑J ⊆ ↑⊥ | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | rfl | @[simp, norm_cast]
theorem disjoint_withBotCoe {I J : WithBot (Box ι)} :
Disjoint (I : Set (ι → ℝ)) J ↔ Disjoint I J := by
simp only [disjoint_iff_inf_le, ← withBotCoe_subset_iff, coe_inf]
| Mathlib.Analysis.BoxIntegral.Box.Basic.368_0.huZHUvFo9Qi2rb8 | @[simp, norm_cast]
theorem disjoint_withBotCoe {I J : WithBot (Box ι)} :
Disjoint (I : Set (ι → ℝ)) J ↔ Disjoint I J | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I J : Box ι
x y : ι → ℝ
⊢ ¬Disjoint ↑I ↑J ↔ Set.Nonempty (↑I ∩ ↑J) | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | rw [disjoint_coe, Set.not_disjoint_iff_nonempty_inter] | theorem not_disjoint_coe_iff_nonempty_inter :
¬Disjoint (I : WithBot (Box ι)) J ↔ (I ∩ J : Set (ι → ℝ)).Nonempty := by
| Mathlib.Analysis.BoxIntegral.Box.Basic.379_0.huZHUvFo9Qi2rb8 | theorem not_disjoint_coe_iff_nonempty_inter :
¬Disjoint (I : WithBot (Box ι)) J ↔ (I ∩ J : Set (ι → ℝ)).Nonempty | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x✝ y : ι → ℝ
n : ℕ
I : Box (Fin (n + 1))
i : Fin (n + 1)
x : ℝ
hx : x ∈ Ioc (lower I i) (upper I i)
⊢ MapsTo (Fin.insertNth i x) ↑(face I i) ↑I | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | intro y hy | theorem mapsTo_insertNth_face {n} (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ}
(hx : x ∈ Ioc (I.lower i) (I.upper i)) :
MapsTo (i.insertNth x) (I.face i : Set (_ → _)) (I : Set (_ → _)) := by
| Mathlib.Analysis.BoxIntegral.Box.Basic.417_0.huZHUvFo9Qi2rb8 | theorem mapsTo_insertNth_face {n} (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ}
(hx : x ∈ Ioc (I.lower i) (I.upper i)) :
MapsTo (i.insertNth x) (I.face i : Set (_ → _)) (I : Set (_ → _)) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x✝ y✝ : ι → ℝ
n : ℕ
I : Box (Fin (n + 1))
i : Fin (n + 1)
x : ℝ
hx : x ∈ Ioc (lower I i) (upper I i)
y : Fin n → ℝ
hy : y ∈ ↑(face I i)
⊢ Fin.insertNth i x y ∈ ↑I | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | simp_rw [mem_coe, mem_def, i.forall_iff_succAbove, Fin.insertNth_apply_same,
Fin.insertNth_apply_succAbove] | theorem mapsTo_insertNth_face {n} (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ}
(hx : x ∈ Ioc (I.lower i) (I.upper i)) :
MapsTo (i.insertNth x) (I.face i : Set (_ → _)) (I : Set (_ → _)) := by
intro y hy
| Mathlib.Analysis.BoxIntegral.Box.Basic.417_0.huZHUvFo9Qi2rb8 | theorem mapsTo_insertNth_face {n} (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ}
(hx : x ∈ Ioc (I.lower i) (I.upper i)) :
MapsTo (i.insertNth x) (I.face i : Set (_ → _)) (I : Set (_ → _)) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x✝ y✝ : ι → ℝ
n : ℕ
I : Box (Fin (n + 1))
i : Fin (n + 1)
x : ℝ
hx : x ∈ Ioc (lower I i) (upper I i)
y : Fin n → ℝ
hy : y ∈ ↑(face I i)
⊢ x ∈ Ioc (lower I i) (upper I i) ∧ ∀ (j : Fin n), y j ∈ Ioc (lower I (Fin.succAbove i j)) (upper I (Fin.succAbove i j)) | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | exact ⟨hx, hy⟩ | theorem mapsTo_insertNth_face {n} (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ}
(hx : x ∈ Ioc (I.lower i) (I.upper i)) :
MapsTo (i.insertNth x) (I.face i : Set (_ → _)) (I : Set (_ → _)) := by
intro y hy
simp_rw [mem_coe, mem_def, i.forall_iff_succAbove, Fin.insertNth_apply_same,
Fin.insertNth_apply... | Mathlib.Analysis.BoxIntegral.Box.Basic.417_0.huZHUvFo9Qi2rb8 | theorem mapsTo_insertNth_face {n} (I : Box (Fin (n + 1))) {i : Fin (n + 1)} {x : ℝ}
(hx : x ∈ Ioc (I.lower i) (I.upper i)) :
MapsTo (i.insertNth x) (I.face i : Set (_ → _)) (I : Set (_ → _)) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
I : Box ι
⊢ ∃ J,
(∀ (n : ℕ), Box.Icc (J n) ⊆ Box.Ioo I) ∧
Tendsto (lower ∘ ⇑J) atTop (𝓝 I.lower) ∧ Tendsto (upper ∘ ⇑J) atTop (𝓝 I.upper) | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | choose a b ha_anti hb_mono ha_mem hb_mem hab ha_tendsto hb_tendsto using
fun i ↦ exists_seq_strictAnti_strictMono_tendsto (I.lower_lt_upper i) | theorem exists_seq_mono_tendsto (I : Box ι) :
∃ J : ℕ →o Box ι,
(∀ n, Box.Icc (J n) ⊆ Box.Ioo I) ∧
Tendsto (lower ∘ J) atTop (𝓝 I.lower) ∧ Tendsto (upper ∘ J) atTop (𝓝 I.upper) := by
| Mathlib.Analysis.BoxIntegral.Box.Basic.470_0.huZHUvFo9Qi2rb8 | theorem exists_seq_mono_tendsto (I : Box ι) :
∃ J : ℕ →o Box ι,
(∀ n, Box.Icc (J n) ⊆ Box.Ioo I) ∧
Tendsto (lower ∘ J) atTop (𝓝 I.lower) ∧ Tendsto (upper ∘ J) atTop (𝓝 I.upper) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
I : Box ι
a b : ι → ℕ → ℝ
ha_anti : ∀ (i : ι), StrictAnti (a i)
hb_mono : ∀ (i : ι), StrictMono (b i)
ha_mem : ∀ (i : ι) (k : ℕ), a i k ∈ Ioo (lower I i) (upper I i)
hb_mem : ∀ (i : ι) (l : ℕ), b i l ∈ Ioo (lower I i) (upper I i)
hab : ∀ (i : ι) (k l : ℕ), a i k < b i l
ha_tendsto ... | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | exact
⟨⟨fun k ↦ ⟨flip a k, flip b k, fun i ↦ hab _ _ _⟩, fun k l hkl ↦
le_iff_bounds.2 ⟨fun i ↦ (ha_anti i).antitone hkl, fun i ↦ (hb_mono i).monotone hkl⟩⟩,
fun n x hx i _ ↦ ⟨(ha_mem _ _).1.trans_le (hx.1 _), (hx.2 _).trans_lt (hb_mem _ _).2⟩,
tendsto_pi_nhds.2 ha_tendsto, tendsto_pi_nhds.2 hb_... | theorem exists_seq_mono_tendsto (I : Box ι) :
∃ J : ℕ →o Box ι,
(∀ n, Box.Icc (J n) ⊆ Box.Ioo I) ∧
Tendsto (lower ∘ J) atTop (𝓝 I.lower) ∧ Tendsto (upper ∘ J) atTop (𝓝 I.upper) := by
choose a b ha_anti hb_mono ha_mem hb_mem hab ha_tendsto hb_tendsto using
fun i ↦ exists_seq_strictAnti_strictMo... | Mathlib.Analysis.BoxIntegral.Box.Basic.470_0.huZHUvFo9Qi2rb8 | theorem exists_seq_mono_tendsto (I : Box ι) :
∃ J : ℕ →o Box ι,
(∀ n, Box.Icc (J n) ⊆ Box.Ioo I) ∧
Tendsto (lower ∘ J) atTop (𝓝 I.lower) ∧ Tendsto (upper ∘ J) atTop (𝓝 I.upper) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
⊢ distortion I = distortion J | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | simp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀] | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J := by
| Mathlib.Analysis.BoxIntegral.Box.Basic.494_0.huZHUvFo9Qi2rb8 | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
⊢ (Finset.sup Finset.univ fun i =>
(Finset.sup Finset.univ fun b => Real.nnabs (upper J b - lower J b) / Real.nnabs r) /
(Real.nnabs (upper J i - lower J i) / Real.... | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | congr 1 with i | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J := by
simp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀]
| Mathlib.Analysis.BoxIntegral.Box.Basic.494_0.huZHUvFo9Qi2rb8 | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J | Mathlib_Analysis_BoxIntegral_Box_Basic |
case e_f.h.a
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
⊢ ↑((Finset.sup Finset.univ fun b => Real.nnabs (upper J b - lower J b) / Real.nnabs r) /
(Real.nnabs (upper J i - lower J i) / Real.nnabs r)) =
↑(... | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | have : 0 < r := by
by_contra hr
have := div_nonpos_of_nonneg_of_nonpos (sub_nonneg.2 <| J.lower_le_upper i) (not_lt.1 hr)
rw [← h] at this
exact this.not_lt (sub_pos.2 <| I.lower_lt_upper i) | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J := by
simp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀]
congr 1 with i
| Mathlib.Analysis.BoxIntegral.Box.Basic.494_0.huZHUvFo9Qi2rb8 | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
⊢ 0 < r | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | by_contra hr | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J := by
simp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀]
congr 1 with i
have : 0 < r := by
| Mathlib.Analysis.BoxIntegral.Box.Basic.494_0.huZHUvFo9Qi2rb8 | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
hr : ¬0 < r
⊢ False | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | have := div_nonpos_of_nonneg_of_nonpos (sub_nonneg.2 <| J.lower_le_upper i) (not_lt.1 hr) | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J := by
simp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀]
congr 1 with i
have : 0 < r := by
by_contra hr
| Mathlib.Analysis.BoxIntegral.Box.Basic.494_0.huZHUvFo9Qi2rb8 | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
hr : ¬0 < r
this : (upper J i - lower J i) / r ≤ 0
⊢ False | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | rw [← h] at this | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J := by
simp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀]
congr 1 with i
have : 0 < r := by
by_contra hr
have := div_nonpos_of_nonn... | Mathlib.Analysis.BoxIntegral.Box.Basic.494_0.huZHUvFo9Qi2rb8 | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
hr : ¬0 < r
this : upper I i - lower I i ≤ 0
⊢ False | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | exact this.not_lt (sub_pos.2 <| I.lower_lt_upper i) | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J := by
simp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀]
congr 1 with i
have : 0 < r := by
by_contra hr
have := div_nonpos_of_nonn... | Mathlib.Analysis.BoxIntegral.Box.Basic.494_0.huZHUvFo9Qi2rb8 | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J | Mathlib_Analysis_BoxIntegral_Box_Basic |
case e_f.h.a
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
this : 0 < r
⊢ ↑((Finset.sup Finset.univ fun b => Real.nnabs (upper J b - lower J b) / Real.nnabs r) /
(Real.nnabs (upper J i - lower J i) / Real.nnabs... | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | have hn0 := (map_ne_zero Real.nnabs).2 this.ne' | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J := by
simp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀]
congr 1 with i
have : 0 < r := by
by_contra hr
have := div_nonpos_of_nonn... | Mathlib.Analysis.BoxIntegral.Box.Basic.494_0.huZHUvFo9Qi2rb8 | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J | Mathlib_Analysis_BoxIntegral_Box_Basic |
case e_f.h.a
ι : Type u_1
I✝ J✝ : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I J : Box ι
r : ℝ
h : ∀ (i : ι), upper I i - lower I i = (upper J i - lower J i) / r
i : ι
this : 0 < r
hn0 : Real.nnabs r ≠ 0
⊢ ↑((Finset.sup Finset.univ fun b => Real.nnabs (upper J b - lower J b) / Real.nnabs r) /
(Real.nnabs (upper J i - ... | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | simp_rw [NNReal.finset_sup_div, div_div_div_cancel_right _ hn0] | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J := by
simp only [distortion, nndist_pi_def, Real.nndist_eq', h, map_div₀]
congr 1 with i
have : 0 < r := by
by_contra hr
have := div_nonpos_of_nonn... | Mathlib.Analysis.BoxIntegral.Box.Basic.494_0.huZHUvFo9Qi2rb8 | theorem distortion_eq_of_sub_eq_div {I J : Box ι} {r : ℝ}
(h : ∀ i, I.upper i - I.lower i = (J.upper i - J.lower i) / r) :
distortion I = distortion J | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
⊢ nndist I.lower I.upper / nndist (lower I i) (upper I i) * nndist (lower I i) (upper I i) ≤
distortion I * nndist (lower I i) (upper I i) | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | apply mul_le_mul_right' | theorem nndist_le_distortion_mul (I : Box ι) (i : ι) :
nndist I.lower I.upper ≤ I.distortion * nndist (I.lower i) (I.upper i) :=
calc
nndist I.lower I.upper =
nndist I.lower I.upper / nndist (I.lower i) (I.upper i) * nndist (I.lower i) (I.upper i) :=
(div_mul_cancel _ <| mt nndist_eq_zero.1 (I.l... | Mathlib.Analysis.BoxIntegral.Box.Basic.508_0.huZHUvFo9Qi2rb8 | theorem nndist_le_distortion_mul (I : Box ι) (i : ι) :
nndist I.lower I.upper ≤ I.distortion * nndist (I.lower i) (I.upper i) | Mathlib_Analysis_BoxIntegral_Box_Basic |
case bc
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
⊢ nndist I.lower I.upper / nndist (lower I i) (upper I i) ≤ distortion I | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | apply Finset.le_sup (Finset.mem_univ i) | theorem nndist_le_distortion_mul (I : Box ι) (i : ι) :
nndist I.lower I.upper ≤ I.distortion * nndist (I.lower i) (I.upper i) :=
calc
nndist I.lower I.upper =
nndist I.lower I.upper / nndist (I.lower i) (I.upper i) * nndist (I.lower i) (I.upper i) :=
(div_mul_cancel _ <| mt nndist_eq_zero.1 (I.l... | Mathlib.Analysis.BoxIntegral.Box.Basic.508_0.huZHUvFo9Qi2rb8 | theorem nndist_le_distortion_mul (I : Box ι) (i : ι) :
nndist I.lower I.upper ≤ I.distortion * nndist (I.lower i) (I.upper i) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
⊢ dist I.lower I.upper ≤ ↑(distortion I) * (upper I i - lower I i) | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | have A : I.lower i - I.upper i < 0 := sub_neg.2 (I.lower_lt_upper i) | theorem dist_le_distortion_mul (I : Box ι) (i : ι) :
dist I.lower I.upper ≤ I.distortion * (I.upper i - I.lower i) := by
| Mathlib.Analysis.BoxIntegral.Box.Basic.519_0.huZHUvFo9Qi2rb8 | theorem dist_le_distortion_mul (I : Box ι) (i : ι) :
dist I.lower I.upper ≤ I.distortion * (I.upper i - I.lower i) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x y : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
A : lower I i - upper I i < 0
⊢ dist I.lower I.upper ≤ ↑(distortion I) * (upper I i - lower I i) | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | simpa only [← NNReal.coe_le_coe, ← dist_nndist, NNReal.coe_mul, Real.dist_eq, abs_of_neg A,
neg_sub] using I.nndist_le_distortion_mul i | theorem dist_le_distortion_mul (I : Box ι) (i : ι) :
dist I.lower I.upper ≤ I.distortion * (I.upper i - I.lower i) := by
have A : I.lower i - I.upper i < 0 := sub_neg.2 (I.lower_lt_upper i)
| Mathlib.Analysis.BoxIntegral.Box.Basic.519_0.huZHUvFo9Qi2rb8 | theorem dist_le_distortion_mul (I : Box ι) (i : ι) :
dist I.lower I.upper ≤ I.distortion * (I.upper i - I.lower i) | Mathlib_Analysis_BoxIntegral_Box_Basic |
ι : Type u_1
I✝ J : Box ι
x✝ y✝ : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
c : ℝ≥0
h : distortion I ≤ c
this : 0 ≤ ↑c * (upper I i - lower I i)
x : ι → ℝ
hx : x ∈ Box.Icc I
y : ι → ℝ
hy : y ∈ Box.Icc I
⊢ ↑(distortion I) * (upper I i - lower I i) ≤ ↑c * (upper I i - lower I i) | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | gcongr | theorem diam_Icc_le_of_distortion_le (I : Box ι) (i : ι) {c : ℝ≥0} (h : I.distortion ≤ c) :
diam (Box.Icc I) ≤ c * (I.upper i - I.lower i) :=
have : (0 : ℝ) ≤ c * (I.upper i - I.lower i) :=
mul_nonneg c.coe_nonneg (sub_nonneg.2 <| I.lower_le_upper _)
diam_le_of_forall_dist_le this fun x hx y hy ↦
calc
... | Mathlib.Analysis.BoxIntegral.Box.Basic.526_0.huZHUvFo9Qi2rb8 | theorem diam_Icc_le_of_distortion_le (I : Box ι) (i : ι) {c : ℝ≥0} (h : I.distortion ≤ c) :
diam (Box.Icc I) ≤ c * (I.upper i - I.lower i) | Mathlib_Analysis_BoxIntegral_Box_Basic |
case a0
ι : Type u_1
I✝ J : Box ι
x✝ y✝ : ι → ℝ
inst✝ : Fintype ι
I : Box ι
i : ι
c : ℝ≥0
h : distortion I ≤ c
this : 0 ≤ ↑c * (upper I i - lower I i)
x : ι → ℝ
hx : x ∈ Box.Icc I
y : ι → ℝ
hy : y ∈ Box.Icc I
⊢ 0 ≤ upper I i - lower I i | /-
Copyright (c) 2021 Yury Kudryashov. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yury Kudryashov
-/
import Mathlib.Data.Set.Intervals.Monotone
import Mathlib.Topology.Algebra.Order.MonotoneConvergence
import Mathlib.Topology.MetricSpace.Bounded
#align_import anal... | exact sub_nonneg.2 (I.lower_le_upper i) | theorem diam_Icc_le_of_distortion_le (I : Box ι) (i : ι) {c : ℝ≥0} (h : I.distortion ≤ c) :
diam (Box.Icc I) ≤ c * (I.upper i - I.lower i) :=
have : (0 : ℝ) ≤ c * (I.upper i - I.lower i) :=
mul_nonneg c.coe_nonneg (sub_nonneg.2 <| I.lower_le_upper _)
diam_le_of_forall_dist_le this fun x hx y hy ↦
calc
... | Mathlib.Analysis.BoxIntegral.Box.Basic.526_0.huZHUvFo9Qi2rb8 | theorem diam_Icc_le_of_distortion_le (I : Box ι) (i : ι) {c : ℝ≥0} (h : I.distortion ≤ c) :
diam (Box.Icc I) ≤ c * (I.upper i - I.lower i) | Mathlib_Analysis_BoxIntegral_Box_Basic |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
h : a ∉ s
⊢ fold op b f (cons a s h) = op (f a) (fold op b f s) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | dsimp only [fold] | @[simp]
theorem fold_cons (h : a ∉ s) : (cons a s h).fold op b f = f a * s.fold op b f := by
| Mathlib.Data.Finset.Fold.45_0.vMyQI0nR4eRmtxs | @[simp]
theorem fold_cons (h : a ∉ s) : (cons a s h).fold op b f = f a * s.fold op b f | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
h : a ∉ s
⊢ Multiset.fold op b (Multiset.map f (cons a s h).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val)) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [cons_val, Multiset.map_cons, fold_cons_left] | @[simp]
theorem fold_cons (h : a ∉ s) : (cons a s h).fold op b f = f a * s.fold op b f := by
dsimp only [fold]
| Mathlib.Data.Finset.Fold.45_0.vMyQI0nR4eRmtxs | @[simp]
theorem fold_cons (h : a ∉ s) : (cons a s h).fold op b f = f a * s.fold op b f | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
h : a ∉ s
⊢ fold op b f (insert a s) = op (f a) (fold op b f s) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | unfold fold | @[simp]
theorem fold_insert [DecidableEq α] (h : a ∉ s) :
(insert a s).fold op b f = f a * s.fold op b f := by
| Mathlib.Data.Finset.Fold.51_0.vMyQI0nR4eRmtxs | @[simp]
theorem fold_insert [DecidableEq α] (h : a ∉ s) :
(insert a s).fold op b f = f a * s.fold op b f | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
h : a ∉ s
⊢ Multiset.fold op b (Multiset.map f (insert a s).val) = op (f a) (Multiset.fold op b (Multiset.map f s.val)) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [insert_val, ndinsert_of_not_mem h, Multiset.map_cons, fold_cons_left] | @[simp]
theorem fold_insert [DecidableEq α] (h : a ∉ s) :
(insert a s).fold op b f = f a * s.fold op b f := by
unfold fold
| Mathlib.Data.Finset.Fold.51_0.vMyQI0nR4eRmtxs | @[simp]
theorem fold_insert [DecidableEq α] (h : a ∉ s) :
(insert a s).fold op b f = f a * s.fold op b f | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
g : γ ↪ α
s : Finset γ
⊢ fold op b f (map g s) = fold op b (f ∘ ⇑g) s | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp only [fold, map, Multiset.map_map] | @[simp]
theorem fold_map {g : γ ↪ α} {s : Finset γ} : (s.map g).fold op b f = s.fold op b (f ∘ g) := by
| Mathlib.Data.Finset.Fold.63_0.vMyQI0nR4eRmtxs | @[simp]
theorem fold_map {g : γ ↪ α} {s : Finset γ} : (s.map g).fold op b f = s.fold op b (f ∘ g) | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
s : Finset γ
H : ∀ x ∈ s, ∀ y ∈ s, g x = g y → x = y
⊢ fold op b f (image g s) = fold op b (f ∘ g) s | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp only [fold, image_val_of_injOn H, Multiset.map_map] | @[simp]
theorem fold_image [DecidableEq α] {g : γ → α} {s : Finset γ}
(H : ∀ x ∈ s, ∀ y ∈ s, g x = g y → x = y) : (s.image g).fold op b f = s.fold op b (f ∘ g) := by
| Mathlib.Data.Finset.Fold.68_0.vMyQI0nR4eRmtxs | @[simp]
theorem fold_image [DecidableEq α] {g : γ → α} {s : Finset γ}
(H : ∀ x ∈ s, ∀ y ∈ s, g x = g y → x = y) : (s.image g).fold op b f = s.fold op b (f ∘ g) | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
g : α → β
H : ∀ x ∈ s, f x = g x
⊢ fold op b f s = fold op b g s | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [fold, fold, map_congr rfl H] | @[congr]
theorem fold_congr {g : α → β} (H : ∀ x ∈ s, f x = g x) : s.fold op b f = s.fold op b g := by
| Mathlib.Data.Finset.Fold.74_0.vMyQI0nR4eRmtxs | @[congr]
theorem fold_congr {g : α → β} (H : ∀ x ∈ s, f x = g x) : s.fold op b f = s.fold op b g | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f✝ : α → β
b : β
s : Finset α
a : α
f g : α → β
b₁ b₂ : β
⊢ fold op (op b₁ b₂) (fun x => op (f x) (g x)) s = op (fold op b₁ f s) (fold op b₂ g s) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp only [fold, fold_distrib] | theorem fold_op_distrib {f g : α → β} {b₁ b₂ : β} :
(s.fold op (b₁ * b₂) fun x => f x * g x) = s.fold op b₁ f * s.fold op b₂ g := by
| Mathlib.Data.Finset.Fold.79_0.vMyQI0nR4eRmtxs | theorem fold_op_distrib {f g : α → β} {b₁ b₂ : β} :
(s.fold op (b₁ * b₂) fun x => f x * g x) = s.fold op b₁ f * s.fold op b₂ g | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
hd : Decidable (s = ∅)
c : β
h : op c (op b c) = op b c
⊢ fold op b (fun x => c) s = if s = ∅ then b else op b c | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | classical
induction' s using Finset.induction_on with x s hx IH generalizing hd
· simp
· simp only [Finset.fold_insert hx, IH, if_false, Finset.insert_ne_empty]
split_ifs
· rw [hc.comm]
· exact h | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c := by
| Mathlib.Data.Finset.Fold.84_0.vMyQI0nR4eRmtxs | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
hd : Decidable (s = ∅)
c : β
h : op c (op b c) = op b c
⊢ fold op b (fun x => c) s = if s = ∅ then b else op b c | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | induction' s using Finset.induction_on with x s hx IH generalizing hd | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c := by
classical
| Mathlib.Data.Finset.Fold.84_0.vMyQI0nR4eRmtxs | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c | Mathlib_Data_Finset_Fold |
case empty
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
c : β
h : op c (op b c) = op b c
hd : Decidable (∅ = ∅)
⊢ fold op b (fun x => c) ∅ = if ∅ = ∅ then b else op b c | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c := by
classical
induction' s using Finset.induction_on with x s hx IH generalizing hd
· | Mathlib.Data.Finset.Fold.84_0.vMyQI0nR4eRmtxs | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c | Mathlib_Data_Finset_Fold |
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
c : β
h : op c (op b c) = op b c
x : α
s : Finset α
hx : x ∉ s
IH : ∀ [hd : Decidable (s = ∅)], fold op b (fun x => c) s = if s = ∅ then b else op b c
hd : Decidable (ins... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp only [Finset.fold_insert hx, IH, if_false, Finset.insert_ne_empty] | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c := by
classical
induction' s using Finset.induction_on with x s hx IH generalizing hd
· simp
· | Mathlib.Data.Finset.Fold.84_0.vMyQI0nR4eRmtxs | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c | Mathlib_Data_Finset_Fold |
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
c : β
h : op c (op b c) = op b c
x : α
s : Finset α
hx : x ∉ s
IH : ∀ [hd : Decidable (s = ∅)], fold op b (fun x => c) s = if s = ∅ then b else op b c
hd : Decidable (ins... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | split_ifs | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c := by
classical
induction' s using Finset.induction_on with x s hx IH generalizing hd
· simp
· simp only [Finset.fold_insert hx, IH, if_false, Finset.insert_... | Mathlib.Data.Finset.Fold.84_0.vMyQI0nR4eRmtxs | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c | Mathlib_Data_Finset_Fold |
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
c : β
h : op c (op b c) = op b c
x : α
s : Finset α
hx : x ∉ s
IH : ∀ [hd : Decidable (s = ∅)], fold op b (fun x => c) s = if s = ∅ then b else op b c
hd : Decidable (insert... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [hc.comm] | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c := by
classical
induction' s using Finset.induction_on with x s hx IH generalizing hd
· simp
· simp only [Finset.fold_insert hx, IH, if_false, Finset.insert_... | Mathlib.Data.Finset.Fold.84_0.vMyQI0nR4eRmtxs | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c | Mathlib_Data_Finset_Fold |
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
c : β
h : op c (op b c) = op b c
x : α
s : Finset α
hx : x ∉ s
IH : ∀ [hd : Decidable (s = ∅)], fold op b (fun x => c) s = if s = ∅ then b else op b c
hd : Decidable (insert... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | exact h | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c := by
classical
induction' s using Finset.induction_on with x s hx IH generalizing hd
· simp
· simp only [Finset.fold_insert hx, IH, if_false, Finset.insert_... | Mathlib.Data.Finset.Fold.84_0.vMyQI0nR4eRmtxs | theorem fold_const [hd : Decidable (s = ∅)] (c : β) (h : op c (op b c) = op b c) :
Finset.fold op b (fun _ => c) s = if s = ∅ then b else op b c | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
op' : γ → γ → γ
inst✝¹ : IsCommutative γ op'
inst✝ : IsAssociative γ op'
m : β → γ
hm : ∀ (x y : β), m (op x y) = op' (m x) (m y)
⊢ fold op' (m b) (fun x => m (f x)) s = m (fold op b ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [fold, fold, ← Multiset.fold_hom op hm, Multiset.map_map] | theorem fold_hom {op' : γ → γ → γ} [IsCommutative γ op'] [IsAssociative γ op'] {m : β → γ}
(hm : ∀ x y, m (op x y) = op' (m x) (m y)) :
(s.fold op' (m b) fun x => m (f x)) = m (s.fold op b f) := by
| Mathlib.Data.Finset.Fold.95_0.vMyQI0nR4eRmtxs | theorem fold_hom {op' : γ → γ → γ} [IsCommutative γ op'] [IsAssociative γ op'] {m : β → γ}
(hm : ∀ x y, m (op x y) = op' (m x) (m y)) :
(s.fold op' (m b) fun x => m (f x)) = m (s.fold op b f) | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
op' : γ → γ → γ
inst✝¹ : IsCommutative γ op'
inst✝ : IsAssociative γ op'
m : β → γ
hm : ∀ (x y : β), m (op x y) = op' (m x) (m y)
⊢ Multiset.fold op' (m b) (Multiset.map (fun x => m (... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp only [Function.comp_apply] | theorem fold_hom {op' : γ → γ → γ} [IsCommutative γ op'] [IsAssociative γ op'] {m : β → γ}
(hm : ∀ x y, m (op x y) = op' (m x) (m y)) :
(s.fold op' (m b) fun x => m (f x)) = m (s.fold op b f) := by
rw [fold, fold, ← Multiset.fold_hom op hm, Multiset.map_map]
| Mathlib.Data.Finset.Fold.95_0.vMyQI0nR4eRmtxs | theorem fold_hom {op' : γ → γ → γ} [IsCommutative γ op'] [IsAssociative γ op'] {m : β → γ}
(hm : ∀ x y, m (op x y) = op' (m x) (m y)) :
(s.fold op' (m b) fun x => m (f x)) = m (s.fold op b f) | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
s₁ s₂ : Finset α
b₁ b₂ : β
⊢ op (fold op b₁ f (s₁ ∪ s₂)) (fold op b₂ f (s₁ ∩ s₂)) = op (fold op b₂ f s₁) (fold op b₁ f s₂) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | unfold fold | theorem fold_union_inter [DecidableEq α] {s₁ s₂ : Finset α} {b₁ b₂ : β} :
((s₁ ∪ s₂).fold op b₁ f * (s₁ ∩ s₂).fold op b₂ f) = s₁.fold op b₂ f * s₂.fold op b₁ f := by
| Mathlib.Data.Finset.Fold.112_0.vMyQI0nR4eRmtxs | theorem fold_union_inter [DecidableEq α] {s₁ s₂ : Finset α} {b₁ b₂ : β} :
((s₁ ∪ s₂).fold op b₁ f * (s₁ ∩ s₂).fold op b₂ f) = s₁.fold op b₂ f * s₂.fold op b₁ f | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
s₁ s₂ : Finset α
b₁ b₂ : β
⊢ op (Multiset.fold op b₁ (Multiset.map f (s₁ ∪ s₂).val)) (Multiset.fold op b₂ (Multiset.map f (s₁ ∩ s₂).val)) =
op (Multiset.fold... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [← fold_add op, ← Multiset.map_add, union_val, inter_val, union_add_inter, Multiset.map_add,
hc.comm, fold_add] | theorem fold_union_inter [DecidableEq α] {s₁ s₂ : Finset α} {b₁ b₂ : β} :
((s₁ ∪ s₂).fold op b₁ f * (s₁ ∩ s₂).fold op b₂ f) = s₁.fold op b₂ f * s₂.fold op b₁ f := by
unfold fold
| Mathlib.Data.Finset.Fold.112_0.vMyQI0nR4eRmtxs | theorem fold_union_inter [DecidableEq α] {s₁ s₂ : Finset α} {b₁ b₂ : β} :
((s₁ ∪ s₂).fold op b₁ f * (s₁ ∩ s₂).fold op b₂ f) = s₁.fold op b₂ f * s₂.fold op b₁ f | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
hi : IsIdempotent β op
⊢ fold op b f (insert a s) = op (f a) (fold op b f s) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | by_cases h : a ∈ s | @[simp]
theorem fold_insert_idem [DecidableEq α] [hi : IsIdempotent β op] :
(insert a s).fold op b f = f a * s.fold op b f := by
| Mathlib.Data.Finset.Fold.119_0.vMyQI0nR4eRmtxs | @[simp]
theorem fold_insert_idem [DecidableEq α] [hi : IsIdempotent β op] :
(insert a s).fold op b f = f a * s.fold op b f | Mathlib_Data_Finset_Fold |
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
hi : IsIdempotent β op
h : a ∈ s
⊢ fold op b f (insert a s) = op (f a) (fold op b f s) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [← insert_erase h] | @[simp]
theorem fold_insert_idem [DecidableEq α] [hi : IsIdempotent β op] :
(insert a s).fold op b f = f a * s.fold op b f := by
by_cases h : a ∈ s
· | Mathlib.Data.Finset.Fold.119_0.vMyQI0nR4eRmtxs | @[simp]
theorem fold_insert_idem [DecidableEq α] [hi : IsIdempotent β op] :
(insert a s).fold op b f = f a * s.fold op b f | Mathlib_Data_Finset_Fold |
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
hi : IsIdempotent β op
h : a ∈ s
⊢ fold op b f (insert a (insert a (erase s a))) = op (f a) (fold op b f (insert a (erase s a))) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp [← ha.assoc, hi.idempotent] | @[simp]
theorem fold_insert_idem [DecidableEq α] [hi : IsIdempotent β op] :
(insert a s).fold op b f = f a * s.fold op b f := by
by_cases h : a ∈ s
· rw [← insert_erase h]
| Mathlib.Data.Finset.Fold.119_0.vMyQI0nR4eRmtxs | @[simp]
theorem fold_insert_idem [DecidableEq α] [hi : IsIdempotent β op] :
(insert a s).fold op b f = f a * s.fold op b f | Mathlib_Data_Finset_Fold |
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
hi : IsIdempotent β op
h : a ∉ s
⊢ fold op b f (insert a s) = op (f a) (fold op b f s) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | apply fold_insert h | @[simp]
theorem fold_insert_idem [DecidableEq α] [hi : IsIdempotent β op] :
(insert a s).fold op b f = f a * s.fold op b f := by
by_cases h : a ∈ s
· rw [← insert_erase h]
simp [← ha.assoc, hi.idempotent]
· | Mathlib.Data.Finset.Fold.119_0.vMyQI0nR4eRmtxs | @[simp]
theorem fold_insert_idem [DecidableEq α] [hi : IsIdempotent β op] :
(insert a s).fold op b f = f a * s.fold op b f | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
s : Finset γ
hi : IsIdempotent β op
⊢ fold op b f (image g s) = fold op b (f ∘ g) s | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | induction' s using Finset.cons_induction with x xs hx ih | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : IsIdempotent β op] :
(image g s).fold op b f = s.fold op b (f ∘ g) := by
| Mathlib.Data.Finset.Fold.128_0.vMyQI0nR4eRmtxs | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : IsIdempotent β op] :
(image g s).fold op b f = s.fold op b (f ∘ g) | Mathlib_Data_Finset_Fold |
case empty
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
hi : IsIdempotent β op
⊢ fold op b f (image g ∅) = fold op b (f ∘ g) ∅ | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [fold_empty, image_empty, fold_empty] | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : IsIdempotent β op] :
(image g s).fold op b f = s.fold op b (f ∘ g) := by
induction' s using Finset.cons_induction with x xs hx ih
· | Mathlib.Data.Finset.Fold.128_0.vMyQI0nR4eRmtxs | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : IsIdempotent β op] :
(image g s).fold op b f = s.fold op b (f ∘ g) | Mathlib_Data_Finset_Fold |
case cons
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
hi : IsIdempotent β op
x : γ
xs : Finset γ
hx : x ∉ xs
ih : fold op b f (image g xs) = fold op b (f ∘ g) xs
⊢ fold op b f (image g (cons x xs... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | haveI := Classical.decEq γ | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : IsIdempotent β op] :
(image g s).fold op b f = s.fold op b (f ∘ g) := by
induction' s using Finset.cons_induction with x xs hx ih
· rw [fold_empty, image_empty, fold_empty]
· | Mathlib.Data.Finset.Fold.128_0.vMyQI0nR4eRmtxs | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : IsIdempotent β op] :
(image g s).fold op b f = s.fold op b (f ∘ g) | Mathlib_Data_Finset_Fold |
case cons
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
hi : IsIdempotent β op
x : γ
xs : Finset γ
hx : x ∉ xs
ih : fold op b f (image g xs) = fold op b (f ∘ g) xs
this : DecidableEq γ
⊢ fold op b ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [fold_cons, cons_eq_insert, image_insert, fold_insert_idem, ih] | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : IsIdempotent β op] :
(image g s).fold op b f = s.fold op b (f ∘ g) := by
induction' s using Finset.cons_induction with x xs hx ih
· rw [fold_empty, image_empty, fold_empty]
· haveI := Classical.decEq γ
| Mathlib.Data.Finset.Fold.128_0.vMyQI0nR4eRmtxs | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : IsIdempotent β op] :
(image g s).fold op b f = s.fold op b (f ∘ g) | Mathlib_Data_Finset_Fold |
case cons
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
inst✝ : DecidableEq α
g : γ → α
hi : IsIdempotent β op
x : γ
xs : Finset γ
hx : x ∉ xs
ih : fold op b f (image g xs) = fold op b (f ∘ g) xs
this : DecidableEq γ
⊢ op (f (g x... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp only [Function.comp_apply] | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : IsIdempotent β op] :
(image g s).fold op b f = s.fold op b (f ∘ g) := by
induction' s using Finset.cons_induction with x xs hx ih
· rw [fold_empty, image_empty, fold_empty]
· haveI := Classical.decEq γ
rw [fold_cons, cons_eq_insert, ... | Mathlib.Data.Finset.Fold.128_0.vMyQI0nR4eRmtxs | theorem fold_image_idem [DecidableEq α] {g : γ → α} {s : Finset γ} [hi : IsIdempotent β op] :
(image g s).fold op b f = s.fold op b (f ∘ g) | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
⊢ fold op b (fun i => if p i then f i else g i) s =
op (fold op b f (filter p s)) (fold op b g (filter (fun i => ¬p ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | classical
induction' s using Finset.induction_on with x s hx IH
· simp [hb]
· simp only [Finset.fold_insert hx]
split_ifs with h
· have : x ∉ Finset.filter p s := by simp [hx]
simp [Finset.filter_insert, h, Finset.fold_insert this, ha.assoc, IH]
· have : x ∉ Finset.filter (fun i =>... | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
⊢ fold op b (fun i => if p i then f i else g i) s =
op (fold op b f (filter p s)) (fold op b g (filter (fun i => ¬p ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | induction' s using Finset.induction_on with x s hx IH | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
case empty
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
⊢ fold op b (fun i => if p i then f i else g i) ∅ =
op (fold op b f (filter p ∅)) (fold op b g (filter (f... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp [hb] | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
x : α
s : Finset α
hx : x ∉ s
IH :
fold op b (fun i => if p i then f i else g i) s =
op (fold op b f ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp only [Finset.fold_insert hx] | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
x : α
s : Finset α
hx : x ∉ s
IH :
fold op b (fun i => if p i then f i else g i) s =
op (fold op b f ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | split_ifs with h | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
x : α
s : Finset α
hx : x ∉ s
IH :
fold op b (fun i => if p i then f i else g i) s =
op (fold op b f (fi... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | have : x ∉ Finset.filter p s := by simp [hx] | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
x : α
s : Finset α
hx : x ∉ s
IH :
fold op b (fun i => if p i then f i else g i) s =
op (fold op b f (filter p s)... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp [hx] | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
case pos
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
x : α
s : Finset α
hx : x ∉ s
IH :
fold op b (fun i => if p i then f i else g i) s =
op (fold op b f (fi... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp [Finset.filter_insert, h, Finset.fold_insert this, ha.assoc, IH] | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
x : α
s : Finset α
hx : x ∉ s
IH :
fold op b (fun i => if p i then f i else g i) s =
op (fold op b f (fi... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | have : x ∉ Finset.filter (fun i => ¬ p i) s := by simp [hx] | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
x : α
s : Finset α
hx : x ∉ s
IH :
fold op b (fun i => if p i then f i else g i) s =
op (fold op b f (filter p s)... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp [hx] | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
case neg
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a : α
g : α → β
hb : op b b = b
p : α → Prop
inst✝ : DecidablePred p
x : α
s : Finset α
hx : x ∉ s
IH :
fold op b (fun i => if p i then f i else g i) s =
op (fold op b f (fi... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp [Finset.filter_insert, h, Finset.fold_insert this, IH, ← ha.assoc, hc.comm] | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib.Data.Finset.Fold.137_0.vMyQI0nR4eRmtxs | /-- A stronger version of `Finset.fold_ite`, but relies on
an explicit proof of idempotency on the seed element, rather
than relying on typeclass idempotency over the whole type. -/
theorem fold_ite' {g : α → β} (hb : op b b = b) (p : α → Prop) [DecidablePred p] :
Finset.fold op b (fun i => ite (p i) (f i) (g i)) s... | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
⊢ r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), and_assoc]
apply and_congr Iff.rfl
constructor
· rintro ⟨h₁, h₂⟩
intro b hb
rw [Finset.mem_insert] at hb
rcases hb with (rfl | hb) <;> s... | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
| Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
⊢ r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | induction' s using Finset.induction_on with a s ha IH | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
| Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case empty
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
⊢ r c (fold op b f ∅) ↔ r c b ∧ ∀ x ∈ ∅, r c (f x) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x)
⊢ r c (fold ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), and_assoc] | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
| Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x)
⊢ (r c b ∧ r... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | apply and_congr Iff.rfl | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x)
⊢ (r c (f a)... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | constructor | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert.mp
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x)
⊢ (r c (f... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rintro ⟨h₁, h₂⟩ | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert.mp.intro
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x)
h₁ ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | intro b hb | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert.mp.intro
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b✝ : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b✝ f s) ↔ r c b✝ ∧ ∀ x ∈ s, r c (f x)
... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [Finset.mem_insert] at hb | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert.mp.intro
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b✝ : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b✝ f s) ↔ r c b✝ ∧ ∀ x ∈ s, r c (f x)
... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rcases hb with (rfl | hb) | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert.mp.intro.inl
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b✝ : β
s✝ : Finset α
a : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
s : Finset α
IH : r c (fold op b✝ f s) ↔ r c b✝ ∧ ∀ x ∈ s, r c (f x)
h₂ : ∀ x ∈ s, ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | solve_by_elim | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert.mp.intro.inr
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b✝ : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b✝ f s) ↔ r c b✝ ∧ ∀ x ∈ s, r c (f... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | solve_by_elim | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert.mpr
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x)
⊢ (∀ x ∈... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | intro h | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert.mpr
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x)
h : ∀ x ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | constructor | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert.mpr.left
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x)
h :... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | exact h a (Finset.mem_insert_self _ _) | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert.mpr.right
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∧ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b f s) ↔ r c b ∧ ∀ x ∈ s, r c (f x)
h ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | exact fun b hb => h b <| Finset.mem_insert_of_mem hb | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← and_assoc, @and_comm (r c (f a)), a... | Mathlib.Data.Finset.Fold.164_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_and {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∧ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∧ ∀ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∨ r x z
c : β
⊢ r c (fold op b f s) ↔ r c b ∨ ∃ x ∈ s, r c (f x) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | classical
induction' s using Finset.induction_on with a s ha IH
· simp
rw [Finset.fold_insert ha, hr, IH, ← or_assoc, @or_comm (r c (f a)), or_assoc]
apply or_congr Iff.rfl
constructor
· rintro (h₁ | ⟨x, hx, h₂⟩)
· use a
simp [h₁]
· refine' ⟨x, by simp [hx], h₂⟩
· rintro ... | theorem fold_op_rel_iff_or {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∨ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∨ ∃ x ∈ s, r c (f x) := by
| Mathlib.Data.Finset.Fold.182_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_or {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∨ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∨ ∃ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∨ r x z
c : β
⊢ r c (fold op b f s) ↔ r c b ∨ ∃ x ∈ s, r c (f x) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | induction' s using Finset.induction_on with a s ha IH | theorem fold_op_rel_iff_or {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∨ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∨ ∃ x ∈ s, r c (f x) := by
classical
| Mathlib.Data.Finset.Fold.182_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_or {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∨ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∨ ∃ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case empty
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha : IsAssociative β op
f : α → β
b : β
s : Finset α
a : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∨ r x z
c : β
⊢ r c (fold op b f ∅) ↔ r c b ∨ ∃ x ∈ ∅, r c (f x) | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | simp | theorem fold_op_rel_iff_or {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∨ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∨ ∃ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· | Mathlib.Data.Finset.Fold.182_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_or {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∨ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∨ ∃ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
case insert
α : Type u_1
β : Type u_2
γ : Type u_3
op : β → β → β
hc : IsCommutative β op
ha✝ : IsAssociative β op
f : α → β
b : β
s✝ : Finset α
a✝ : α
r : β → β → Prop
hr : ∀ {x y z : β}, r x (op y z) ↔ r x y ∨ r x z
c : β
a : α
s : Finset α
ha : a ∉ s
IH : r c (fold op b f s) ↔ r c b ∨ ∃ x ∈ s, r c (f x)
⊢ r c (fold ... | /-
Copyright (c) 2017 Mario Carneiro. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Mario Carneiro
-/
import Mathlib.Algebra.Order.Monoid.WithTop
import Mathlib.Data.Finset.Image
import Mathlib.Data.Multiset.Fold
#align_import data.finset.fold from "leanprover-commun... | rw [Finset.fold_insert ha, hr, IH, ← or_assoc, @or_comm (r c (f a)), or_assoc] | theorem fold_op_rel_iff_or {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∨ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∨ ∃ x ∈ s, r c (f x) := by
classical
induction' s using Finset.induction_on with a s ha IH
· simp
| Mathlib.Data.Finset.Fold.182_0.vMyQI0nR4eRmtxs | theorem fold_op_rel_iff_or {r : β → β → Prop} (hr : ∀ {x y z}, r x (op y z) ↔ r x y ∨ r x z)
{c : β} : r c (s.fold op b f) ↔ r c b ∨ ∃ x ∈ s, r c (f x) | Mathlib_Data_Finset_Fold |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.