1337xyz1337xyz/leandojo-benchmark4-v10 huggingface dataset:
Theorem: List.getElem?_modifyNth
File: .lake/packages/batteries/Batteries/Data/List/Lemmas.lean

tactic: cases l <;> cases n <;> simp
state_before: α : Type u_1
f : α → α
n : Nat
l : List α
⊢ (modifyNth f n l)[0]? = (fun a => if n = 0 then f a else a) <$> l[0]?
state_after: no goals

tactic: cases n <;> rfl
state_before: α : Type u_1
f : α → α
n n✝ : Nat
⊢ (modifyNth f n [])[n✝ + 1]? = (fun a => if n = n✝ + 1 then f a else a) <$> [][n✝ + 1]?
state_after: no goals

tactic: cases h : l[m]? <;> simp [h, modifyNth, m.succ_ne_zero.symm]
state_before: α : Type u_1
f : α → α
head✝ : α
l : List α
m : Nat
⊢ (modifyNth f 0 (head✝ :: l))[m + 1]? = (fun a => if 0 = m + 1 then f a else a) <$> (head✝ :: l)[m + 1]?
state_after: no goals

tactic: simp only [modifyNth_succ_cons, getElem?_cons_succ, Nat.reduceEqDiff, Option.map_eq_map]
state_before: α : Type u_1
f : α → α
n : Nat
a : α
l : List α
m : Nat
⊢ (modifyNth f (n + 1) (a :: l))[m + 1]? = (fun a => if n + 1 = m + 1 then f a else a) <$> (a :: l)[m + 1]?
state_after: α : Type u_1
f : α → α
n : Nat
a : α
l : List α
m : Nat
⊢ (modifyNth f n l)[m]? = Option.map (fun a => if n = m then f a else a) l[m]?

tactic: refine (getElem?_modifyNth f n l m).trans ?_
state_before: α : Type u_1
f : α → α
n : Nat
a : α
l : List α
m : Nat
⊢ (modifyNth f n l)[m]? = Option.map (fun a => if n = m then f a else a) l[m]?
state_after: α : Type u_1
f : α → α
n : Nat
a : α
l : List α
m : Nat
⊢ (fun a => if n = m then f a else a) <$> l[m]? = Option.map (fun a => if n = m then f a else a) l[m]?

