tasksource/leandojo huggingface dataset:
Theorem: Matrix.isSkewAdjoint_bracket
File: Mathlib/Algebra/Lie/SkewAdjoint.lean

tactic: simp only [mem_skewAdjointMatricesSubmodule] at *
state_before: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J A B : Matrix n n R
hA : A ∈ skewAdjointMatricesSubmodule J
hB : B ∈ skewAdjointMatricesSubmodule J
⊢ ⁅A, B⁆ ∈ skewAdjointMatricesSubmodule J

tactic: change ⁅A, B⁆ᵀ ⬝ J = J ⬝ (-⁅A, B⁆)
state_before: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J A B : Matrix n n R
hA : IsSkewAdjoint J A
hB : IsSkewAdjoint J B
⊢ IsSkewAdjoint J ⁅A, B⁆

tactic: change Aᵀ ⬝ J = J ⬝ (-A) at hA
state_before: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J A B : Matrix n n R
hA : IsSkewAdjoint J A
hB : IsSkewAdjoint J B
⊢ ⁅A, B⁆ᵀ ⬝ J = J ⬝ (-⁅A, B⁆)

tactic: change Bᵀ ⬝ J = J ⬝ (-B) at hB
state_before: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J A B : Matrix n n R
hB : IsSkewAdjoint J B
hA : Aᵀ ⬝ J = J ⬝ (-A)
⊢ ⁅A, B⁆ᵀ ⬝ J = J ⬝ (-⁅A, B⁆)

tactic: simp only [← Matrix.mul_eq_mul] at *
state_before: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J A B : Matrix n n R
hA : Aᵀ ⬝ J = J ⬝ (-A)
hB : Bᵀ ⬝ J = J ⬝ (-B)
⊢ ⁅A, B⁆ᵀ ⬝ J = J ⬝ (-⁅A, B⁆)

tactic: rw [Matrix.lie_transpose, LieRing.of_associative_ring_bracket,
  LieRing.of_associative_ring_bracket, sub_mul, mul_assoc, mul_assoc, hA, hB, ← mul_assoc,
  ← mul_assoc, hA, hB]
state_before: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J A B : Matrix n n R
hA : Aᵀ * J = J * -A
hB : Bᵀ * J = J * -B
⊢ ⁅A, B⁆ᵀ * J = J * -⁅A, B⁆

tactic: noncomm_ring
state_before: R : Type u
n : Type w
inst✝² : CommRing R
inst✝¹ : DecidableEq n
inst✝ : Fintype n
J A B : Matrix n n R
hA : Aᵀ * J = J * -A
hB : Bᵀ * J = J * -B
⊢ J * -B * -A - J * -A * -B = J * -(A * B - B * A)
Theorem: List.rotate_cons_succ
File: Mathlib/Data/List/Rotate.lean

