ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: LowerSet.supIrred_iff_of_finite
File: Mathlib/Order/Birkhoff.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : PartialOrder α
s : LowerSet α
inst✝ : Finite α
⊢ SupIrred s ↔ ∃ a, Iic a = s
state_after: case refine_1
α : Type u_1
inst✝¹ : PartialOrder α
s : LowerSet α
inst✝ : Finite α
hs : SupIrred s
⊢ ∃ a, Iic a = s

case refine_2
α : Type u_1
inst✝¹ : PartialOrder α
s : LowerSet α
inst✝ : Finite α
⊢ (∃ a, Iic a = s) → SupIrred s
tactic: refine ⟨fun hs ↦ ?_, ?_⟩
Theorem: inv_mul_mul_self
File: Mathlib/Algebra/GroupWithZero/Basic.lean

Proof steps:
state_before: α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
⊢ a⁻¹ * a * a = a
state_after: case pos
α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
h : a = 0
⊢ a⁻¹ * a * a = a

case neg
α : Type u_1
M₀ : Type u_2
G₀ : Type u_3
M₀' : Type u_4
G₀' : Type u_5
F : Type u_6
F' : Type u_7
inst✝ : GroupWithZero G₀
a✝ b c a : G₀
h : ¬a = 0
⊢ a⁻¹ * a * a = a
tactic: by_cases h : a = 0
Theorem: strictConcaveOn_of_deriv2_neg
File: Mathlib/Analysis/Convex/Deriv.lean

Proof steps:
state_before: D : Set ℝ
hD : Convex ℝ D
f : ℝ → ℝ
hf : ContinuousOn f D
hf'' : ∀ x ∈ interior D, deriv^[2] f x < 0
⊢ ∀ x ∈ interior (interior D), deriv (deriv f) x < 0
state_after: no goals
tactic: rwa [interior_interior]
Theorem: LieModule.map_lowerCentralSeries_eq
File: Mathlib/Algebra/Lie/Nilpotent.lean

Proof steps:
state_before: R : Type u
L : Type v
M : Type w
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
k : ℕ
N : LieSubmodule R L M
M₂ : Type w₁
inst✝³ : AddCommGroup M₂
inst✝² : Module R M₂
inst✝¹ : LieRingModule L M₂
inst✝ : LieModule R L M₂
f : M →ₗ⁅R,L⁆ M₂
hf : Function.Surjective ⇑f
⊢ LieSubmodule.map f (lowerCentralSeries R L M k) = lowerCentralSeries R L M₂ k
state_after: R : Type u
L : Type v
M : Type w
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
k : ℕ
N : LieSubmodule R L M
M₂ : Type w₁
inst✝³ : AddCommGroup M₂
inst✝² : Module R M₂
inst✝¹ : LieRingModule L M₂
inst✝ : LieModule R L M₂
f : M →ₗ⁅R,L⁆ M₂
hf : Function.Surjective ⇑f
⊢ lowerCentralSeries R L M₂ k ≤ LieSubmodule.map f (lowerCentralSeries R L M k)
tactic: apply le_antisymm (map_lowerCentralSeries_le k f)
state_before: R : Type u
L : Type v
M : Type w
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
k : ℕ
N : LieSubmodule R L M
M₂ : Type w₁
inst✝³ : AddCommGroup M₂
inst✝² : Module R M₂
inst✝¹ : LieRingModule L M₂
inst✝ : LieModule R L M₂
f : M →ₗ⁅R,L⁆ M₂
hf : Function.Surjective ⇑f
⊢ lowerCentralSeries R L M₂ k ≤ LieSubmodule.map f (lowerCentralSeries R L M k)
state_after: case zero
R : Type u
L : Type v
M : Type w
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
k : ℕ
N : LieSubmodule R L M
M₂ : Type w₁
inst✝³ : AddCommGroup M₂
inst✝² : Module R M₂
inst✝¹ : LieRingModule L M₂
inst✝ : LieModule R L M₂
f : M →ₗ⁅R,L⁆ M₂
hf : Function.Surjective ⇑f
⊢ lowerCentralSeries R L M₂ 0 ≤ LieSubmodule.map f (lowerCentralSeries R L M 0)

