tasksource/leandojo huggingface dataset:
Theorem: List.length_cyclicPermutations_of_ne_nil
File: Mathlib/Data/List/Rotate.lean

tactic: simp [cyclicPermutations_of_ne_nil _ h]
state_before: α : Type u
l✝ l' l : List α
h : l ≠ []
⊢ length (cyclicPermutations l) = length l
Theorem: GroupFilterBasis.nhds_hasBasis
File: Mathlib/Topology/Algebra/FilterBasis.lean

tactic: rw [B.nhds_eq]
state_before: G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ : G
⊢ HasBasis (𝓝 x₀) (fun V => V ∈ B) fun V => (fun y => x₀ * y) '' V

tactic: apply B.hasBasis
state_before: G : Type u
inst✝ : Group G
B✝ B : GroupFilterBasis G
x₀ : G
⊢ HasBasis (N B x₀) (fun V => V ∈ B) fun V => (fun y => x₀ * y) '' V
Theorem: Finsupp.sum_smul_index_linearMap'
File: Mathlib/LinearAlgebra/Basic.lean

tactic: rw [Finsupp.sum_smul_index', Finsupp.smul_sum]
state_before: R✝ : Type ?u.3532
R₁ : Type ?u.3535
R₂ : Type ?u.3538
R₃ : Type ?u.3541
R₄ : Type ?u.3544
S : Type ?u.3547
K : Type ?u.3550
K₂ : Type ?u.3553
M✝ : Type ?u.3556
M' : Type ?u.3559
M₁ : Type ?u.3562
M₂✝ : Type ?u.3565
M₃ : Type ?u.3568
M₄ : Type ?u.3571
N : Type ?u.3574
N₂ : Type ?u.3577
ι : Type ?u.3580
V : Type ?u.3583
V₂ : Type ?u.3586
α : Type u_1
R : Type u_2
M : Type u_3
M₂ : Type u_4
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R M₂
v : α →₀ M
c : R
h : α → M →ₗ[R] M₂
⊢ (sum (c • v) fun a => ↑(h a)) = c • sum v fun a => ↑(h a)

tactic: simp only [map_smul]
state_before: R✝ : Type ?u.3532
R₁ : Type ?u.3535
R₂ : Type ?u.3538
R₃ : Type ?u.3541
R₄ : Type ?u.3544
S : Type ?u.3547
K : Type ?u.3550
K₂ : Type ?u.3553
M✝ : Type ?u.3556
M' : Type ?u.3559
M₁ : Type ?u.3562
M₂✝ : Type ?u.3565
M₃ : Type ?u.3568
M₄ : Type ?u.3571
N : Type ?u.3574
N₂ : Type ?u.3577
ι : Type ?u.3580
V : Type ?u.3583
V₂ : Type ?u.3586
α : Type u_1
R : Type u_2
M : Type u_3
M₂ : Type u_4
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R M₂
v : α →₀ M
c : R
h : α → M →ₗ[R] M₂
⊢ (sum v fun i c_1 => ↑(h i) (c • c_1)) = sum v fun a b => c • ↑(h a) b

tactic: intro i
state_before: R✝ : Type ?u.3532
R₁ : Type ?u.3535
R₂ : Type ?u.3538
R₃ : Type ?u.3541
R₄ : Type ?u.3544
S : Type ?u.3547
K : Type ?u.3550
K₂ : Type ?u.3553
M✝ : Type ?u.3556
M' : Type ?u.3559
M₁ : Type ?u.3562
M₂✝ : Type ?u.3565
M₃ : Type ?u.3568
M₄ : Type ?u.3571
N : Type ?u.3574
N₂ : Type ?u.3577
ι : Type ?u.3580
V : Type ?u.3583
V₂ : Type ?u.3586
α : Type u_1
R : Type u_2
M : Type u_3
M₂ : Type u_4
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R M₂
v : α →₀ M
c : R
h : α → M →ₗ[R] M₂
⊢ ∀ (i : α), ↑(h i) 0 = 0

tactic: exact (h i).map_zero
state_before: R✝ : Type ?u.3532
R₁ : Type ?u.3535
R₂ : Type ?u.3538
R₃ : Type ?u.3541
R₄ : Type ?u.3544
S : Type ?u.3547
K : Type ?u.3550
K₂ : Type ?u.3553
M✝ : Type ?u.3556
M' : Type ?u.3559
M₁ : Type ?u.3562
M₂✝ : Type ?u.3565
M₃ : Type ?u.3568
M₄ : Type ?u.3571
N : Type ?u.3574
N₂ : Type ?u.3577
ι : Type ?u.3580
V : Type ?u.3583
V₂ : Type ?u.3586
α : Type u_1
R : Type u_2
M : Type u_3
M₂ : Type u_4
inst✝⁴ : Semiring R
inst✝³ : AddCommMonoid M
inst✝² : Module R M
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R M₂
v : α →₀ M
c : R
h : α → M →ₗ[R] M₂
i : α
⊢ ↑(h i) 0 = 0
Theorem: Complex.sin_eq_sin_iff
File: Mathlib/Analysis/SpecialFunctions/Trigonometric/Complex.lean

tactic: simp only [← Complex.cos_sub_pi_div_two, cos_eq_cos_iff, sub_eq_iff_eq_add]
state_before: x y : ℂ
⊢ sin x = sin y ↔ ∃ k, y = 2 * ↑k * ↑π + x ∨ y = (2 * ↑k + 1) * ↑π - x

tactic: refine' exists_congr fun k => or_congr _ _ <;> refine' Eq.congr rfl _ <;> field_simp <;> ring
state_before: x y : ℂ
⊢ (∃ k, y = 2 * ↑k * ↑π + (x - ↑π / 2) + ↑π / 2 ∨ y = 2 * ↑k * ↑π - (x - ↑π / 2) + ↑π / 2) ↔
    ∃ k, y = 2 * ↑k * ↑π + x ∨ y = (2 * ↑k + 1) * ↑π - x
Theorem: FirstOrder.Language.Theory.simpleGraph_model_iff
File: Mathlib/ModelTheory/Graph.lean

tactic: simp [Theory.simpleGraph]
state_before: L : Language
α : Type w
V : Type w'
n : ℕ
inst✝ : Structure Language.graph V
⊢ V ⊨ Theory.simpleGraph ↔ (Irreflexive fun x y => RelMap adj ![x, y]) ∧ Symmetric fun x y => RelMap adj ![x, y]
Theorem: Polynomial.derivative_bernoulli_add_one
File: Mathlib/NumberTheory/BernoulliPolynomials.lean

tactic: simp_rw [bernoulli, derivative_sum, derivative_monomial, Nat.sub_sub, Nat.add_sub_add_right]
state_before: k : ℕ
⊢ ↑derivative (bernoulli (k + 1)) = (↑k + 1) * bernoulli k

tactic: rw [range_add_one, sum_insert not_mem_range_self, tsub_self, cast_zero, MulZeroClass.mul_zero,
  map_zero, zero_add, mul_sum]
state_before: k : ℕ
⊢ ∑ x in range (k + 1 + 1), ↑(monomial (k - x)) (_root_.bernoulli x * ↑(Nat.choose (k + 1) x) * ↑(k + 1 - x)) =
    (↑k + 1) * ∑ x in range (k + 1), ↑(monomial (k - x)) (_root_.bernoulli x * ↑(Nat.choose k x))

tactic: refine' sum_congr (by rfl) fun m _ => _
state_before: k : ℕ
⊢ ∑ x in range (k + 1), ↑(monomial (k - x)) (_root_.bernoulli x * ↑(Nat.choose (k + 1) x) * ↑(k + 1 - x)) =
    ∑ x in range (k + 1), (↑k + 1) * ↑(monomial (k - x)) (_root_.bernoulli x * ↑(Nat.choose k x))

tactic: conv_rhs => rw [← Nat.cast_one, ← Nat.cast_add, ← C_eq_nat_cast, C_mul_monomial, mul_comm]
state_before: k m : ℕ
x✝ : m ∈ range (k + 1)
⊢ ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose (k + 1) m) * ↑(k + 1 - m)) =
    (↑k + 1) * ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose k m))

