ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: Finset.prod_subtype
File: Mathlib/Algebra/BigOperators/Group/Finset.lean

Proof steps:
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
p : α → Prop
F : Fintype (Subtype p)
s : Finset α
h : ∀ (x : α), x ∈ s ↔ p x
f : α → β
this : (fun x => x ∈ s) = p
⊢ ∏ a ∈ s, f a = ∏ a : Subtype p, f ↑a
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
F : Fintype { x // x ∈ s }
h : ∀ (x : α), x ∈ s ↔ (fun x => x ∈ s) x
⊢ ∏ a ∈ s, f a = ∏ a : { x // x ∈ s }, f ↑a
tactic: subst p
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
F : Fintype { x // x ∈ s }
h : ∀ (x : α), x ∈ s ↔ (fun x => x ∈ s) x
⊢ ∏ a ∈ s, f a = ∏ a : { x // x ∈ s }, f ↑a
state_after: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
F : Fintype { x // x ∈ s }
h : ∀ (x : α), x ∈ s ↔ (fun x => x ∈ s) x
⊢ ∏ i : { x // x ∈ s }, f ↑i = ∏ a : { x // x ∈ s }, f ↑a
tactic: rw [← prod_coe_sort]
state_before: ι : Type u_1
κ : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
s✝ s₁ s₂ : Finset α
a : α
f✝ g : α → β
inst✝ : CommMonoid β
s : Finset α
f : α → β
F : Fintype { x // x ∈ s }
h : ∀ (x : α), x ∈ s ↔ (fun x => x ∈ s) x
⊢ ∏ i : { x // x ∈ s }, f ↑i = ∏ a : { x // x ∈ s }, f ↑a
state_after: no goals
tactic: congr!
Theorem: List.pairwise_map'
File: Mathlib/Data/List/Pairwise.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
R S T : α → α → Prop
a : α
l : List α
f : β → α
⊢ Pairwise R (map f []) ↔ Pairwise (fun a b => R (f a) (f b)) []
state_after: no goals
tactic: simp only [map, Pairwise.nil]
state_before: α : Type u_1
β : Type u_2
R S T : α → α → Prop
a : α
l✝ : List α
f : β → α
b : β
l : List β
⊢ Pairwise R (map f (b :: l)) ↔ Pairwise (fun a b => R (f a) (f b)) (b :: l)
state_after: no goals
tactic: simp only [map, pairwise_cons, mem_map, forall_exists_index, and_imp,
      forall_apply_eq_imp_iff₂, pairwise_map]
Theorem: Matrix.vec3_eq
File: Mathlib/Data/Matrix/Notation.lean

Proof steps:
state_before: α : Type u
o n m : ℕ
m' : Type uₘ
n' : Type uₙ
o' : Type uₒ
a b : ℕ
a₀ a₁ a₂ b₀ b₁ b₂ : α
h₀ : a₀ = b₀
h₁ : a₁ = b₁
h₂ : a₂ = b₂
⊢ ![a₀, a₁, a₂] = ![b₀, b₁, b₂]
state_after: α : Type u
o n m : ℕ
m' : Type uₘ
n' : Type uₙ
o' : Type uₒ
a b : ℕ
b₀ b₁ b₂ : α
⊢ ![b₀, b₁, b₂] = ![b₀, b₁, b₂]
tactic: subst_vars
state_before: α : Type u
o n m : ℕ
m' : Type uₘ
n' : Type uₙ
o' : Type uₒ
a b : ℕ
b₀ b₁ b₂ : α
⊢ ![b₀, b₁, b₂] = ![b₀, b₁, b₂]
state_after: no goals
tactic: rfl
Theorem: rank_prod'
File: Mathlib/LinearAlgebra/Dimension/Constructions.lean

Proof steps:
state_before: R S : Type u
M : Type v
M' : Type v'
M₁ : Type v
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type u_1
inst✝¹¹ : Ring R
inst✝¹⁰ : CommRing S
inst✝⁹ : AddCommGroup M
inst✝⁸ : AddCommGroup M'
inst✝⁷ : AddCommGroup M₁
inst✝⁶ : Module R M
inst✝⁵ : Module R M'
inst✝⁴ : Module R M₁
inst✝³ : StrongRankCondition R
inst✝² : Module.Free R M
inst✝¹ : Module.Free R M'
inst✝ : Module.Free R M₁
⊢ Module.rank R (M × M₁) = Module.rank R M + Module.rank R M₁
state_after: no goals
tactic: simp
Theorem: Nat.choose_le_middle
File: Mathlib/Data/Nat/Choose/Basic.lean

Proof steps:
state_before: r n : ℕ
⊢ n.choose r ≤ n.choose (n / 2)
state_after: case inl
r n : ℕ
b : r ≤ n
⊢ n.choose r ≤ n.choose (n / 2)

case inr
r n : ℕ
b : r > n
⊢ n.choose r ≤ n.choose (n / 2)
tactic: cases' le_or_gt r n with b b
Theorem: Set.infinite_union
File: Mathlib/Data/Set/Finite.lean

Proof steps:
state_before: α : Type u
β : Type v
ι : Sort w
γ : Type x
s✝ t✝ s t : Set α
⊢ (s ∪ t).Infinite ↔ s.Infinite ∨ t.Infinite
state_after: no goals
tactic: simp only [Set.Infinite, finite_union, not_and_or]
Theorem: IsMulHom.to_isMonoidHom
File: Mathlib/Deprecated/Group.lean

Proof steps:
state_before: α : Type u
β : Type v
inst✝¹ : MulOneClass α
inst✝ : Group β
f : α → β
hf : IsMulHom f
⊢ f 1 * f 1 = f 1
state_after: no goals
tactic: rw [← hf.map_mul, one_mul]
Theorem: Composition.ones_sizeUpTo
File: Mathlib/Combinatorics/Enumerative/Composition.lean

Proof steps:
state_before: n✝ : ℕ
c : Composition n✝
n i : ℕ
⊢ (ones n).sizeUpTo i = min i n
state_after: no goals
tactic: simp [sizeUpTo, ones_blocks, take_replicate]
Theorem: MeasureTheory.lintegral_indicator₀
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
s : Set α
hs : NullMeasurableSet s μ
⊢ ∫⁻ (a : α), s.indicator f a ∂μ = ∫⁻ (a : α) in s, f a ∂μ
state_after: no goals
tactic: rw [← lintegral_congr_ae (indicator_ae_eq_of_ae_eq_set hs.toMeasurable_ae_eq),
    lintegral_indicator _ (measurableSet_toMeasurable _ _),
    Measure.restrict_congr_set hs.toMeasurable_ae_eq]
Theorem: Equiv.Perm.pow_apply_eq_self_of_apply_eq_self
File: Mathlib/GroupTheory/Perm/Support.lean

Proof steps:
state_before: α : Type u_1
f g h : Perm α
x : α
hfx : f x = x
n : ℕ
⊢ (f ^ (n + 1)) x = x
state_after: no goals
tactic: rw [pow_succ, mul_apply, hfx, pow_apply_eq_self_of_apply_eq_self hfx n]
Theorem: SetTheory.PGame.equiv_of_mk_equiv
File: Mathlib/SetTheory/Game/PGame.lean

Proof steps:
state_before: xl xr : Type u
x y : PGame
L : x.LeftMoves ≃ y.LeftMoves
R : x.RightMoves ≃ y.RightMoves
hl : ∀ (i : x.LeftMoves), x.moveLeft i ≈ y.moveLeft (L i)
hr : ∀ (j : x.RightMoves), x.moveRight j ≈ y.moveRight (R j)
⊢ x ≈ y
state_after: case left
xl xr : Type u
x y : PGame
L : x.LeftMoves ≃ y.LeftMoves
R : x.RightMoves ≃ y.RightMoves
hl : ∀ (i : x.LeftMoves), x.moveLeft i ≈ y.moveLeft (L i)
hr : ∀ (j : x.RightMoves), x.moveRight j ≈ y.moveRight (R j)
⊢ (∀ (i : x.LeftMoves), (∃ i', x.moveLeft i ≤ y.moveLeft i') ∨ ∃ j, (x.moveLeft i).moveRight j ≤ y) ∧
    ∀ (j : y.RightMoves), (∃ i, x ≤ (y.moveRight j).moveLeft i) ∨ ∃ j', x.moveRight j' ≤ y.moveRight j

case right
xl xr : Type u
x y : PGame
L : x.LeftMoves ≃ y.LeftMoves
R : x.RightMoves ≃ y.RightMoves
hl : ∀ (i : x.LeftMoves), x.moveLeft i ≈ y.moveLeft (L i)
hr : ∀ (j : x.RightMoves), x.moveRight j ≈ y.moveRight (R j)
⊢ (∀ (i : y.LeftMoves), (∃ i', y.moveLeft i ≤ x.moveLeft i') ∨ ∃ j, (y.moveLeft i).moveRight j ≤ x) ∧
    ∀ (j : x.RightMoves), (∃ i, y ≤ (x.moveRight j).moveLeft i) ∨ ∃ j', y.moveRight j' ≤ x.moveRight j
tactic: constructor <;> rw [le_def]
Theorem: FractionalIdeal.le_dual_iff
File: Mathlib/RingTheory/DedekindDomain/Different.lean

Proof steps:
state_before: A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra.IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : IsDedekindDomain B
I J : FractionalIdeal B⁰ L
hI : I ≠ 0
hJ : J ≠ 0
⊢ I ≤ dual A K J ↔ I * J ≤ dual A K 1
state_after: case pos
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra.IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : IsDedekindDomain B
I J : FractionalIdeal B⁰ L
hI✝ : I ≠ 0
hJ : J ≠ 0
hI : I = 0
⊢ I ≤ dual A K J ↔ I * J ≤ dual A K 1

case neg
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra.IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : IsDedekindDomain B
I J : FractionalIdeal B⁰ L
hI✝ : I ≠ 0
hJ : J ≠ 0
hI : ¬I = 0
⊢ I ≤ dual A K J ↔ I * J ≤ dual A K 1
tactic: by_cases hI : I = 0
state_before: case neg
A : Type u_1
K : Type u_2
L : Type u
B : Type u_3
inst✝¹⁸ : CommRing A
inst✝¹⁷ : Field K
inst✝¹⁶ : CommRing B
inst✝¹⁵ : Field L
inst✝¹⁴ : Algebra A K
inst✝¹³ : Algebra B L
inst✝¹² : Algebra A B
inst✝¹¹ : Algebra K L
inst✝¹⁰ : Algebra A L
inst✝⁹ : IsScalarTower A K L
inst✝⁸ : IsScalarTower A B L
inst✝⁷ : IsDomain A
inst✝⁶ : IsFractionRing A K
inst✝⁵ : IsIntegralClosure B A L
inst✝⁴ : IsFractionRing B L
inst✝³ : FiniteDimensional K L
inst✝² : Algebra.IsSeparable K L
inst✝¹ : IsIntegrallyClosed A
inst✝ : IsDedekindDomain B
I J : FractionalIdeal B⁰ L
hI✝ : I ≠ 0
hJ : J ≠ 0
hI : ¬I = 0
⊢ I ≤ dual A K J ↔ I * J ≤ dual A K 1
state_after: no goals
tactic: rw [← coe_le_coe, ← coe_le_coe, coe_mul, coe_dual A K hJ, coe_dual_one, le_traceDual]
Theorem: MvPolynomial.derivation_C_mul
File: Mathlib/Algebra/MvPolynomial/Derivation.lean

Proof steps:
state_before: σ : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Module (MvPolynomial σ R) A
D : Derivation R (MvPolynomial σ R) A
a : R
f : MvPolynomial σ R
⊢ C a • D f = a • D f
state_after: σ : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Module (MvPolynomial σ R) A
D : Derivation R (MvPolynomial σ R) A
a : R
f : MvPolynomial σ R
this : C a • D f = D (C a * f)
⊢ C a • D f = a • D f
tactic: have : C (σ := σ) a • D f = D (C a * f) := by simp
state_before: σ : Type u_1
R : Type u_2
A : Type u_3
inst✝³ : CommSemiring R
inst✝² : AddCommMonoid A
inst✝¹ : Module R A
inst✝ : Module (MvPolynomial σ R) A
D : Derivation R (MvPolynomial σ R) A
a : R
f : MvPolynomial σ R
this : C a • D f = D (C a * f)
⊢ C a • D f = a • D f
state_after: no goals
tactic: rw [this, C_mul', D.map_smul]
Theorem: measurable_of_Ici
File: Mathlib/MeasureTheory/Constructions/BorelSpace/Order.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort y
s t u : Set α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : BorelSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : MeasurableSpace δ
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : SecondCountableTopology α
f : δ → α
hf : ∀ (x : α), MeasurableSet (f ⁻¹' Ici x)
⊢ Measurable f
state_after: case hf
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort y
s t u : Set α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : BorelSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : MeasurableSpace δ
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : SecondCountableTopology α
f : δ → α
hf : ∀ (x : α), MeasurableSet (f ⁻¹' Ici x)
⊢ ∀ (x : α), MeasurableSet (f ⁻¹' Iio x)
tactic: apply measurable_of_Iio
state_before: case hf
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort y
s t u : Set α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : BorelSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : MeasurableSpace δ
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : SecondCountableTopology α
f : δ → α
hf : ∀ (x : α), MeasurableSet (f ⁻¹' Ici x)
⊢ ∀ (x : α), MeasurableSet (f ⁻¹' Iio x)
state_after: case hf
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort y
s t u : Set α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : BorelSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : MeasurableSpace δ
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : SecondCountableTopology α
f : δ → α
hf : ∀ (x : α), MeasurableSet (f ⁻¹' Ici x)
⊢ ∀ (x : α), MeasurableSet (f ⁻¹' Ici x)
tactic: simp_rw [← compl_Ici, preimage_compl, MeasurableSet.compl_iff]
state_before: case hf
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
ι : Sort y
s t u : Set α
inst✝⁹ : TopologicalSpace α
inst✝⁸ : MeasurableSpace α
inst✝⁷ : BorelSpace α
inst✝⁶ : TopologicalSpace β
inst✝⁵ : MeasurableSpace β
inst✝⁴ : BorelSpace β
inst✝³ : MeasurableSpace δ
inst✝² : LinearOrder α
inst✝¹ : OrderTopology α
inst✝ : SecondCountableTopology α
f : δ → α
hf : ∀ (x : α), MeasurableSet (f ⁻¹' Ici x)
⊢ ∀ (x : α), MeasurableSet (f ⁻¹' Ici x)
state_after: no goals
tactic: assumption
Theorem: Equiv.Perm.cycleFactorsFinset_eq_singleton_self_iff
File: Mathlib/GroupTheory/Perm/Cycle/Factors.lean

Proof steps:
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝¹ : DecidableEq α
inst✝ : Fintype α
f✝ f : Perm α
⊢ f.cycleFactorsFinset = {f} ↔ f.IsCycle
state_after: no goals
tactic: simp [cycleFactorsFinset_eq_finset]
Theorem: edist_le_coe
File: Mathlib/Topology/MetricSpace/Pseudo/Defs.lean

Proof steps:
state_before: α : Type u
β : Type v
X : Type u_1
ι : Type u_2
inst✝ : PseudoMetricSpace α
x y : α
c : ℝ≥0
⊢ edist x y ≤ ↑c ↔ nndist x y ≤ c
state_after: no goals
tactic: rw [edist_nndist, ENNReal.coe_le_coe]
Theorem: CategoryTheory.Equivalence.sheafCongr.unitIso_inv_app_val_app
File: Mathlib/CategoryTheory/Sites/Equivalence.lean

Proof steps:
state_before: C : Type u₁
inst✝³ : Category.{v₁, u₁} C
J : GrothendieckTopology C
D : Type u₂
inst✝² : Category.{v₂, u₂} D
K : GrothendieckTopology D
e : C ≌ D
G : D ⥤ C
A : Type u₃
inst✝¹ : Category.{v₃, u₃} A
inst✝ : TransportsGrothendieckTopology J K e
⊢ ∀ {X Y : Sheaf J A} (f : X ⟶ Y),
    (𝟭 (Sheaf J A)).map f ≫
        ((fun F =>
              { hom := { val := (isoWhiskerRight e.op.unitIso F.val).hom },
                inv := { val := (isoWhiskerRight e.op.unitIso F.val).inv }, hom_inv_id := ⋯, inv_hom_id := ⋯ })
            Y).hom =
      ((fun F =>
              { hom := { val := (isoWhiskerRight e.op.unitIso F.val).hom },
                inv := { val := (isoWhiskerRight e.op.unitIso F.val).inv }, hom_inv_id := ⋯, inv_hom_id := ⋯ })
            X).hom ≫
        (functor J K e A ⋙ inverse J K e A).map f
state_after: no goals
tactic: aesop
Theorem: Ordnode.Valid'.balance'_lemma
File: Mathlib/Data/Ordmap/Ordset.lean

Proof steps:
state_before: α✝ : Type u_1
inst✝ : Preorder α✝
α : Type u_2
l : Ordnode α
l' : ℕ
r : Ordnode α
r' : ℕ
H1 : BalancedSz l' r'
H2 : l.size.dist l' ≤ 1 ∧ r.size = r' ∨ r.size.dist r' ≤ 1 ∧ l.size = l'
⊢ r.size ≤ 3 * (l.size + 1)
state_after: case inl.intro.inl
α✝ : Type u_1
inst✝ : Preorder α✝
α : Type u_2
l : Ordnode α
l' : ℕ
r : Ordnode α
hl : l.size.dist l' ≤ 1
h : l' + r.size ≤ 1
⊢ r.size ≤ 3 * (l.size + 1)

case inl.intro.inr.intro
α✝ : Type u_1
inst✝ : Preorder α✝
α : Type u_2
l : Ordnode α
l' : ℕ
r : Ordnode α
hl : l.size.dist l' ≤ 1
left✝ : l' ≤ delta * r.size
h₂ : r.size ≤ delta * l'
⊢ r.size ≤ 3 * (l.size + 1)

case inr.intro.inl
α✝ : Type u_1
inst✝ : Preorder α✝
α : Type u_2
l r : Ordnode α
r' : ℕ
hr : r.size.dist r' ≤ 1
h : l.size + r' ≤ 1
⊢ r.size ≤ 3 * (l.size + 1)

case inr.intro.inr.intro
α✝ : Type u_1
inst✝ : Preorder α✝
α : Type u_2
l r : Ordnode α
r' : ℕ
hr : r.size.dist r' ≤ 1
left✝ : l.size ≤ delta * r'
h₂ : r' ≤ delta * l.size
⊢ r.size ≤ 3 * (l.size + 1)
tactic: rcases H2 with (⟨hl, rfl⟩ | ⟨hr, rfl⟩) <;> rcases H1 with (h | ⟨_, h₂⟩)
Theorem: MeasureTheory.IsSetAlgebra.biInter_mem
File: Mathlib/MeasureTheory/SetAlgebra.lean

Proof steps:
state_before: α : Type u_1
𝒜 : Set (Set α)
s✝ t : Set α
ι : Type u_2
h𝒜 : IsSetAlgebra 𝒜
s : ι → Set α
S : Finset ι
hs : ∀ i ∈ S, s i ∈ 𝒜
⊢ ⋂ i ∈ S, s i ∈ 𝒜
state_after: case pos
α : Type u_1
𝒜 : Set (Set α)
s✝ t : Set α
ι : Type u_2
h𝒜 : IsSetAlgebra 𝒜
s : ι → Set α
S : Finset ι
hs : ∀ i ∈ S, s i ∈ 𝒜
h : S = ∅
⊢ ⋂ i ∈ S, s i ∈ 𝒜

case neg
α : Type u_1
𝒜 : Set (Set α)
s✝ t : Set α
ι : Type u_2
h𝒜 : IsSetAlgebra 𝒜
s : ι → Set α
S : Finset ι
hs : ∀ i ∈ S, s i ∈ 𝒜
h : ¬S = ∅
⊢ ⋂ i ∈ S, s i ∈ 𝒜
tactic: by_cases h : S = ∅
Theorem: Batteries.RBNode.modify_eq_alter
File: .lake/packages/batteries/Batteries/Data/RBMap/Alter.lean

Proof steps:
state_before: α : Type u_1
cut : α → Ordering
f : α → α
t : RBNode α
⊢ modify cut f t = alter cut (Option.map f) t
state_after: no goals
tactic: simp [modify, alter]
Theorem: Equiv.piEquivPiSubtypeProd_symm_apply
File: Mathlib/Logic/Equiv/Basic.lean

Proof steps:
state_before: α : Type u_1
p : α → Prop
β : α → Type u_2
inst✝ : DecidablePred p
⊢ Function.RightInverse (fun f x => if h : p x then f.1 ⟨x, h⟩ else f.2 ⟨x, h⟩) fun f => (fun x => f ↑x, fun x => f ↑x)
state_after: case mk
α : Type u_1
p : α → Prop
β : α → Type u_2
inst✝ : DecidablePred p
f : (i : { x // p x }) → β ↑i
g : (i : { x // ¬p x }) → β ↑i
⊢ (fun f => (fun x => f ↑x, fun x => f ↑x)) ((fun f x => if h : p x then f.1 ⟨x, h⟩ else f.2 ⟨x, h⟩) (f, g)) = (f, g)
tactic: rintro ⟨f, g⟩
state_before: α : Type u_1
p : α → Prop
β : α → Type u_2
inst✝ : DecidablePred p
f : (i : α) → β i
⊢ (fun f x => if h : p x then f.1 ⟨x, h⟩ else f.2 ⟨x, h⟩) ((fun f => (fun x => f ↑x, fun x => f ↑x)) f) = f
state_after: case h
α : Type u_1
p : α → Prop
β : α → Type u_2
inst✝ : DecidablePred p
f : (i : α) → β i
x : α
⊢ (fun f x => if h : p x then f.1 ⟨x, h⟩ else f.2 ⟨x, h⟩) ((fun f => (fun x => f ↑x, fun x => f ↑x)) f) x = f x
tactic: ext x
Theorem: Submodule.fg_span
File: Mathlib/RingTheory/Finiteness.lean

Proof steps:
state_before: R : Type u_1
M : Type u_2
inst✝² : Semiring R
inst✝¹ : AddCommMonoid M
inst✝ : Module R M
s : Set M
hs : s.Finite
⊢ span R ↑hs.toFinset = span R s
state_after: no goals
tactic: rw [hs.coe_toFinset]
Theorem: Filter.disjoint_cocompact_right
File: Mathlib/Topology/Compactness/Compact.lean

Proof steps:
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : Filter X
⊢ Disjoint f (cocompact X) ↔ ∃ K ∈ f, IsCompact K
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : Filter X
⊢ (∃ i, IsCompact i ∧ i ∈ f) ↔ ∃ K ∈ f, IsCompact K
tactic: simp_rw [hasBasis_cocompact.disjoint_iff_right, compl_compl]
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : Filter X
⊢ (∃ i, IsCompact i ∧ i ∈ f) ↔ ∃ K ∈ f, IsCompact K
state_after: no goals
tactic: tauto
Theorem: Real.coe_fib_eq'
File: Mathlib/Data/Real/GoldenRatio.lean

Proof steps:
state_before: ⊢ (fun n => ↑(Nat.fib n)) = fun n => (φ ^ n - ψ ^ n) / √5
state_after: ⊢ Set.EqOn (fun n => ↑(Nat.fib n)) (fun n => (φ ^ n - ψ ^ n) / √5) ↑(Finset.range fibRec.order)

case hu

⊢ fibRec.IsSolution fun n => ↑(Nat.fib n)

case hv

⊢ fibRec.IsSolution fun n => (φ ^ n - ψ ^ n) / √5
tactic: rw [fibRec.sol_eq_of_eq_init]
Theorem: BoolAlg.Iso.mk_hom_toLatticeHom_toSupHom_toFun
File: Mathlib/Order/Category/BoolAlg.lean

Proof steps:
state_before: α β : BoolAlg
e : ↑α ≃o ↑β
⊢ ((let __src := { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ };
      { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ }) ≫
      let __src := { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ };
      { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ }) =
    𝟙 α
state_after: case w
α β : BoolAlg
e : ↑α ≃o ↑β
x✝ : (forget BoolAlg).obj α
⊢ ((let __src := { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ };
        { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ }) ≫
        let __src := { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ };
        { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ })
      x✝ =
    (𝟙 α) x✝
tactic: ext
state_before: case w
α β : BoolAlg
e : ↑α ≃o ↑β
x✝ : (forget BoolAlg).obj α
⊢ ((let __src := { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ };
        { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ }) ≫
        let __src := { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ };
        { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ })
      x✝ =
    (𝟙 α) x✝
state_after: no goals
tactic: exact e.symm_apply_apply _
state_before: α β : BoolAlg
e : ↑α ≃o ↑β
⊢ ((let __src := { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ };
      { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ }) ≫
      let __src := { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ };
      { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ }) =
    𝟙 β
state_after: case w
α β : BoolAlg
e : ↑α ≃o ↑β
x✝ : (forget BoolAlg).obj β
⊢ ((let __src := { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ };
        { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ }) ≫
        let __src := { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ };
        { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ })
      x✝ =
    (𝟙 β) x✝
tactic: ext
state_before: case w
α β : BoolAlg
e : ↑α ≃o ↑β
x✝ : (forget BoolAlg).obj β
⊢ ((let __src := { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯ };
        { toFun := ⇑e.symm, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ }) ≫
        let __src := { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯ };
        { toFun := ⇑e, map_sup' := ⋯, map_inf' := ⋯, map_top' := ⋯, map_bot' := ⋯ })
      x✝ =
    (𝟙 β) x✝
state_after: no goals
tactic: exact e.apply_symm_apply _
Theorem: Field.exists_primitive_element
File: Mathlib/FieldTheory/PrimitiveElement.lean

Proof steps:
state_before: F : Type u_1
E : Type u_2
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
inst✝¹ : FiniteDimensional F E
inst✝ : Algebra.IsSeparable F E
⊢ ∃ α, F⟮α⟯ = ⊤
state_after: case inl
F : Type u_1
E : Type u_2
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
inst✝¹ : FiniteDimensional F E
inst✝ : Algebra.IsSeparable F E
F_inf : IsEmpty (Fintype F)
⊢ ∃ α, F⟮α⟯ = ⊤

case inr.intro
F : Type u_1
E : Type u_2
inst✝⁴ : Field F
inst✝³ : Field E
inst✝² : Algebra F E
inst✝¹ : FiniteDimensional F E
inst✝ : Algebra.IsSeparable F E
F_finite : Fintype F
⊢ ∃ α, F⟮α⟯ = ⊤
tactic: rcases isEmpty_or_nonempty (Fintype F) with (F_inf | ⟨⟨F_finite⟩⟩)
Theorem: List.foldr_permutationsAux2
File: Mathlib/Data/List/Permutation.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
t : α
ts : List α
r L : List (List α)
⊢ foldr (fun y r => (permutationsAux2 t ts r y id).2) r L = (L.bind fun y => (permutationsAux2 t ts [] y id).2) ++ r
state_after: case nil
α : Type u_1
β : Type u_2
t : α
ts : List α
r : List (List α)
⊢ foldr (fun y r => (permutationsAux2 t ts r y id).2) r [] = ([].bind fun y => (permutationsAux2 t ts [] y id).2) ++ r

case cons
α : Type u_1
β : Type u_2
t : α
ts : List α
r : List (List α)
l : List α
L : List (List α)
ih : foldr (fun y r => (permutationsAux2 t ts r y id).2) r L = (L.bind fun y => (permutationsAux2 t ts [] y id).2) ++ r
⊢ foldr (fun y r => (permutationsAux2 t ts r y id).2) r (l :: L) =
    ((l :: L).bind fun y => (permutationsAux2 t ts [] y id).2) ++ r
tactic: induction' L with l L ih