1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: List.mem_foldr_sup_support_iff
File: Mathlib/Data/Finsupp/BigOperators.lean

tactic: simp only [Finset.sup_eq_union, List.foldr_map, Finsupp.mem_support_iff, exists_prop]
state_before: ι : Type u_1
M : Type u_2
inst✝¹ : DecidableEq ι
inst✝ : Zero M
l : List (ι →₀ M)
x : ι
⊢ x ∈ foldr (fun x x_1 => x.support ⊔ x_1) ∅ l ↔ ∃ f ∈ l, x ∈ f.support
state_after: ι : Type u_1
M : Type u_2
inst✝¹ : DecidableEq ι
inst✝ : Zero M
l : List (ι →₀ M)
x : ι
⊢ x ∈ foldr (fun x x_1 => x.support ∪ x_1) ∅ l ↔ ∃ f ∈ l, f x ≠ 0

tactic: induction' l with hd tl IH
state_before: ι : Type u_1
M : Type u_2
inst✝¹ : DecidableEq ι
inst✝ : Zero M
l : List (ι →₀ M)
x : ι
⊢ x ∈ foldr (fun x x_1 => x.support ∪ x_1) ∅ l ↔ ∃ f ∈ l, f x ≠ 0
state_after: case nil
ι : Type u_1
M : Type u_2
inst✝¹ : DecidableEq ι
inst✝ : Zero M
x : ι
⊢ x ∈ foldr (fun x x_1 => x.support ∪ x_1) ∅ [] ↔ ∃ f ∈ [], f x ≠ 0

case cons
ι : Type u_1
M : Type u_2
inst✝¹ : DecidableEq ι
inst✝ : Zero M
x : ι
hd : ι →₀ M
tl : List (ι →₀ M)
IH : x ∈ foldr (fun x x_1 => x.support ∪ x_1) ∅ tl ↔ ∃ f ∈ tl, f x ≠ 0
⊢ x ∈ foldr (fun x x_1 => x.support ∪ x_1) ∅ (hd :: tl) ↔ ∃ f ∈ hd :: tl, f x ≠ 0

tactic: simp
state_before: case nil
ι : Type u_1
M : Type u_2
inst✝¹ : DecidableEq ι
inst✝ : Zero M
x : ι
⊢ x ∈ foldr (fun x x_1 => x.support ∪ x_1) ∅ [] ↔ ∃ f ∈ [], f x ≠ 0
state_after: no goals

tactic: simp only [foldr, Function.comp_apply, Finset.mem_union, Finsupp.mem_support_iff, ne_eq, IH,
  find?, mem_cons, exists_eq_or_imp]
state_before: case cons
ι : Type u_1
M : Type u_2
inst✝¹ : DecidableEq ι
inst✝ : Zero M
x : ι
hd : ι →₀ M
tl : List (ι →₀ M)
IH : x ∈ foldr (fun x x_1 => x.support ∪ x_1) ∅ tl ↔ ∃ f ∈ tl, f x ≠ 0
⊢ x ∈ foldr (fun x x_1 => x.support ∪ x_1) ∅ (hd :: tl) ↔ ∃ f ∈ hd :: tl, f x ≠ 0
state_after: no goals
Theorem: symmDiff_symmDiff_left
File: Mathlib/Order/SymmDiff.lean