tactic: rw [mul_assoc, mul_assoc, ← Nat.cast_mul, ← Nat.cast_mul]
state_before: k m : ℕ
x✝ : m ∈ range (k + 1)
⊢ ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose (k + 1) m) * ↑(k + 1 - m)) =
    ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose k m) * ↑(k + 1))

tactic: congr 3
state_before: k m : ℕ
x✝ : m ∈ range (k + 1)
⊢ ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose (k + 1) m * (k + 1 - m))) =
    ↑(monomial (k - m)) (_root_.bernoulli m * ↑(Nat.choose k m * (k + 1)))

tactic: rw [(choose_mul_succ_eq k m).symm, mul_comm]
state_before: case h.e_6.h.e_a.e_a
k m : ℕ
x✝ : m ∈ range (k + 1)
⊢ Nat.choose (k + 1) m * (k + 1 - m) = Nat.choose k m * (k + 1)

tactic: rfl
state_before: k : ℕ
⊢ range (k + 1) = range (k + 1)
Theorem: Finset.inter_assoc
File: Mathlib/Data/Finset/Basic.lean

tactic: simp only [mem_inter, and_assoc]
state_before: α : Type u_1
β : Type ?u.181571
γ : Type ?u.181574
inst✝ : DecidableEq α
s s₁✝ s₂✝ t t₁ t₂ u v : Finset α
a b : α
s₁ s₂ s₃ : Finset α
x✝ : α
⊢ x✝ ∈ s₁ ∩ s₂ ∩ s₃ ↔ x✝ ∈ s₁ ∩ (s₂ ∩ s₃)
Theorem: MeasureTheory.measure_sUnion₀
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [sUnion_eq_biUnion, measure_biUnion₀ hs hd h]
state_before: α : Type u_1
β : Type ?u.10618
γ : Type ?u.10621
δ : Type ?u.10624
ι : Type ?u.10627
R : Type ?u.10630
R' : Type ?u.10633
m : MeasurableSpace α
μ μ₁ μ₂ : Measure α
s s₁ s₂ t : Set α
S : Set (Set α)
hs : Set.Countable S
hd : Set.Pairwise S (AEDisjoint μ)
h : ∀ (s : Set α), s ∈ S → NullMeasurableSet s
⊢ ↑↑μ (⋃₀ S) = ∑' (s : ↑S), ↑↑μ ↑s
Theorem: Nat.ord_proj_dvd_ord_proj_of_dvd
File: Mathlib/Data/Nat/Factorization/Basic.lean

