1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: ExpChar.neg_one_pow_expChar
File: Mathlib/Algebra/CharP/ExpChar.lean

tactic: cases' hR with _ _ hprime _
state_before: R : Type u
inst✝ : Ring R
q : ℕ
hR : ExpChar R q
⊢ (-1) ^ q = -1
state_after: case zero
R : Type u
inst✝¹ : Ring R
inst✝ : CharZero R
⊢ (-1) ^ 1 = -1

case prime
R : Type u
inst✝ : Ring R
q : ℕ
hprime : Nat.Prime q
hchar✝ : CharP R q
⊢ (-1) ^ q = -1

tactic: haveI := Fact.mk hprime
state_before: case prime
R : Type u
inst✝ : Ring R
q : ℕ
hprime : Nat.Prime q
hchar✝ : CharP R q
⊢ (-1) ^ q = -1
state_after: case prime
R : Type u
inst✝ : Ring R
q : ℕ
hprime : Nat.Prime q
hchar✝ : CharP R q
this : Fact (Nat.Prime q)
⊢ (-1) ^ q = -1

tactic: exact CharP.neg_one_pow_char R q
state_before: case prime
R : Type u
inst✝ : Ring R
q : ℕ
hprime : Nat.Prime q
hchar✝ : CharP R q
this : Fact (Nat.Prime q)
⊢ (-1) ^ q = -1
state_after: no goals

tactic: simp only [pow_one]
state_before: case zero
R : Type u
inst✝¹ : Ring R
inst✝ : CharZero R
⊢ (-1) ^ 1 = -1
state_after: no goals
Theorem: CategoryTheory.ProjectiveResolution.liftFOne_zero_comm
File: Mathlib/CategoryTheory/Abelian/ProjectiveResolution.lean

tactic: apply Q.exact₀.liftFromProjective_comp
state_before: C : Type u
inst✝¹ : Category.{v, u} C
inst✝ : Abelian C
Y Z : C
f : Y ⟶ Z
P : ProjectiveResolution Y
Q : ProjectiveResolution Z
⊢ liftFOne f P Q ≫ Q.complex.d 1 0 = P.complex.d 1 0 ≫ liftFZero f P Q
state_after: no goals
Theorem: HasDerivWithinAt.rpow_const
File: Mathlib/Analysis/SpecialFunctions/Pow/Deriv.lean