tactic: rw [sdiff_symmDiff', sup_comm (c ⊓ a ⊓ b), symmDiff_sdiff]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ a ∆ b \ c ⊔ c \ a ∆ b = a \ (b ⊔ c) ⊔ b \ (a ⊔ c) ⊔ (c \ (a ⊔ b) ⊔ c ⊓ a ⊓ b)
state_after: no goals

tactic: ac_rfl
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
π : ι → Type u_4
inst✝ : GeneralizedBooleanAlgebra α
a b c d : α
⊢ a \ (b ⊔ c) ⊔ b \ (a ⊔ c) ⊔ (c \ (a ⊔ b) ⊔ c ⊓ a ⊓ b) = a \ (b ⊔ c) ⊔ b \ (a ⊔ c) ⊔ c \ (a ⊔ b) ⊔ a ⊓ b ⊓ c
state_after: no goals
Theorem: Set.mulIndicator_comp_of_one
File: Mathlib/Algebra/Group/Indicator.lean

tactic: funext
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s t : Set α
f g✝ : α → M
a : α
g : M → N
hg : g 1 = 1
⊢ s.mulIndicator (g ∘ f) = g ∘ s.mulIndicator f
state_after: case h
α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s t : Set α
f g✝ : α → M
a : α
g : M → N
hg : g 1 = 1
x✝ : α
⊢ s.mulIndicator (g ∘ f) x✝ = (g ∘ s.mulIndicator f) x✝

tactic: simp only [mulIndicator]
state_before: case h
α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s t : Set α
f g✝ : α → M
a : α
g : M → N
hg : g 1 = 1
x✝ : α
⊢ s.mulIndicator (g ∘ f) x✝ = (g ∘ s.mulIndicator f) x✝
state_after: case h
α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s t : Set α
f g✝ : α → M
a : α
g : M → N
hg : g 1 = 1
x✝ : α
⊢ (if x✝ ∈ s then (g ∘ f) x✝ else 1) = (g ∘ s.mulIndicator f) x✝

tactic: split_ifs <;> simp [*]
state_before: case h
α : Type u_1
β : Type u_2
ι : Type u_3
M : Type u_4
N : Type u_5
inst✝¹ : One M
inst✝ : One N
s t : Set α
f g✝ : α → M
a : α
g : M → N
hg : g 1 = 1
x✝ : α
⊢ (if x✝ ∈ s then (g ∘ f) x✝ else 1) = (g ∘ s.mulIndicator f) x✝
state_after: no goals
Theorem: EReal.div_mul_cancel
File: Mathlib/Data/Real/EReal.lean

tactic: change (a * b⁻¹) * b = a
state_before: a b : EReal
h₁ : b ≠ ⊥
h₂ : b ≠ ⊤
h₃ : b ≠ 0
⊢ a / b * b = a
state_after: a b : EReal
h₁ : b ≠ ⊥
h₂ : b ≠ ⊤
h₃ : b ≠ 0
⊢ a * b⁻¹ * b = a

tactic: rw [mul_assoc, mul_comm b⁻¹ b]
state_before: a b : EReal
h₁ : b ≠ ⊥
h₂ : b ≠ ⊤
h₃ : b ≠ 0
⊢ a * b⁻¹ * b = a
state_after: a b : EReal
h₁ : b ≠ ⊥
h₂ : b ≠ ⊤
h₃ : b ≠ 0
⊢ a * (b * b⁻¹) = a

tactic: change a * (b / b) = a
state_before: a b : EReal
h₁ : b ≠ ⊥
h₂ : b ≠ ⊤
h₃ : b ≠ 0
⊢ a * (b * b⁻¹) = a
state_after: a b : EReal
h₁ : b ≠ ⊥
h₂ : b ≠ ⊤
h₃ : b ≠ 0
⊢ a * (b / b) = a

tactic: rw [div_self h₁ h₂ h₃, mul_one]
state_before: a b : EReal
h₁ : b ≠ ⊥
h₂ : b ≠ ⊤
h₃ : b ≠ 0
⊢ a * (b / b) = a
state_after: no goals
Theorem: Ordinal.principal_add_of_principal_mul
File: Mathlib/SetTheory/Ordinal/Principal.lean

tactic: cases' lt_or_gt_of_ne ho₂ with ho₁ ho₂
state_before: o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : o ≠ 2
⊢ Principal (fun x x_1 => x + x_1) o
state_after: case inl
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : o ≠ 2
ho₁ : o < 2
⊢ Principal (fun x x_1 => x + x_1) o

case inr
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂✝ : o ≠ 2
ho₂ : o > 2
⊢ Principal (fun x x_1 => x + x_1) o

tactic: replace ho₁ : o < succ 1 := by simpa using ho₁
state_before: case inl
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : o ≠ 2
ho₁ : o < 2
⊢ Principal (fun x x_1 => x + x_1) o
state_after: case inl
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : o ≠ 2
ho₁ : o < succ 1
⊢ Principal (fun x x_1 => x + x_1) o

tactic: rw [lt_succ_iff] at ho₁
state_before: case inl
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : o ≠ 2
ho₁ : o < succ 1
⊢ Principal (fun x x_1 => x + x_1) o
state_after: case inl
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : o ≠ 2
ho₁ : o ≤ 1
⊢ Principal (fun x x_1 => x + x_1) o

tactic: exact principal_add_of_le_one ho₁
state_before: case inl
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : o ≠ 2
ho₁ : o ≤ 1
⊢ Principal (fun x x_1 => x + x_1) o
state_after: no goals

tactic: simpa using ho₁
state_before: o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂ : o ≠ 2
ho₁ : o < 2
⊢ o < succ 1
state_after: no goals

tactic: refine fun a b hao hbo => lt_of_le_of_lt ?_ (ho (max_lt hao hbo) ho₂)
state_before: case inr
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂✝ : o ≠ 2
ho₂ : o > 2
⊢ Principal (fun x x_1 => x + x_1) o
state_after: case inr
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂✝ : o ≠ 2
ho₂ : o > 2
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
⊢ (fun x x_1 => x + x_1) a b ≤ (fun x x_1 => x * x_1) (max a b) 2

tactic: dsimp only
state_before: case inr
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂✝ : o ≠ 2
ho₂ : o > 2
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
⊢ (fun x x_1 => x + x_1) a b ≤ (fun x x_1 => x * x_1) (max a b) 2
state_after: case inr
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂✝ : o ≠ 2
ho₂ : o > 2
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
⊢ a + b ≤ max a b * 2

tactic: rw [← one_add_one_eq_two, mul_add, mul_one]
state_before: case inr
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂✝ : o ≠ 2
ho₂ : o > 2
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
⊢ a + b ≤ max a b * 2
state_after: case inr
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂✝ : o ≠ 2
ho₂ : o > 2
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
⊢ a + b ≤ max a b + max a b

tactic: exact add_le_add (le_max_left a b) (le_max_right a b)
state_before: case inr
o : Ordinal.{u_1}
ho : Principal (fun x x_1 => x * x_1) o
ho₂✝ : o ≠ 2
ho₂ : o > 2
a b : Ordinal.{u_1}
hao : a < o
hbo : b < o
⊢ a + b ≤ max a b + max a b
state_after: no goals
Theorem: hasBasis_coclosedLindelof
File: Mathlib/Topology/Compactness/Lindelof.lean

tactic: simp only [Filter.coclosedLindelof, iInf_and']
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ (coclosedLindelof X).HasBasis (fun s => IsClosed s ∧ IsLindelof s) compl
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ (⨅ s, ⨅ (_ : IsClosed s ∧ IsLindelof s), 𝓟 sᶜ).HasBasis (fun s => IsClosed s ∧ IsLindelof s) compl

tactic: refine hasBasis_biInf_principal' ?_ ⟨∅, isClosed_empty, isLindelof_empty⟩
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ (⨅ s, ⨅ (_ : IsClosed s ∧ IsLindelof s), 𝓟 sᶜ).HasBasis (fun s => IsClosed s ∧ IsLindelof s) compl
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ ∀ (i : Set X),
    IsClosed i ∧ IsLindelof i →
      ∀ (j : Set X), IsClosed j ∧ IsLindelof j → ∃ k, (IsClosed k ∧ IsLindelof k) ∧ kᶜ ⊆ iᶜ ∧ kᶜ ⊆ jᶜ

tactic: rintro s ⟨hs₁, hs₂⟩ t ⟨ht₁, ht₂⟩
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
⊢ ∀ (i : Set X),
    IsClosed i ∧ IsLindelof i →
      ∀ (j : Set X), IsClosed j ∧ IsLindelof j → ∃ k, (IsClosed k ∧ IsLindelof k) ∧ kᶜ ⊆ iᶜ ∧ kᶜ ⊆ jᶜ
state_after: case intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s✝ t✝ s : Set X
hs₁ : IsClosed s
hs₂ : IsLindelof s
t : Set X
ht₁ : IsClosed t
ht₂ : IsLindelof t
⊢ ∃ k, (IsClosed k ∧ IsLindelof k) ∧ kᶜ ⊆ sᶜ ∧ kᶜ ⊆ tᶜ

tactic: exact ⟨s ∪ t, ⟨⟨hs₁.union ht₁, hs₂.union ht₂⟩, compl_subset_compl.2 subset_union_left,
  compl_subset_compl.2 subset_union_right⟩⟩
state_before: case intro.intro
X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s✝ t✝ s : Set X
hs₁ : IsClosed s
hs₂ : IsLindelof s
t : Set X
ht₁ : IsClosed t
ht₂ : IsLindelof t
⊢ ∃ k, (IsClosed k ∧ IsLindelof k) ∧ kᶜ ⊆ sᶜ ∧ kᶜ ⊆ tᶜ
state_after: no goals
Theorem: writtenInExtChartAt_extChartAt
File: Mathlib/Geometry/Manifold/SmoothManifoldWithCorners.lean

tactic: simp_all only [mfld_simps]
state_before: 𝕜 : Type u_1
E : Type u_2
M : Type u_3
H : Type u_4
E' : Type u_5
M' : Type u_6
H' : Type u_7
inst✝¹⁰ : NontriviallyNormedField 𝕜
inst✝⁹ : NormedAddCommGroup E
inst✝⁸ : NormedSpace 𝕜 E
inst✝⁷ : TopologicalSpace H
inst✝⁶ : TopologicalSpace M
f f' : PartialHomeomorph M H
I : ModelWithCorners 𝕜 E H
inst✝⁵ : NormedAddCommGroup E'
inst✝⁴ : NormedSpace 𝕜 E'
inst✝³ : TopologicalSpace H'
inst✝² : TopologicalSpace M'
I' : ModelWithCorners 𝕜 E' H'
s t : Set M
inst✝¹ : ChartedSpace H M
inst✝ : ChartedSpace H' M'
x : M
y : E
h : y ∈ (extChartAt I x).target
⊢ writtenInExtChartAt I 𝓘(𝕜, E) x (↑(extChartAt I x)) y = y
state_after: no goals
Theorem: MeasureTheory.empty_mem_measurableCylinders
File: Mathlib/MeasureTheory/Constructions/Cylinders.lean

tactic: simp_rw [measurableCylinders, mem_iUnion, mem_singleton_iff]
state_before: ι : Type u_2
α✝ : ι → Type ?u.29757
α : ι → Type u_1
inst✝ : (i : ι) → MeasurableSpace (α i)
⊢ ∅ ∈ measurableCylinders α
state_after: ι : Type u_2
α✝ : ι → Type ?u.29757
α : ι → Type u_1
inst✝ : (i : ι) → MeasurableSpace (α i)
⊢ ∃ i i_1, ∃ (_ : MeasurableSet i_1), ∅ = cylinder i i_1

tactic: exact ⟨∅, ∅, MeasurableSet.empty, (cylinder_empty _).symm⟩
state_before: ι : Type u_2
α✝ : ι → Type ?u.29757
α : ι → Type u_1
inst✝ : (i : ι) → MeasurableSpace (α i)
⊢ ∃ i i_1, ∃ (_ : MeasurableSet i_1), ∅ = cylinder i i_1
state_after: no goals
Theorem: lt_mul_iff_one_lt_right'
File: Mathlib/Algebra/Order/Monoid/Unbundled/Basic.lean

tactic: rw [mul_one]
state_before: α : Type u_1
β : Type u_2
inst✝³ : MulOneClass α
inst✝² : LT α
inst✝¹ : CovariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1
inst✝ : ContravariantClass α α (fun x x_1 => x * x_1) fun x x_1 => x < x_1
a b : α
⊢ a < a * b ↔ a * 1 < a * b
state_after: no goals
Theorem: List.Perm.filterMap
File: .lake/packages/batteries/Batteries/Data/List/Perm.lean

tactic: induction p with
| nil => simp
| cons x _p IH => cases h : f x <;> simp [h, filterMap_cons, IH, Perm.cons]
| swap x y l₂ => cases hx : f x <;> cases hy : f y <;> simp [hx, hy, filterMap_cons, swap]
| trans _p₁ _p₂ IH₁ IH₂ => exact IH₁.trans IH₂
state_before: α : Type u_1
β : Type u_2
f : α → Option β
l₁ l₂ : List α
p : l₁ ~ l₂
⊢ List.filterMap f l₁ ~ List.filterMap f l₂
state_after: no goals

tactic: simp
state_before: case nil
α : Type u_1
β : Type u_2
f : α → Option β
l₁ l₂ : List α
⊢ List.filterMap f [] ~ List.filterMap f []
state_after: no goals

tactic: cases h : f x <;> simp [h, filterMap_cons, IH, Perm.cons]
state_before: case cons
α : Type u_1
β : Type u_2
f : α → Option β
l₁ l₂ : List α
x : α
l₁✝ l₂✝ : List α
_p : l₁✝ ~ l₂✝
IH : List.filterMap f l₁✝ ~ List.filterMap f l₂✝
⊢ List.filterMap f (x :: l₁✝) ~ List.filterMap f (x :: l₂✝)
state_after: no goals

tactic: cases hx : f x <;> cases hy : f y <;> simp [hx, hy, filterMap_cons, swap]
state_before: case swap
α : Type u_1
β : Type u_2
f : α → Option β
l₁ l₂✝ : List α
x y : α
l₂ : List α
⊢ List.filterMap f (y :: x :: l₂) ~ List.filterMap f (x :: y :: l₂)
state_after: no goals

tactic: exact IH₁.trans IH₂
state_before: case trans
α : Type u_1
β : Type u_2
f : α → Option β
l₁ l₂ l₁✝ l₂✝ l₃✝ : List α
_p₁ : l₁✝ ~ l₂✝
_p₂ : l₂✝ ~ l₃✝
IH₁ : List.filterMap f l₁✝ ~ List.filterMap f l₂✝
IH₂ : List.filterMap f l₂✝ ~ List.filterMap f l₃✝
⊢ List.filterMap f l₁✝ ~ List.filterMap f l₃✝
state_after: no goals
Theorem: CategoryTheory.PreservesFiniteLimitsOfFlat.fac
File: Mathlib/CategoryTheory/Functor/Flat.lean

tactic: simp [lift, ← Functor.map_comp]
state_before: C : Type u₁
inst✝⁴ : Category.{v₁, u₁} C
D : Type u₂
inst✝³ : Category.{v₂, u₂} D
J : Type v₁
inst✝² : SmallCategory J
inst✝¹ : FinCategory J
K : J ⥤ C
F : C ⥤ D
inst✝ : RepresentablyFlat F
c : Cone K
hc : IsLimit c
s : Cone (K ⋙ F)
x : J
⊢ lift F hc s ≫ (F.mapCone c).π.app x = s.π.app x
state_after: no goals
Theorem: Primrec.fst
File: Mathlib/Computability/Primrec.lean

tactic: simp only [Nat.unpaired, Nat.unpair_pair, decode_prod_val]
state_before: α✝ : Type u_1
σ : Type u_2
inst✝³ : Primcodable α✝
inst✝² : Primcodable σ
α : Type u_3
β : Type u_4
inst✝¹ : Primcodable α
inst✝ : Primcodable β
n : ℕ
⊢ Nat.unpaired
      (fun z n =>
        Nat.casesOn n 0 fun y =>
          Nat.unpaired (fun z n => Nat.casesOn n 0 fun y => (Nat.unpair (Nat.pair z y)).1.succ)
            (Nat.pair (Nat.unpair (Nat.pair z y)).2 (encode (decode (Nat.unpair (Nat.pair z y)).1))))
      (Nat.pair (Nat.unpair n).2 (encode (decode (Nat.unpair n).1))) =
    encode (Option.map Prod.fst (decode n))
state_after: α✝ : Type u_1
σ : Type u_2
inst✝³ : Primcodable α✝
inst✝² : Primcodable σ
α : Type u_3
β : Type u_4
inst✝¹ : Primcodable α
inst✝ : Primcodable β
n : ℕ
⊢ Nat.rec 0 (fun n_1 n_ih => Nat.rec 0 (fun n n_ih => n_1.succ) (encode (decode (Nat.unpair n).2)))
      (encode (decode (Nat.unpair n).1)) =
    encode
      (Option.map Prod.fst ((decode (Nat.unpair n).1).bind fun a => Option.map (Prod.mk a) (decode (Nat.unpair n).2)))

tactic: cases @decode α _ n.unpair.1 <;> simp
state_before: α✝ : Type u_1
σ : Type u_2
inst✝³ : Primcodable α✝
inst✝² : Primcodable σ
α : Type u_3
β : Type u_4
inst✝¹ : Primcodable α
inst✝ : Primcodable β
n : ℕ
⊢ Nat.rec 0 (fun n_1 n_ih => Nat.rec 0 (fun n n_ih => n_1.succ) (encode (decode (Nat.unpair n).2)))
      (encode (decode (Nat.unpair n).1)) =
    encode
      (Option.map Prod.fst ((decode (Nat.unpair n).1).bind fun a => Option.map (Prod.mk a) (decode (Nat.unpair n).2)))
state_after: case some
α✝ : Type u_1
σ : Type u_2
inst✝³ : Primcodable α✝
inst✝² : Primcodable σ
α : Type u_3
β : Type u_4
inst✝¹ : Primcodable α
inst✝ : Primcodable β
n : ℕ
val✝ : α
⊢ Nat.rec 0 (fun n n_ih => encode val✝ + 1) (encode (decode (Nat.unpair n).2)) =
    encode (Option.map (Function.const β val✝) (decode (Nat.unpair n).2))

tactic: cases @decode β _ n.unpair.2 <;> simp
state_before: case some
α✝ : Type u_1
σ : Type u_2
inst✝³ : Primcodable α✝
inst✝² : Primcodable σ
α : Type u_3
β : Type u_4
inst✝¹ : Primcodable α
inst✝ : Primcodable β
n : ℕ
val✝ : α
⊢ Nat.rec 0 (fun n n_ih => encode val✝ + 1) (encode (decode (Nat.unpair n).2)) =
    encode (Option.map (Function.const β val✝) (decode (Nat.unpair n).2))
state_after: no goals
Theorem: Fin.foldr_rev
File: .lake/packages/batteries/Batteries/Data/Fin/Lemmas.lean

tactic: induction n generalizing x with
| zero => simp
| succ n ih => rw [foldl_succ_last, foldr_succ, ← ih]; simp [rev_succ]
state_before: α : Sort u_1
n : Nat
f : α → Fin n → α
x : α
⊢ foldr n (fun i x => f x i.rev) x = foldl n f x
state_after: no goals

tactic: simp
state_before: case zero
α : Sort u_1
f : α → Fin 0 → α
x : α
⊢ foldr 0 (fun i x => f x i.rev) x = foldl 0 f x
state_after: no goals

tactic: rw [foldl_succ_last, foldr_succ, ← ih]
state_before: case succ
α : Sort u_1
n : Nat
ih : ∀ (f : α → Fin n → α) (x : α), foldr n (fun i x => f x i.rev) x = foldl n f x
f : α → Fin (n + 1) → α
x : α
⊢ foldr (n + 1) (fun i x => f x i.rev) x = foldl (n + 1) f x
state_after: case succ
α : Sort u_1
n : Nat
ih : ∀ (f : α → Fin n → α) (x : α), foldr n (fun i x => f x i.rev) x = foldl n f x
f : α → Fin (n + 1) → α
x : α
⊢ f (foldr n (fun i x => f x i.succ.rev) x) (rev 0) = f (foldr n (fun i x => f x i.rev.castSucc) x) (last n)

tactic: simp [rev_succ]
state_before: case succ
α : Sort u_1
n : Nat
ih : ∀ (f : α → Fin n → α) (x : α), foldr n (fun i x => f x i.rev) x = foldl n f x
f : α → Fin (n + 1) → α
x : α
⊢ f (foldr n (fun i x => f x i.succ.rev) x) (rev 0) = f (foldr n (fun i x => f x i.rev.castSucc) x) (last n)
state_after: no goals
Theorem: MeasureTheory.IsStoppingTime.measurableSet_min_iff
File: Mathlib/Probability/Process/Stopping.lean

tactic: rfl
state_before: Ω : Type u_1
β : Type u_2
ι : Type u_3
m : MeasurableSpace Ω
inst✝ : LinearOrder ι
f : Filtration ι m
τ π : Ω → ι
hτ : IsStoppingTime f τ
hπ : IsStoppingTime f π
s : Set Ω
⊢ MeasurableSet s ↔ MeasurableSet s ∧ MeasurableSet s
state_after: no goals
Theorem: Action.functorCategoryMonoidalEquivalence.ε_app
File: Mathlib/RepresentationTheory/Action/Monoidal.lean

tactic: dsimp only [functorCategoryMonoidalEquivalence]
state_before: V : Type (u + 1)
inst✝¹ : LargeCategory V
G : MonCat
inst✝ : MonoidalCategory V
⊢ (functorCategoryMonoidalEquivalence V G).ε.app PUnit.unit = 𝟙 ((𝟙_ (SingleObj ↑G ⥤ V)).obj PUnit.unit)
state_after: V : Type (u + 1)
inst✝¹ : LargeCategory V
G : MonCat
inst✝ : MonoidalCategory V
⊢ (Monoidal.fromTransported (functorCategoryEquivalence V G).symm).ε.app PUnit.unit =
    𝟙 ((𝟙_ (SingleObj ↑G ⥤ V)).obj PUnit.unit)

tactic: simp only [Monoidal.fromTransported_toLaxMonoidalFunctor_ε]
state_before: V : Type (u + 1)
inst✝¹ : LargeCategory V
G : MonCat
inst✝ : MonoidalCategory V
⊢ (Monoidal.fromTransported (functorCategoryEquivalence V G).symm).ε.app PUnit.unit =
    𝟙 ((𝟙_ (SingleObj ↑G ⥤ V)).obj PUnit.unit)
state_after: V : Type (u + 1)
inst✝¹ : LargeCategory V
G : MonCat
inst✝ : MonoidalCategory V
⊢ ((functorCategoryEquivalence V G).symm.unitIso.hom.app (𝟙_ (SingleObj ↑G ⥤ V))).app PUnit.unit =
    𝟙 ((𝟙_ (SingleObj ↑G ⥤ V)).obj PUnit.unit)

tactic: rfl
state_before: V : Type (u + 1)
inst✝¹ : LargeCategory V
G : MonCat
inst✝ : MonoidalCategory V
⊢ ((functorCategoryEquivalence V G).symm.unitIso.hom.app (𝟙_ (SingleObj ↑G ⥤ V))).app PUnit.unit =
    𝟙 ((𝟙_ (SingleObj ↑G ⥤ V)).obj PUnit.unit)
state_after: no goals
Theorem: MeasureTheory.iSup_lintegral_measurable_le_eq_lintegral
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: apply le_antisymm
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
⊢ ⨆ g, ⨆ (_ : Measurable g), ⨆ (_ : g ≤ f), ∫⁻ (a : α), g a ∂μ = ∫⁻ (a : α), f a ∂μ
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
⊢ ⨆ g, ⨆ (_ : Measurable g), ⨆ (_ : g ≤ f), ∫⁻ (a : α), g a ∂μ ≤ ∫⁻ (a : α), f a ∂μ

case a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
⊢ ∫⁻ (a : α), f a ∂μ ≤ ⨆ g, ⨆ (_ : Measurable g), ⨆ (_ : g ≤ f), ∫⁻ (a : α), g a ∂μ

tactic: exact iSup_le fun i => iSup_le fun _ => iSup_le fun h'i => lintegral_mono h'i
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
⊢ ⨆ g, ⨆ (_ : Measurable g), ⨆ (_ : g ≤ f), ∫⁻ (a : α), g a ∂μ ≤ ∫⁻ (a : α), f a ∂μ
state_after: no goals

tactic: rw [lintegral]
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
⊢ ∫⁻ (a : α), f a ∂μ ≤ ⨆ g, ⨆ (_ : Measurable g), ⨆ (_ : g ≤ f), ∫⁻ (a : α), g a ∂μ
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
⊢ ⨆ g, ⨆ (_ : ↑g ≤ fun a => f a), g.lintegral μ ≤ ⨆ g, ⨆ (_ : Measurable g), ⨆ (_ : g ≤ f), ∫⁻ (a : α), g a ∂μ

tactic: refine iSup₂_le fun i hi => le_iSup₂_of_le i i.measurable <| le_iSup_of_le hi ?_
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
⊢ ⨆ g, ⨆ (_ : ↑g ≤ fun a => f a), g.lintegral μ ≤ ⨆ g, ⨆ (_ : Measurable g), ⨆ (_ : g ≤ f), ∫⁻ (a : α), g a ∂μ
state_after: case a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
i : α →ₛ ℝ≥0∞
hi : ↑i ≤ fun a => f a
⊢ i.lintegral μ ≤ ∫⁻ (a : α), ↑i a ∂μ

tactic: exact le_of_eq (i.lintegral_eq_lintegral _).symm
state_before: case a
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
i : α →ₛ ℝ≥0∞
hi : ↑i ≤ fun a => f a
⊢ i.lintegral μ ≤ ∫⁻ (a : α), ↑i a ∂μ
state_after: no goals
Theorem: Fin.tail_cons
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: simp (config := { unfoldPartialApp := true }) [tail, cons]
state_before: m n : ℕ
α : Fin (n + 1) → Type u
x : α 0
q : (i : Fin (n + 1)) → α i
p : (i : Fin n) → α i.succ
i : Fin n
y : α i.succ
z : α 0
⊢ tail (cons x p) = p
state_after: no goals
Theorem: Stream'.zip_eq
File: Mathlib/Data/Stream/Init.lean

tactic: rw [← Stream'.eta (zip f s₁ s₂)]
state_before: α : Type u
β : Type v
δ : Type w
f : α → β → δ
s₁ : Stream' α
s₂ : Stream' β
⊢ zip f s₁ s₂ = f s₁.head s₂.head :: zip f s₁.tail s₂.tail
state_after: α : Type u
β : Type v
δ : Type w
f : α → β → δ
s₁ : Stream' α
s₂ : Stream' β
⊢ (zip f s₁ s₂).head :: (zip f s₁ s₂).tail = f s₁.head s₂.head :: zip f s₁.tail s₂.tail

tactic: rfl
state_before: α : Type u
β : Type v
δ : Type w
f : α → β → δ
s₁ : Stream' α
s₂ : Stream' β
⊢ (zip f s₁ s₂).head :: (zip f s₁ s₂).tail = f s₁.head s₂.head :: zip f s₁.tail s₂.tail
state_after: no goals