case succ
R : Type u
L : Type v
M : Type w
inst✝¹⁰ : CommRing R
inst✝⁹ : LieRing L
inst✝⁸ : LieAlgebra R L
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R M
inst✝⁵ : LieRingModule L M
inst✝⁴ : LieModule R L M
k✝ : ℕ
N : LieSubmodule R L M
M₂ : Type w₁
inst✝³ : AddCommGroup M₂
inst✝² : Module R M₂
inst✝¹ : LieRingModule L M₂
inst✝ : LieModule R L M₂
f : M →ₗ⁅R,L⁆ M₂
hf : Function.Surjective ⇑f
k : ℕ
ih : lowerCentralSeries R L M₂ k ≤ LieSubmodule.map f (lowerCentralSeries R L M k)
⊢ lowerCentralSeries R L M₂ (k + 1) ≤ LieSubmodule.map f (lowerCentralSeries R L M (k + 1))
tactic: induction' k with k ih
Theorem: Part.Fix.le_f_of_mem_approx
File: Mathlib/Control/LawfulFix.lean

Proof steps:
state_before: α : Type u_1
β : α → Type u_2
f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)
x : (a : α) → Part (β a)
⊢ ∀ (x_1 : ℕ), x = (approxChain f) x_1 → x ≤ f x
state_after: α : Type u_1
β : α → Type u_2
f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)
i : ℕ
⊢ (approxChain f) i ≤ f ((approxChain f) i)
tactic: rintro i rfl
state_before: α : Type u_1
β : α → Type u_2
f : ((a : α) → Part (β a)) →o (a : α) → Part (β a)
i : ℕ
⊢ (approxChain f) i ≤ f ((approxChain f) i)
state_after: no goals
tactic: apply approx_mono'
Theorem: QuadraticMap.toBilin_apply
File: Mathlib/LinearAlgebra/QuadraticForm/Basis.lean

Proof steps:
state_before: ι : Type u_4
R : Type u_1
M : Type u_2
N : Type u_3
inst✝⁵ : LinearOrder ι
inst✝⁴ : CommRing R
inst✝³ : AddCommGroup M
inst✝² : AddCommGroup N
inst✝¹ : Module R M
inst✝ : Module R N
Q : QuadraticMap R M N
bm : Basis ι R M
i j : ι
⊢ ((Q.toBilin bm) (bm i)) (bm j) = if i = j then Q (bm i) else if i < j then polar (⇑Q) (bm i) (bm j) else 0
state_after: no goals
tactic: simp [toBilin]
Theorem: Ordinal.le_cof_iff_lsub
File: Mathlib/SetTheory/Cardinal/Cofinality.lean