tactic: cases h' : l[m]? <;> by_cases h : n = m <;>
  simp [h, if_pos, if_neg, Option.map, mt Nat.succ.inj, not_false_iff, h']
state_before: α : Type u_1
f : α → α
n : Nat
a : α
l : List α
m : Nat
⊢ (fun a => if n = m then f a else a) <$> l[m]? = Option.map (fun a => if n = m then f a else a) l[m]?
state_after: no goals
Theorem: CategoryTheory.Limits.IsLimit.isIso_π_app_of_isInitial
File: Mathlib/CategoryTheory/Limits/Shapes/Terminal.lean

tactic: change IsIso (conePointUniqueUpToIso hc (limitOfDiagramInitial hX F)).hom
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
F : J ⥤ C
c : Cone F
hc : IsLimit c
X : J
hX : IsInitial X
⊢ IsIso (c.π.app X)
state_after: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
F : J ⥤ C
c : Cone F
hc : IsLimit c
X : J
hX : IsInitial X
⊢ IsIso (hc.conePointUniqueUpToIso (limitOfDiagramInitial hX F)).hom

tactic: infer_instance
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
J : Type u
inst✝ : Category.{v, u} J
F : J ⥤ C
c : Cone F
hc : IsLimit c
X : J
hX : IsInitial X
⊢ IsIso (hc.conePointUniqueUpToIso (limitOfDiagramInitial hX F)).hom
state_after: no goals
Theorem: gauge_norm_smul
File: Mathlib/Analysis/Convex/Gauge.lean

tactic: unfold gauge
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
x✝ : E
a : ℝ
inst✝² : RCLike 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
⊢ gauge s (‖r‖ • x) = gauge s (r • x)
state_after: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
x✝ : E
a : ℝ
inst✝² : RCLike 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
⊢ sInf {r_1 | 0 < r_1 ∧ ‖r‖ • x ∈ r_1 • s} = sInf {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}

tactic: congr with θ
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
x✝ : E
a : ℝ
inst✝² : RCLike 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
⊢ sInf {r_1 | 0 < r_1 ∧ ‖r‖ • x ∈ r_1 • s} = sInf {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}
state_after: case e_a.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
x✝ : E
a : ℝ
inst✝² : RCLike 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
θ : ℝ
⊢ θ ∈ {r_1 | 0 < r_1 ∧ ‖r‖ • x ∈ r_1 • s} ↔ θ ∈ {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}

tactic: rw [@RCLike.real_smul_eq_coe_smul 𝕜]
state_before: case e_a.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
x✝ : E
a : ℝ
inst✝² : RCLike 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
θ : ℝ
⊢ θ ∈ {r_1 | 0 < r_1 ∧ ‖r‖ • x ∈ r_1 • s} ↔ θ ∈ {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}
state_after: case e_a.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
x✝ : E
a : ℝ
inst✝² : RCLike 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
θ : ℝ
⊢ θ ∈ {r_1 | 0 < r_1 ∧ ↑‖r‖ • x ∈ r_1 • s} ↔ θ ∈ {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}

tactic: refine and_congr_right fun hθ => (hs.smul _).smul_mem_iff ?_
state_before: case e_a.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
x✝ : E
a : ℝ
inst✝² : RCLike 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
θ : ℝ
⊢ θ ∈ {r_1 | 0 < r_1 ∧ ↑‖r‖ • x ∈ r_1 • s} ↔ θ ∈ {r_1 | 0 < r_1 ∧ r • x ∈ r_1 • s}
state_after: case e_a.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
x✝ : E
a : ℝ
inst✝² : RCLike 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
θ : ℝ
hθ : 0 < θ
⊢ ‖↑‖r‖‖ = ‖r‖

tactic: rw [RCLike.norm_ofReal, abs_norm]
state_before: case e_a.h
𝕜 : Type u_1
E : Type u_2
F : Type u_3
inst✝⁴ : AddCommGroup E
inst✝³ : Module ℝ E
s t : Set E
x✝ : E
a : ℝ
inst✝² : RCLike 𝕜
inst✝¹ : Module 𝕜 E
inst✝ : IsScalarTower ℝ 𝕜 E
hs : Balanced 𝕜 s
r : 𝕜
x : E
θ : ℝ
hθ : 0 < θ
⊢ ‖↑‖r‖‖ = ‖r‖
state_after: no goals
Theorem: ZMod.val_neg_of_ne_zero
File: Mathlib/Data/ZMod/Basic.lean

tactic: simp_all [neg_val a, na.out]
state_before: n : ℕ
nz : NeZero n
a : ZMod n
na : NeZero a
⊢ (-a).val = n - a.val
state_after: no goals
Theorem: Filter.mem_comap_prod_mk
File: Mathlib/Order/Filter/Basic.lean

tactic: simp_rw [mem_comap', Prod.ext_iff, and_imp, @forall_swap β (_ = _), forall_eq, eq_comm]
state_before: α : Type u
β : Type v
γ : Type w
δ : Type u_1
ι : Sort x
l✝ : Filter α
f : α → β
l : Filter β
p : α → Prop
s✝ : Set α
x : α
s : Set β
F : Filter (α × β)
⊢ s ∈ comap (Prod.mk x) F ↔ {p | p.1 = x → p.2 ∈ s} ∈ F
state_after: no goals
Theorem: PrimeSpectrum.le_iff_mem_closure
File: Mathlib/AlgebraicGeometry/PrimeSpectrum/Basic.lean

tactic: rw [← asIdeal_le_asIdeal, ← zeroLocus_vanishingIdeal_eq_closure, mem_zeroLocus,
  vanishingIdeal_singleton, SetLike.coe_subset_coe]
state_before: R : Type u
S : Type v
inst✝¹ : CommSemiring R
inst✝ : CommSemiring S
x y : PrimeSpectrum R
⊢ x ≤ y ↔ y ∈ closure {x}
state_after: no goals
Theorem: Real.Angle.two_zsmul_coe_div_two
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Angle.lean

tactic: rw [← coe_zsmul, two_zsmul, add_halves]
state_before: θ : ℝ
⊢ 2 • ↑(θ / 2) = ↑θ
state_after: no goals
Theorem: List.unzip_enum_eq_prod
File: Mathlib/Data/List/Range.lean

tactic: simp only [enum_eq_zip_range, unzip_zip, length_range]
state_before: α : Type u
l : List α
⊢ l.enum.unzip = (range l.length, l)
state_after: no goals
Theorem: LieDerivation.IsKilling.range_ad_eq_top
File: Mathlib/Algebra/Lie/Derivation/Killing.lean

tactic: rw [← LieSubalgebra.coe_to_submodule_eq_iff]
state_before: R : Type u_1
L : Type u_2
inst✝⁴ : Field R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : Module.Finite R L
inst✝ : LieAlgebra.IsKilling R L
⊢ (ad R L).range = ⊤
state_after: R : Type u_1
L : Type u_2
inst✝⁴ : Field R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : Module.Finite R L
inst✝ : LieAlgebra.IsKilling R L
⊢ (ad R L).range.toSubmodule = ⊤.toSubmodule

tactic: apply LinearMap.BilinForm.eq_top_of_restrict_nondegenerate_of_orthogonal_eq_bot
  (LieModule.traceForm_isSymm R 𝔻 𝔻).isRefl (killingForm_restrict_range_ad_nondegenerate R L)
state_before: R : Type u_1
L : Type u_2
inst✝⁴ : Field R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : Module.Finite R L
inst✝ : LieAlgebra.IsKilling R L
⊢ (ad R L).range.toSubmodule = ⊤.toSubmodule
state_after: R : Type u_1
L : Type u_2
inst✝⁴ : Field R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : Module.Finite R L
inst✝ : LieAlgebra.IsKilling R L
⊢ (LieModule.traceForm R (LieDerivation R L L) (LieDerivation R L L)).orthogonal (ad R L).range.toSubmodule = ⊥

tactic: refine (Submodule.eq_bot_iff _).mpr fun D hD ↦ ext fun x ↦ ?_
state_before: R : Type u_1
L : Type u_2
inst✝⁴ : Field R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : Module.Finite R L
inst✝ : LieAlgebra.IsKilling R L
⊢ (LieModule.traceForm R (LieDerivation R L L) (LieDerivation R L L)).orthogonal (ad R L).range.toSubmodule = ⊥
state_after: R : Type u_1
L : Type u_2
inst✝⁴ : Field R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : Module.Finite R L
inst✝ : LieAlgebra.IsKilling R L
D : LieDerivation R L L
hD : D ∈ (LieModule.traceForm R (LieDerivation R L L) (LieDerivation R L L)).orthogonal (ad R L).range.toSubmodule
x : L
⊢ D x = 0 x

tactic: simpa using ad_mem_ker_killingForm_ad_range_of_mem_orthogonal hD x
state_before: R : Type u_1
L : Type u_2
inst✝⁴ : Field R
inst✝³ : LieRing L
inst✝² : LieAlgebra R L
inst✝¹ : Module.Finite R L
inst✝ : LieAlgebra.IsKilling R L
D : LieDerivation R L L
hD : D ∈ (LieModule.traceForm R (LieDerivation R L L) (LieDerivation R L L)).orthogonal (ad R L).range.toSubmodule
x : L
⊢ D x = 0 x
state_after: no goals
Theorem: Multiset.noncommFoldr_cons
File: Mathlib/Data/Finset/NoncommProd.lean

tactic: induction s using Quotient.inductionOn
state_before: F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
s : Multiset α
a : α
h : {x | x ∈ a ::ₘ s}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
h' : {x | x ∈ s}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
b : β
⊢ noncommFoldr f (a ::ₘ s) h b = f a (noncommFoldr f s h' b)
state_after: case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
a : α
b : β
a✝ : List α
h : {x | x ∈ a ::ₘ ⟦a✝⟧}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
h' : {x | x ∈ ⟦a✝⟧}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
⊢ noncommFoldr f (a ::ₘ ⟦a✝⟧) h b = f a (noncommFoldr f ⟦a✝⟧ h' b)

tactic: simp
state_before: case h
F : Type u_1
ι : Type u_2
α : Type u_3
β : Type u_4
γ : Type u_5
f : α → β → β
op : α → α → α
a : α
b : β
a✝ : List α
h : {x | x ∈ a ::ₘ ⟦a✝⟧}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
h' : {x | x ∈ ⟦a✝⟧}.Pairwise fun x y => ∀ (b : β), f x (f y b) = f y (f x b)
⊢ noncommFoldr f (a ::ₘ ⟦a✝⟧) h b = f a (noncommFoldr f ⟦a✝⟧ h' b)
state_after: no goals
Theorem: FixedPoints.rank_le_card
File: Mathlib/FieldTheory/Fixed.lean

tactic: simpa only [rank_fun', Cardinal.mk_coe_finset, Finset.coe_sort_coe, Cardinal.lift_natCast,
  Cardinal.natCast_le] using
  (linearIndependent_smul_of_linearIndependent G F hs).cardinal_lift_le_rank
state_before: M : Type u
inst✝⁵ : Monoid M
G : Type u
inst✝⁴ : Group G
F : Type v
inst✝³ : Field F
inst✝² : MulSemiringAction M F
inst✝¹ : MulSemiringAction G F
m : M
inst✝ : Fintype G
x : F
s : Finset F
hs : LinearIndependent ↥(subfield G F) fun i => ↑i
⊢ s.card ≤ Fintype.card G
state_after: no goals
Theorem: LSeries.term_smul_apply
File: Mathlib/NumberTheory/LSeries/Linearity.lean

tactic: rw [term_smul, Pi.smul_apply, smul_eq_mul]
state_before: f : ℕ → ℂ
c s : ℂ
n : ℕ
⊢ term (c • f) s n = c * term f s n
state_after: no goals
Theorem: Cardinal.aleph'_isNormal
File: Mathlib/SetTheory/Cardinal/Ordinal.lean

tactic: simp [ord_le, aleph'_le_of_limit l]
state_before: o : Ordinal.{u_1}
l : o.IsLimit
a : Ordinal.{u_1}
⊢ (ord ∘ aleph') o ≤ a ↔ ∀ b < o, (ord ∘ aleph') b ≤ a
state_after: no goals
Theorem: PowerSeries.exp_pow_eq_rescale_exp
File: Mathlib/RingTheory/PowerSeries/WellKnown.lean

tactic: induction' k with k h
state_before: A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
k : ℕ
⊢ exp A ^ k = (rescale ↑k) (exp A)
state_after: case zero
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ exp A ^ 0 = (rescale ↑0) (exp A)

case succ
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
k : ℕ
h : exp A ^ k = (rescale ↑k) (exp A)
⊢ exp A ^ (k + 1) = (rescale ↑(k + 1)) (exp A)

tactic: simp only [rescale_zero, constantCoeff_exp, Function.comp_apply, map_one, cast_zero, zero_eq,
  pow_zero (exp A), coe_comp]
state_before: case zero
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
⊢ exp A ^ 0 = (rescale ↑0) (exp A)
state_after: no goals

tactic: simpa only [succ_eq_add_one, cast_add, ← exp_mul_exp_eq_exp_add (k : A), ← h, cast_one,
id_apply, rescale_one] using pow_succ (exp A) k
state_before: case succ
A : Type u_1
inst✝¹ : CommRing A
inst✝ : Algebra ℚ A
k : ℕ
h : exp A ^ k = (rescale ↑k) (exp A)
⊢ exp A ^ (k + 1) = (rescale ↑(k + 1)) (exp A)
state_after: no goals
Theorem: GaussianInt.toComplex_im
File: Mathlib/NumberTheory/Zsqrtd/GaussianInt.lean

tactic: simp [toComplex_def]
state_before: x y : ℤ
⊢ (toComplex { re := x, im := y }).im = ↑y
state_after: no goals
Theorem: CategoryTheory.CostructuredArrow.w
File: Mathlib/CategoryTheory/Comma/StructuredArrow.lean

tactic: simp
state_before: C : Type u₁
inst✝¹ : Category.{v₁, u₁} C
D : Type u₂
inst✝ : Category.{v₂, u₂} D
T T' T'' : D
Y Y' Y'' : C
S S' : C ⥤ D
A B : CostructuredArrow S T
f : A ⟶ B
⊢ S.map f.left ≫ B.hom = A.hom
state_after: no goals
Theorem: MeasureTheory.setLIntegral_dirac'
File: Mathlib/MeasureTheory/Integral/Lebesgue.lean

tactic: rw [restrict_dirac' hs]
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : MeasurableSpace α
a : α
f : α → ℝ≥0∞
hf : Measurable f
s : Set α
hs : MeasurableSet s
inst✝ : Decidable (a ∈ s)
⊢ ∫⁻ (x : α) in s, f x ∂dirac a = if a ∈ s then f a else 0
state_after: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : MeasurableSpace α
a : α
f : α → ℝ≥0∞
hf : Measurable f
s : Set α
hs : MeasurableSet s
inst✝ : Decidable (a ∈ s)
⊢ (∫⁻ (x : α), f x ∂if a ∈ s then dirac a else 0) = if a ∈ s then f a else 0

tactic: split_ifs
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : MeasurableSpace α
a : α
f : α → ℝ≥0∞
hf : Measurable f
s : Set α
hs : MeasurableSet s
inst✝ : Decidable (a ∈ s)
⊢ (∫⁻ (x : α), f x ∂if a ∈ s then dirac a else 0) = if a ∈ s then f a else 0
state_after: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : MeasurableSpace α
a : α
f : α → ℝ≥0∞
hf : Measurable f
s : Set α
hs : MeasurableSet s
inst✝ : Decidable (a ∈ s)
h✝ : a ∈ s
⊢ ∫⁻ (x : α), f x ∂dirac a = f a

case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : MeasurableSpace α
a : α
f : α → ℝ≥0∞
hf : Measurable f
s : Set α
hs : MeasurableSet s
inst✝ : Decidable (a ∈ s)
h✝ : a ∉ s
⊢ ∫⁻ (x : α), f x ∂0 = 0

tactic: exact lintegral_dirac' _ hf
state_before: case pos
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : MeasurableSpace α
a : α
f : α → ℝ≥0∞
hf : Measurable f
s : Set α
hs : MeasurableSet s
inst✝ : Decidable (a ∈ s)
h✝ : a ∈ s
⊢ ∫⁻ (x : α), f x ∂dirac a = f a
state_after: no goals

tactic: exact lintegral_zero_measure _
state_before: case neg
α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type u_4
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : MeasurableSpace α
a : α
f : α → ℝ≥0∞
hf : Measurable f
s : Set α
hs : MeasurableSet s
inst✝ : Decidable (a ∈ s)
h✝ : a ∉ s
⊢ ∫⁻ (x : α), f x ∂0 = 0
state_after: no goals
Theorem: Batteries.BinaryHeap.size_pos_of_max
File: .lake/packages/batteries/Batteries/Data/BinaryHeap.lean

tactic: simp [BinaryHeap.max, Array.get?, h] at e
state_before: α : Type u_1
lt : α → α → Bool
x : α
self : BinaryHeap α lt
e : self.max = some x
h : ¬0 < self.arr.size
⊢ False
state_after: no goals
Theorem: tsum_geometric_inv_two_ge
File: Mathlib/Analysis/SpecificLimits/Basic.lean

tactic: have A : Summable fun i : ℕ ↦ ite (n ≤ i) ((2⁻¹ : ℝ) ^ i) 0 := by
  simpa only [← piecewise_eq_indicator, one_div]
    using summable_geometric_two.indicator {i | n ≤ i}
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
n : ℕ
⊢ (∑' (i : ℕ), if n ≤ i then 2⁻¹ ^ i else 0) = 2 * 2⁻¹ ^ n
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
n : ℕ
A : Summable fun i => if n ≤ i then 2⁻¹ ^ i else 0
⊢ (∑' (i : ℕ), if n ≤ i then 2⁻¹ ^ i else 0) = 2 * 2⁻¹ ^ n

tactic: have B : ((Finset.range n).sum fun i : ℕ ↦ ite (n ≤ i) ((2⁻¹ : ℝ) ^ i) 0) = 0 :=
  Finset.sum_eq_zero fun i hi ↦
    ite_eq_right_iff.2 fun h ↦ (lt_irrefl _ ((Finset.mem_range.1 hi).trans_le h)).elim
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
n : ℕ
A : Summable fun i => if n ≤ i then 2⁻¹ ^ i else 0
⊢ (∑' (i : ℕ), if n ≤ i then 2⁻¹ ^ i else 0) = 2 * 2⁻¹ ^ n
state_after: α : Type u_1
β : Type u_2
ι : Type u_3
n : ℕ
A : Summable fun i => if n ≤ i then 2⁻¹ ^ i else 0
B : (∑ i ∈ Finset.range n, if n ≤ i then 2⁻¹ ^ i else 0) = 0
⊢ (∑' (i : ℕ), if n ≤ i then 2⁻¹ ^ i else 0) = 2 * 2⁻¹ ^ n

tactic: simp only [← _root_.sum_add_tsum_nat_add n A, B, if_true, zero_add, zero_le',
  le_add_iff_nonneg_left, pow_add, _root_.tsum_mul_right, tsum_geometric_inv_two]
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
n : ℕ
A : Summable fun i => if n ≤ i then 2⁻¹ ^ i else 0
B : (∑ i ∈ Finset.range n, if n ≤ i then 2⁻¹ ^ i else 0) = 0
⊢ (∑' (i : ℕ), if n ≤ i then 2⁻¹ ^ i else 0) = 2 * 2⁻¹ ^ n
state_after: no goals

tactic: simpa only [← piecewise_eq_indicator, one_div]
  using summable_geometric_two.indicator {i | n ≤ i}
state_before: α : Type u_1
β : Type u_2
ι : Type u_3
n : ℕ
⊢ Summable fun i => if n ≤ i then 2⁻¹ ^ i else 0
state_after: no goals
Theorem: AList.perm_union
File: Mathlib/Data/List/AList.lean

tactic: simp [p₁₂.kunion s₃.nodupKeys p₃₄]
state_before: α : Type u
β : α → Type v
inst✝ : DecidableEq α
s₁ s₂ s₃ s₄ : AList β
p₁₂ : s₁.entries ~ s₂.entries
p₃₄ : s₃.entries ~ s₄.entries
⊢ (s₁ ∪ s₃).entries ~ (s₂ ∪ s₄).entries
state_after: no goals
Theorem: Batteries.RBNode.Ordered.le_max?
File: .lake/packages/batteries/Batteries/Data/RBMap/Lemmas.lean

tactic: simpa using hx
state_before: α : Type u_1
cmp : α → α → Ordering
a : α
t : RBNode α
inst✝ : TransCmp cmp
ht : Ordered cmp t
h : t.max? = some a
x : α
hx : x ∈ t
⊢ x ∈ t.reverse
state_after: no goals
Theorem: Real.rpow_le_one
File: Mathlib/Analysis/SpecialFunctions/Pow/Real.lean

tactic: rw [← one_rpow z]
state_before: x✝ y z✝ : ℝ
n : ℕ
x z : ℝ
hx1 : 0 ≤ x
hx2 : x ≤ 1
hz : 0 ≤ z
⊢ x ^ z ≤ 1
state_after: x✝ y z✝ : ℝ
n : ℕ
x z : ℝ
hx1 : 0 ≤ x
hx2 : x ≤ 1
hz : 0 ≤ z
⊢ x ^ z ≤ 1 ^ z

tactic: exact rpow_le_rpow hx1 hx2 hz
state_before: x✝ y z✝ : ℝ
n : ℕ
x z : ℝ
hx1 : 0 ≤ x
hx2 : x ≤ 1
hz : 0 ≤ z
⊢ x ^ z ≤ 1 ^ z
state_after: no goals
Theorem: quadraticChar_odd_prime
File: Mathlib/NumberTheory/LegendreSymbol/QuadraticChar/GaussSum.lean

tactic: rw [← quadraticChar_neg_one hF]
state_before: F : Type u_1
inst✝³ : Field F
inst✝² : Fintype F
inst✝¹ : DecidableEq F
hF : ringChar F ≠ 2
p : ℕ
inst✝ : Fact (Nat.Prime p)
hp₁ : p ≠ 2
hp₂ : ringChar F ≠ p
⊢ (quadraticChar F) ↑p = (quadraticChar (ZMod p)) (↑(χ₄ ↑(Fintype.card F)) * ↑(Fintype.card F))
state_after: F : Type u_1
inst✝³ : Field F
inst✝² : Fintype F
inst✝¹ : DecidableEq F
hF : ringChar F ≠ 2
p : ℕ
inst✝ : Fact (Nat.Prime p)
hp₁ : p ≠ 2
hp₂ : ringChar F ≠ p
⊢ (quadraticChar F) ↑p = (quadraticChar (ZMod p)) (↑((quadraticChar F) (-1)) * ↑(Fintype.card F))

tactic: have h := quadraticChar_card_card hF (ne_of_eq_of_ne (ringChar_zmod_n p) hp₁)
  (ne_of_eq_of_ne (ringChar_zmod_n p) hp₂.symm)
state_before: F : Type u_1
inst✝³ : Field F
inst✝² : Fintype F
inst✝¹ : DecidableEq F
hF : ringChar F ≠ 2
p : ℕ
inst✝ : Fact (Nat.Prime p)
hp₁ : p ≠ 2
hp₂ : ringChar F ≠ p
⊢ (quadraticChar F) ↑p = (quadraticChar (ZMod p)) (↑((quadraticChar F) (-1)) * ↑(Fintype.card F))
state_after: F : Type u_1
inst✝³ : Field F
inst✝² : Fintype F
inst✝¹ : DecidableEq F
hF : ringChar F ≠ 2
p : ℕ
inst✝ : Fact (Nat.Prime p)
hp₁ : p ≠ 2
hp₂ : ringChar F ≠ p
h :
  (quadraticChar F) ↑(Fintype.card (ZMod p)) = (quadraticChar (ZMod p)) (↑((quadraticChar F) (-1)) * ↑(Fintype.card F))
⊢ (quadraticChar F) ↑p = (quadraticChar (ZMod p)) (↑((quadraticChar F) (-1)) * ↑(Fintype.card F))

tactic: rwa [card p] at h
state_before: F : Type u_1
inst✝³ : Field F
inst✝² : Fintype F
inst✝¹ : DecidableEq F
hF : ringChar F ≠ 2
p : ℕ
inst✝ : Fact (Nat.Prime p)
hp₁ : p ≠ 2
hp₂ : ringChar F ≠ p
h :
  (quadraticChar F) ↑(Fintype.card (ZMod p)) = (quadraticChar (ZMod p)) (↑((quadraticChar F) (-1)) * ↑(Fintype.card F))
⊢ (quadraticChar F) ↑p = (quadraticChar (ZMod p)) (↑((quadraticChar F) (-1)) * ↑(Fintype.card F))
state_after: no goals
Theorem: Inducing.isCompact_preimage
File: Mathlib/Topology/Compactness/Compact.lean

tactic: replace hK := hK.inter_right hf'
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : X → Y
hf : Inducing f
hf' : IsClosed (range f)
K : Set Y
hK : IsCompact K
⊢ IsCompact (f ⁻¹' K)
state_after: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : X → Y
hf : Inducing f
hf' : IsClosed (range f)
K : Set Y
hK : IsCompact (K ∩ range f)
⊢ IsCompact (f ⁻¹' K)

tactic: rwa [hf.isCompact_iff, image_preimage_eq_inter_range]
state_before: X : Type u
Y : Type v
ι : Type u_1
inst✝¹ : TopologicalSpace X
inst✝ : TopologicalSpace Y
s t : Set X
f : X → Y
hf : Inducing f
hf' : IsClosed (range f)
K : Set Y
hK : IsCompact (K ∩ range f)
⊢ IsCompact (f ⁻¹' K)
state_after: no goals
Theorem: Subtype.preimage_coe_eq_empty
File: Mathlib/Data/Set/Image.lean

tactic: simp [← not_nonempty_iff_eq_empty, preimage_coe_nonempty]
state_before: α : Type u_1
s t : Set α
⊢ val ⁻¹' t = ∅ ↔ s ∩ t = ∅
state_after: no goals
Theorem: countable_bInter_mem
File: Mathlib/Order/Filter/CountableInter.lean

tactic: rw [biInter_eq_iInter]
state_before: ι✝ : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
ι : Type u_4
S : Set ι
hS : S.Countable
s : (i : ι) → i ∈ S → Set α
⊢ ⋂ i, ⋂ (hi : i ∈ S), s i hi ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l
state_after: ι✝ : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
ι : Type u_4
S : Set ι
hS : S.Countable
s : (i : ι) → i ∈ S → Set α
⊢ ⋂ x, s ↑x ⋯ ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l

tactic: haveI := hS.toEncodable
state_before: ι✝ : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
ι : Type u_4
S : Set ι
hS : S.Countable
s : (i : ι) → i ∈ S → Set α
⊢ ⋂ x, s ↑x ⋯ ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l
state_after: ι✝ : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
ι : Type u_4
S : Set ι
hS : S.Countable
s : (i : ι) → i ∈ S → Set α
this : Encodable ↑S
⊢ ⋂ x, s ↑x ⋯ ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l

tactic: exact countable_iInter_mem.trans Subtype.forall
state_before: ι✝ : Sort u_1
α : Type u_2
β : Type u_3
l : Filter α
inst✝ : CountableInterFilter l
ι : Type u_4
S : Set ι
hS : S.Countable
s : (i : ι) → i ∈ S → Set α
this : Encodable ↑S
⊢ ⋂ x, s ↑x ⋯ ∈ l ↔ ∀ (i : ι) (hi : i ∈ S), s i hi ∈ l
state_after: no goals