tactic: rcases em' p.Prime with (pp | pp)
state_before: a b : ℕ
hb0 : b ≠ 0
hab : a ∣ b
p : ℕ
⊢ p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p

tactic: rcases eq_or_ne a 0 with (rfl | ha0)
state_before: case inr
a b : ℕ
hb0 : b ≠ 0
hab : a ∣ b
p : ℕ
pp : Prime p
⊢ p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p

tactic: rw [pow_dvd_pow_iff_le_right pp.one_lt]
state_before: case inr.inr
a b : ℕ
hb0 : b ≠ 0
hab : a ∣ b
p : ℕ
pp : Prime p
ha0 : a ≠ 0
⊢ p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p

tactic: exact (factorization_le_iff_dvd ha0 hb0).2 hab p
state_before: case inr.inr
a b : ℕ
hb0 : b ≠ 0
hab : a ∣ b
p : ℕ
pp : Prime p
ha0 : a ≠ 0
⊢ ↑(factorization a) p ≤ ↑(factorization b) p

tactic: simp [pp]
state_before: case inl
a b : ℕ
hb0 : b ≠ 0
hab : a ∣ b
p : ℕ
pp : ¬Prime p
⊢ p ^ ↑(factorization a) p ∣ p ^ ↑(factorization b) p

tactic: simp
state_before: case inr.inl
b : ℕ
hb0 : b ≠ 0
p : ℕ
pp : Prime p
hab : 0 ∣ b
⊢ p ^ ↑(factorization 0) p ∣ p ^ ↑(factorization b) p
Theorem: Cubic.monic_of_a_eq_one
File: Mathlib/Algebra/CubicDiscriminant.lean