Proof steps:
state_before: α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
a : Cardinal.{u}
⊢ a ≤ o.cof ↔ ∀ {ι : Type u} (f : ι → Ordinal.{u}), lsub f = o → a ≤ #ι
state_after: α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
a : Cardinal.{u}
⊢ a ≤ sInf {a | ∃ ι f, lsub f = o ∧ #ι = a} ↔ ∀ {ι : Type u} (f : ι → Ordinal.{u}), lsub f = o → a ≤ #ι
tactic: rw [cof_eq_sInf_lsub]
state_before: α : Type u_1
r : α → α → Prop
o : Ordinal.{u}
a : Cardinal.{u}
⊢ a ≤ sInf {a | ∃ ι f, lsub f = o ∧ #ι = a} ↔ ∀ {ι : Type u} (f : ι → Ordinal.{u}), lsub f = o → a ≤ #ι
state_after: no goals
tactic: exact
    (le_csInf_iff'' (cof_lsub_def_nonempty o)).trans
      ⟨fun H ι f hf => H _ ⟨ι, f, hf, rfl⟩, fun H b ⟨ι, f, hf, hb⟩ => by
        rw [← hb]
        exact H _ hf⟩
Theorem: Algebra.IsSeparable.sepDegree_eq
File: Mathlib/FieldTheory/SeparableClosure.lean

Proof steps:
state_before: F : Type u
E : Type v
inst✝⁵ : Field F
inst✝⁴ : Field E
inst✝³ : Algebra F E
K : Type w
inst✝² : Field K
inst✝¹ : Algebra F K
inst✝ : Algebra.IsSeparable F E
⊢ sepDegree F E = Module.rank F E
state_after: no goals
tactic: rw [sepDegree, (separableClosure.eq_top_iff F E).2 ‹_›, IntermediateField.rank_top']
Theorem: closure_openSegment
File: Mathlib/Analysis/Convex/Topology.lean

Proof steps:
state_before: ι : Type u_1
𝕜 : Type u_2
E : Type u_3
inst✝¹¹ : LinearOrderedRing 𝕜
inst✝¹⁰ : DenselyOrdered 𝕜
inst✝⁹ : PseudoMetricSpace 𝕜
inst✝⁸ : OrderTopology 𝕜
inst✝⁷ : ProperSpace 𝕜
inst✝⁶ : CompactIccSpace 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : TopologicalSpace E
inst✝³ : T2Space E
inst✝² : ContinuousAdd E
inst✝¹ : Module 𝕜 E
inst✝ : ContinuousSMul 𝕜 E
x y : E
⊢ closure (openSegment 𝕜 x y) = [x-[𝕜]y]
state_after: ι : Type u_1
𝕜 : Type u_2
E : Type u_3
inst✝¹¹ : LinearOrderedRing 𝕜
inst✝¹⁰ : DenselyOrdered 𝕜
inst✝⁹ : PseudoMetricSpace 𝕜
inst✝⁸ : OrderTopology 𝕜
inst✝⁷ : ProperSpace 𝕜
inst✝⁶ : CompactIccSpace 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : TopologicalSpace E
inst✝³ : T2Space E
inst✝² : ContinuousAdd E
inst✝¹ : Module 𝕜 E
inst✝ : ContinuousSMul 𝕜 E
x y : E
⊢ closure ((fun θ => (1 - θ) • x + θ • y) '' Ioo 0 1) = (fun θ => (1 - θ) • x + θ • y) '' closure (Ioo 0 1)
tactic: rw [segment_eq_image, openSegment_eq_image, ← closure_Ioo (zero_ne_one' 𝕜)]
state_before: ι : Type u_1
𝕜 : Type u_2
E : Type u_3
inst✝¹¹ : LinearOrderedRing 𝕜
inst✝¹⁰ : DenselyOrdered 𝕜
inst✝⁹ : PseudoMetricSpace 𝕜
inst✝⁸ : OrderTopology 𝕜
inst✝⁷ : ProperSpace 𝕜
inst✝⁶ : CompactIccSpace 𝕜
inst✝⁵ : AddCommGroup E
inst✝⁴ : TopologicalSpace E
inst✝³ : T2Space E
inst✝² : ContinuousAdd E
inst✝¹ : Module 𝕜 E
inst✝ : ContinuousSMul 𝕜 E
x y : E
⊢ closure ((fun θ => (1 - θ) • x + θ • y) '' Ioo 0 1) = (fun θ => (1 - θ) • x + θ • y) '' closure (Ioo 0 1)
state_after: no goals
tactic: exact (image_closure_of_isCompact (isBounded_Ioo _ _).isCompact_closure <|
    Continuous.continuousOn <| by fun_prop).symm
Theorem: Submonoid.powLogEquiv_symm_apply
File: Mathlib/Algebra/Group/Submonoid/Membership.lean

Proof steps:
state_before: M : Type u_1
A : Type u_2
B : Type u_3
inst✝¹ : Monoid M
a : M
inst✝ : DecidableEq M
n : M
h : Function.Injective fun m => n ^ m
x✝¹ x✝ : Multiplicative ℕ
⊢ { toFun := fun m => pow n (Multiplicative.toAdd m), invFun := fun m => Multiplicative.ofAdd (log m), left_inv := ⋯,
          right_inv := ⋯ }.toFun
      (x✝¹ * x✝) =
    { toFun := fun m => pow n (Multiplicative.toAdd m), invFun := fun m => Multiplicative.ofAdd (log m), left_inv := ⋯,
            right_inv := ⋯ }.toFun
        x✝¹ *
      { toFun := fun m => pow n (Multiplicative.toAdd m), invFun := fun m => Multiplicative.ofAdd (log m),
            left_inv := ⋯, right_inv := ⋯ }.toFun
        x✝
state_after: no goals
tactic: simp only [pow, map_mul, ofAdd_add, toAdd_mul]
Theorem: Matrix.cons_eq_zero_iff
File: Mathlib/Algebra/Group/Fin/Tuple.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
n : ℕ
inst✝ : Zero α
v : Fin n → α
x : α
h : vecCons x v = 0
⊢ v = 0
state_after: no goals
tactic: convert congr_arg vecTail h
state_before: α : Type u_1
M : Type u_2
n : ℕ
inst✝ : Zero α
v : Fin n → α
x : α
x✝ : x = 0 ∧ v = 0
hx : x = 0
hv : v = 0
⊢ vecCons x v = 0
state_after: no goals
tactic: simp [hx, hv]
Theorem: ZMod.natCast_mod
File: Mathlib/Data/ZMod/Basic.lean

Proof steps:
state_before: m n✝ a n : ℕ
⊢ ↑(a % n) = ↑a
state_after: m n✝ a n : ℕ
⊢ ↑(a % n) = ↑(a % n + n * (a / n))
tactic: conv =>
      rhs
      rw [← Nat.mod_add_div a n]
state_before: m n✝ a n : ℕ
⊢ ↑(a % n) = ↑(a % n + n * (a / n))
state_after: no goals
tactic: simp
Theorem: LiouvilleNumber.aux_calc
File: Mathlib/NumberTheory/Liouville/LiouvilleNumber.lean

Proof steps:
state_before: n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 ≤ 1 / m ^ (n + 1)!
state_after: no goals
tactic: positivity
state_before: n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 / m ^ (n ! * (n + 1)) ≤ 1 / m ^ (n ! * n)
state_after: n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 * m ^ (n ! * n) ≤ 1 * m ^ (n ! * (n + 1))

n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * (n + 1))

n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * n)
tactic: apply (div_le_div_iff _ _).mpr
state_before: n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 * m ^ (n ! * n) ≤ 1 * m ^ (n ! * (n + 1))

n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * (n + 1))

n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * n)
state_after: case refine_1
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * n)