tactic: convert (hasDerivAt_rpow_const hx).comp_hasDerivWithinAt x hf using 1
state_before: f g : ℝ → ℝ
f' g' x y p : ℝ
s : Set ℝ
hf : HasDerivWithinAt f f' s x
hx : f x ≠ 0 ∨ 1 ≤ p
⊢ HasDerivWithinAt (fun y => f y ^ p) (f' * p * f x ^ (p - 1)) s x
state_after: case h.e'_7
f g : ℝ → ℝ
f' g' x y p : ℝ
s : Set ℝ
hf : HasDerivWithinAt f f' s x
hx : f x ≠ 0 ∨ 1 ≤ p
⊢ f' * p * f x ^ (p - 1) = p * f x ^ (p - 1) * f'

tactic: ring
state_before: case h.e'_7
f g : ℝ → ℝ
f' g' x y p : ℝ
s : Set ℝ
hf : HasDerivWithinAt f f' s x
hx : f x ≠ 0 ∨ 1 ≤ p
⊢ f' * p * f x ^ (p - 1) = p * f x ^ (p - 1) * f'
state_after: no goals
Theorem: Turing.ListBlank.nth_zero
File: Mathlib/Computability/TuringMachine.lean

tactic: conv => lhs; rw [← ListBlank.cons_head_tail l]
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
l : ListBlank Γ
⊢ l.nth 0 = l.head
state_after: Γ : Type u_1
inst✝ : Inhabited Γ
l : ListBlank Γ
⊢ (cons l.head l.tail).nth 0 = l.head

tactic: exact Quotient.inductionOn' l.tail fun l ↦ rfl
state_before: Γ : Type u_1
inst✝ : Inhabited Γ
l : ListBlank Γ
⊢ (cons l.head l.tail).nth 0 = l.head
state_after: no goals
Theorem: Rat.div_int_inj
File: Mathlib/Data/Rat/Lemmas.lean

tactic: apply And.intro
state_before: a b c d : ℤ
hb0 : 0 < b
hd0 : 0 < d
h1 : a.natAbs.Coprime b.natAbs
h2 : c.natAbs.Coprime d.natAbs
h : ↑a / ↑b = ↑c / ↑d
⊢ a = c ∧ b = d
state_after: case left
a b c d : ℤ
hb0 : 0 < b
hd0 : 0 < d
h1 : a.natAbs.Coprime b.natAbs
h2 : c.natAbs.Coprime d.natAbs
h : ↑a / ↑b = ↑c / ↑d
⊢ a = c

case right
a b c d : ℤ
hb0 : 0 < b
hd0 : 0 < d
h1 : a.natAbs.Coprime b.natAbs
h2 : c.natAbs.Coprime d.natAbs
h : ↑a / ↑b = ↑c / ↑d
⊢ b = d

tactic: rw [← num_div_eq_of_coprime hb0 h1, h, num_div_eq_of_coprime hd0 h2]
state_before: case left
a b c d : ℤ
hb0 : 0 < b
hd0 : 0 < d
h1 : a.natAbs.Coprime b.natAbs
h2 : c.natAbs.Coprime d.natAbs
h : ↑a / ↑b = ↑c / ↑d
⊢ a = c
state_after: no goals

tactic: rw [← den_div_eq_of_coprime hb0 h1, h, den_div_eq_of_coprime hd0 h2]
state_before: case right
a b c d : ℤ
hb0 : 0 < b
hd0 : 0 < d
h1 : a.natAbs.Coprime b.natAbs
h2 : c.natAbs.Coprime d.natAbs
h : ↑a / ↑b = ↑c / ↑d
⊢ b = d
state_after: no goals
Theorem: skewAdjoint.mem_iff
File: Mathlib/Algebra/Star/SelfAdjoint.lean

tactic: rw [← AddSubgroup.mem_carrier]
state_before: R : Type u_1
A : Type u_2
inst✝¹ : AddCommGroup R
inst✝ : StarAddMonoid R
x : R
⊢ x ∈ skewAdjoint R ↔ star x = -x
state_after: R : Type u_1
A : Type u_2
inst✝¹ : AddCommGroup R
inst✝ : StarAddMonoid R
x : R
⊢ x ∈ (skewAdjoint R).carrier ↔ star x = -x

tactic: exact Iff.rfl
state_before: R : Type u_1
A : Type u_2
inst✝¹ : AddCommGroup R
inst✝ : StarAddMonoid R
x : R
⊢ x ∈ (skewAdjoint R).carrier ↔ star x = -x
state_after: no goals
Theorem: Polynomial.aeval_algebraMap_apply
File: Mathlib/RingTheory/Polynomial/Tower.lean

tactic: rw [aeval_def, aeval_def, hom_eval₂, ← IsScalarTower.algebraMap_eq]
state_before: R : Type u_1
A : Type u_2
B : Type u_3
inst✝⁶ : CommSemiring R
inst✝⁵ : CommSemiring A
inst✝⁴ : Semiring B
inst✝³ : Algebra R A
inst✝² : Algebra A B
inst✝¹ : Algebra R B
inst✝ : IsScalarTower R A B
x : A
p : R[X]
⊢ (aeval ((algebraMap A B) x)) p = (algebraMap A B) ((aeval x) p)
state_after: no goals
Theorem: Complex.arg_ofReal_of_nonneg
File: Mathlib/Analysis/SpecialFunctions/Complex/Arg.lean

tactic: simp [arg, hx]
state_before: a x✝ z : ℂ
x : ℝ
hx : 0 ≤ x
⊢ (↑x).arg = 0
state_after: no goals
Theorem: Real.cos_int_mul_two_pi_add_pi
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Basic.lean

tactic: simpa only [cos_zero] using (cos_periodic.int_mul n).add_antiperiod_eq cos_antiperiodic
state_before: n : ℤ
⊢ cos (↑n * (2 * π) + π) = -1
state_after: no goals
Theorem: ENNReal.le_tsum_condensed
File: Mathlib/Analysis/PSeries.lean

tactic: rw [ENNReal.tsum_eq_iSup_nat' (Nat.tendsto_pow_atTop_atTop_of_one_lt _root_.one_lt_two)]
state_before: u : ℕ → ℕ
f : ℕ → ℝ≥0∞
hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m
⊢ ∑' (k : ℕ), f k ≤ f 0 + ∑' (k : ℕ), 2 ^ k * f (2 ^ k)
state_after: u : ℕ → ℕ
f : ℕ → ℝ≥0∞
hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m
⊢ ⨆ i, ∑ a ∈ range (2 ^ i), f a ≤ f 0 + ∑' (k : ℕ), 2 ^ k * f (2 ^ k)

tactic: refine iSup_le fun n => (Finset.le_sum_condensed hf n).trans (add_le_add_left ?_ _)
state_before: u : ℕ → ℕ
f : ℕ → ℝ≥0∞
hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m
⊢ ⨆ i, ∑ a ∈ range (2 ^ i), f a ≤ f 0 + ∑' (k : ℕ), 2 ^ k * f (2 ^ k)
state_after: u : ℕ → ℕ
f : ℕ → ℝ≥0∞
hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m
n : ℕ
⊢ ∑ k ∈ range n, 2 ^ k • f (2 ^ k) ≤ ∑' (k : ℕ), 2 ^ k * f (2 ^ k)

tactic: simp only [nsmul_eq_mul, Nat.cast_pow, Nat.cast_two]
state_before: u : ℕ → ℕ
f : ℕ → ℝ≥0∞
hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m
n : ℕ
⊢ ∑ k ∈ range n, 2 ^ k • f (2 ^ k) ≤ ∑' (k : ℕ), 2 ^ k * f (2 ^ k)
state_after: u : ℕ → ℕ
f : ℕ → ℝ≥0∞
hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m
n : ℕ
⊢ ∑ x ∈ range n, 2 ^ x * f (2 ^ x) ≤ ∑' (k : ℕ), 2 ^ k * f (2 ^ k)

tactic: apply ENNReal.sum_le_tsum
state_before: u : ℕ → ℕ
f : ℕ → ℝ≥0∞
hf : ∀ ⦃m n : ℕ⦄, 0 < m → m ≤ n → f n ≤ f m
n : ℕ
⊢ ∑ x ∈ range n, 2 ^ x * f (2 ^ x) ≤ ∑' (k : ℕ), 2 ^ k * f (2 ^ k)
state_after: no goals
Theorem: mul_add_mul_le_mul_add_mul'
File: Mathlib/Algebra/Order/Ring/Defs.lean

tactic: rw [add_comm (a * d), add_comm (a * c)]
state_before: α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : ExistsAddOfLE α
hba : b ≤ a
hdc : d ≤ c
⊢ a * d + b * c ≤ a * c + b * d
state_after: α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : ExistsAddOfLE α
hba : b ≤ a
hdc : d ≤ c
⊢ b * c + a * d ≤ b * d + a * c

tactic: exact mul_add_mul_le_mul_add_mul hba hdc
state_before: α : Type u
β : Type u_1
inst✝¹ : StrictOrderedSemiring α
a b c d : α
inst✝ : ExistsAddOfLE α
hba : b ≤ a
hdc : d ≤ c
⊢ b * c + a * d ≤ b * d + a * c
state_after: no goals
Theorem: finprod_mem_eq_toFinset_prod
File: Mathlib/Algebra/BigOperators/Finprod.lean

tactic: simp_rw [coe_toFinset s]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
G : Type u_4
M : Type u_5
N : Type u_6
inst✝² : CommMonoid M
inst✝¹ : CommMonoid N
f : α → M
s : Set α
inst✝ : Fintype ↑s
⊢ s ∩ mulSupport f = ↑s.toFinset ∩ mulSupport f
state_after: no goals
Theorem: algebraMap_memℓp_infty
File: Mathlib/Analysis/NormedSpace/lpSpace.lean

tactic: rw [Algebra.algebraMap_eq_smul_one]
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁴ : (i : α) → NormedAddCommGroup (E i)
I : Type u_3
𝕜 : Type u_4
B : I → Type u_5
inst✝³ : NormedField 𝕜
inst✝² : (i : I) → NormedRing (B i)
inst✝¹ : (i : I) → NormedAlgebra 𝕜 (B i)
inst✝ : ∀ (i : I), NormOneClass (B i)
k : 𝕜
⊢ Memℓp ((algebraMap 𝕜 ((i : I) → B i)) k) ⊤
state_after: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁴ : (i : α) → NormedAddCommGroup (E i)
I : Type u_3
𝕜 : Type u_4
B : I → Type u_5
inst✝³ : NormedField 𝕜
inst✝² : (i : I) → NormedRing (B i)
inst✝¹ : (i : I) → NormedAlgebra 𝕜 (B i)
inst✝ : ∀ (i : I), NormOneClass (B i)
k : 𝕜
⊢ Memℓp (k • 1) ⊤

tactic: exact (one_memℓp_infty.const_smul k : Memℓp (k • (1 : ∀ i, B i)) ∞)
state_before: α : Type u_1
E : α → Type u_2
p q : ℝ≥0∞
inst✝⁴ : (i : α) → NormedAddCommGroup (E i)
I : Type u_3
𝕜 : Type u_4
B : I → Type u_5
inst✝³ : NormedField 𝕜
inst✝² : (i : I) → NormedRing (B i)
inst✝¹ : (i : I) → NormedAlgebra 𝕜 (B i)
inst✝ : ∀ (i : I), NormOneClass (B i)
k : 𝕜
⊢ Memℓp (k • 1) ⊤
state_after: no goals
Theorem: Submodule.one_le_finrank_iff
File: Mathlib/LinearAlgebra/Dimension/Finite.lean

tactic: simp [← not_iff_not]
state_before: R : Type u
M M₁ : Type v
M' : Type v'
ι : Type w
inst✝¹¹ : Ring R
inst✝¹⁰ : AddCommGroup M
inst✝⁹ : AddCommGroup M'
inst✝⁸ : AddCommGroup M₁
inst✝⁷ : Module R M
inst✝⁶ : Module R M'
inst✝⁵ : Module R M₁
inst✝⁴ : Nontrivial R
inst✝³ : NoZeroSMulDivisors R M
inst✝² : StrongRankCondition R
inst✝¹ : NoZeroSMulDivisors R M
S : Submodule R M
inst✝ : Module.Finite R ↥S
⊢ 1 ≤ finrank R ↥S ↔ S ≠ ⊥
state_after: no goals
Theorem: ContinuousMap.dist_le_iff_of_nonempty
File: Mathlib/Topology/ContinuousFunction/Compact.lean

tactic: simp only [← dist_mkOfCompact, BoundedContinuousFunction.dist_le_iff_of_nonempty,
  mkOfCompact_apply]
state_before: α : Type u_1
β : Type u_2
E : Type u_3
inst✝⁴ : TopologicalSpace α
inst✝³ : CompactSpace α
inst✝² : MetricSpace β
inst✝¹ : NormedAddCommGroup E
f g : C(α, β)
C : ℝ
inst✝ : Nonempty α
⊢ dist f g ≤ C ↔ ∀ (x : α), dist (f x) (g x) ≤ C
state_after: no goals
Theorem: IsSemisimpleModule.annihilator_isRadical
File: Mathlib/RingTheory/SimpleModule.lean

tactic: rw [← Submodule.annihilator_top, ← sSup_simples_eq_top, sSup_eq_iSup', Submodule.annihilator_iSup]
state_before: ι : Type u_1
R✝ : Type u_2
S : Type u_3
inst✝⁹ : Ring R✝
inst✝⁸ : Ring S
M : Type u_4
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R✝ M
m : Submodule R✝ M
N : Type u_5
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R✝ N
inst✝³ : IsSemisimpleModule R✝ M
R : Type u_6
inst✝² : CommRing R
inst✝¹ : Module R M
inst✝ : IsSemisimpleModule R M
⊢ (Module.annihilator R M).IsRadical
state_after: ι : Type u_1
R✝ : Type u_2
S : Type u_3
inst✝⁹ : Ring R✝
inst✝⁸ : Ring S
M : Type u_4
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R✝ M
m : Submodule R✝ M
N : Type u_5
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R✝ N
inst✝³ : IsSemisimpleModule R✝ M
R : Type u_6
inst✝² : CommRing R
inst✝¹ : Module R M
inst✝ : IsSemisimpleModule R M
⊢ (⨅ i, (↑i).annihilator).IsRadical

tactic: exact Ideal.isRadical_iInf _ fun i ↦ (i.2.annihilator_isMaximal).isPrime.isRadical
state_before: ι : Type u_1
R✝ : Type u_2
S : Type u_3
inst✝⁹ : Ring R✝
inst✝⁸ : Ring S
M : Type u_4
inst✝⁷ : AddCommGroup M
inst✝⁶ : Module R✝ M
m : Submodule R✝ M
N : Type u_5
inst✝⁵ : AddCommGroup N
inst✝⁴ : Module R✝ N
inst✝³ : IsSemisimpleModule R✝ M
R : Type u_6
inst✝² : CommRing R
inst✝¹ : Module R M
inst✝ : IsSemisimpleModule R M
⊢ (⨅ i, (↑i).annihilator).IsRadical
state_after: no goals
Theorem: RatFunc.eval_algebraMap
File: Mathlib/FieldTheory/RatFunc/AsPolynomial.lean

tactic: simp [eval, IsScalarTower.algebraMap_apply S K[X] (RatFunc K)]
state_before: K : Type u
inst✝³ : Field K
L : Type u
inst✝² : Field L
f : K →+* L
a : L
S : Type u_1
inst✝¹ : CommSemiring S
inst✝ : Algebra S K[X]
p : S
⊢ eval f a ((algebraMap S (RatFunc K)) p) = Polynomial.eval₂ f a ((algebraMap S K[X]) p)
state_after: no goals
Theorem: MeasureTheory.SimpleFunc.piecewise_empty
File: Mathlib/MeasureTheory/Function/SimpleFunc.lean

tactic: set_option tactic.skipAssignedInstances false in
simp; convert Set.piecewise_empty f g
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
f g : α →ₛ β
⊢ ↑(piecewise ∅ ⋯ f g) = ↑g
state_after: no goals

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
f g : α →ₛ β
⊢ ↑(piecewise ∅ ⋯ f g) = ↑g
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
f g : α →ₛ β
⊢ ∅.piecewise ↑f ↑g = ↑g

tactic: convert Set.piecewise_empty f g
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
inst✝ : MeasurableSpace α
f g : α →ₛ β
⊢ ∅.piecewise ↑f ↑g = ↑g
state_after: no goals
Theorem: Mathlib.Meta.Positivity.log_nonneg_of_isNegNat
File: Mathlib/Analysis/SpecialFunctions/Log/Basic.lean

tactic: rw [NormNum.IsInt.neg_to_eq h rfl]
state_before: e : ℝ
d n : ℕ
h : NormNum.IsInt e (Int.negOfNat n)
⊢ 0 ≤ Real.log e
state_after: e : ℝ
d n : ℕ
h : NormNum.IsInt e (Int.negOfNat n)
⊢ 0 ≤ Real.log (-↑n)

tactic: exact Real.log_neg_natCast_nonneg _
state_before: e : ℝ
d n : ℕ
h : NormNum.IsInt e (Int.negOfNat n)
⊢ 0 ≤ Real.log (-↑n)
state_after: no goals
Theorem: MeasureTheory.meas_le_lintegral₀
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: apply le_trans _ (mul_meas_ge_le_lintegral₀ hf 1)
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
s : Set α
hs : ∀ x ∈ s, 1 ≤ f x
⊢ μ s ≤ ∫⁻ (a : α), f a ∂μ
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
s : Set α
hs : ∀ x ∈ s, 1 ≤ f x
⊢ μ s ≤ 1 * μ {x | 1 ≤ f x}

tactic: rw [one_mul]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
s : Set α
hs : ∀ x ∈ s, 1 ≤ f x
⊢ μ s ≤ 1 * μ {x | 1 ≤ f x}
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
s : Set α
hs : ∀ x ∈ s, 1 ≤ f x
⊢ μ s ≤ μ {x | 1 ≤ f x}

tactic: exact measure_mono hs
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
f : α → ℝ≥0∞
hf : AEMeasurable f μ
s : Set α
hs : ∀ x ∈ s, 1 ≤ f x
⊢ μ s ≤ μ {x | 1 ≤ f x}
state_after: no goals
Theorem: Finset.mem_image₂_iff
File: Mathlib/Data/Finset/NAry.lean

tactic: rw [← mem_coe, coe_image₂, mem_image2_iff hf, mem_coe, mem_coe]
state_before: α : Type u_1
α' : Type u_2
β : Type u_3
β' : Type u_4
γ : Type u_5
γ' : Type u_6
δ : Type u_7
δ' : Type u_8
ε : Type u_9
ε' : Type u_10
ζ : Type u_11
ζ' : Type u_12
ν : Type u_13
inst✝⁷ : DecidableEq α'
inst✝⁶ : DecidableEq β'
inst✝⁵ : DecidableEq γ
inst✝⁴ : DecidableEq γ'
inst✝³ : DecidableEq δ
inst✝² : DecidableEq δ'
inst✝¹ : DecidableEq ε
inst✝ : DecidableEq ε'
f f' : α → β → γ
g g' : α → β → γ → δ
s s' : Finset α
t t' : Finset β
u u' : Finset γ
a a' : α
b b' : β
c : γ
hf : Injective2 f
⊢ f a b ∈ image₂ f s t ↔ a ∈ s ∧ b ∈ t
state_after: no goals
Theorem: GeneralizedContinuedFraction.succ_nth_convergent'_eq_squashGCF_nth_convergent'
File: Mathlib/Algebra/ContinuedFractions/ConvergentsEquiv.lean

tactic: cases n with
| zero =>
  cases g_s_head_eq : g.s.get? 0 <;>
    simp [g_s_head_eq, squashGCF, convergents', convergents'Aux, Stream'.Seq.head]
| succ =>
  simp only [succ_succ_nth_convergent'_aux_eq_succ_nth_convergent'_aux_squashSeq, convergents',
    squashGCF]
state_before: K : Type u_1
n : ℕ
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
⊢ g.convergents' (n + 1) = (g.squashGCF n).convergents' n
state_after: no goals

tactic: cases g_s_head_eq : g.s.get? 0 <;>
  simp [g_s_head_eq, squashGCF, convergents', convergents'Aux, Stream'.Seq.head]
state_before: case zero
K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
⊢ g.convergents' (0 + 1) = (g.squashGCF 0).convergents' 0
state_after: no goals

tactic: simp only [succ_succ_nth_convergent'_aux_eq_succ_nth_convergent'_aux_squashSeq, convergents',
  squashGCF]
state_before: case succ
K : Type u_1
g : GeneralizedContinuedFraction K
s : Stream'.Seq (Pair K)
inst✝ : DivisionRing K
n✝ : ℕ
⊢ g.convergents' (n✝ + 1 + 1) = (g.squashGCF (n✝ + 1)).convergents' (n✝ + 1)
state_after: no goals
Theorem: card_derangements_fin_add_two
File: Mathlib/Combinatorics/Derangements/Finite.lean

tactic: have h1 : ∀ a : Fin (n + 1), card ({a}ᶜ : Set (Fin (n + 1))) = card (Fin n) := by
  intro a
  simp only [Fintype.card_fin, Finset.card_fin, Fintype.card_ofFinset, Finset.filter_ne' _ a,
    Set.mem_compl_singleton_iff, Finset.card_erase_of_mem (Finset.mem_univ a),
    add_tsub_cancel_right]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
⊢ card ↑(derangements (Fin (n + 2))) =
    (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))
state_after: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : ∀ (a : Fin (n + 1)), card ↑{a}ᶜ = card (Fin n)
⊢ card ↑(derangements (Fin (n + 2))) =
    (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))

tactic: have h2 : card (Fin (n + 2)) = card (Option (Fin (n + 1))) := by simp only [card_fin, card_option]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : ∀ (a : Fin (n + 1)), card ↑{a}ᶜ = card (Fin n)
⊢ card ↑(derangements (Fin (n + 2))) =
    (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))
state_after: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : ∀ (a : Fin (n + 1)), card ↑{a}ᶜ = card (Fin n)
h2 : card (Fin (n + 2)) = card (Option (Fin (n + 1)))
⊢ card ↑(derangements (Fin (n + 2))) =
    (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))

tactic: simp only [card_derangements_invariant h2,
  card_congr
    (@derangementsRecursionEquiv (Fin (n + 1))
      _),card_sigma,
  card_sum, card_derangements_invariant (h1 _), Finset.sum_const, nsmul_eq_mul, Finset.card_fin,
  mul_add, Nat.cast_id]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : ∀ (a : Fin (n + 1)), card ↑{a}ᶜ = card (Fin n)
h2 : card (Fin (n + 2)) = card (Option (Fin (n + 1)))
⊢ card ↑(derangements (Fin (n + 2))) =
    (n + 1) * card ↑(derangements (Fin n)) + (n + 1) * card ↑(derangements (Fin (n + 1)))
state_after: no goals

tactic: intro a
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
⊢ ∀ (a : Fin (n + 1)), card ↑{a}ᶜ = card (Fin n)
state_after: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
a : Fin (n + 1)
⊢ card ↑{a}ᶜ = card (Fin n)

tactic: simp only [Fintype.card_fin, Finset.card_fin, Fintype.card_ofFinset, Finset.filter_ne' _ a,
  Set.mem_compl_singleton_iff, Finset.card_erase_of_mem (Finset.mem_univ a),
  add_tsub_cancel_right]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
a : Fin (n + 1)
⊢ card ↑{a}ᶜ = card (Fin n)
state_after: no goals

tactic: simp only [card_fin, card_option]
state_before: α : Type u_1
inst✝¹ : DecidableEq α
inst✝ : Fintype α
n : ℕ
h1 : ∀ (a : Fin (n + 1)), card ↑{a}ᶜ = card (Fin n)
⊢ card (Fin (n + 2)) = card (Option (Fin (n + 1)))
state_after: no goals
Theorem: Real.geom_mean_le_arith_mean4_weighted
File: Mathlib/Analysis/MeanInequalities.lean

tactic: assumption
state_before: ι : Type u
s : Finset ι
w₁ w₂ w₃ w₄ p₁ p₂ p₃ p₄ : ℝ
hw₁ : 0 ≤ w₁
hw₂ : 0 ≤ w₂
hw₃ : 0 ≤ w₃
hw₄ : 0 ≤ w₄
hp₁ : 0 ≤ p₁
hp₂ : 0 ≤ p₂
hp₃ : 0 ≤ p₃
hp₄ : 0 ≤ p₄
hw : w₁ + w₂ + w₃ + w₄ = 1
⊢ ↑(⟨w₁, hw₁⟩ + ⟨w₂, hw₂⟩ + ⟨w₃, hw₃⟩ + ⟨w₄, hw₄⟩) = ↑1
state_after: no goals
Theorem: Multiset.fold_hom
File: Mathlib/Data/Multiset/Fold.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
op : α → α → α
hc : Std.Commutative op
ha : Std.Associative op
op' : β → β → β
inst✝¹ : Std.Commutative op'
inst✝ : Std.Associative op'
m : α → β
hm : ∀ (x y : α), m (op x y) = op' (m x) (m y)
b : α
s : Multiset α
⊢ fold op' (m b) (map m 0) = m (fold op b 0)
state_after: no goals

tactic: simp (config := { contextual := true }) [hm]
state_before: α : Type u_1
β : Type u_2
op : α → α → α
hc : Std.Commutative op
ha : Std.Associative op
op' : β → β → β
inst✝¹ : Std.Commutative op'
inst✝ : Std.Associative op'
m : α → β
hm : ∀ (x y : α), m (op x y) = op' (m x) (m y)
b : α
s : Multiset α
⊢ ∀ (a : α) (s : Multiset α),
    fold op' (m b) (map m s) = m (fold op b s) → fold op' (m b) (map m (a ::ₘ s)) = m (fold op b (a ::ₘ s))
state_after: no goals
Theorem: Bundle.TotalSpace.range_mk
File: Mathlib/Data/Bundle.lean

tactic: apply Subset.antisymm
state_before: B : Type u_1
F : Type u_2
E : B → Type u_3
b : B
⊢ range (mk b) = proj ⁻¹' {b}
state_after: case h₁
B : Type u_1
F : Type u_2
E : B → Type u_3
b : B
⊢ range (mk b) ⊆ proj ⁻¹' {b}

case h₂
B : Type u_1
F : Type u_2
E : B → Type u_3
b : B
⊢ proj ⁻¹' {b} ⊆ range (mk b)

tactic: rintro _ ⟨x, rfl⟩
state_before: case h₁
B : Type u_1
F : Type u_2
E : B → Type u_3
b : B
⊢ range (mk b) ⊆ proj ⁻¹' {b}
state_after: case h₁.intro
B : Type u_1
F : Type u_2
E : B → Type u_3
b : B
x : E b
⊢ { proj := b, snd := x } ∈ proj ⁻¹' {b}

tactic: rfl
state_before: case h₁.intro
B : Type u_1
F : Type u_2
E : B → Type u_3
b : B
x : E b
⊢ { proj := b, snd := x } ∈ proj ⁻¹' {b}
state_after: no goals

tactic: rintro ⟨_, x⟩ rfl
state_before: case h₂
B : Type u_1
F : Type u_2
E : B → Type u_3
b : B
⊢ proj ⁻¹' {b} ⊆ range (mk b)
state_after: case h₂.mk
B : Type u_1
F : Type u_2
E : B → Type u_3
proj✝ : B
x : E proj✝
⊢ { proj := proj✝, snd := x } ∈ range (mk { proj := proj✝, snd := x }.proj)

tactic: exact ⟨x, rfl⟩
state_before: case h₂.mk
B : Type u_1
F : Type u_2
E : B → Type u_3
proj✝ : B
x : E proj✝
⊢ { proj := proj✝, snd := x } ∈ range (mk { proj := proj✝, snd := x }.proj)
state_after: no goals
Theorem: ENNReal.le_inv_iff_mul_le
File: Mathlib/Data/ENNReal/Inv.lean

tactic: right
state_before: case ht
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ b ≠ ⊤ ∨ 1 ≠ ⊤
state_after: case ht.h
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ 1 ≠ ⊤

tactic: simp
state_before: case ht.h
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ 1 ≠ ⊤
state_after: no goals
Theorem: Set.left_mem_Ici
File: Mathlib/Order/Interval/Set/Basic.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
inst✝ : Preorder α
a a₁ a₂ b b₁ b₂ c x : α
⊢ a ∈ Ici a
state_after: no goals
Theorem: CircleDeg1Lift.translationNumber_lt_of_forall_lt_add
File: Mathlib/Dynamics/Circle/RotationNumber/TranslationNumber.lean

tactic: obtain ⟨x, -, hx⟩ : ∃ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, f y - y ≤ f x - x :=
  isCompact_Icc.exists_isMaxOn (nonempty_Icc.2 zero_le_one)
    (hf.sub continuous_id).continuousOn
state_before: f g : CircleDeg1Lift
hf : Continuous ⇑f
z : ℝ
hz : ∀ (x : ℝ), f x < x + z
⊢ τ f < z
state_after: case intro.intro
f g : CircleDeg1Lift
hf : Continuous ⇑f
z : ℝ
hz : ∀ (x : ℝ), f x < x + z
x : ℝ
hx : ∀ y ∈ Icc 0 1, f y - y ≤ f x - x
⊢ τ f < z

tactic: refine lt_of_le_of_lt ?_ (sub_lt_iff_lt_add'.2 <| hz x)
state_before: case intro.intro
f g : CircleDeg1Lift
hf : Continuous ⇑f
z : ℝ
hz : ∀ (x : ℝ), f x < x + z
x : ℝ
hx : ∀ y ∈ Icc 0 1, f y - y ≤ f x - x
⊢ τ f < z
state_after: case intro.intro
f g : CircleDeg1Lift
hf : Continuous ⇑f
z : ℝ
hz : ∀ (x : ℝ), f x < x + z
x : ℝ
hx : ∀ y ∈ Icc 0 1, f y - y ≤ f x - x
⊢ τ f ≤ f x - x

tactic: apply translationNumber_le_of_le_add
state_before: case intro.intro
f g : CircleDeg1Lift
hf : Continuous ⇑f
z : ℝ
hz : ∀ (x : ℝ), f x < x + z
x : ℝ
hx : ∀ y ∈ Icc 0 1, f y - y ≤ f x - x
⊢ τ f ≤ f x - x
state_after: case intro.intro.hz
f g : CircleDeg1Lift
hf : Continuous ⇑f
z : ℝ
hz : ∀ (x : ℝ), f x < x + z
x : ℝ
hx : ∀ y ∈ Icc 0 1, f y - y ≤ f x - x
⊢ ∀ (x_1 : ℝ), f x_1 ≤ x_1 + (f x - x)

tactic: simp only [← sub_le_iff_le_add']
state_before: case intro.intro.hz
f g : CircleDeg1Lift
hf : Continuous ⇑f
z : ℝ
hz : ∀ (x : ℝ), f x < x + z
x : ℝ
hx : ∀ y ∈ Icc 0 1, f y - y ≤ f x - x
⊢ ∀ (x_1 : ℝ), f x_1 ≤ x_1 + (f x - x)
state_after: case intro.intro.hz
f g : CircleDeg1Lift
hf : Continuous ⇑f
z : ℝ
hz : ∀ (x : ℝ), f x < x + z
x : ℝ
hx : ∀ y ∈ Icc 0 1, f y - y ≤ f x - x
⊢ ∀ (x_1 : ℝ), f x_1 - x_1 ≤ f x - x

tactic: exact f.forall_map_sub_of_Icc (fun a => a ≤ f x - x) hx
state_before: case intro.intro.hz
f g : CircleDeg1Lift
hf : Continuous ⇑f
z : ℝ
hz : ∀ (x : ℝ), f x < x + z
x : ℝ
hx : ∀ y ∈ Icc 0 1, f y - y ≤ f x - x
⊢ ∀ (x_1 : ℝ), f x_1 - x_1 ≤ f x - x
state_after: no goals