1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: Nat.decreasingInduction_self
File: Mathlib/Data/Nat/Defs.lean

tactic: dsimp only [decreasingInduction]
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
P : ℕ → Sort u_1
h : (n : ℕ) → P (n + 1) → P n
nn : n ≤ n
hP : P n
⊢ decreasingInduction h nn hP = hP
state_after: a b c d m n k : ℕ
p q : ℕ → Prop
P : ℕ → Sort u_1
h : (n : ℕ) → P (n + 1) → P n
nn : n ≤ n
hP : P n
⊢ leRecOn nn (fun {k} ih hsk => ih (h k hsk)) (fun h => h) hP = hP

tactic: rw [leRecOn_self]
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
P : ℕ → Sort u_1
h : (n : ℕ) → P (n + 1) → P n
nn : n ≤ n
hP : P n
⊢ leRecOn nn (fun {k} ih hsk => ih (h k hsk)) (fun h => h) hP = hP
state_after: no goals
Theorem: Partrec.option_casesOn_right
File: Mathlib/Computability/Partrec.lean

tactic: cases' o a with b <;> simp [encodek]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
σ : Type u_4
inst✝³ : Primcodable α
inst✝² : Primcodable β
inst✝¹ : Primcodable γ
inst✝ : Primcodable σ
o : α → Option β
f : α → σ
g : α → β →. σ
ho : Computable o
hf : Computable f
hg : Partrec₂ g
this : Partrec fun a => Nat.casesOn (encode (o a)) (Part.some (f a)) fun n => (↑(decode n)).bind (g a)
a : α
⊢ (Nat.casesOn (encode (o a)) (Part.some (f a)) fun n => (↑(decode n)).bind (g a)) =
    Option.casesOn (o a) (Part.some (f a)) (g a)
state_after: no goals
Theorem: Turing.ToPartrec.Code.fix_eval
File: Mathlib/Computability/TMToPartrec.lean

tactic: simp [eval]
state_before: f : Code
⊢ f.fix.eval = PFun.fix fun v => Part.map (fun v => if v.headI = 0 then Sum.inl v.tail else Sum.inr v.tail) (f.eval v)
state_after: no goals
Theorem: Multiset.sum_map_mul_right
File: Mathlib/Algebra/BigOperators/Ring/Multiset.lean

tactic: simp
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : NonUnitalNonAssocSemiring α
a : α
s : Multiset ι
f : ι → α
⊢ (map (fun i => f i * a) 0).sum = (map f 0).sum * a
state_after: no goals

tactic: simp [ih, add_mul]
state_before: ι : Type u_1
α : Type u_2
β : Type u_3
inst✝ : NonUnitalNonAssocSemiring α
a✝ : α
s✝ : Multiset ι
f : ι → α
a : ι
s : Multiset ι
ih : (map (fun i => f i * a✝) s).sum = (map f s).sum * a✝
⊢ (map (fun i => f i * a✝) (a ::ₘ s)).sum = (map f (a ::ₘ s)).sum * a✝
state_after: no goals
Theorem: ENNReal.ofReal_nsmul
File: Mathlib/Data/ENNReal/Real.lean

tactic: simp only [nsmul_eq_mul, ← ofReal_natCast n, ← ofReal_mul n.cast_nonneg]
state_before: a b c d : ℝ≥0∞
r p q : ℝ≥0
x : ℝ
n : ℕ
⊢ ENNReal.ofReal (n • x) = n • ENNReal.ofReal x
state_after: no goals
Theorem: Finset.inr_mem_sumLexLift
File: Mathlib/Data/Sum/Interval.lean

tactic: simp [mem_sumLexLift]
state_before: α₁ : Type u_1
α₂ : Type u_2
β₁ : Type u_3
β₂ : Type u_4
γ₁ : Type u_5
γ₂ : Type u_6
f₁ f₁' : α₁ → β₁ → Finset γ₁
f₂ f₂' : α₂ → β₂ → Finset γ₂
g₁ g₁' : α₁ → β₂ → Finset γ₁
g₂ g₂' : α₁ → β₂ → Finset γ₂
a : α₁ ⊕ α₂
b : β₁ ⊕ β₂
c : γ₁ ⊕ γ₂
c₂ : γ₂
⊢ inr c₂ ∈ sumLexLift f₁ f₂ g₁ g₂ a b ↔
    (∃ a₁ b₂, a = inl a₁ ∧ b = inr b₂ ∧ c₂ ∈ g₂ a₁ b₂) ∨ ∃ a₂ b₂, a = inr a₂ ∧ b = inr b₂ ∧ c₂ ∈ f₂ a₂ b₂