case refine_2
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 ≤ m ^ n !

n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * (n + 1))

n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * n)
tactic: focus
        conv_rhs => rw [one_mul, mul_add, pow_add, mul_one, pow_mul, mul_comm, ← pow_mul]
        -- the second factors coincide, so we prove the inequality of the first factors*
        refine (mul_le_mul_right ?_).mpr ?_
state_before: case refine_1
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * n)

case refine_2
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 ≤ m ^ n !

n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * (n + 1))

n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 0 < m ^ (n ! * n)
state_after: case refine_2
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 ≤ m ^ n !
tactic: any_goals exact pow_pos (zero_lt_two.trans_le hm) _
state_before: case refine_2
n : ℕ
m : ℝ
hm : 2 ≤ m
⊢ 2 ≤ m ^ n !
state_after: no goals
tactic: exact _root_.trans (_root_.trans hm (pow_one _).symm.le)
        (pow_right_mono (one_le_two.trans hm) n.factorial_pos)
Theorem: PartialHomeomorph.IsImage.closure
File: Mathlib/Topology/PartialHomeomorph.lean

Proof steps:
state_before: X : Type u_1
X' : Type u_2
Y : Type u_3
Y' : Type u_4
Z : Type u_5
Z' : Type u_6
inst✝⁵ : TopologicalSpace X
inst✝⁴ : TopologicalSpace X'
inst✝³ : TopologicalSpace Y
inst✝² : TopologicalSpace Y'
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
e : PartialHomeomorph X Y
s : Set X
t : Set Y
x✝ : X
y : Y
h : e.IsImage s t
x : X
hx : x ∈ e.source
⊢ ↑e x ∈ closure t ↔ x ∈ closure s
state_after: no goals
tactic: simp only [mem_closure_iff_nhdsWithin_neBot, ← h.map_nhdsWithin_eq hx, map_neBot_iff]
Theorem: ContinuousMap.Homotopy.extend_apply_of_one_le
File: Mathlib/Topology/Homotopy/Basic.lean

