ruc-ai4math/mathlib_handler_benchmark_410 huggingface dataset:
Theorem: CategoryTheory.Localization.Construction.liftToPathCategory_map
File: Mathlib/CategoryTheory/Localization/Construction.lean

Proof steps:
state_before: C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : W.IsInvertedBy G
⊢ {X Y : LocQuiver W} → (X ⟶ Y) → ((fun X => G.obj X.obj) X ⟶ (fun X => G.obj X.obj) Y)
state_after: C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : W.IsInvertedBy G
X Y : LocQuiver W
⊢ (X ⟶ Y) → ((fun X => G.obj X.obj) X ⟶ (fun X => G.obj X.obj) Y)
tactic: intros X Y
state_before: C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : W.IsInvertedBy G
X Y : LocQuiver W
⊢ (X ⟶ Y) → ((fun X => G.obj X.obj) X ⟶ (fun X => G.obj X.obj) Y)
state_after: case inl
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : W.IsInvertedBy G
X Y : LocQuiver W
f : X.obj ⟶ Y.obj
⊢ (fun X => G.obj X.obj) X ⟶ (fun X => G.obj X.obj) Y

case inr.mk
C : Type uC
inst✝¹ : Category.{uC', uC} C
W : MorphismProperty C
D : Type uD
inst✝ : Category.{uD', uD} D
G : C ⥤ D
hG : W.IsInvertedBy G
X Y : LocQuiver W
g : Y.obj ⟶ X.obj
hg : W g
⊢ (fun X => G.obj X.obj) X ⟶ (fun X => G.obj X.obj) Y
tactic: rintro (f | ⟨g, hg⟩)
Theorem: MeasurableSet.iInter
File: Mathlib/MeasureTheory/MeasurableSpace/Defs.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s t u : Set α
m : MeasurableSpace α
inst✝ : Countable ι
f : ι → Set α
h : ∀ (b : ι), MeasurableSet (f b)
⊢ MeasurableSet (⋂ b, f b)ᶜ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s t u : Set α
m : MeasurableSpace α
inst✝ : Countable ι
f : ι → Set α
h : ∀ (b : ι), MeasurableSet (f b)
⊢ MeasurableSet (⋃ i, (f i)ᶜ)
tactic: rw [compl_iInter]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
δ' : Type u_5
ι : Sort u_6
s t u : Set α
m : MeasurableSpace α
inst✝ : Countable ι
f : ι → Set α
h : ∀ (b : ι), MeasurableSet (f b)
⊢ MeasurableSet (⋃ i, (f i)ᶜ)
state_after: no goals
tactic: exact .iUnion fun b => (h b).compl
Theorem: Tactic.NormNum.nat_sqrt_helper
File: Mathlib/Tactic/NormNum/NatSqrt.lean

Proof steps:
state_before: x y r : ℕ
hr : y * y + r = x
hle : r.ble (2 * y) = true
⊢ x.sqrt = y
state_after: x y r : ℕ
hr : y * y + r = x
hle : r.ble (2 * y) = true
⊢ (y ^ 2 + r).sqrt = y
tactic: rw [← hr, ← pow_two]
state_before: x y r : ℕ
hr : y * y + r = x
hle : r.ble (2 * y) = true
⊢ (y ^ 2 + r).sqrt = y
state_after: x y r : ℕ
hr : y * y + r = x
hle : r.ble (y + y) = true
⊢ (y ^ 2 + r).sqrt = y
tactic: rw [two_mul] at hle
state_before: x y r : ℕ
hr : y * y + r = x
hle : r.ble (y + y) = true
⊢ (y ^ 2 + r).sqrt = y
state_after: no goals
tactic: exact Nat.sqrt_add_eq' _ (Nat.le_of_ble_eq_true hle)
Theorem: Polynomial.coeff_pow_eq_ite_of_natDegree_le_of_le
File: Mathlib/Algebra/Polynomial/Degree/Lemmas.lean

Proof steps:
state_before: R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
o : ℕ
pn : p.natDegree ≤ n
mno : m * n ≤ o
⊢ (p ^ m).coeff o = if o = m * n then p.coeff n ^ m else 0
state_after: case inl
R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
pn : p.natDegree ≤ n
mno : m * n ≤ m * n
⊢ (p ^ m).coeff (m * n) = if m * n = m * n then p.coeff n ^ m else 0

case inr
R : Type u
S : Type v
ι : Type w
a b : R
m n : ℕ
inst✝ : Semiring R
p q r : R[X]
o : ℕ
pn : p.natDegree ≤ n
mno : m * n ≤ o
h : o ≠ m * n
⊢ (p ^ m).coeff o = if o = m * n then p.coeff n ^ m else 0
tactic: rcases eq_or_ne o (m * n) with rfl | h
Theorem: IsUpperSet.le_card_inter_finset
File: Mathlib/Combinatorics/SetFamily/HarrisKleitman.lean

Proof steps:
state_before: α : Type u_1
inst✝¹ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
inst✝ : Fintype α
h𝒜 : IsUpperSet ↑𝒜
hℬ : IsUpperSet ↑ℬ
⊢ 𝒜.card * ℬ.card ≤ 2 ^ Fintype.card α * (𝒜 ∩ ℬ).card
state_after: α : Type u_1
inst✝¹ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
inst✝ : Fintype α
h𝒜 : IsLowerSet ↑𝒜ᶜ
hℬ : IsUpperSet ↑ℬ
⊢ 𝒜.card * ℬ.card ≤ 2 ^ Fintype.card α * (𝒜 ∩ ℬ).card
tactic: rw [← isLowerSet_compl, ← coe_compl] at h𝒜
state_before: α : Type u_1
inst✝¹ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
inst✝ : Fintype α
h𝒜 : IsLowerSet ↑𝒜ᶜ
hℬ : IsUpperSet ↑ℬ
⊢ 𝒜.card * ℬ.card ≤ 2 ^ Fintype.card α * (𝒜 ∩ ℬ).card
state_after: α : Type u_1
inst✝¹ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
inst✝ : Fintype α
h𝒜 : IsLowerSet ↑𝒜ᶜ
hℬ : IsUpperSet ↑ℬ
this : 2 ^ Fintype.card α * (𝒜ᶜ ∩ ℬ).card ≤ 𝒜ᶜ.card * ℬ.card
⊢ 𝒜.card * ℬ.card ≤ 2 ^ Fintype.card α * (𝒜 ∩ ℬ).card
tactic: have := h𝒜.card_inter_le_finset hℬ
state_before: α : Type u_1
inst✝¹ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
inst✝ : Fintype α
h𝒜 : IsLowerSet ↑𝒜ᶜ
hℬ : IsUpperSet ↑ℬ
this : 2 ^ Fintype.card α * (𝒜ᶜ ∩ ℬ).card ≤ 𝒜ᶜ.card * ℬ.card
⊢ 𝒜.card * ℬ.card ≤ 2 ^ Fintype.card α * (𝒜 ∩ ℬ).card
state_after: case h₁
α : Type u_1
inst✝¹ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
inst✝ : Fintype α
h𝒜 : IsLowerSet ↑𝒜ᶜ
hℬ : IsUpperSet ↑ℬ
this : 2 ^ Fintype.card α * (𝒜ᶜ ∩ ℬ).card ≤ 2 ^ Fintype.card α * ℬ.card - 𝒜.card * ℬ.card
⊢ 2 ^ Fintype.card α * (𝒜ᶜ ∩ ℬ).card ≤ 2 ^ Fintype.card α * ℬ.card

case h₂
α : Type u_1
inst✝¹ : DecidableEq α
𝒜 ℬ : Finset (Finset α)
s : Finset α
a : α
inst✝ : Fintype α
h𝒜 : IsLowerSet ↑𝒜ᶜ
hℬ : IsUpperSet ↑ℬ
this : 2 ^ Fintype.card α * (𝒜ᶜ ∩ ℬ).card ≤ 2 ^ Fintype.card α * ℬ.card - 𝒜.card * ℬ.card
⊢ 𝒜.card * ℬ.card ≤ 2 ^ Fintype.card α * ℬ.card
tactic: rwa [card_compl, Fintype.card_finset, tsub_mul, le_tsub_iff_le_tsub, ← mul_tsub, ←
    card_sdiff inter_subset_right, sdiff_inter_self_right, sdiff_compl,
    _root_.inf_comm] at this
Theorem: UV.card_compression
File: Mathlib/Combinatorics/SetFamily/Compression/UV.lean

Proof steps:
state_before: α : Type u_1
inst✝³ : GeneralizedBooleanAlgebra α
inst✝² : DecidableRel Disjoint
inst✝¹ : DecidableRel fun x x_1 => x ≤ x_1
s✝ : Finset α
u✝ v✝ a b : α
inst✝ : DecidableEq α
u v : α
s : Finset α
⊢ (𝓒 u v s).card = s.card
state_after: no goals
tactic: rw [compression, card_union_of_disjoint compress_disjoint, filter_image,
    card_image_of_injOn compress_injOn, ← card_union_of_disjoint (disjoint_filter_filter_neg s _ _),
    filter_union_filter_neg_eq]
Theorem: dist_pi_lt_iff
File: Mathlib/Topology/MetricSpace/Pseudo/Constructions.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ
hr : 0 < r
⊢ dist f g < r ↔ ∀ (b : β), dist (f b) (g b) < r
state_after: case intro
α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < ↑r
⊢ dist f g < ↑r ↔ ∀ (b : β), dist (f b) (g b) < ↑r
tactic: lift r to ℝ≥0 using hr.le
state_before: case intro
α : Type u_1
β : Type u_2
inst✝² : PseudoMetricSpace α
π : β → Type u_3
inst✝¹ : Fintype β
inst✝ : (b : β) → PseudoMetricSpace (π b)
f g : (b : β) → π b
r : ℝ≥0
hr : 0 < ↑r
⊢ dist f g < ↑r ↔ ∀ (b : β), dist (f b) (g b) < ↑r
state_after: no goals
tactic: exact nndist_pi_lt_iff hr
Theorem: Ordering.then_eq_gt
File: .lake/packages/batteries/Batteries/Classes/Order.lean

Proof steps:
state_before: o₁ o₂ : Ordering
⊢ o₁.then o₂ = gt ↔ o₁ = gt ∨ o₁ = eq ∧ o₂ = gt
state_after: no goals
tactic: cases o₁ <;> cases o₂ <;> decide
Theorem: Pell.IsFundamental.eq_pow_of_nonneg
File: Mathlib/NumberTheory/Pell.lean

Proof steps:
state_before: d : ℤ
a₁ : Solution₁ d
h : IsFundamental a₁
a : Solution₁ d
hax : 0 < a.x
hay : 0 ≤ a.y
⊢ ∃ n, a = a₁ ^ n
state_after: case intro
d : ℤ
a₁ : Solution₁ d
h : IsFundamental a₁
a : Solution₁ d
hay : 0 ≤ a.y
ax : ℕ
hax' : ↑ax = a.x
hax✝ hax : 0 < ↑ax
⊢ ∃ n, a = a₁ ^ n
tactic: lift a.x to ℕ using hax.le with ax hax'
state_before: case intro
d : ℤ
a₁ : Solution₁ d
h : IsFundamental a₁
a : Solution₁ d
hay : 0 ≤ a.y
ax : ℕ
hax' : ↑ax = a.x
hax✝ hax : 0 < ↑ax
⊢ ∃ n, a = a₁ ^ n
state_after: case intro
d : ℤ
a₁ : Solution₁ d
h : IsFundamental a₁
a : Solution₁ d
hay : 0 ≤ a.y
ax : ℕ
hax' : ↑ax = a.x
hax : 0 < ↑ax
⊢ ∃ n, a = a₁ ^ n
tactic: clear hax
state_before: case intro
d : ℤ
a₁ : Solution₁ d
h : IsFundamental a₁
a : Solution₁ d
hay : 0 ≤ a.y
ax : ℕ
hax' : ↑ax = a.x
hax : 0 < ↑ax
⊢ ∃ n, a = a₁ ^ n
state_after: case intro.h
d : ℤ
a₁ : Solution₁ d
h : IsFundamental a₁
x : ℕ
ih : ∀ m < x, ∀ {a : Solution₁ d}, 0 ≤ a.y → ↑m = a.x → 0 < ↑m → ∃ n, a = a₁ ^ n
a : Solution₁ d
hay : 0 ≤ a.y
hax' : ↑x = a.x
hax : 0 < ↑x
⊢ ∃ n, a = a₁ ^ n
tactic: induction' ax using Nat.strong_induction_on with x ih generalizing a
state_before: case intro.h
d : ℤ
a₁ : Solution₁ d
h : IsFundamental a₁
x : ℕ
ih : ∀ m < x, ∀ {a : Solution₁ d}, 0 ≤ a.y → ↑m = a.x → 0 < ↑m → ∃ n, a = a₁ ^ n
a : Solution₁ d
hay : 0 ≤ a.y
hax' : ↑x = a.x
hax : 0 < ↑x
⊢ ∃ n, a = a₁ ^ n
state_after: case intro.h.inl
d : ℤ
a₁ : Solution₁ d
h : IsFundamental a₁
x : ℕ
ih : ∀ m < x, ∀ {a : Solution₁ d}, 0 ≤ a.y → ↑m = a.x → 0 < ↑m → ∃ n, a = a₁ ^ n
a : Solution₁ d
hay : 0 ≤ a.y
hax' : ↑x = a.x
hax : 0 < ↑x
hy : 0 = a.y
⊢ ∃ n, a = a₁ ^ n

case intro.h.inr
d : ℤ
a₁ : Solution₁ d
h : IsFundamental a₁
x : ℕ
ih : ∀ m < x, ∀ {a : Solution₁ d}, 0 ≤ a.y → ↑m = a.x → 0 < ↑m → ∃ n, a = a₁ ^ n
a : Solution₁ d
hay : 0 ≤ a.y
hax' : ↑x = a.x
hax : 0 < ↑x
hy : 0 < a.y
⊢ ∃ n, a = a₁ ^ n
tactic: rcases hay.eq_or_lt with hy | hy
Theorem: Finsupp.total_onFinset
File: Mathlib/LinearAlgebra/Finsupp.lean

Proof steps:
state_before: α : Type u_1
M : Type u_2
N : Type u_3
P : Type u_4
R : Type u_5
S : Type u_6
inst✝⁹ : Semiring R
inst✝⁸ : Semiring S
inst✝⁷ : AddCommMonoid M
inst✝⁶ : Module R M
inst✝⁵ : AddCommMonoid N
inst✝⁴ : Module R N
inst✝³ : AddCommMonoid P
inst✝² : Module R P
α' : Type u_7
M' : Type u_8
inst✝¹ : AddCommMonoid M'
inst✝ : Module R M'
v : α → M
v' : α' → M'
s : Finset α
f : α → R
g : α → M
hf : ∀ (a : α), f a ≠ 0 → a ∈ s
⊢ (Finsupp.total α M R g) (onFinset s f hf) = ∑ x ∈ s, f x • g x
state_after: no goals
tactic: classical
  simp only [Finsupp.total_apply, Finsupp.sum, Finsupp.onFinset_apply, Finsupp.support_onFinset]
  rw [Finset.sum_filter_of_ne]
  intro x _ h
  contrapose! h
  simp [h]
Theorem: Metric.tendsto_atTop
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 z : α
δ ε ε₁ ε₂ : ℝ
s : Set α
inst✝¹ : Nonempty β
inst✝ : SemilatticeSup β
u : β → α
a : α
⊢ (∀ (ib : ℝ), 0 < ib → ∃ ia, True ∧ ∀ x ∈ Ici ia, u x ∈ ball a ib) ↔ ∀ ε > 0, ∃ N, ∀ n ≥ N, dist (u n) a < ε
state_after: no goals
tactic: simp only [true_and, mem_ball, mem_Ici]
Theorem: Tuple.sort_eq_refl_iff_monotone
File: Mathlib/Data/Fin/Tuple/Sort.lean

Proof steps:
state_before: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
⊢ sort f = Equiv.refl (Fin n) ↔ Monotone f
state_after: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
⊢ (Monotone f ∧ ∀ (i j : Fin n), i < j → f (id i) = f (id j) → id i < id j) ↔ Monotone f
tactic: rw [eq_comm, eq_sort_iff, Equiv.coe_refl, Function.comp_id]
state_before: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
⊢ (Monotone f ∧ ∀ (i j : Fin n), i < j → f (id i) = f (id j) → id i < id j) ↔ Monotone f
state_after: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
⊢ Monotone f → ∀ (i j : Fin n), i < j → f i = f j → i < j
tactic: simp only [id, and_iff_left_iff_imp]
state_before: n : ℕ
α : Type u_1
inst✝ : LinearOrder α
f : Fin n → α
σ : Equiv.Perm (Fin n)
⊢ Monotone f → ∀ (i j : Fin n), i < j → f i = f j → i < j
state_after: no goals
tactic: exact fun _ _ _ hij _ => hij
Theorem: CategoryTheory.ShortComplex.LeftHomologyData.ofIsColimitCokernelCofork_K
File: Mathlib/Algebra/Homology/ShortComplex/LeftHomology.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{?u.20185, u_1} C
inst✝ : HasZeroMorphisms C
S S₁ S₂ S₃ : ShortComplex C
h : S.LeftHomologyData
A : C
hg : S.g = 0
c : CokernelCofork S.f
hc : IsColimit c
⊢ 𝟙 S.X₂ ≫ S.g = 0
state_after: no goals
tactic: rw [id_comp, hg]
Theorem: Nat.div_lt_iff_lt_mul'
File: Mathlib/Data/Nat/Defs.lean

Proof steps:
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
hb : 0 < b
⊢ a / b < c ↔ a < c * b
state_after: no goals
tactic: simp only [← Nat.not_le, le_div_iff_mul_le' hb]
Theorem: Submonoid.unop_closure
File: Mathlib/Algebra/Group/Submonoid/MulOpposite.lean

Proof steps:
state_before: ι : Sort u_1
M : Type u_2
inst✝ : MulOneClass M
s : Set Mᵐᵒᵖ
⊢ (closure s).unop = closure (MulOpposite.op ⁻¹' s)
state_after: ι : Sort u_1
M : Type u_2
inst✝ : MulOneClass M
s : Set Mᵐᵒᵖ
⊢ sInf {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} = sInf {S | MulOpposite.op ⁻¹' s ⊆ ↑S}
tactic: simp_rw [closure, unop_sInf, Set.preimage_setOf_eq, Submonoid.op_coe]
state_before: ι : Sort u_1
M : Type u_2
inst✝ : MulOneClass M
s : Set Mᵐᵒᵖ
⊢ sInf {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} = sInf {S | MulOpposite.op ⁻¹' s ⊆ ↑S}
state_after: case e_a.h
ι : Sort u_1
M : Type u_2
inst✝ : MulOneClass M
s : Set Mᵐᵒᵖ
a : Submonoid M
⊢ a ∈ {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} ↔ a ∈ {S | MulOpposite.op ⁻¹' s ⊆ ↑S}
tactic: congr with a
state_before: case e_a.h
ι : Sort u_1
M : Type u_2
inst✝ : MulOneClass M
s : Set Mᵐᵒᵖ
a : Submonoid M
⊢ a ∈ {a | s ⊆ MulOpposite.unop ⁻¹' ↑a} ↔ a ∈ {S | MulOpposite.op ⁻¹' s ⊆ ↑S}
state_after: no goals
tactic: exact MulOpposite.op_surjective.forall
Theorem: div_eq_div_iff_mul_eq_mul
File: Mathlib/Algebra/Group/Basic.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : CommGroup G
a b c d : G
⊢ a / b = c / d ↔ a * d = c * b
state_after: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : CommGroup G
a b c d : G
⊢ c * b = d * a ↔ a * d = c * b
tactic: rw [div_eq_iff_eq_mul, div_mul_eq_mul_div, eq_comm, div_eq_iff_eq_mul']
state_before: α : Type u_1
β : Type u_2
G : Type u_3
M : Type u_4
inst✝ : CommGroup G
a b c d : G
⊢ c * b = d * a ↔ a * d = c * b
state_after: no goals
tactic: simp only [mul_comm, eq_comm]
Theorem: Int.testBit_lxor
File: Mathlib/Data/Int/Bitwise.lean

Proof steps:
state_before: m n : ℤ
k : ℕ
⊢ (m.xor n).testBit k = xor (m.testBit k) (n.testBit k)
state_after: no goals
tactic: rw [← bitwise_xor, testBit_bitwise]
Theorem: EReal.add_lt_top
File: Mathlib/Data/Real/EReal.lean

Proof steps:
state_before: x y : EReal
hx : x ≠ ⊤
hy : y ≠ ⊤
⊢ x + y < ⊤
state_after: x y : EReal
hx : x ≠ ⊤
hy : y ≠ ⊤
⊢ x + y < ⊤ + ⊤
tactic: rw [← EReal.top_add_top]
state_before: x y : EReal
hx : x ≠ ⊤
hy : y ≠ ⊤
⊢ x + y < ⊤ + ⊤
state_after: no goals
tactic: exact EReal.add_lt_add hx.lt_top hy.lt_top
Theorem: ProbabilityTheory.condCount_isProbabilityMeasure
File: Mathlib/Probability/CondCount.lean

Proof steps:
state_before: Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s : Set Ω
hs : s.Finite
hs' : s.Nonempty
⊢ (condCount s) Set.univ = 1
state_after: case h0
Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s : Set Ω
hs : s.Finite
hs' : s.Nonempty
⊢ Measure.count s ≠ 0

case ht
Ω : Type u_1
inst✝¹ : MeasurableSpace Ω
inst✝ : MeasurableSingletonClass Ω
s : Set Ω
hs : s.Finite
hs' : s.Nonempty
⊢ Measure.count s ≠ ⊤
tactic: rw [condCount, cond_apply _ hs.measurableSet, Set.inter_univ, ENNReal.inv_mul_cancel]
Theorem: Real.Angle.neg_coe_abs_toReal_of_sign_nonpos
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

Proof steps:
state_before: θ : Angle
h : θ.sign ≤ 0
⊢ -↑|θ.toReal| = θ
state_after: θ : Angle
h : θ.sign = -1 ∨ θ.sign = 0
⊢ -↑|θ.toReal| = θ
tactic: rw [SignType.nonpos_iff] at h
state_before: θ : Angle
h : θ.sign = -1 ∨ θ.sign = 0
⊢ -↑|θ.toReal| = θ
state_after: case inl
θ : Angle
h : θ.sign = -1
⊢ -↑|θ.toReal| = θ

case inr
θ : Angle
h : θ.sign = 0
⊢ -↑|θ.toReal| = θ
tactic: rcases h with (h | h)
Theorem: AlgebraicGeometry.PresheafedSpace.congr_app
File: Mathlib/Geometry/RingedSpace/PresheafedSpace.lean

Proof steps:
state_before: C : Type u_1
inst✝ : Category.{?u.27751, u_1} C
X Y : PresheafedSpace C
α β : X ⟶ Y
h : α = β
U : (Opens ↑↑Y)ᵒᵖ
⊢ (Opens.map β.base).op.obj U = (Opens.map α.base).op.obj U
state_after: C : Type u_1
inst✝ : Category.{?u.27751, u_1} C
X Y : PresheafedSpace C
α : X ⟶ Y
U : (Opens ↑↑Y)ᵒᵖ
⊢ (Opens.map α.base).op.obj U = (Opens.map α.base).op.obj U
tactic: subst h
state_before: C : Type u_1
inst✝ : Category.{?u.27751, u_1} C
X Y : PresheafedSpace C
α : X ⟶ Y
U : (Opens ↑↑Y)ᵒᵖ
⊢ (Opens.map α.base).op.obj U = (Opens.map α.base).op.obj U
state_after: no goals
tactic: rfl
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
α β : X ⟶ Y
h : α = β
U : (Opens ↑↑Y)ᵒᵖ
⊢ α.c.app U = β.c.app U ≫ X.presheaf.map (eqToHom ⋯)
state_after: C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
α : X ⟶ Y
U : (Opens ↑↑Y)ᵒᵖ
⊢ α.c.app U = α.c.app U ≫ X.presheaf.map (eqToHom ⋯)
tactic: subst h
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
X Y : PresheafedSpace C
α : X ⟶ Y
U : (Opens ↑↑Y)ᵒᵖ
⊢ α.c.app U = α.c.app U ≫ X.presheaf.map (eqToHom ⋯)
state_after: no goals
tactic: simp
Theorem: Filter.HasBasis.comap
File: Mathlib/Order/Filter/Bases.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p : ι → Prop
s : ι → Set α
t✝ : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
f : β → α
hl : l.HasBasis p s
t : Set β
⊢ t ∈ Filter.comap f l ↔ ∃ i, p i ∧ f ⁻¹' s i ⊆ t
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p : ι → Prop
s : ι → Set α
t✝ : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
f : β → α
hl : l.HasBasis p s
t : Set β
⊢ (∃ i, p i ∧ s i ⊆ {y | ∀ ⦃x : β⦄, f x = y → x ∈ t}) ↔ ∃ i, p i ∧ f ⁻¹' s i ⊆ t
tactic: simp only [mem_comap', hl.mem_iff]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p : ι → Prop
s : ι → Set α
t✝ : Set α
i : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
f : β → α
hl : l.HasBasis p s
t : Set β
⊢ (∃ i, p i ∧ s i ⊆ {y | ∀ ⦃x : β⦄, f x = y → x ∈ t}) ↔ ∃ i, p i ∧ f ⁻¹' s i ⊆ t
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p : ι → Prop
s : ι → Set α
t✝ : Set α
i✝ : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
f : β → α
hl : l.HasBasis p s
t : Set β
i : ι
⊢ s i ⊆ {y | ∀ ⦃x : β⦄, f x = y → x ∈ t} ↔ f ⁻¹' s i ⊆ t
tactic: refine exists_congr (fun i => Iff.rfl.and ?_)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
ι : Sort u_4
ι' : Sort u_5
l l' : Filter α
p : ι → Prop
s : ι → Set α
t✝ : Set α
i✝ : ι
p' : ι' → Prop
s' : ι' → Set α
i' : ι'
f : β → α
hl : l.HasBasis p s
t : Set β
i : ι
⊢ s i ⊆ {y | ∀ ⦃x : β⦄, f x = y → x ∈ t} ↔ f ⁻¹' s i ⊆ t
state_after: no goals
tactic: exact ⟨fun h x hx => h hx rfl, fun h y hy x hx => h <| by rwa [mem_preimage, hx]⟩
Theorem: Set.image_neg_Icc
File: Mathlib/Data/Set/Pointwise/Interval.lean

Proof steps:
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ Neg.neg '' Icc a b = Icc (-b) (-a)
state_after: no goals
tactic: simp
Theorem: isSMulRegular_on_quot_iff_smul_mem_implies_mem
File: Mathlib/RingTheory/Regular/IsSMulRegular.lean

Proof steps:
state_before: R : Type u_1
S : Type u_2
M : Type u_3
M' : Type u_4
M'' : Type u_5
inst✝⁶ : Ring R
inst✝⁵ : AddCommGroup M
inst✝⁴ : Module R M
inst✝³ : AddCommGroup M'
inst✝² : Module R M'
inst✝¹ : AddCommGroup M''
inst✝ : Module R M''
N : Submodule R M
r : R
⊢ (∀ (x : M), r • N.mkQ x = 0 → N.mkQ x = 0) ↔ ∀ (x : M), r • x ∈ N → x ∈ N
state_after: no goals
tactic: simp_rw [← map_smul, N.mkQ_apply, Submodule.Quotient.mk_eq_zero]
Theorem: Finset.sym2_nonempty
File: Mathlib/Data/Finset/Sym.lean

Proof steps:
state_before: α : Type u_1
β : Type u_2
s t : Finset α
a b : α
⊢ s.sym2.Nonempty ↔ s.Nonempty
state_after: α : Type u_1
β : Type u_2
s t : Finset α
a b : α
⊢ ¬s.sym2.Nonempty ↔ ¬s.Nonempty
tactic: rw [← not_iff_not]
state_before: α : Type u_1
β : Type u_2
s t : Finset α
a b : α
⊢ ¬s.sym2.Nonempty ↔ ¬s.Nonempty
state_after: no goals
tactic: simp_rw [not_nonempty_iff_eq_empty, sym2_eq_empty]
Theorem: CategoryTheory.ShortComplex.Homotopy.symm_h₃
File: Mathlib/Algebra/Homology/ShortComplex/Preadditive.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{?u.97646, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂
h : Homotopy φ₁ φ₂
⊢ φ₂.τ₁ = S₁.f ≫ (-h.h₁) + -h.h₀ + φ₁.τ₁
state_after: C : Type u_1
inst✝¹ : Category.{?u.97646, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂
h : Homotopy φ₁ φ₂
⊢ φ₂.τ₁ = -S₁.f ≫ h.h₁ + -h.h₀ + (S₁.f ≫ h.h₁ + h.h₀ + φ₂.τ₁)
tactic: rw [h.comm₁, comp_neg]
state_before: C : Type u_1
inst✝¹ : Category.{?u.97646, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂
h : Homotopy φ₁ φ₂
⊢ φ₂.τ₁ = -S₁.f ≫ h.h₁ + -h.h₀ + (S₁.f ≫ h.h₁ + h.h₀ + φ₂.τ₁)
state_after: no goals
tactic: abel
state_before: C : Type u_1
inst✝¹ : Category.{?u.97646, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂
h : Homotopy φ₁ φ₂
⊢ φ₂.τ₂ = S₁.g ≫ (-h.h₂) + (-h.h₁) ≫ S₂.f + φ₁.τ₂
state_after: C : Type u_1
inst✝¹ : Category.{?u.97646, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂
h : Homotopy φ₁ φ₂
⊢ φ₂.τ₂ = -S₁.g ≫ h.h₂ + -h.h₁ ≫ S₂.f + (S₁.g ≫ h.h₂ + h.h₁ ≫ S₂.f + φ₂.τ₂)
tactic: rw [h.comm₂, comp_neg, neg_comp]
state_before: C : Type u_1
inst✝¹ : Category.{?u.97646, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂
h : Homotopy φ₁ φ₂
⊢ φ₂.τ₂ = -S₁.g ≫ h.h₂ + -h.h₁ ≫ S₂.f + (S₁.g ≫ h.h₂ + h.h₁ ≫ S₂.f + φ₂.τ₂)
state_after: no goals
tactic: abel
state_before: C : Type u_1
inst✝¹ : Category.{?u.97646, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂
h : Homotopy φ₁ φ₂
⊢ φ₂.τ₃ = -h.h₃ + (-h.h₂) ≫ S₂.g + φ₁.τ₃
state_after: C : Type u_1
inst✝¹ : Category.{?u.97646, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂
h : Homotopy φ₁ φ₂
⊢ φ₂.τ₃ = -h.h₃ + -h.h₂ ≫ S₂.g + (h.h₃ + h.h₂ ≫ S₂.g + φ₂.τ₃)
tactic: rw [h.comm₃, neg_comp]
state_before: C : Type u_1
inst✝¹ : Category.{?u.97646, u_1} C
inst✝ : Preadditive C
S₁ S₂ S₃ : ShortComplex C
φ₁ φ₂ φ₃ φ₄ : S₁ ⟶ S₂
h : Homotopy φ₁ φ₂
⊢ φ₂.τ₃ = -h.h₃ + -h.h₂ ≫ S₂.g + (h.h₃ + h.h₂ ≫ S₂.g + φ₂.τ₃)
state_after: no goals
tactic: abel
Theorem: CategoryTheory.Idempotents.instAdd_add
File: Mathlib/CategoryTheory/Idempotents/Karoubi.lean

Proof steps:
state_before: C : Type u_1
inst✝¹ : Category.{?u.20231, u_1} C
inst✝ : Preadditive C
P Q : Karoubi C
f g : P ⟶ Q
⊢ f.f + g.f = P.p ≫ (f.f + g.f) ≫ Q.p
state_after: no goals
tactic: rw [add_comp, comp_add, ← f.comm, ← g.comm]
Theorem: SimpleGraph.Coloring.card_colorClasses_le
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 α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
⊢ card ↑C.colorClasses ≤ card α
state_after: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
⊢ card ↑(Setoid.ker ⇑C).classes ≤ card α
tactic: simp only [colorClasses]
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
⊢ card ↑(Setoid.ker ⇑C).classes ≤ card α
state_after: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
this : Fintype ↑(Setoid.ker ⇑C).classes
⊢ card ↑(Setoid.ker ⇑C).classes ≤ card α
tactic: haveI : Fintype (Setoid.classes (Setoid.ker C)) := by assumption
state_before: V : Type u
G : SimpleGraph V
n : ℕ
α : Type u_1
β : Type u_2
C : G.Coloring α
inst✝¹ : Fintype α
inst✝ : Fintype ↑C.colorClasses
this : Fintype ↑(Setoid.ker ⇑C).classes
⊢ card ↑(Setoid.ker ⇑C).classes ≤ card α
state_after: no goals
tactic: convert Setoid.card_classes_ker_le C