tactic: nontriviality R
state_before: R : Type u_1
S : Type ?u.558294
F : Type ?u.558297
K : Type ?u.558300
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝ : Semiring R
ha : P.a = 1
⊢ Monic (toPoly P)

tactic: rw [Monic, leadingCoeff_of_a_ne_zero (ha ▸ one_ne_zero), ha]
state_before: R : Type u_1
S : Type ?u.558294
F : Type ?u.558297
K : Type ?u.558300
P Q : Cubic R
a b c d a' b' c' d' : R
inst✝ : Semiring R
ha : P.a = 1
✝ : Nontrivial R
⊢ Monic (toPoly P)
Theorem: Nat.ArithmeticFunction.mul_apply_one
File: Mathlib/NumberTheory/ArithmeticFunction.lean

tactic: simp
state_before: R : Type u_1
inst✝ : Semiring R
f g : ArithmeticFunction R
⊢ ↑(f * g) 1 = ↑f 1 * ↑g 1
Theorem: Set.ncard_lt_ncard_iff_ncard_diff_lt_ncard_diff
File: Mathlib/Data/Set/Ncard.lean

tactic: rw [← ncard_inter_add_ncard_diff_eq_ncard s t hs, ← ncard_inter_add_ncard_diff_eq_ncard t s ht,
  inter_comm, add_lt_add_iff_left]
state_before: α : Type u_1
β : Type ?u.129820
s t : Set α
a b x y : α
f : α → β
hs : autoParam (Set.Finite s) _auto✝
ht : autoParam (Set.Finite t) _auto✝
⊢ ncard s < ncard t ↔ ncard (s \ t) < ncard (t \ s)
Theorem: Quaternion.coeComplex_mul
File: Mathlib/Analysis/Quaternion.lean

tactic: ext <;> simp
state_before: z w : ℂ
⊢ ↑(z * w) = ↑z * ↑w
Theorem: List.find?_eq_none
File: Std/Data/List/Lemmas.lean

tactic: induction l <;> simp
state_before: α✝ : Type u_1
p : α✝ → Bool
l : List α✝
⊢ find? p l = none ↔ ∀ (x : α✝), x ∈ l → ¬p x = true

tactic: split <;> simp [*]
state_before: case cons
α✝ : Type u_1
p : α✝ → Bool
head✝ : α✝
tail✝ : List α✝
tail_ih✝ : find? p tail✝ = none ↔ ∀ (x : α✝), x ∈ tail✝ → ¬p x = true
⊢ (match p head✝ with
      | true => some head✝
      | false => find? p tail✝) =
      none ↔
    p head✝ = false ∧ ∀ (a : α✝), a ∈ tail✝ → p a = false
Theorem: Polynomial.natDegree_pow'
File: Mathlib/Data/Polynomial/Degree/Definitions.lean

tactic: simp [*]
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.688771
n : ℕ
h : leadingCoeff p ^ n ≠ 0
hp0 : p = 0
hn0 : n = 0
⊢ natDegree (p ^ n) = n * natDegree p

tactic: rw [hp0, zero_pow (Nat.pos_of_ne_zero hn0)]
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.688771
n : ℕ
h : leadingCoeff p ^ n ≠ 0
hp0 : p = 0
hn0 : ¬n = 0
⊢ natDegree (p ^ n) = n * natDegree p

tactic: simp
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.688771
n : ℕ
h : leadingCoeff p ^ n ≠ 0
hp0 : p = 0
hn0 : ¬n = 0
⊢ natDegree 0 = n * natDegree 0