Proof steps:
state_before: F✝ : Type u_1
X : Type u
Y : Type v
Z : Type w
Z' : Type x
ι : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
f₀ f₁ : C(X, Y)
F : f₀.Homotopy f₁
t : ℝ
ht : 1 ≤ t
x : X
⊢ (F.extend t) x = f₁ x
state_after: F✝ : Type u_1
X : Type u
Y : Type v
Z : Type w
Z' : Type x
ι : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
f₀ f₁ : C(X, Y)
F : f₀.Homotopy f₁
t : ℝ
ht : 1 ≤ t
x : X
⊢ (F.extend t) x = F (1, x)
tactic: rw [← F.apply_one]
state_before: F✝ : Type u_1
X : Type u
Y : Type v
Z : Type w
Z' : Type x
ι : Type u_2
inst✝³ : TopologicalSpace X
inst✝² : TopologicalSpace Y
inst✝¹ : TopologicalSpace Z
inst✝ : TopologicalSpace Z'
f₀ f₁ : C(X, Y)
F : f₀.Homotopy f₁
t : ℝ
ht : 1 ≤ t
x : X
⊢ (F.extend t) x = F (1, x)
state_after: no goals
tactic: exact ContinuousMap.congr_fun (Set.IccExtend_of_right_le (zero_le_one' ℝ) F.curry ht) x
Theorem: AddSubgroup.range_mem_leftTransversals
File: Mathlib/GroupTheory/Complement.lean

Proof steps:
state_before: G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
f : G ⧸ H → G
hf : ∀ (q : G ⧸ H), ↑(f q) = q
⊢ Function.Injective ((range f).restrict Quotient.mk'')
state_after: case mk.intro.mk.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
f : G ⧸ H → G
hf : ∀ (q : G ⧸ H), ↑(f q) = q
q₁ q₂ : G ⧸ H
h : (range f).restrict Quotient.mk'' ⟨f q₁, ⋯⟩ = (range f).restrict Quotient.mk'' ⟨f q₂, ⋯⟩
⊢ ⟨f q₁, ⋯⟩ = ⟨f q₂, ⋯⟩
tactic: rintro ⟨-, q₁, rfl⟩ ⟨-, q₂, rfl⟩ h
state_before: case mk.intro.mk.intro
G : Type u_1
inst✝ : Group G
H K : Subgroup G
S T : Set G
f : G ⧸ H → G
hf : ∀ (q : G ⧸ H), ↑(f q) = q
q₁ q₂ : G ⧸ H
h : (range f).restrict Quotient.mk'' ⟨f q₁, ⋯⟩ = (range f).restrict Quotient.mk'' ⟨f q₂, ⋯⟩
⊢ ⟨f q₁, ⋯⟩ = ⟨f q₂, ⋯⟩
state_after: no goals
tactic: exact Subtype.ext <| congr_arg f <| ((hf q₁).symm.trans h).trans (hf q₂)
Theorem: List.sigma_eq_sigmaTR
File: .lake/packages/batteries/Batteries/Data/List/Basic.lean

Proof steps:
state_before: ⊢ @List.sigma = @sigmaTR
state_after: case h.h.h.h
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ l₁.sigma l₂ = l₁.sigmaTR l₂
tactic: funext α β l₁ l₂
state_before: case h.h.h.h
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ l₁.sigma l₂ = l₁.sigmaTR l₂
state_after: case h.h.h.h
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ (l₁.bind fun a => map (Sigma.mk a) (l₂ a)) =
    (foldl (fun acc a => foldl (fun acc b => acc.push ⟨a, b⟩) acc (l₂ a)) #[] l₁).data
tactic: simp [List.sigma, sigmaTR]
state_before: case h.h.h.h
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ (l₁.bind fun a => map (Sigma.mk a) (l₂ a)) =
    (foldl (fun acc a => foldl (fun acc b => acc.push ⟨a, b⟩) acc (l₂ a)) #[] l₁).data
state_after: case h.h.h.h
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ (l₁.bind fun a => map (Sigma.mk a) (l₂ a)) = #[].data ++ l₁.bind ?h.h.h.h.G

case h.h.h.h.G
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ α → List ((a : α) × β a)

case h.h.h.h.H
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ ∀ (acc : Array ((a : α) × β a)) (a : α),
    (foldl (fun acc b => acc.push ⟨a, b⟩) acc (l₂ a)).data = acc.data ++ ?h.h.h.h.G a
tactic: rw [Array.foldl_data_eq_bind]
state_before: case h.h.h.h
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ (l₁.bind fun a => map (Sigma.mk a) (l₂ a)) = #[].data ++ l₁.bind ?h.h.h.h.G

case h.h.h.h.G
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ α → List ((a : α) × β a)

case h.h.h.h.H
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ ∀ (acc : Array ((a : α) × β a)) (a : α),
    (foldl (fun acc b => acc.push ⟨a, b⟩) acc (l₂ a)).data = acc.data ++ ?h.h.h.h.G a
state_after: case h.h.h.h.H
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ ∀ (acc : Array ((a : α) × β a)) (a : α),
    (foldl (fun acc b => acc.push ⟨a, b⟩) acc (l₂ a)).data = acc.data ++ map (Sigma.mk a) (l₂ a)
tactic: rfl
state_before: case h.h.h.h.H
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
⊢ ∀ (acc : Array ((a : α) × β a)) (a : α),
    (foldl (fun acc b => acc.push ⟨a, b⟩) acc (l₂ a)).data = acc.data ++ map (Sigma.mk a) (l₂ a)
state_after: case h.h.h.h.H
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
acc✝ : Array ((a : α) × β a)
a✝ : α
⊢ (foldl (fun acc b => acc.push ⟨a✝, b⟩) acc✝ (l₂ a✝)).data = acc✝.data ++ map (Sigma.mk a✝) (l₂ a✝)
tactic: intros
state_before: case h.h.h.h.H
α : Type u_2
β : α → Type u_1
l₁ : List α
l₂ : (a : α) → List (β a)
acc✝ : Array ((a : α) × β a)
a✝ : α
⊢ (foldl (fun acc b => acc.push ⟨a✝, b⟩) acc✝ (l₂ a✝)).data = acc✝.data ++ map (Sigma.mk a✝) (l₂ a✝)
state_after: no goals
tactic: apply Array.foldl_data_eq_map
Theorem: Finset.sum_prod_piFinset
File: Mathlib/Algebra/BigOperators/Ring.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
γ : Type u_4
κ✝ : ι → Type u_5
s✝ s₁ s₂ : Finset ι
i : ι
a : α
f g✝ : ι → α
inst✝² : CommSemiring α
inst✝¹ : DecidableEq ι
κ : Type u_6
inst✝ : Fintype ι
s : Finset κ
g : ι → κ → α
⊢ ∑ f ∈ piFinset fun x => s, ∏ i : ι, g i (f i) = ∏ i : ι, ∑ j ∈ s, g i j
state_after: no goals
tactic: rw [← prod_univ_sum]
Theorem: ZMod.isSquare_neg_one_of_dvd
File: Mathlib/NumberTheory/SumTwoSquares.lean

Proof steps:
state_before: m n : ℕ
hd : m ∣ n
hs : IsSquare (-1)
⊢ IsSquare (-1)
state_after: m n : ℕ
hd : m ∣ n
hs : IsSquare (-1)
f : ZMod n →+* ZMod m := castHom hd (ZMod m)
⊢ IsSquare (-1)
tactic: let f : ZMod n →+* ZMod m := ZMod.castHom hd _
state_before: m n : ℕ
hd : m ∣ n
hs : IsSquare (-1)
f : ZMod n →+* ZMod m := castHom hd (ZMod m)
⊢ IsSquare (-1)
state_after: m n : ℕ
hd : m ∣ n
hs : IsSquare (-1)
f : ZMod n →+* ZMod m := castHom hd (ZMod m)
⊢ IsSquare (f (-1))
tactic: rw [← RingHom.map_one f, ← RingHom.map_neg]
state_before: m n : ℕ
hd : m ∣ n
hs : IsSquare (-1)
f : ZMod n →+* ZMod m := castHom hd (ZMod m)
⊢ IsSquare (f (-1))
state_after: no goals
tactic: exact hs.map f
Theorem: two_smul'
File: Mathlib/Algebra/Module/Defs.lean

Proof steps:
state_before: α : Type u_1
R : Type u_2
k : Type u_3
S : Type u_4
M : Type u_5
M₂ : Type u_6
M₃ : Type u_7
ι : Type u_8
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
r s : R
x y : M
⊢ 2 • x = 2 • x
state_after: no goals
tactic: rw [two_smul, two_nsmul]
Theorem: SimpleGraph.Walk.dart_snd_mem_support_of_mem_darts
File: Mathlib/Combinatorics/SimpleGraph/Walk.lean

Proof steps:
state_before: V : Type u
V' : Type v
V'' : Type w
G : SimpleGraph V
G' : SimpleGraph V'
G'' : SimpleGraph V''
u v : V
p : G.Walk u v
d : G.Dart
h : d ∈ p.darts
⊢ d.toProd.2 ∈ p.support
state_after: no goals
tactic: simpa using p.reverse.dart_fst_mem_support_of_mem_darts (by simp [h] : d.symm ∈ p.reverse.darts)
Theorem: AddUnits.val_sub_eq_sub_val
File: Mathlib/Algebra/Group/Units.lean

Proof steps:
state_before: α : Type u
inst✝ : DivisionMonoid α
⊢ ∀ (u₁ u₂ : αˣ), ↑(u₁ / u₂) = ↑u₁ / ↑u₂
state_after: no goals
tactic: simp [div_eq_mul_inv]
Theorem: MeasureTheory.ae_eq_set_compl_compl
File: Mathlib/MeasureTheory/OuterMeasure/AE.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
F : Type u_3
inst✝¹ : FunLike F (Set α) ℝ≥0∞
inst✝ : OuterMeasureClass F α
μ : F
s✝ t✝ s t : Set α
⊢ sᶜ =ᶠ[ae μ] tᶜ ↔ s =ᶠ[ae μ] t
state_after: no goals
tactic: simp only [← measure_symmDiff_eq_zero_iff, compl_symmDiff_compl]
Theorem: Polynomial.smeval_mul
File: Mathlib/Algebra/Polynomial/Smeval.lean

Proof steps:
state_before: R : Type u_1
inst✝⁶ : Semiring R
p✝ : R[X]
r : R
p q : R[X]
S : Type u_2
inst✝⁵ : NonAssocSemiring S
inst✝⁴ : Module R S
inst✝³ : IsScalarTower R S S
inst✝² : SMulCommClass R S S
inst✝¹ : Pow S ℕ
inst✝ : NatPowAssoc S
x : S
⊢ (p * q).smeval x = p.smeval x * q.smeval x
state_after: no goals
tactic: induction p using Polynomial.induction_on' with
  | h_add r s hr hs =>
    simp only [add_comp, hr, hs, smeval_add, add_mul]
  | h_monomial n a =>
    simp only [smeval_monomial, smeval_C_mul, smeval_mul_X_pow, smeval_monomial_mul, smul_mul_assoc]
Theorem: SimpleGraph.Walk.start_mem_verts_toSubgraph
File: Mathlib/Combinatorics/SimpleGraph/Connectivity/Subgraph.lean

Proof steps:
state_before: V : Type u
V' : Type v
G : SimpleGraph V
G' : SimpleGraph V'
u v w : V
p : G.Walk u v
⊢ u ∈ p.toSubgraph.verts
state_after: no goals
tactic: simp [mem_verts_toSubgraph]
Theorem: SimpleGraph.IsClique.card_le_of_coloring
File: Mathlib/Combinatorics/SimpleGraph/Coloring.lean

Proof steps:
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C✝ : G.Coloring α
s : Finset V
h : G.IsClique ↑s
inst✝ : Fintype α
C : G.Coloring α
⊢ s.card ≤ card α
state_after: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C✝ : G.Coloring α
s : Finset V
h : induce (↑s) G = ⊤
inst✝ : Fintype α
C : G.Coloring α
⊢ s.card ≤ card α
tactic: rw [isClique_iff_induce_eq] at h
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C✝ : G.Coloring α
s : Finset V
h : induce (↑s) G = ⊤
inst✝ : Fintype α
C : G.Coloring α
⊢ s.card ≤ card α
state_after: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C✝ : G.Coloring α
s : Finset V
h : induce (↑s) G = ⊤
inst✝ : Fintype α
C : G.Coloring α
f : induce (↑s) G ↪g G
⊢ s.card ≤ card α
tactic: have f : G.induce ↑s ↪g G := Embedding.comap (Function.Embedding.subtype fun x => x ∈ ↑s) G
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C✝ : G.Coloring α
s : Finset V
h : induce (↑s) G = ⊤
inst✝ : Fintype α
C : G.Coloring α
f : induce (↑s) G ↪g G
⊢ s.card ≤ card α
state_after: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C✝ : G.Coloring α
s : Finset V
h : induce (↑s) G = ⊤
inst✝ : Fintype α
C : G.Coloring α
f : ⊤ ↪g G
⊢ s.card ≤ card α
tactic: rw [h] at f
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C✝ : G.Coloring α
s : Finset V
h : induce (↑s) G = ⊤
inst✝ : Fintype α
C : G.Coloring α
f : ⊤ ↪g G
⊢ s.card ≤ card α
state_after: case h.e'_3
V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C✝ : G.Coloring α
s : Finset V
h : induce (↑s) G = ⊤
inst✝ : Fintype α
C : G.Coloring α
f : ⊤ ↪g G
⊢ s.card = card ↑↑s
tactic: convert Fintype.card_le_of_injective _ (C.comp f.toHom).injective_of_top_hom using 1
state_before: case h.e'_3
V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C✝ : G.Coloring α
s : Finset V
h : induce (↑s) G = ⊤
inst✝ : Fintype α
C : G.Coloring α
f : ⊤ ↪g G
⊢ s.card = card ↑↑s
state_after: no goals
tactic: simp
Theorem: Cardinal.mk_iUnion_le_lift
File: Mathlib/SetTheory/Cardinal/Basic.lean

Proof steps:
state_before: α✝ β : Type u
c : Cardinal.{?u.201719}
α : Type u
ι : Type v
f : ι → Set α
⊢ lift.{v, u} #↑(⋃ i, f i) ≤ lift.{u, v} #ι * ⨆ i, lift.{v, u} #↑(f i)
state_after: α✝ β : Type u
c : Cardinal.{?u.201719}
α : Type u
ι : Type v
f : ι → Set α
⊢ (sum fun i => #↑(f i)) = sum fun i => lift.{v, u} #↑(f i)
tactic: refine mk_iUnion_le_sum_mk_lift.trans <| Eq.trans_le ?_ (sum_le_iSup_lift _)
state_before: α✝ β : Type u
c : Cardinal.{?u.201719}
α : Type u
ι : Type v
f : ι → Set α
⊢ (sum fun i => #↑(f i)) = sum fun i => lift.{v, u} #↑(f i)
state_after: no goals
tactic: rw [← lift_sum, lift_id'.{_,u}]
Theorem: Finset.singleton_inter_of_mem
File: Mathlib/Data/Finset/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝ : DecidableEq α
s✝ s₁ s₂ t t₁ t₂ u v : Finset α
a✝ b a : α
s : Finset α
H : a ∈ s
⊢ insert a ∅ ∩ s = insert a ∅
state_after: no goals
tactic: rw [insert_inter_of_mem H, empty_inter]
Theorem: Int.Prime.dvd_mul
File: Mathlib/RingTheory/Int/Basic.lean

Proof steps:
state_before: m n : ℤ
p : ℕ
hp : Nat.Prime p
h : ↑p ∣ m * n
⊢ p ∣ m.natAbs ∨ p ∣ n.natAbs
state_after: no goals
tactic: rwa [← hp.dvd_mul, ← Int.natAbs_mul, ← Int.natCast_dvd]