tactic: rw [rotate_eq_rotate', rotate_eq_rotate', rotate'_cons_succ]
state_before: α : Type u
l : List α
a : α
n : ℕ
⊢ rotate (a :: l) (succ n) = rotate (l ++ [a]) n
Theorem: Projectivization.Subspace.sup_span
File: Mathlib/LinearAlgebra/ProjectiveSpace/Subspace.lean

tactic: rw [span_union, span_coe]
state_before: K : Type u_2
V : Type u_1
inst✝² : Field K
inst✝¹ : AddCommGroup V
inst✝ : Module K V
S : Set (ℙ K V)
W : Subspace K V
⊢ W ⊔ span S = span (↑W ∪ S)
Theorem: Sym.fill_filterNe
File: Mathlib/Data/Sym/Basic.lean

tactic: rw [coe_fill, filterNe, ← val_eq_coe, Subtype.coe_mk, Fin.val_mk]
state_before: α : Type u_1
β : Type ?u.54293
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : Sym α n
⊢ ↑(fill a (filterNe a m).fst (filterNe a m).snd) = ↑m

tactic: ext b
state_before: α : Type u_1
β : Type ?u.54293
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : Sym α n
⊢ filter ((fun x x_1 => x ≠ x_1) a) ↑m + ↑(replicate (count a ↑m) a) = ↑m

tactic: dsimp
state_before: case a
α : Type u_1
β : Type ?u.54293
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ count b (filter ((fun x x_1 => x ≠ x_1) a) ↑m + ↑(replicate (count a ↑m) a)) = count b ↑m

tactic: rw [count_add, count_filter, Sym.coe_replicate, count_replicate]
state_before: case a
α : Type u_1
β : Type ?u.54293
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ count b (filter (fun x => ¬a = x) ↑m + ↑(replicate (count a ↑m) a)) = count b ↑m

tactic: obtain rfl | h := eq_or_ne a b
state_before: case a
α : Type u_1
β : Type ?u.54293
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
⊢ ((if ¬a = b then count b ↑m else 0) + if b = a then count a ↑m else 0) = count b ↑m

tactic: rw [if_pos rfl, if_neg (not_not.2 rfl), zero_add]
state_before: case a.inl
α : Type u_1
β : Type ?u.54293
n n' m✝ : ℕ
s : Sym α n
a✝ b : α
inst✝ : DecidableEq α
a : α
m : Sym α n
⊢ ((if ¬a = a then count a ↑m else 0) + if a = a then count a ↑m else 0) = count a ↑m

tactic: rw [if_pos h, if_neg h.symm, add_zero]
state_before: case a.inr
α : Type u_1
β : Type ?u.54293
n n' m✝ : ℕ
s : Sym α n
a✝ b✝ : α
inst✝ : DecidableEq α
a : α
m : Sym α n
b : α
h : a ≠ b
⊢ ((if ¬a = b then count b ↑m else 0) + if b = a then count a ↑m else 0) = count b ↑m
Theorem: MultilinearMap.mkPiRing_eq_zero_iff
File: Mathlib/LinearAlgebra/Multilinear/Basic.lean

tactic: rw [← mkPiRing_zero, mkPiRing_eq_iff]
state_before: R : Type u
ι : Type u'
n : ℕ
M : Fin (Nat.succ n) → Type v
M₁ : ι → Type v₁
M₂ : Type v₂
M₃ : Type v₃
M' : Type v'
inst✝⁷ : CommSemiring R
inst✝⁶ : (i : ι) → AddCommMonoid (M₁ i)
inst✝⁵ : (i : Fin (Nat.succ n)) → AddCommMonoid (M i)
inst✝⁴ : AddCommMonoid M₂
inst✝³ : (i : Fin (Nat.succ n)) → Module R (M i)
inst✝² : (i : ι) → Module R (M₁ i)
inst✝¹ : Module R M₂
f f' : MultilinearMap R M₁ M₂
inst✝ : Fintype ι
z : M₂
⊢ MultilinearMap.mkPiRing R ι z = 0 ↔ z = 0
Theorem: Multiset.map_bind
File: Mathlib/Data/Multiset/Bind.lean

tactic: simp
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type ?u.28107
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : α → Multiset β
f : β → γ
⊢ map f (bind 0 n) = bind 0 fun a => map f (n a)

tactic: simp (config := { contextual := true })
state_before: α : Type u_1
β : Type u_2
γ : Type u_3
δ : Type ?u.28107
a : α
s t : Multiset α
f✝ g : α → Multiset β
m : Multiset α
n : α → Multiset β
f : β → γ
⊢ ∀ ⦃a : α⦄ {s : Multiset α},
    (map f (bind s n) = bind s fun a => map f (n a)) → map f (bind (a ::ₘ s) n) = bind (a ::ₘ s) fun a => map f (n a)
Theorem: Real.cos_add_cos
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [cos_add_cos]
state_before: x y : ℝ
⊢ ↑(cos x + cos y) = ↑(2 * cos ((x + y) / 2) * cos ((x - y) / 2))
Theorem: div_ne_zero
File: Mathlib/Algebra/GroupWithZero/Units/Basic.lean

tactic: rw [div_eq_mul_inv]
state_before: α : Type ?u.19055
M₀ : Type ?u.19058
G₀ : Type u_1
M₀' : Type ?u.19064
G₀' : Type ?u.19067
F : Type ?u.19070
F' : Type ?u.19073
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b c : G₀
ha : a ≠ 0
hb : b ≠ 0
⊢ a / b ≠ 0

tactic: exact mul_ne_zero ha (inv_ne_zero hb)
state_before: α : Type ?u.19055
M₀ : Type ?u.19058
G₀ : Type u_1
M₀' : Type ?u.19064
G₀' : Type ?u.19067
F : Type ?u.19070
F' : Type ?u.19073
inst✝¹ : MonoidWithZero M₀
inst✝ : GroupWithZero G₀
a b c : G₀
ha : a ≠ 0
hb : b ≠ 0
⊢ a * b⁻¹ ≠ 0
Theorem: MeasureTheory.Measure.toSignedMeasure_sub_apply
File: Mathlib/MeasureTheory/Measure/VectorMeasure.lean

tactic: rw [VectorMeasure.sub_apply, toSignedMeasure_apply_measurable hi,
  Measure.toSignedMeasure_apply_measurable hi, sub_eq_add_neg]
state_before: α : Type u_1
β : Type ?u.150394
m : MeasurableSpace α
μ ν : Measure α
inst✝¹ : IsFiniteMeasure μ
inst✝ : IsFiniteMeasure ν
i : Set α
hi : MeasurableSet i
⊢ ↑(toSignedMeasure μ - toSignedMeasure ν) i = ENNReal.toReal (↑↑μ i) - ENNReal.toReal (↑↑ν i)
Theorem: half_le_self_iff
File: Mathlib/Algebra/Order/Field/Basic.lean

tactic: rw [div_le_iff (zero_lt_two' α), mul_two, le_add_iff_nonneg_left]
state_before: ι : Type ?u.94503
α : Type u_1
β : Type ?u.94509
inst✝ : LinearOrderedSemifield α
a b c d e : α
m n : ℤ
⊢ a / 2 ≤ a ↔ 0 ≤ a
Theorem: NFA.stepSet_empty
File: Mathlib/Computability/NFA.lean

tactic: simp [stepSet]
state_before: α : Type u
σ σ' : Type v
M : NFA α σ
a : α
⊢ stepSet M ∅ a = ∅
Theorem: Ordinal.mul_div_le
File: Mathlib/SetTheory/Ordinal/Arithmetic.lean

tactic: simp only [b0, zero_mul, Ordinal.zero_le]
state_before: α : Type ?u.239646
β : Type ?u.239649
γ : Type ?u.239652
r : α → α → Prop
s : β → β → Prop
t : γ → γ → Prop
a b : Ordinal
b0 : b = 0
⊢ b * (a / b) ≤ a
Theorem: zpow_bit1_nonpos_iff
File: Mathlib/Algebra/Order/Field/Power.lean

tactic: rw [le_iff_lt_or_eq, le_iff_lt_or_eq, zpow_bit1_neg_iff, zpow_eq_zero_iff (Int.bit1_ne_zero n)]
state_before: α : Type u_1
inst✝ : LinearOrderedField α
a b c d : α
n : ℤ
⊢ a ^ bit1 n ≤ 0 ↔ a ≤ 0
Theorem: Pi.isCompl_iff
File: Mathlib/Order/PropInstances.lean

tactic: simp_rw [_root_.isCompl_iff, disjoint_iff, codisjoint_iff, forall_and]
state_before: ι : Type u_2
α' : ι → Type u_1
inst✝¹ : (i : ι) → PartialOrder (α' i)
inst✝ : (i : ι) → BoundedOrder (α' i)
f g : (i : ι) → α' i
⊢ IsCompl f g ↔ ∀ (i : ι), IsCompl (f i) (g i)
Theorem: deriv.lhopital_zero_atBot
File: Mathlib/Analysis/Calculus/LHopital.lean

tactic: have hdg : ∀ᶠ x in atBot, DifferentiableAt ℝ g x :=
  hg'.mp (eventually_of_forall fun _ hg' =>
    by_contradiction fun h => hg' (deriv_zero_of_not_differentiableAt h))
state_before: a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ f x
hg' : ∀ᶠ (x : ℝ) in atBot, deriv g x ≠ 0
hfbot : Tendsto f atBot (𝓝 0)
hgbot : Tendsto g atBot (𝓝 0)
hdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l
⊢ Tendsto (fun x => f x / g x) atBot l

tactic: have hdf' : ∀ᶠ x in atBot, HasDerivAt f (deriv f x) x :=
  hdf.mp (eventually_of_forall fun _ => DifferentiableAt.hasDerivAt)
state_before: a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ f x
hg' : ∀ᶠ (x : ℝ) in atBot, deriv g x ≠ 0
hfbot : Tendsto f atBot (𝓝 0)
hgbot : Tendsto g atBot (𝓝 0)
hdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l
hdg : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ g x
⊢ Tendsto (fun x => f x / g x) atBot l

tactic: have hdg' : ∀ᶠ x in atBot, HasDerivAt g (deriv g x) x :=
  hdg.mp (eventually_of_forall fun _ => DifferentiableAt.hasDerivAt)
state_before: a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ f x
hg' : ∀ᶠ (x : ℝ) in atBot, deriv g x ≠ 0
hfbot : Tendsto f atBot (𝓝 0)
hgbot : Tendsto g atBot (𝓝 0)
hdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l
hdg : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ g x
hdf' : ∀ᶠ (x : ℝ) in atBot, HasDerivAt f (deriv f x) x
⊢ Tendsto (fun x => f x / g x) atBot l

tactic: exact HasDerivAt.lhopital_zero_atBot hdf' hdg' hg' hfbot hgbot hdiv
state_before: a b : ℝ
hab : a < b
l : Filter ℝ
f f' g g' : ℝ → ℝ
hdf : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ f x
hg' : ∀ᶠ (x : ℝ) in atBot, deriv g x ≠ 0
hfbot : Tendsto f atBot (𝓝 0)
hgbot : Tendsto g atBot (𝓝 0)
hdiv : Tendsto (fun x => deriv f x / deriv g x) atBot l
hdg : ∀ᶠ (x : ℝ) in atBot, DifferentiableAt ℝ g x
hdf' : ∀ᶠ (x : ℝ) in atBot, HasDerivAt f (deriv f x) x
hdg' : ∀ᶠ (x : ℝ) in atBot, HasDerivAt g (deriv g x) x
⊢ Tendsto (fun x => f x / g x) atBot l
Theorem: Matrix.det_updateRow_add_smul_self
File: Mathlib/LinearAlgebra/Matrix/Determinant.lean

tactic: simp [det_updateRow_add, det_updateRow_smul,
  det_zero_of_row_eq hij (updateRow_self.trans (updateRow_ne hij.symm).symm)]
state_before: m : Type ?u.1684713
n : Type u_1
inst✝⁴ : DecidableEq n
inst✝³ : Fintype n
inst✝² : DecidableEq m
inst✝¹ : Fintype m
R : Type v
inst✝ : CommRing R
A : Matrix n n R
i j : n
hij : i ≠ j
c : R
⊢ det (updateRow A i (A i + c • A j)) = det A
Theorem: Multiset.prod_map_eq_pow_single
File: Mathlib/Algebra/BigOperators/Multiset/Basic.lean

tactic: induction' m using Quotient.inductionOn with l
state_before: ι : Type u_1
α : Type u_2
β : Type ?u.22654
γ : Type ?u.22657
inst✝¹ : CommMonoid α
s t : Multiset α
a : α
m : Multiset ι
f g : ι → α
inst✝ : DecidableEq ι
i : ι
hf : ∀ (i' : ι), i' ≠ i → i' ∈ m → f i' = 1
⊢ prod (map f m) = f i ^ count i m

tactic: simp [List.prod_map_eq_pow_single i f hf]
state_before: case h
ι : Type u_1
α : Type u_2
β : Type ?u.22654
γ : Type ?u.22657
inst✝¹ : CommMonoid α
s t : Multiset α
a : α
m : Multiset ι
f g : ι → α
inst✝ : DecidableEq ι
i : ι
hf✝ : ∀ (i' : ι), i' ≠ i → i' ∈ m → f i' = 1
l : List ι
hf : ∀ (i' : ι), i' ≠ i → i' ∈ Quotient.mk (List.isSetoid ι) l → f i' = 1
⊢ prod (map f (Quotient.mk (List.isSetoid ι) l)) = f i ^ count i (Quotient.mk (List.isSetoid ι) l)
Theorem: totallyBounded_of_forall_symm
File: Mathlib/Topology/UniformSpace/Cauchy.lean

tactic: simpa only [ball_eq_of_symmetry hV.2] using h V hV.1 hV.2
state_before: α : Type u
β : Type v
inst✝ : UniformSpace α
s : Set α
h : ∀ (V : Set (α × α)), V ∈ 𝓤 α → SymmetricRel V → ∃ t, Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), ball y V
V : Set (α × α)
hV : V ∈ 𝓤 α ∧ SymmetricRel V
⊢ ∃ t, Set.Finite t ∧ s ⊆ ⋃ (y : α) (_ : y ∈ t), {x | (x, y) ∈ id V}
Theorem: ProjectiveSpectrum.zeroLocus_span
File: Mathlib/AlgebraicGeometry/ProjectiveSpectrum/Topology.lean

tactic: ext x
state_before: R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
s : Set A
⊢ zeroLocus 𝒜 ↑(Ideal.span s) = zeroLocus 𝒜 s

tactic: exact (Submodule.gi _ _).gc s x.asHomogeneousIdeal.toIdeal
state_before: case h
R : Type u_2
A : Type u_1
inst✝³ : CommSemiring R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ℕ → Submodule R A
inst✝ : GradedAlgebra 𝒜
s : Set A
x : ProjectiveSpectrum 𝒜
⊢ x ∈ zeroLocus 𝒜 ↑(Ideal.span s) ↔ x ∈ zeroLocus 𝒜 s
Theorem: essSup_comp_le_essSup_map_measure
File: Mathlib/MeasureTheory/Function/EssSup.lean

tactic: refine' limsSup_le_limsSup_of_le (fun t => _) (by isBoundedDefault) (by isBoundedDefault)
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
⊢ essSup (g ∘ f) μ ≤ essSup g (Measure.map f μ)

tactic: simp_rw [Filter.mem_map]
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
⊢ t ∈ map g (Measure.ae (Measure.map f μ)) → t ∈ map (g ∘ f) (Measure.ae μ)

tactic: have : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t) := by
  ext1 x
  simp_rw [Set.mem_preimage, Function.comp]
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
⊢ g ⁻¹' t ∈ Measure.ae (Measure.map f μ) → g ∘ f ⁻¹' t ∈ Measure.ae μ

tactic: rw [this]
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
this : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t)
⊢ g ⁻¹' t ∈ Measure.ae (Measure.map f μ) → g ∘ f ⁻¹' t ∈ Measure.ae μ

tactic: exact fun h => mem_ae_of_mem_ae_map hf h
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
this : g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t)
⊢ g ⁻¹' t ∈ Measure.ae (Measure.map f μ) → f ⁻¹' (g ⁻¹' t) ∈ Measure.ae μ

tactic: isBoundedDefault
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
⊢ IsCobounded (fun x x_1 => x ≤ x_1) (map (g ∘ f) (Measure.ae μ))

tactic: isBoundedDefault
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
⊢ IsBounded (fun x x_1 => x ≤ x_1) (map g (Measure.ae (Measure.map f μ)))

tactic: ext1 x
state_before: α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
⊢ g ∘ f ⁻¹' t = f ⁻¹' (g ⁻¹' t)

tactic: simp_rw [Set.mem_preimage, Function.comp]
state_before: case h
α : Type u_1
β : Type u_3
m : MeasurableSpace α
μ ν : MeasureTheory.Measure α
inst✝ : CompleteLattice β
γ : Type u_2
mγ : MeasurableSpace γ
f : α → γ
g : γ → β
hf : AEMeasurable f
t : Set β
x : α
⊢ x ∈ g ∘ f ⁻¹' t ↔ x ∈ f ⁻¹' (g ⁻¹' t)
Theorem: WithBot.image_coe_Ico
File: Mathlib/Data/Set/Intervals/WithBotTop.lean

tactic: rw [← preimage_coe_Ico, image_preimage_eq_inter_range, range_coe,
  inter_eq_self_of_subset_left
    (Subset.trans Ico_subset_Ici_self <| Ici_subset_Ioi.2 <| bot_lt_coe a)]
state_before: α : Type u_1
inst✝ : PartialOrder α
a b : α
⊢ some '' Ico a b = Ico ↑a ↑b
Theorem: Matrix.trace_one
File: Mathlib/LinearAlgebra/Matrix/Trace.lean

tactic: simp_rw [trace, diag_one, Pi.one_def, Finset.sum_const, nsmul_one, Finset.card_univ]
state_before: ι : Type ?u.21632
m : Type ?u.21635
n : Type u_2
p : Type ?u.21641
α : Type ?u.21644
R : Type u_1
S : Type ?u.21650
inst✝⁴ : Fintype m
inst✝³ : Fintype n
inst✝² : Fintype p
inst✝¹ : DecidableEq n
inst✝ : AddCommMonoidWithOne R
⊢ trace 1 = ↑(Fintype.card n)
Theorem: Nat.Subtype.coe_comp_ofNat_range
File: Mathlib/Logic/Denumerable.lean

tactic: rw [Set.range_comp Subtype.val, ofNat_range, Set.image_univ, Subtype.range_coe]
state_before: α : Type ?u.71312
β : Type ?u.71315
s : Set ℕ
inst✝¹ : Infinite ↑s
inst✝ : DecidablePred fun x => x ∈ s
⊢ Set.range (Subtype.val ∘ ofNat s) = s
Theorem: Abelianization.commutator_subset_ker
File: Mathlib/GroupTheory/Abelianization.lean

tactic: rw [commutator_eq_closure, Subgroup.closure_le]
state_before: G : Type u
inst✝¹ : Group G
A : Type v
inst✝ : CommGroup A
f : G →* A
⊢ commutator G ≤ MonoidHom.ker f

tactic: rintro x ⟨p, q, rfl⟩
state_before: G : Type u
inst✝¹ : Group G
A : Type v
inst✝ : CommGroup A
f : G →* A
⊢ commutatorSet G ⊆ ↑(MonoidHom.ker f)

tactic: simp [MonoidHom.mem_ker, mul_right_comm (f p) (f q), commutatorElement_def]
state_before: case intro.intro
G : Type u
inst✝¹ : Group G
A : Type v
inst✝ : CommGroup A
f : G →* A
p q : G
⊢ ⁅p, q⁆ ∈ ↑(MonoidHom.ker f)
Theorem: Pmf.toMeasure_pure
File: Mathlib/Probability/ProbabilityMassFunction/Monad.lean

tactic: rw [toMeasure_pure_apply a s hs, Measure.dirac_apply' a hs]
state_before: α : Type u_1
β : Type ?u.7470
γ : Type ?u.7473
a a' : α
s✝ : Set α
inst✝ : MeasurableSpace α
s : Set α
hs : MeasurableSet s
⊢ ↑↑(toMeasure (pure a)) s = ↑↑(Measure.dirac a) s

tactic: rfl
state_before: α : Type u_1
β : Type ?u.7470
γ : Type ?u.7473
a a' : α
s✝ : Set α
inst✝ : MeasurableSpace α
s : Set α
hs : MeasurableSet s
⊢ (if a ∈ s then 1 else 0) = Set.indicator s 1 a
Theorem: CategoryTheory.Functor.preservesZeroMorphisms_of_map_exact
File: Mathlib/CategoryTheory/Abelian/Exact.lean

tactic: replace h := (h (exact_of_zero (𝟙 0) (𝟙 0))).w
state_before: C : Type u₁
inst✝⁵ : Category C
inst✝⁴ : Abelian C
A : Type u₁
B : Type u₂
inst✝³ : Category A
inst✝² : Category B
inst✝¹ : Abelian A
inst✝ : Abelian B
L : A ⥤ B
h : ∀ ⦃X Y Z : A⦄ {f : X ⟶ Y} {g : Y ⟶ Z}, Exact f g → Exact (L.map f) (L.map g)
⊢ PreservesZeroMorphisms L

tactic: rw [L.map_id, Category.comp_id] at h
state_before: C : Type u₁
inst✝⁵ : Category C
inst✝⁴ : Abelian C
A : Type u₁
B : Type u₂
inst✝³ : Category A
inst✝² : Category B
inst✝¹ : Abelian A
inst✝ : Abelian B
L : A ⥤ B
h : L.map (𝟙 0) ≫ L.map (𝟙 0) = 0
⊢ PreservesZeroMorphisms L

tactic: exact preservesZeroMorphisms_of_map_zero_object (idZeroEquivIsoZero _ h)
state_before: C : Type u₁
inst✝⁵ : Category C
inst✝⁴ : Abelian C
A : Type u₁
B : Type u₂
inst✝³ : Category A
inst✝² : Category B
inst✝¹ : Abelian A
inst✝ : Abelian B
L : A ⥤ B
h : 𝟙 (L.obj 0) = 0
⊢ PreservesZeroMorphisms L
Theorem: Filter.limsup_eq_iInf_iSup_of_nat
File: Mathlib/Order/LiminfLimsup.lean

tactic: simp only [sSup_image, iInf_const]
state_before: α : Type u_1
β : Type ?u.106921
γ : Type ?u.106924
ι : Type ?u.106927
inst✝ : CompleteLattice α
u : ℕ → α
⊢ (⨅ (i : ℕ) (_ : True), sSup (u '' Ici i)) = ⨅ (n : ℕ), ⨆ (i : ℕ) (_ : i ≥ n), u i

tactic: rfl
state_before: α : Type u_1
β : Type ?u.106921
γ : Type ?u.106924
ι : Type ?u.106927
inst✝ : CompleteLattice α
u : ℕ → α
⊢ (⨅ (i : ℕ), ⨆ (a : ℕ) (_ : a ∈ Ici i), u a) = ⨅ (n : ℕ), ⨆ (i : ℕ) (_ : i ≥ n), u i
Theorem: exists_eq_right_right'
File: Std/Logic.lean

tactic: (conv in _=_ => rw [eq_comm])
state_before: α : Sort u_1
p q : α → Prop
b : Prop
a' : α
⊢ (∃ a, p a ∧ b ∧ a' = a) ↔ p a' ∧ b

tactic: simp
state_before: α : Sort u_1
p q : α → Prop
b : Prop
a' : α
⊢ (∃ a, p a ∧ b ∧ a = a') ↔ p a' ∧ b

tactic: conv in _=_ => rw [eq_comm]
state_before: α : Sort u_1
p q : α → Prop
b : Prop
a' : α
⊢ (∃ a, p a ∧ b ∧ a' = a) ↔ p a' ∧ b
Theorem: closedBall_add_ball
File: Mathlib/Analysis/NormedSpace/Pointwise.lean

tactic: rw [add_comm, ball_add_closedBall hδ hε b, add_comm, add_comm δ]
state_before: 𝕜 : Type ?u.1204873
E : Type u_1
inst✝³ : NormedField 𝕜
inst✝² : SeminormedAddCommGroup E
inst✝¹ : NormedSpace 𝕜 E
inst✝ : NormedSpace ℝ E
x y z : E
δ ε : ℝ
hε : 0 ≤ ε
hδ : 0 < δ
a b : E
⊢ Metric.closedBall a ε + Metric.ball b δ = Metric.ball (a + b) (ε + δ)
Theorem: Int.squarefree_coe_nat
File: Mathlib/Algebra/Squarefree.lean

tactic: rw [← squarefree_natAbs, natAbs_ofNat]
state_before: R : Type ?u.125583
n : ℕ
⊢ Squarefree ↑n ↔ Squarefree n
Theorem: ModuleCat.exact_iff
File: Mathlib/Algebra/Category/ModuleCat/Abelian.lean

tactic: rw [abelian.exact_iff' f g (kernelIsLimit _) (cokernelIsColimit _)]
state_before: R : Type u
inst✝ : Ring R
M N : ModuleCat R
f : M ⟶ N
O : ModuleCat R
g : N ⟶ O
⊢ Exact f g ↔ range f = ker g

tactic: exact
  ⟨fun h => le_antisymm (range_le_ker_iff.2 h.1) (ker_le_range_iff.2 h.2), fun h =>
    ⟨range_le_ker_iff.1 <| le_of_eq h, ker_le_range_iff.1 <| le_of_eq h.symm⟩⟩
state_before: R : Type u
inst✝ : Ring R
M N : ModuleCat R
f : M ⟶ N
O : ModuleCat R
g : N ⟶ O
⊢ f ≫ g = 0 ∧ Fork.ι (kernelCone g) ≫ Cofork.π (cokernelCocone f) = 0 ↔ range f = ker g
Theorem: BddAbove.image2
File: Mathlib/Order/Bounds/Basic.lean

tactic: rintro ⟨a, ha⟩ ⟨b, hb⟩
state_before: α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β → γ
s : Set α
t : Set β
a : α
b : β
h₀ : ∀ (b : β), Monotone (swap f b)
h₁ : ∀ (a : α), Monotone (f a)
⊢ BddAbove s → BddAbove t → BddAbove (Set.image2 f s t)

tactic: exact ⟨f a b, mem_upperBounds_image2 h₀ h₁ ha hb⟩
state_before: case intro.intro
α : Type u
β : Type v
γ : Type w
ι : Sort x
inst✝² : Preorder α
inst✝¹ : Preorder β
inst✝ : Preorder γ
f : α → β → γ
s : Set α
t : Set β
a✝ : α
b✝ : β
h₀ : ∀ (b : β), Monotone (swap f b)
h₁ : ∀ (a : α), Monotone (f a)
a : α
ha : a ∈ upperBounds s
b : β
hb : b ∈ upperBounds t
⊢ BddAbove (Set.image2 f s t)
Theorem: himp_inf_self
File: Mathlib/Order/Heyting/Basic.lean

tactic: rw [inf_comm, inf_himp, inf_comm]
state_before: ι : Type ?u.28717
α : Type u_1
β : Type ?u.28723
inst✝ : GeneralizedHeytingAlgebra α
a✝ b✝ c d a b : α
⊢ (a ⇨ b) ⊓ a = b ⊓ a
Theorem: surjOn_Icc_of_monotone_surjective
File: Mathlib/Data/Set/Intervals/SurjOn.lean

tactic: intro p hp
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a ≤ b
⊢ SurjOn f (Icc a b) (Icc (f a) (f b))

tactic: rcases eq_endpoints_or_mem_Ioo_of_mem_Icc hp with (rfl | rfl | hp')
state_before: α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a ≤ b
p : β
hp : p ∈ Icc (f a) (f b)
⊢ p ∈ f '' Icc a b

tactic: exact ⟨a, left_mem_Icc.mpr hab, rfl⟩
state_before: case inl
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a ≤ b
hp : f a ∈ Icc (f a) (f b)
⊢ f a ∈ f '' Icc a b

tactic: exact ⟨b, right_mem_Icc.mpr hab, rfl⟩
state_before: case inr.inl
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a ≤ b
hp : f b ∈ Icc (f a) (f b)
⊢ f b ∈ f '' Icc a b

tactic: have := surjOn_Ioo_of_monotone_surjective h_mono h_surj a b hp'
state_before: case inr.inr
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a ≤ b
p : β
hp : p ∈ Icc (f a) (f b)
hp' : p ∈ Ioo (f a) (f b)
⊢ p ∈ f '' Icc a b

tactic: exact image_subset f Ioo_subset_Icc_self this
state_before: case inr.inr
α : Type u_1
β : Type u_2
inst✝¹ : LinearOrder α
inst✝ : PartialOrder β
f : α → β
h_mono : Monotone f
h_surj : Surjective f
a b : α
hab : a ≤ b
p : β
hp : p ∈ Icc (f a) (f b)
hp' : p ∈ Ioo (f a) (f b)
this : p ∈ f '' Ioo a b
⊢ p ∈ f '' Icc a b