state_after: no goals
Theorem: MeasureTheory.snorm_one_eq_lintegral_nnnorm
File: Mathlib/MeasureTheory/Function/LpSeminorm/Basic.lean

tactic: simp_rw [snorm_eq_lintegral_rpow_nnnorm one_ne_zero ENNReal.coe_ne_top, ENNReal.one_toReal,
  one_div_one, ENNReal.rpow_one]
state_before: α : Type u_1
E : Type u_2
F : Type u_3
G : Type u_4
m m0 : MeasurableSpace α
p : ℝ≥0∞
q : ℝ
μ ν : Measure α
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedAddCommGroup F
inst✝ : NormedAddCommGroup G
f : α → F
⊢ snorm f 1 μ = ∫⁻ (x : α), ↑‖f x‖₊ ∂μ
state_after: no goals
Theorem: Traversable.toList_eq_self
File: Mathlib/Control/Fold.lean

tactic: simp only [toList_spec, foldMap, traverse]
state_before: α β γ : Type u
t : Type u → Type u
inst✝¹ : Traversable t
inst✝ : LawfulTraversable t
xs : List α
⊢ toList xs = xs
state_after: α β γ : Type u
t : Type u → Type u
inst✝¹ : Traversable t
inst✝ : LawfulTraversable t
xs : List α
⊢ FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) xs) = xs

tactic: induction xs with
| nil => rfl
| cons _ _ ih => (conv_rhs => rw [← ih]); rfl
state_before: α β γ : Type u
t : Type u → Type u
inst✝¹ : Traversable t
inst✝ : LawfulTraversable t
xs : List α
⊢ FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) xs) = xs
state_after: no goals

tactic: rfl
state_before: case nil
α β γ : Type u
t : Type u → Type u
inst✝¹ : Traversable t
inst✝ : LawfulTraversable t
⊢ FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) []) = []
state_after: no goals

tactic: (conv_rhs => rw [← ih])
state_before: case cons
α β γ : Type u
t : Type u → Type u
inst✝¹ : Traversable t
inst✝ : LawfulTraversable t
head✝ : α
tail✝ : List α
ih : FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) tail✝) = tail✝
⊢ FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) (head✝ :: tail✝)) = head✝ :: tail✝
state_after: case cons
α β γ : Type u
t : Type u → Type u
inst✝¹ : Traversable t
inst✝ : LawfulTraversable t
head✝ : α
tail✝ : List α
ih : FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) tail✝) = tail✝
⊢ FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) (head✝ :: tail✝)) =
    head✝ :: FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) tail✝)

tactic: rfl
state_before: case cons
α β γ : Type u
t : Type u → Type u
inst✝¹ : Traversable t
inst✝ : LawfulTraversable t
head✝ : α
tail✝ : List α
ih : FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) tail✝) = tail✝
⊢ FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) (head✝ :: tail✝)) =
    head✝ :: FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) tail✝)
state_after: no goals