tactic: have h1 := h
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.688771
n : ℕ
h : leadingCoeff p ^ n ≠ 0
hp0 : ¬p = 0
hpn0 : p ^ n = 0
⊢ False

tactic: rw [← leadingCoeff_pow' h1, hpn0, leadingCoeff_zero] at h
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.688771
n : ℕ
h : leadingCoeff p ^ n ≠ 0
hp0 : ¬p = 0
hpn0 : p ^ n = 0
h1 : leadingCoeff p ^ n ≠ 0
⊢ False

tactic: exact h rfl
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.688771
n : ℕ
h : 0 ≠ 0
hp0 : ¬p = 0
hpn0 : p ^ n = 0
h1 : leadingCoeff p ^ n ≠ 0
⊢ False

tactic: rw [← degree_eq_natDegree hpn, degree_pow' h, degree_eq_natDegree hp0,
    Nat.cast_withBot, ← WithBot.coe_nsmul, ← Nat.cast_withBot]
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.688771
n : ℕ
h : leadingCoeff p ^ n ≠ 0
hp0 : ¬p = 0
hpn : p ^ n ≠ 0
⊢ ↑(natDegree (p ^ n)) = ↑(n * natDegree p)

tactic: simp
state_before: R : Type u
S : Type v
a b c d : R
n✝ m : ℕ
inst✝ : Semiring R
p q : R[X]
ι : Type ?u.688771
n : ℕ
h : leadingCoeff p ^ n ≠ 0
hp0 : ¬p = 0
hpn : p ^ n ≠ 0
⊢ ↑(n • natDegree p) = ↑(n * natDegree p)
Theorem: rank_fun'
File: Mathlib/LinearAlgebra/Dimension.lean

tactic: rw [rank_fun_eq_lift_mul, rank_self, Cardinal.lift_one, mul_one, Cardinal.natCast_inj]
state_before: K : Type u
V V₁ V₂ V₃ : Type v
V' V'₁ : Type v'
V'' : Type v''
ι : Type w
ι' : Type w'
η : Type u₁'
φ : η → Type ?u.540063
inst✝¹⁴ : Ring K
inst✝¹³ : StrongRankCondition K
inst✝¹² : AddCommGroup V
inst✝¹¹ : Module K V
inst✝¹⁰ : Module.Free K V
inst✝⁹ : AddCommGroup V'
inst✝⁸ : Module K V'
inst✝⁷ : Module.Free K V'
inst✝⁶ : AddCommGroup V₁
inst✝⁵ : Module K V₁
inst✝⁴ : Module.Free K V₁
inst✝³ : (i : η) → AddCommGroup (φ i)
inst✝² : (i : η) → Module K (φ i)
inst✝¹ : ∀ (i : η), Module.Free K (φ i)
inst✝ : Fintype η
⊢ Module.rank K (η → K) = ↑(Fintype.card η)
Theorem: CategoryTheory.Over.over_hasTerminal
File: Mathlib/CategoryTheory/Limits/Constructions/Over/Products.lean

tactic: simp only
state_before: J : Type w
C : Type u
inst✝ : Category C
X B : C
F : Discrete PEmpty ⥤ Over B
s : Cone F
m : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt
x✝ : ∀ (j : Discrete PEmpty), m ≫ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π.app j = s.π.app j
⊢ m = (fun s => homMk s.pt.hom) s

tactic: ext
state_before: J : Type w
C : Type u
inst✝ : Category C
X B : C
F : Discrete PEmpty ⥤ Over B
s : Cone F
m : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt
x✝ : ∀ (j : Discrete PEmpty), m ≫ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π.app j = s.π.app j
⊢ m = homMk s.pt.hom

tactic: rw [Over.homMk_left _]
state_before: case h
J : Type w
C : Type u
inst✝ : Category C
X B : C
F : Discrete PEmpty ⥤ Over B
s : Cone F
m : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt
x✝ : ∀ (j : Discrete PEmpty), m ≫ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π.app j = s.π.app j
⊢ m.left = (homMk s.pt.hom).left

tactic: have := m.w
state_before: case h
J : Type w
C : Type u
inst✝ : Category C
X B : C
F : Discrete PEmpty ⥤ Over B
s : Cone F
m : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt
x✝ : ∀ (j : Discrete PEmpty), m ≫ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π.app j = s.π.app j
⊢ m.left = s.pt.hom

tactic: dsimp at this
state_before: case h
J : Type w
C : Type u
inst✝ : Category C
X B : C
F : Discrete PEmpty ⥤ Over B
s : Cone F
m : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt
x✝ : ∀ (j : Discrete PEmpty), m ≫ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π.app j = s.π.app j
this :
  (𝟭 C).map m.left ≫ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt.hom =
    s.pt.hom ≫ (Functor.fromPUnit B).map m.right
⊢ m.left = s.pt.hom

tactic: rwa [Category.comp_id, Category.comp_id] at this
state_before: case h
J : Type w
C : Type u
inst✝ : Category C
X B : C
F : Discrete PEmpty ⥤ Over B
s : Cone F
m : s.pt ⟶ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.pt
x✝ : ∀ (j : Discrete PEmpty), m ≫ { pt := mk (𝟙 B), π := NatTrans.mk fun p => PEmpty.elim p.as }.π.app j = s.π.app j
this : m.left ≫ 𝟙 B = s.pt.hom ≫ 𝟙 B
⊢ m.left = s.pt.hom
Theorem: Complex.inv_cpow_eq_ite'
File: Mathlib/Analysis/SpecialFunctions/Pow/Complex.lean

tactic: rw [inv_cpow_eq_ite, apply_ite conj, conj_conj, conj_conj]
state_before: x n : ℂ
⊢ (x ^ n)⁻¹ = if arg x = π then ↑(starRingEnd ℂ) (x⁻¹ ^ ↑(starRingEnd ℂ) n) else x⁻¹ ^ n

tactic: split_ifs with h
state_before: x n : ℂ
⊢ (x ^ n)⁻¹ =
    if arg x = π then if arg x = π then (x ^ n)⁻¹ else ↑(starRingEnd ℂ) (x ^ ↑(starRingEnd ℂ) n)⁻¹ else x⁻¹ ^ n

tactic: rfl
state_before: case inl
x n : ℂ
h : arg x = π
⊢ (x ^ n)⁻¹ = (x ^ n)⁻¹

tactic: rw [inv_cpow _ _ h]
state_before: case inr
x n : ℂ
h : ¬arg x = π
⊢ (x ^ n)⁻¹ = x⁻¹ ^ n
Theorem: boundariesToCycles_naturality
File: Mathlib/Algebra/Homology/Homology.lean

tactic: ext
state_before: ι : Type u_1
V : Type u
inst✝⁴ : Category V
inst✝³ : HasZeroMorphisms V
c : ComplexShape ι
C : HomologicalComplex V c
inst✝² : HasEqualizers V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
C₁ C₂ : HomologicalComplex V c
f : C₁ ⟶ C₂
i : ι
⊢ boundariesMap f i ≫ boundariesToCycles C₂ i = boundariesToCycles C₁ i ≫ cyclesMap f i

tactic: simp
state_before: case h
ι : Type u_1
V : Type u
inst✝⁴ : Category V
inst✝³ : HasZeroMorphisms V
c : ComplexShape ι
C : HomologicalComplex V c
inst✝² : HasEqualizers V
inst✝¹ : HasImages V
inst✝ : HasImageMaps V
C₁ C₂ : HomologicalComplex V c
f : C₁ ⟶ C₂
i : ι
⊢ (boundariesMap f i ≫ boundariesToCycles C₂ i) ≫ Subobject.arrow (cycles C₂ i) =
    (boundariesToCycles C₁ i ≫ cyclesMap f i) ≫ Subobject.arrow (cycles C₂ i)
Theorem: continuousOn_Ioc_extendFrom_Ioo
File: Mathlib/Topology/Algebra/Order/ExtendFrom.lean

tactic: have := @continuousOn_Ico_extendFrom_Ioo αᵒᵈ _ _ _ _ _ _ _ f _ _ lb hab
state_before: α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : RegularSpace β
f : α → β
a b : α
lb : β
hab : a < b
hf : ContinuousOn f (Ioo a b)
hb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)
⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)