tactic: conv_rhs => rw [← ih]
state_before: case cons
α β γ : Type u
t : Type u → Type u
inst✝¹ : Traversable t
inst✝ : LawfulTraversable t
head✝ : α
tail✝ : List α
ih : FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) tail✝) = tail✝
⊢ FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) (head✝ :: tail✝)) = head✝ :: tail✝
state_after: case cons
α β γ : Type u
t : Type u → Type u
inst✝¹ : Traversable t
inst✝ : LawfulTraversable t
head✝ : α
tail✝ : List α
ih : FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) tail✝) = tail✝
⊢ FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) (head✝ :: tail✝)) =
    head✝ :: FreeMonoid.toList (List.traverse (Const.mk' ∘ FreeMonoid.of) tail✝)
Theorem: Complex.equivRealProd_apply_le'
File: Mathlib/Analysis/Complex/Basic.lean

tactic: simpa using equivRealProd_apply_le z
state_before: z✝ : ℂ
E : Type u_1
inst✝¹ : SeminormedAddCommGroup E
inst✝ : NormedSpace ℂ E
z : ℂ
⊢ ‖equivRealProd z‖ ≤ 1 * abs z
state_after: no goals
Theorem: OrderIso.supIrredLowerSet_symm_apply
File: Mathlib/Order/Birkhoff.lean

tactic: classical
obtain ⟨s, hs⟩ := s
obtain ⟨a, rfl⟩ := supIrred_iff_of_finite.1 hs
cases nonempty_fintype α
have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
simp [symm_apply_eq]
state_before: α : Type u_1
inst✝³ : SemilatticeSup α
inst✝² : OrderBot α
inst✝¹ : Finite α
s : { s // SupIrred s }
inst✝ : Fintype ↥↑s
⊢ supIrredLowerSet.symm s = (↑↑s).toFinset.sup id
state_after: no goals

tactic: obtain ⟨s, hs⟩ := s
state_before: α : Type u_1
inst✝³ : SemilatticeSup α
inst✝² : OrderBot α
inst✝¹ : Finite α
s : { s // SupIrred s }
inst✝ : Fintype ↥↑s
⊢ supIrredLowerSet.symm s = (↑↑s).toFinset.sup id
state_after: case mk
α : Type u_1
inst✝³ : SemilatticeSup α
inst✝² : OrderBot α
inst✝¹ : Finite α
s : LowerSet α
hs : SupIrred s
inst✝ : Fintype ↥↑⟨s, hs⟩
⊢ supIrredLowerSet.symm ⟨s, hs⟩ = (↑↑⟨s, hs⟩).toFinset.sup id

tactic: obtain ⟨a, rfl⟩ := supIrred_iff_of_finite.1 hs
state_before: case mk
α : Type u_1
inst✝³ : SemilatticeSup α
inst✝² : OrderBot α
inst✝¹ : Finite α
s : LowerSet α
hs : SupIrred s
inst✝ : Fintype ↥↑⟨s, hs⟩
⊢ supIrredLowerSet.symm ⟨s, hs⟩ = (↑↑⟨s, hs⟩).toFinset.sup id
state_after: case mk.intro
α : Type u_1
inst✝³ : SemilatticeSup α
inst✝² : OrderBot α
inst✝¹ : Finite α
a : α
hs : SupIrred (LowerSet.Iic a)
inst✝ : Fintype ↥↑⟨LowerSet.Iic a, hs⟩
⊢ supIrredLowerSet.symm ⟨LowerSet.Iic a, hs⟩ = (↑↑⟨LowerSet.Iic a, hs⟩).toFinset.sup id

tactic: cases nonempty_fintype α
state_before: case mk.intro
α : Type u_1
inst✝³ : SemilatticeSup α
inst✝² : OrderBot α
inst✝¹ : Finite α
a : α
hs : SupIrred (LowerSet.Iic a)
inst✝ : Fintype ↥↑⟨LowerSet.Iic a, hs⟩
⊢ supIrredLowerSet.symm ⟨LowerSet.Iic a, hs⟩ = (↑↑⟨LowerSet.Iic a, hs⟩).toFinset.sup id
state_after: case mk.intro.intro
α : Type u_1
inst✝³ : SemilatticeSup α
inst✝² : OrderBot α
inst✝¹ : Finite α
a : α
hs : SupIrred (LowerSet.Iic a)
inst✝ : Fintype ↥↑⟨LowerSet.Iic a, hs⟩
val✝ : Fintype α
⊢ supIrredLowerSet.symm ⟨LowerSet.Iic a, hs⟩ = (↑↑⟨LowerSet.Iic a, hs⟩).toFinset.sup id

tactic: have : LocallyFiniteOrder α := Fintype.toLocallyFiniteOrder
state_before: case mk.intro.intro
α : Type u_1
inst✝³ : SemilatticeSup α
inst✝² : OrderBot α
inst✝¹ : Finite α
a : α
hs : SupIrred (LowerSet.Iic a)
inst✝ : Fintype ↥↑⟨LowerSet.Iic a, hs⟩
val✝ : Fintype α
⊢ supIrredLowerSet.symm ⟨LowerSet.Iic a, hs⟩ = (↑↑⟨LowerSet.Iic a, hs⟩).toFinset.sup id
state_after: case mk.intro.intro
α : Type u_1
inst✝³ : SemilatticeSup α
inst✝² : OrderBot α
inst✝¹ : Finite α
a : α
hs : SupIrred (LowerSet.Iic a)
inst✝ : Fintype ↥↑⟨LowerSet.Iic a, hs⟩
val✝ : Fintype α
this : LocallyFiniteOrder α
⊢ supIrredLowerSet.symm ⟨LowerSet.Iic a, hs⟩ = (↑↑⟨LowerSet.Iic a, hs⟩).toFinset.sup id

tactic: simp [symm_apply_eq]
state_before: case mk.intro.intro
α : Type u_1
inst✝³ : SemilatticeSup α
inst✝² : OrderBot α
inst✝¹ : Finite α
a : α
hs : SupIrred (LowerSet.Iic a)
inst✝ : Fintype ↥↑⟨LowerSet.Iic a, hs⟩
val✝ : Fintype α
this : LocallyFiniteOrder α
⊢ supIrredLowerSet.symm ⟨LowerSet.Iic a, hs⟩ = (↑↑⟨LowerSet.Iic a, hs⟩).toFinset.sup id
state_after: no goals
Theorem: IsCyclotomicExtension.numberField
File: Mathlib/NumberTheory/Cyclotomic/Basic.lean

tactic: haveI := charZero_of_injective_algebraMap (algebraMap K L).injective
state_before: n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
h : NumberField K
inst✝¹ : Finite ↑S
inst✝ : IsCyclotomicExtension S K L
⊢ FiniteDimensional ℚ L
state_after: n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
h : NumberField K
inst✝¹ : Finite ↑S
inst✝ : IsCyclotomicExtension S K L
this : CharZero L
⊢ FiniteDimensional ℚ L

tactic: haveI := IsCyclotomicExtension.finite S K L
state_before: n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
h : NumberField K
inst✝¹ : Finite ↑S
inst✝ : IsCyclotomicExtension S K L
this : CharZero L
⊢ FiniteDimensional ℚ L
state_after: n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
h : NumberField K
inst✝¹ : Finite ↑S
inst✝ : IsCyclotomicExtension S K L
this✝ : CharZero L
this : Module.Finite K L
⊢ FiniteDimensional ℚ L

tactic: exact Module.Finite.trans K _
state_before: n : ℕ+
S T : Set ℕ+
A : Type u
B : Type v
K : Type w
L : Type z
inst✝⁷ : CommRing A
inst✝⁶ : CommRing B
inst✝⁵ : Algebra A B
inst✝⁴ : Field K
inst✝³ : Field L
inst✝² : Algebra K L
h : NumberField K
inst✝¹ : Finite ↑S
inst✝ : IsCyclotomicExtension S K L
this✝ : CharZero L
this : Module.Finite K L
⊢ FiniteDimensional ℚ L
state_after: no goals
Theorem: LinearMap.rTensor_comp
File: Mathlib/LinearAlgebra/TensorProduct/Basic.lean

tactic: ext m n
state_before: R : Type u_1
inst✝¹⁶ : CommSemiring R
R' : Type u_2
inst✝¹⁵ : Monoid R'
R'' : Type u_3
inst✝¹⁴ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹³ : AddCommMonoid M
inst✝¹² : AddCommMonoid N
inst✝¹¹ : AddCommMonoid P
inst✝¹⁰ : AddCommMonoid Q
inst✝⁹ : AddCommMonoid S
inst✝⁸ : AddCommMonoid T
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module R P
inst✝⁴ : Module R Q
inst✝³ : Module R S
inst✝² : Module R T
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f : N →ₗ[R] P
⊢ rTensor M (g ∘ₗ f) = rTensor M g ∘ₗ rTensor M f
state_after: case H.h.h
R : Type u_1
inst✝¹⁶ : CommSemiring R
R' : Type u_2
inst✝¹⁵ : Monoid R'
R'' : Type u_3
inst✝¹⁴ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹³ : AddCommMonoid M
inst✝¹² : AddCommMonoid N
inst✝¹¹ : AddCommMonoid P
inst✝¹⁰ : AddCommMonoid Q
inst✝⁹ : AddCommMonoid S
inst✝⁸ : AddCommMonoid T
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module R P
inst✝⁴ : Module R Q
inst✝³ : Module R S
inst✝² : Module R T
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f : N →ₗ[R] P
m : N
n : M
⊢ (((TensorProduct.mk R N M).compr₂ (rTensor M (g ∘ₗ f))) m) n =
    (((TensorProduct.mk R N M).compr₂ (rTensor M g ∘ₗ rTensor M f)) m) n

tactic: simp only [compr₂_apply, mk_apply, comp_apply, rTensor_tmul]
state_before: case H.h.h
R : Type u_1
inst✝¹⁶ : CommSemiring R
R' : Type u_2
inst✝¹⁵ : Monoid R'
R'' : Type u_3
inst✝¹⁴ : Semiring R''
M : Type u_4
N : Type u_5
P : Type u_6
Q : Type u_7
S : Type u_8
T : Type u_9
inst✝¹³ : AddCommMonoid M
inst✝¹² : AddCommMonoid N
inst✝¹¹ : AddCommMonoid P
inst✝¹⁰ : AddCommMonoid Q
inst✝⁹ : AddCommMonoid S
inst✝⁸ : AddCommMonoid T
inst✝⁷ : Module R M
inst✝⁶ : Module R N
inst✝⁵ : Module R P
inst✝⁴ : Module R Q
inst✝³ : Module R S
inst✝² : Module R T
inst✝¹ : DistribMulAction R' M
inst✝ : Module R'' M
g : P →ₗ[R] Q
f : N →ₗ[R] P
m : N
n : M
⊢ (((TensorProduct.mk R N M).compr₂ (rTensor M (g ∘ₗ f))) m) n =
    (((TensorProduct.mk R N M).compr₂ (rTensor M g ∘ₗ rTensor M f)) m) n
state_after: no goals
Theorem: Bool.or_inl
File: Mathlib/Data/Bool/Basic.lean

tactic: simp [H]
state_before: a b : Bool
H : a = true
⊢ (a || b) = true
state_after: no goals
Theorem: NNReal.hasSum_nat_add_iff
File: Mathlib/Topology/Instances/NNReal.lean

tactic: rw [← hasSum_coe, hasSum_nat_add_iff (f := fun n => toReal (f n)) k]
state_before: α : Type u_1
f : ℕ → ℝ≥0
k : ℕ
a : ℝ≥0
⊢ HasSum (fun n => f (n + k)) a ↔ HasSum f (a + ∑ i ∈ Finset.range k, f i)
state_after: α : Type u_1
f : ℕ → ℝ≥0
k : ℕ
a : ℝ≥0
⊢ HasSum (fun n => ↑(f n)) (↑a + ∑ i ∈ Finset.range k, ↑(f i)) ↔ HasSum f (a + ∑ i ∈ Finset.range k, f i)

tactic: norm_cast
state_before: α : Type u_1
f : ℕ → ℝ≥0
k : ℕ
a : ℝ≥0
⊢ HasSum (fun n => ↑(f n)) (↑a + ∑ i ∈ Finset.range k, ↑(f i)) ↔ HasSum f (a + ∑ i ∈ Finset.range k, f i)
state_after: no goals
Theorem: Fin.Ioi_eq_finset_subtype
File: Mathlib/Order/Interval/Finset/Fin.lean

tactic: ext
state_before: n : ℕ
a b : Fin n
⊢ Ioi a = Finset.fin n (Ioc (↑a) n)
state_after: case a
n : ℕ
a b a✝ : Fin n
⊢ a✝ ∈ Ioi a ↔ a✝ ∈ Finset.fin n (Ioc (↑a) n)

tactic: simp
state_before: case a
n : ℕ
a b a✝ : Fin n
⊢ a✝ ∈ Ioi a ↔ a✝ ∈ Finset.fin n (Ioc (↑a) n)
state_after: no goals
Theorem: CategoryTheory.Idempotents.Karoubi.decompId_i_toKaroubi
File: Mathlib/CategoryTheory/Idempotents/Karoubi.lean

tactic: rfl
state_before: C : Type u_1
inst✝ : Category.{u_2, u_1} C
X : C
⊢ ((toKaroubi C).obj X).decompId_i = 𝟙 ((toKaroubi C).obj X)
state_after: no goals
Theorem: Complex.re_eq_neg_abs
File: Mathlib/Data/Complex/Order.lean

tactic: rw [← neg_eq_iff_eq_neg, neg_re_eq_abs]
state_before: z : ℂ
⊢ z.re = -abs z ↔ z ≤ 0
state_after: no goals
Theorem: Real.dimH_univ_pi_fin
File: Mathlib/Topology/MetricSpace/HausdorffDimension.lean

tactic: rw [dimH_univ_pi, Fintype.card_fin]
state_before: ι : Type u_1
X : Type u_2
Y : Type u_3
inst✝⁵ : EMetricSpace X
inst✝⁴ : EMetricSpace Y
C K r : ℝ≥0
f : X → Y
s t : Set X
E : Type u_4
inst✝³ : Fintype ι
inst✝² : NormedAddCommGroup E
inst✝¹ : NormedSpace ℝ E
inst✝ : FiniteDimensional ℝ E
n : ℕ
⊢ dimH univ = ↑n
state_after: no goals
Theorem: MeasureTheory.Measure.toPMF_toMeasure
File: Mathlib/Probability/ProbabilityMassFunction/Basic.lean

tactic: rw [μ.toPMF.toMeasure_apply s hs, ← μ.tsum_indicator_apply_singleton s hs]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : Countable α
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSingletonClass α
μ : Measure α
inst✝ : IsProbabilityMeasure μ
s : Set α
hs : MeasurableSet s
⊢ μ.toPMF.toMeasure s = μ s
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : Countable α
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSingletonClass α
μ : Measure α
inst✝ : IsProbabilityMeasure μ
s : Set α
hs : MeasurableSet s
⊢ ∑' (x : α), s.indicator (⇑μ.toPMF) x = ∑' (x : α), s.indicator (fun x => μ {x}) x

tactic: rfl
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
inst✝³ : Countable α
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSingletonClass α
μ : Measure α
inst✝ : IsProbabilityMeasure μ
s : Set α
hs : MeasurableSet s
⊢ ∑' (x : α), s.indicator (⇑μ.toPMF) x = ∑' (x : α), s.indicator (fun x => μ {x}) x
state_after: no goals
Theorem: Nat.div_eq_sub_mod_div
File: Mathlib/Data/Nat/Defs.lean

tactic: obtain rfl | hn := n.eq_zero_or_pos
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
⊢ m / n = (m - m % n) / n
state_after: case inl
a b c d m k : ℕ
p q : ℕ → Prop
⊢ m / 0 = (m - m % 0) / 0

case inr
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n > 0
⊢ m / n = (m - m % n) / n

tactic: rw [Nat.div_zero, Nat.div_zero]
state_before: case inl
a b c d m k : ℕ
p q : ℕ → Prop
⊢ m / 0 = (m - m % 0) / 0
state_after: no goals

tactic: have : m - m % n = n * (m / n) := by
  rw [Nat.sub_eq_iff_eq_add (Nat.mod_le _ _), Nat.add_comm, mod_add_div]
state_before: case inr
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n > 0
⊢ m / n = (m - m % n) / n
state_after: case inr
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n > 0
this : m - m % n = n * (m / n)
⊢ m / n = (m - m % n) / n

tactic: rw [this, mul_div_right _ hn]
state_before: case inr
a b c d m n k : ℕ
p q : ℕ → Prop
hn : n > 0
this : m - m % n = n * (m / n)
⊢ m / n = (m - m % n) / n
state_after: no goals

tactic: rw [Nat.sub_eq_iff_eq_add (Nat.mod_le _ _), Nat.add_comm, mod_add_div]
state_before: a b c d m n k : ℕ
p q : ℕ → Prop
hn : n > 0
⊢ m - m % n = n * (m / n)
state_after: no goals
Theorem: ENNReal.finset_card_const_le_le_of_tsum_le
File: Mathlib/Topology/Instances/ENNReal.lean

tactic: have hf : { i : ι | ε ≤ a i }.Finite :=
  finite_const_le_of_tsum_ne_top (ne_top_of_le_ne_top c_ne_top tsum_le_c) ε_ne_zero
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε✝ ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
a : ι → ℝ≥0∞
c : ℝ≥0∞
c_ne_top : c ≠ ⊤
tsum_le_c : ∑' (i : ι), a i ≤ c
ε : ℝ≥0∞
ε_ne_zero : ε ≠ 0
⊢ ∃ (hf : {i | ε ≤ a i}.Finite), ↑hf.toFinset.card ≤ c / ε
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε✝ ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
a : ι → ℝ≥0∞
c : ℝ≥0∞
c_ne_top : c ≠ ⊤
tsum_le_c : ∑' (i : ι), a i ≤ c
ε : ℝ≥0∞
ε_ne_zero : ε ≠ 0
hf : {i | ε ≤ a i}.Finite
⊢ ∃ (hf : {i | ε ≤ a i}.Finite), ↑hf.toFinset.card ≤ c / ε

tactic: refine ⟨hf, (ENNReal.le_div_iff_mul_le (.inl ε_ne_zero) (.inr c_ne_top)).2 ?_⟩
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε✝ ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
a : ι → ℝ≥0∞
c : ℝ≥0∞
c_ne_top : c ≠ ⊤
tsum_le_c : ∑' (i : ι), a i ≤ c
ε : ℝ≥0∞
ε_ne_zero : ε ≠ 0
hf : {i | ε ≤ a i}.Finite
⊢ ∃ (hf : {i | ε ≤ a i}.Finite), ↑hf.toFinset.card ≤ c / ε
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε✝ ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
a : ι → ℝ≥0∞
c : ℝ≥0∞
c_ne_top : c ≠ ⊤
tsum_le_c : ∑' (i : ι), a i ≤ c
ε : ℝ≥0∞
ε_ne_zero : ε ≠ 0
hf : {i | ε ≤ a i}.Finite
⊢ ↑hf.toFinset.card * ε ≤ c

tactic: calc ↑hf.toFinset.card * ε = ∑ _i ∈ hf.toFinset, ε := by rw [Finset.sum_const, nsmul_eq_mul]
  _ ≤ ∑ i ∈ hf.toFinset, a i := Finset.sum_le_sum fun i => hf.mem_toFinset.1
  _ ≤ ∑' i, a i := ENNReal.sum_le_tsum _
  _ ≤ c := tsum_le_c
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε✝ ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
a : ι → ℝ≥0∞
c : ℝ≥0∞
c_ne_top : c ≠ ⊤
tsum_le_c : ∑' (i : ι), a i ≤ c
ε : ℝ≥0∞
ε_ne_zero : ε ≠ 0
hf : {i | ε ≤ a i}.Finite
⊢ ↑hf.toFinset.card * ε ≤ c
state_after: no goals

tactic: rw [Finset.sum_const, nsmul_eq_mul]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
a✝ b c✝ d : ℝ≥0∞
r p q : ℝ≥0
x y z ε✝ ε₁ ε₂ : ℝ≥0∞
s : Set ℝ≥0∞
f g : α → ℝ≥0∞
ι : Type u_4
a : ι → ℝ≥0∞
c : ℝ≥0∞
c_ne_top : c ≠ ⊤
tsum_le_c : ∑' (i : ι), a i ≤ c
ε : ℝ≥0∞
ε_ne_zero : ε ≠ 0
hf : {i | ε ≤ a i}.Finite
⊢ ↑hf.toFinset.card * ε = ∑ _i ∈ hf.toFinset, ε
state_after: no goals
Theorem: MeasureTheory.Measure.count_apply_finite
File: Mathlib/MeasureTheory/Measure/Count.lean

tactic: rw [← count_apply_finset, Finite.coe_toFinset]
state_before: α : Type u_1
β : Type u_2
inst✝² : MeasurableSpace α
inst✝¹ : MeasurableSpace β
s✝ : Set α
inst✝ : MeasurableSingletonClass α
s : Set α
hs : s.Finite
⊢ count s = ↑hs.toFinset.card
state_after: no goals
Theorem: Part.mem_toOption
File: Mathlib/Data/Part.lean

tactic: unfold toOption
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
o : Part α
inst✝ : Decidable o.Dom
a : α
⊢ a ∈ o.toOption ↔ a ∈ o
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
o : Part α
inst✝ : Decidable o.Dom
a : α
⊢ (a ∈ if h : o.Dom then Option.some (o.get h) else Option.none) ↔ a ∈ o

tactic: by_cases h : o.Dom <;> simp [h]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
o : Part α
inst✝ : Decidable o.Dom
a : α
⊢ (a ∈ if h : o.Dom then Option.some (o.get h) else Option.none) ↔ a ∈ o
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
o : Part α
inst✝ : Decidable o.Dom
a : α
h : o.Dom
⊢ o.get ⋯ = a ↔ a ∈ o

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
o : Part α
inst✝ : Decidable o.Dom
a : α
h : ¬o.Dom
⊢ a ∉ o

tactic: exact ⟨fun h => ⟨_, h⟩, fun ⟨_, h⟩ => h⟩
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
o : Part α
inst✝ : Decidable o.Dom
a : α
h : o.Dom
⊢ o.get ⋯ = a ↔ a ∈ o
state_after: no goals

tactic: exact mt Exists.fst h
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
o : Part α
inst✝ : Decidable o.Dom
a : α
h : ¬o.Dom
⊢ a ∉ o
state_after: no goals
Theorem: Set.image_neg_Ioo
File: Mathlib/Data/Set/Pointwise/Interval.lean

tactic: simp
state_before: α : Type u_1
inst✝ : OrderedAddCommGroup α
a b c : α
⊢ Neg.neg '' Ioo a b = Ioo (-b) (-a)
state_after: no goals
Theorem: Real.Angle.two_nsmul_eq_zero_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: convert two_nsmul_eq_iff <;> simp
state_before: θ : Angle
⊢ 2 • θ = 0 ↔ θ = 0 ∨ θ = ↑π
state_after: no goals
Theorem: Multiset.countP_map
File: Mathlib/Data/Multiset/Basic.lean

tactic: refine Multiset.induction_on s ?_ fun a t IH => ?_
state_before: α : Type u_1
β : Type v
γ : Type u_2
p✝ : α → Prop
inst✝¹ : DecidablePred p✝
f : α → β
s : Multiset α
p : β → Prop
inst✝ : DecidablePred p
⊢ countP p (map f s) = card (filter (fun a => p (f a)) s)
state_after: case refine_1
α : Type u_1
β : Type v
γ : Type u_2
p✝ : α → Prop
inst✝¹ : DecidablePred p✝
f : α → β
s : Multiset α
p : β → Prop
inst✝ : DecidablePred p
⊢ countP p (map f 0) = card (filter (fun a => p (f a)) 0)

case refine_2
α : Type u_1
β : Type v
γ : Type u_2
p✝ : α → Prop
inst✝¹ : DecidablePred p✝
f : α → β
s : Multiset α
p : β → Prop
inst✝ : DecidablePred p
a : α
t : Multiset α
IH : countP p (map f t) = card (filter (fun a => p (f a)) t)
⊢ countP p (map f (a ::ₘ t)) = card (filter (fun a => p (f a)) (a ::ₘ t))

tactic: rw [map_zero, countP_zero, filter_zero, card_zero]
state_before: case refine_1
α : Type u_1
β : Type v
γ : Type u_2
p✝ : α → Prop
inst✝¹ : DecidablePred p✝
f : α → β
s : Multiset α
p : β → Prop
inst✝ : DecidablePred p
⊢ countP p (map f 0) = card (filter (fun a => p (f a)) 0)
state_after: no goals

tactic: rw [map_cons, countP_cons, IH, filter_cons, card_add, apply_ite card, card_zero, card_singleton,
  add_comm]
state_before: case refine_2
α : Type u_1
β : Type v
γ : Type u_2
p✝ : α → Prop
inst✝¹ : DecidablePred p✝
f : α → β
s : Multiset α
p : β → Prop
inst✝ : DecidablePred p
a : α
t : Multiset α
IH : countP p (map f t) = card (filter (fun a => p (f a)) t)
⊢ countP p (map f (a ::ₘ t)) = card (filter (fun a => p (f a)) (a ::ₘ t))
state_after: no goals