tactic: erw [dual_Ico, dual_Ioi, dual_Ioo] at this
state_before: α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : RegularSpace β
f : α → β
a b : α
lb : β
hab : a < b
hf : ContinuousOn f (Ioo a b)
hb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)
this : ContinuousOn f (Ioo b a) → Tendsto f (𝓝[Ioi b] b) (𝓝 lb) → ContinuousOn (extendFrom (Ioo b a) f) (Ico b a)
⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)

tactic: exact this hf hb
state_before: α : Type u_1
β : Type u_2
inst✝⁵ : TopologicalSpace α
inst✝⁴ : LinearOrder α
inst✝³ : DenselyOrdered α
inst✝² : OrderTopology α
inst✝¹ : TopologicalSpace β
inst✝ : RegularSpace β
f : α → β
a b : α
lb : β
hab : a < b
hf : ContinuousOn f (Ioo a b)
hb : Tendsto f (𝓝[Iio b] b) (𝓝 lb)
this :
  ContinuousOn f (↑OrderDual.ofDual ⁻¹' Ioo a b) →
    Tendsto f (𝓝[↑OrderDual.ofDual ⁻¹' Iio b] b) (𝓝 lb) →
      ContinuousOn (extendFrom (↑OrderDual.ofDual ⁻¹' Ioo a b) f) (↑OrderDual.ofDual ⁻¹' Ioc a b)
⊢ ContinuousOn (extendFrom (Ioo a b) f) (Ioc a b)
Theorem: Set.piecewise_univ
File: Mathlib/Data/Set/Function.lean

tactic: ext i
state_before: α : Type u_1
β : Type ?u.72334
γ : Type ?u.72337
ι : Sort ?u.72340
π : α → Type ?u.72345
δ : α → Sort u_2
s : Set α
f g : (i : α) → δ i
inst✝ : (i : α) → Decidable (i ∈ univ)
⊢ piecewise univ f g = f

tactic: simp [piecewise]
state_before: case h
α : Type u_1
β : Type ?u.72334
γ : Type ?u.72337
ι : Sort ?u.72340
π : α → Type ?u.72345
δ : α → Sort u_2
s : Set α
f g : (i : α) → δ i
inst✝ : (i : α) → Decidable (i ∈ univ)
i : α
⊢ piecewise univ f g i = f i
Theorem: Num.ofNat'_zero
File: Mathlib/Data/Num/Lemmas.lean

tactic: simp [Num.ofNat']
state_before: α : Type ?u.179471
⊢ ofNat' 0 = 0
Theorem: MeasureTheory.integral_nonpos_of_ae
File: Mathlib/MeasureTheory/Integral/Bochner.lean

tactic: have hf : 0 ≤ᵐ[μ] -f := hf.mono fun a h => by rwa [Pi.neg_apply, Pi.zero_apply, neg_nonneg]
state_before: α : Type u_1
E : Type ?u.1098396
F : Type ?u.1098399
𝕜 : Type ?u.1098402
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1101093
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : f ≤ᵐ[μ] 0
⊢ (∫ (a : α), f a ∂μ) ≤ 0

tactic: have : 0 ≤ ∫ a, -f a ∂μ := integral_nonneg_of_ae hf
state_before: α : Type u_1
E : Type ?u.1098396
F : Type ?u.1098399
𝕜 : Type ?u.1098402
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1101093
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf✝ : f ≤ᵐ[μ] 0
hf : 0 ≤ᵐ[μ] -f
⊢ (∫ (a : α), f a ∂μ) ≤ 0

tactic: rwa [integral_neg, neg_nonneg] at this
state_before: α : Type u_1
E : Type ?u.1098396
F : Type ?u.1098399
𝕜 : Type ?u.1098402
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1101093
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf✝ : f ≤ᵐ[μ] 0
hf : 0 ≤ᵐ[μ] -f
this : 0 ≤ ∫ (a : α), -f a ∂μ
⊢ (∫ (a : α), f a ∂μ) ≤ 0

tactic: rwa [Pi.neg_apply, Pi.zero_apply, neg_nonneg]
state_before: α : Type u_1
E : Type ?u.1098396
F : Type ?u.1098399
𝕜 : Type ?u.1098402
inst✝¹⁰ : NormedAddCommGroup E
inst✝⁹ : NormedSpace ℝ E
inst✝⁸ : CompleteSpace E
inst✝⁷ : NontriviallyNormedField 𝕜
inst✝⁶ : NormedSpace 𝕜 E
inst✝⁵ : SMulCommClass ℝ 𝕜 E
inst✝⁴ : NormedAddCommGroup F
inst✝³ : NormedSpace ℝ F
inst✝² : CompleteSpace F
f✝ g : α → E
m : MeasurableSpace α
μ : Measure α
X : Type ?u.1101093
inst✝¹ : TopologicalSpace X
inst✝ : FirstCountableTopology X
f : α → ℝ
hf : f ≤ᵐ[μ] 0
a : α
h : f a ≤ OfNat.ofNat 0 a
⊢ OfNat.ofNat 0 a ≤ (-f) a
Theorem: List.not_eq_key
File: Mathlib/Data/List/Sigma.lean

tactic: rwa [e] at h₁
state_before: α : Type u
β : α → Type v
l✝ l₁ l₂ : List (Sigma β)
a : α
l : List (Sigma β)
h₁ : ¬a ∈ keys l
s : Sigma β
h₂ : s ∈ l
e : a = s.fst
⊢ ¬s.fst ∈ keys l
Theorem: ENNReal.inv_ne_zero
File: Mathlib/Data/Real/ENNReal.lean

tactic: simp
state_before: α : Type ?u.256704
β : Type ?u.256707
a b c d : ℝ≥0∞
r p q : ℝ≥0
⊢ a⁻¹ ≠ 0 ↔ a ≠ ⊤
Theorem: UpperSet.map_map
File: Mathlib/Order/UpperLower/Basic.lean

tactic: ext
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
ι : Sort ?u.98275
κ : ι → Sort ?u.98280
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f✝ : α ≃o β
s t : UpperSet α
a : α
b : β
g : β ≃o γ
f : α ≃o β
⊢ ↑(map g) (↑(map f) s) = ↑(map (OrderIso.trans f g)) s

tactic: simp
state_before: case a.h
α : Type u_3
β : Type u_1
γ : Type u_2
ι : Sort ?u.98275
κ : ι → Sort ?u.98280
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f✝ : α ≃o β
s t : UpperSet α
a : α
b : β
g : β ≃o γ
f : α ≃o β
x✝ : γ
⊢ x✝ ∈ ↑(↑(map g) (↑(map f) s)) ↔ x✝ ∈ ↑(↑(map (OrderIso.trans f g)) s)
Theorem: MeasureTheory.prob_compl_eq_one_iff
File: Mathlib/MeasureTheory/Measure/MeasureSpace.lean

tactic: rw [← prob_compl_eq_zero_iff hs.compl, compl_compl]
state_before: α : Type u_1
β : Type ?u.709067
γ : Type ?u.709070
δ : Type ?u.709073
ι : Type ?u.709076
R : Type ?u.709079
R' : Type ?u.709082
m0 : MeasurableSpace α
inst✝² : MeasurableSpace β
inst✝¹ : MeasurableSpace γ
μ μ₁ μ₂ μ₃ ν ν' ν₁ ν₂ : Measure α
s s' t : Set α
inst✝ : IsProbabilityMeasure μ
hs : MeasurableSet s
⊢ ↑↑μ (sᶜ) = 1 ↔ ↑↑μ s = 0