tasksource/leandojo huggingface dataset:
Theorem: Commute.list_prod_right
File: Mathlib/Data/List/BigOperators/Basic.lean

tactic: induction' l with z l IH
state_before: ι : Type ?u.71204
α : Type ?u.71207
M : Type u_1
N : Type ?u.71213
P : Type ?u.71216
M₀ : Type ?u.71219
G : Type ?u.71222
R : Type ?u.71225
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l✝ l₁ l₂ : List M
a : M
l : List M
y : M
h : ∀ (x : M), x ∈ l → Commute y x
⊢ Commute y (prod l)

tactic: simp
state_before: case nil
ι : Type ?u.71204
α : Type ?u.71207
M : Type u_1
N : Type ?u.71213
P : Type ?u.71216
M₀ : Type ?u.71219
G : Type ?u.71222
R : Type ?u.71225
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l✝ l₁ l₂ : List M
a : M
l : List M
y : M
h✝ : ∀ (x : M), x ∈ l → Commute y x
h : ∀ (x : M), x ∈ [] → Commute y x
⊢ Commute y (prod [])

tactic: rw [List.forall_mem_cons] at h
state_before: case cons
ι : Type ?u.71204
α : Type ?u.71207
M : Type u_1
N : Type ?u.71213
P : Type ?u.71216
M₀ : Type ?u.71219
G : Type ?u.71222
R : Type ?u.71225
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l✝¹ l₁ l₂ : List M
a : M
l✝ : List M
y : M
h✝ : ∀ (x : M), x ∈ l✝ → Commute y x
z : M
l : List M
IH : (∀ (x : M), x ∈ l → Commute y x) → Commute y (prod l)
h : ∀ (x : M), x ∈ z :: l → Commute y x
⊢ Commute y (prod (z :: l))

tactic: rw [List.prod_cons]
state_before: case cons
ι : Type ?u.71204
α : Type ?u.71207
M : Type u_1
N : Type ?u.71213
P : Type ?u.71216
M₀ : Type ?u.71219
G : Type ?u.71222
R : Type ?u.71225
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l✝¹ l₁ l₂ : List M
a : M
l✝ : List M
y : M
h✝ : ∀ (x : M), x ∈ l✝ → Commute y x
z : M
l : List M
IH : (∀ (x : M), x ∈ l → Commute y x) → Commute y (prod l)
h : Commute y z ∧ ∀ (x : M), x ∈ l → Commute y x
⊢ Commute y (prod (z :: l))

tactic: exact Commute.mul_right h.1 (IH h.2)
state_before: case cons
ι : Type ?u.71204
α : Type ?u.71207
M : Type u_1
N : Type ?u.71213
P : Type ?u.71216
M₀ : Type ?u.71219
G : Type ?u.71222
R : Type ?u.71225
inst✝² : Monoid M
inst✝¹ : Monoid N
inst✝ : Monoid P
l✝¹ l₁ l₂ : List M
a : M
l✝ : List M
y : M
h✝ : ∀ (x : M), x ∈ l✝ → Commute y x
z : M
l : List M
IH : (∀ (x : M), x ∈ l → Commute y x) → Commute y (prod l)
h : Commute y z ∧ ∀ (x : M), x ∈ l → Commute y x
⊢ Commute y (z * prod l)
Theorem: List.nthLe_range'_1
File: Mathlib/Data/List/Range.lean

tactic: simp
state_before: α : Type u
n m i : ℕ
H : i < length (range' n m)
⊢ nthLe (range' n m) i H = n + i
Theorem: SubsemiringClass.coe_pow
File: Mathlib/RingTheory/Subsemiring/Basic.lean

tactic: induction' n with n ih
state_before: R✝ : Type u
S : Type v
T : Type w
inst✝⁴ : NonAssocSemiring R✝
M : Submonoid R✝
inst✝³ : SetLike S R✝
hSR : SubsemiringClass S R✝
s : S
R : Type u_1
inst✝² : Semiring R
inst✝¹ : SetLike S R
inst✝ : SubsemiringClass S R
x : { x // x ∈ s }
n : ℕ
⊢ ↑(x ^ n) = ↑x ^ n

tactic: simp
state_before: case zero
R✝ : Type u
S : Type v
T : Type w
inst✝⁴ : NonAssocSemiring R✝
M : Submonoid R✝
inst✝³ : SetLike S R✝
hSR : SubsemiringClass S R✝
s : S
R : Type u_1
inst✝² : Semiring R
inst✝¹ : SetLike S R
inst✝ : SubsemiringClass S R
x : { x // x ∈ s }
⊢ ↑(x ^ Nat.zero) = ↑x ^ Nat.zero

tactic: simp [pow_succ, ih]
state_before: case succ
R✝ : Type u
S : Type v
T : Type w
inst✝⁴ : NonAssocSemiring R✝
M : Submonoid R✝
inst✝³ : SetLike S R✝
hSR : SubsemiringClass S R✝
s : S
R : Type u_1
inst✝² : Semiring R
inst✝¹ : SetLike S R
inst✝ : SubsemiringClass S R
x : { x // x ∈ s }
n : ℕ
ih : ↑(x ^ n) = ↑x ^ n
⊢ ↑(x ^ Nat.succ n) = ↑x ^ Nat.succ n
Theorem: String.validFor_toSubstring
File: Std/Data/String/Lemmas.lean

tactic: simp [toSubstring]
state_before: s : String
⊢ (toSubstring s).str.data = [] ++ s.data ++ []

tactic: simp [toSubstring, endPos, utf8ByteSize]
state_before: s : String
⊢ (toSubstring s).stopPos.byteIdx = utf8Len [] + utf8Len s.data
Theorem: UniformOnFun.topologicalSpace_eq
File: Mathlib/Topology/UniformSpace/UniformConvergenceTopology.lean

tactic: simp only [UniformOnFun.topologicalSpace, toTopologicalSpace_iInf, toTopologicalSpace_iInf,
  toTopologicalSpace_comap]
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.57789
ι : Type ?u.57792
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
⊢ topologicalSpace α β 𝔖 =
    ⨅ (s : Set α) (_ : s ∈ 𝔖),
      TopologicalSpace.induced (restrict s ∘ ↑UniformFun.toFun) (UniformFun.topologicalSpace (↑s) β)

tactic: rfl
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.57789
ι : Type ?u.57792
s s' : Set α
x : α
p : Filter ι
g : ι → α
inst✝ : UniformSpace β
𝔖 : Set (Set α)
⊢ (⨅ (i : Set α) (_ : i ∈ 𝔖), TopologicalSpace.induced (restrict i) UniformSpace.toTopologicalSpace) =
    ⨅ (s : Set α) (_ : s ∈ 𝔖),
      TopologicalSpace.induced (restrict s ∘ ↑UniformFun.toFun) (UniformFun.topologicalSpace (↑s) β)
Theorem: MulHom.comp_coprod
File: Mathlib/Algebra/Group/Prod.lean

tactic: simp
state_before: A : Type ?u.44652
B : Type ?u.44655
G : Type ?u.44658
H : Type ?u.44661
M : Type u_3
N : Type u_4
P : Type u_2
inst✝³ : Mul M
inst✝² : Mul N
inst✝¹ : CommSemigroup P
f✝ : M →ₙ* P
g✝ : N →ₙ* P
Q : Type u_1
inst✝ : CommSemigroup Q
h : P →ₙ* Q
f : M →ₙ* P
g : N →ₙ* P
x : M × N
⊢ ↑(comp h (coprod f g)) x = ↑(coprod (comp h f) (comp h g)) x
Theorem: FreeGroup.map.unique
File: Mathlib/GroupTheory/FreeGroup.lean

tactic: rintro ⟨L⟩
state_before: α : Type u
L L₁ L₂ L₃ L₄ : List (α × Bool)
β : Type v
f : α → β
x y : FreeGroup α
g : FreeGroup α →* FreeGroup β
hg : ∀ (x : α), ↑g (FreeGroup.of x) = FreeGroup.of (f x)
⊢ ∀ {x : FreeGroup α}, ↑g x = ↑(map f) x

tactic: exact List.recOn L g.map_one fun ⟨x, b⟩ t (ih : g (FreeGroup.mk t) = map f (FreeGroup.mk t)) =>
  Bool.recOn b
    (show g ((FreeGroup.of x)⁻¹ * FreeGroup.mk t) =
        FreeGroup.map f ((FreeGroup.of x)⁻¹ * FreeGroup.mk t) by
      simp [g.map_mul, g.map_inv, hg, ih])
    (show g (FreeGroup.of x * FreeGroup.mk t) =
        FreeGroup.map f (FreeGroup.of x * FreeGroup.mk t) by simp [g.map_mul, hg, ih])
state_before: case mk
α : Type u
L✝ L₁ L₂ L₃ L₄ : List (α × Bool)
β : Type v
f : α → β
x y : FreeGroup α
g : FreeGroup α →* FreeGroup β
hg : ∀ (x : α), ↑g (FreeGroup.of x) = FreeGroup.of (f x)
x✝ : FreeGroup α
L : List (α × Bool)
⊢ ↑g (Quot.mk Red.Step L) = ↑(map f) (Quot.mk Red.Step L)

tactic: simp [g.map_mul, g.map_inv, hg, ih]
state_before: α : Type u
L✝ L₁ L₂ L₃ L₄ : List (α × Bool)
β : Type v
f : α → β
x✝² y : FreeGroup α
g : FreeGroup α →* FreeGroup β
hg : ∀ (x : α), ↑g (FreeGroup.of x) = FreeGroup.of (f x)
x✝¹ : FreeGroup α
L : List (α × Bool)
x✝ : α × Bool
t : List (α × Bool)
ih : ↑g (FreeGroup.mk t) = ↑(map f) (FreeGroup.mk t)
x : α
b : Bool
⊢ ↑g ((FreeGroup.of x)⁻¹ * FreeGroup.mk t) = ↑(map f) ((FreeGroup.of x)⁻¹ * FreeGroup.mk t)

tactic: simp [g.map_mul, hg, ih]
state_before: α : Type u
L✝ L₁ L₂ L₃ L₄ : List (α × Bool)
β : Type v
f : α → β
x✝² y : FreeGroup α
g : FreeGroup α →* FreeGroup β
hg : ∀ (x : α), ↑g (FreeGroup.of x) = FreeGroup.of (f x)
x✝¹ : FreeGroup α
L : List (α × Bool)
x✝ : α × Bool
t : List (α × Bool)
ih : ↑g (FreeGroup.mk t) = ↑(map f) (FreeGroup.mk t)
x : α
b : Bool
⊢ ↑g (FreeGroup.of x * FreeGroup.mk t) = ↑(map f) (FreeGroup.of x * FreeGroup.mk t)
Theorem: Fin.last_pos
File: Mathlib/Data/Fin/Basic.lean

tactic: simp [lt_iff_val_lt_val]
state_before: n m : ℕ
⊢ 0 < last (n + 1)
Theorem: Fin.insertNth_zero_right
File: Mathlib/Data/Fin/Tuple/Basic.lean

tactic: simp [succAbove_ne, Pi.zero_def]
state_before: m n : ℕ
α : Fin (n + 1) → Type u
β : Type v
inst✝ : (j : Fin (n + 1)) → Zero (α j)
i : Fin (n + 1)
x : α i
⊢ Pi.single i x i = x ∧ 0 = fun j => Pi.single i x (↑(succAbove i) j)
Theorem: Fin.castPred_last
File: Mathlib/Data/Fin/Basic.lean

tactic: simp [castPred, predAbove, castSucc_lt_last]
state_before: n m : ℕ
⊢ ↑(castPred (last (n + 1))) = ↑(last n)
Theorem: CategoryTheory.Quotient.sound
File: Mathlib/CategoryTheory/Quotient.lean

tactic: simpa using Quot.sound (CompClosure.intro (𝟙 a) f₁ f₂ (𝟙 b) h)
state_before: C : Type u_2
inst✝ : Category C
r : HomRel C
a b : C
f₁ f₂ : a ⟶ b
h : r f₁ f₂
⊢ (functor r).map f₁ = (functor r).map f₂
Theorem: Matrix.compl_apply
File: Mathlib/Combinatorics/SimpleGraph/AdjMatrix.lean

tactic: unfold compl
state_before: V : Type u_2
α : Type u_1
β : Type ?u.12780
inst✝³ : DecidableEq α
inst✝² : DecidableEq V
A : Matrix V V α
inst✝¹ : Zero α
inst✝ : One α
i j : V
⊢ compl A i j = 0 ∨ compl A i j = 1

tactic: split_ifs <;> simp
state_before: V : Type u_2
α : Type u_1
β : Type ?u.12780
inst✝³ : DecidableEq α
inst✝² : DecidableEq V
A : Matrix V V α
inst✝¹ : Zero α
inst✝ : One α
i j : V
⊢ (if i = j then 0 else if A i j = 0 then 1 else 0) = 0 ∨ (if i = j then 0 else if A i j = 0 then 1 else 0) = 1
Theorem: interior_closedBall'
File: Mathlib/Analysis/NormedSpace/Basic.lean

tactic: rcases eq_or_ne r 0 with (rfl | hr)
state_before: α : Type ?u.306784
β : Type ?u.306787
γ : Type ?u.306790
ι : Type ?u.306793
inst✝⁶ : NormedField α
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace α E
F : Type ?u.306886
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace α F
inst✝¹ : NormedSpace ℝ E
inst✝ : Nontrivial E
x : E
r : ℝ
⊢ interior (closedBall x r) = ball x r

tactic: rw [closedBall_zero, ball_zero, interior_singleton]
state_before: case inl
α : Type ?u.306784
β : Type ?u.306787
γ : Type ?u.306790
ι : Type ?u.306793
inst✝⁶ : NormedField α
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace α E
F : Type ?u.306886
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace α F
inst✝¹ : NormedSpace ℝ E
inst✝ : Nontrivial E
x : E
⊢ interior (closedBall x 0) = ball x 0

tactic: exact interior_closedBall x hr
state_before: case inr
α : Type ?u.306784
β : Type ?u.306787
γ : Type ?u.306790
ι : Type ?u.306793
inst✝⁶ : NormedField α
E : Type u_1
inst✝⁵ : NormedAddCommGroup E
inst✝⁴ : NormedSpace α E
F : Type ?u.306886
inst✝³ : NormedAddCommGroup F
inst✝² : NormedSpace α F
inst✝¹ : NormedSpace ℝ E
inst✝ : Nontrivial E
x : E
r : ℝ
hr : r ≠ 0
⊢ interior (closedBall x r) = ball x r
Theorem: Ideal.span_singleton_mul_left_mono
File: Mathlib/RingTheory/Ideal/Operations.lean

tactic: simpa only [mul_comm I, mul_comm J] using span_singleton_mul_right_mono hx
state_before: R : Type u
ι : Type ?u.238401
inst✝¹ : CommSemiring R
I J K L : Ideal R
inst✝ : IsDomain R
x : R
hx : x ≠ 0
⊢ I * span {x} ≤ J * span {x} ↔ I ≤ J
Theorem: Finset.insert_val_of_not_mem
File: Mathlib/Data/Finset/Basic.lean

tactic: rw [insert_val, ndinsert_of_not_mem h]
state_before: α : Type u_1
β : Type ?u.103482
γ : Type ?u.103485
inst✝ : DecidableEq α
s✝ t u v : Finset α
a✝ b a : α
s : Finset α
h : ¬a ∈ s
⊢ (insert a s).val = a ::ₘ s.val
Theorem: TopCat.pullbackIsoProdSubtype_inv_fst
File: Mathlib/Topology/Category/TopCat/Limits/Pullbacks.lean

tactic: simp [pullbackCone, pullbackIsoProdSubtype]
state_before: J : Type v
inst✝ : SmallCategory J
X Y Z : TopCat
f : X ⟶ Z
g : Y ⟶ Z
⊢ (pullbackIsoProdSubtype f g).inv ≫ pullback.fst = pullbackFst f g
Theorem: Mon_.Mon_tensor_one_mul
File: Mathlib/CategoryTheory/Monoidal/Mon_.lean

tactic: rw [← Category.id_comp (𝟙 (M.X ⊗ N.X)), tensor_comp]
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ ((λ_ (𝟙_ C)).inv ≫ (M.one ⊗ N.one) ⊗ 𝟙 (M.X ⊗ N.X)) ≫ tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
    (λ_ (M.X ⊗ N.X)).hom

tactic: slice_lhs 2 3 => rw [← tensor_id, tensor_μ_natural]
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (((λ_ (𝟙_ C)).inv ⊗ 𝟙 (M.X ⊗ N.X)) ≫ ((M.one ⊗ N.one) ⊗ 𝟙 (M.X ⊗ N.X))) ≫
      tensor_μ C (M.X, N.X) (M.X, N.X) ≫ (M.mul ⊗ N.mul) =
    (λ_ (M.X ⊗ N.X)).hom

tactic: slice_lhs 3 4 => rw [← tensor_comp, one_mul M, one_mul N]
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (M.X ⊗ N.X)) ≫
      (tensor_μ C (tensorUnit', 𝟙_ C) (M.X, N.X) ≫ ((M.one ⊗ 𝟙 M.X) ⊗ N.one ⊗ 𝟙 N.X)) ≫ (M.mul ⊗ N.mul) =
    (λ_ (M.X ⊗ N.X)).hom

tactic: symm
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (M.X ⊗ N.X)) ≫ tensor_μ C (tensorUnit', 𝟙_ C) (M.X, N.X) ≫ ((λ_ M.X).hom ⊗ (λ_ N.X).hom) =
    (λ_ (M.X ⊗ N.X)).hom

tactic: exact tensor_left_unitality C M.X N.X
state_before: C : Type u₁
inst✝² : Category C
inst✝¹ : MonoidalCategory C
inst✝ : BraidedCategory C
M N : Mon_ C
⊢ (λ_ (M.X ⊗ N.X)).hom =
    ((λ_ (𝟙_ C)).inv ⊗ 𝟙 (M.X ⊗ N.X)) ≫ tensor_μ C (tensorUnit', 𝟙_ C) (M.X, N.X) ≫ ((λ_ M.X).hom ⊗ (λ_ N.X).hom)
Theorem: MeasurePreservingQuotientGroup.mk'
File: Mathlib/MeasureTheory/Measure/Haar/Quotient.lean

tactic: rw [h𝓕.map_restrict_quotient K h𝓕_finite, h]
state_before: G : Type u_1
inst✝¹² : Group G
inst✝¹¹ : MeasurableSpace G
inst✝¹⁰ : TopologicalSpace G
inst✝⁹ : TopologicalGroup G
inst✝⁸ : BorelSpace G
μ : MeasureTheory.Measure G
Γ : Subgroup G
𝓕 : Set G
h𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕
inst✝⁷ : Countable { x // x ∈ Γ }
inst✝⁶ : MeasurableSpace (G ⧸ Γ)
inst✝⁵ : BorelSpace (G ⧸ Γ)
inst✝⁴ : T2Space (G ⧸ Γ)
inst✝³ : SecondCountableTopology (G ⧸ Γ)
K : PositiveCompacts (G ⧸ Γ)
inst✝² : Subgroup.Normal Γ
inst✝¹ : IsHaarMeasure μ
inst✝ : IsMulRightInvariant μ
h𝓕_finite : ↑↑μ 𝓕 < ⊤
c : ℝ≥0
h : ↑↑μ (𝓕 ∩ ↑(QuotientGroup.mk' Γ) ⁻¹' ↑K) = ↑c
⊢ map (↑(QuotientGroup.mk' Γ)) (Measure.restrict μ 𝓕) = c • haarMeasure K

tactic: rfl
state_before: G : Type u_1
inst✝¹² : Group G
inst✝¹¹ : MeasurableSpace G
inst✝¹⁰ : TopologicalSpace G
inst✝⁹ : TopologicalGroup G
inst✝⁸ : BorelSpace G
μ : MeasureTheory.Measure G
Γ : Subgroup G
𝓕 : Set G
h𝓕 : IsFundamentalDomain { x // x ∈ ↑Subgroup.opposite Γ } 𝓕
inst✝⁷ : Countable { x // x ∈ Γ }
inst✝⁶ : MeasurableSpace (G ⧸ Γ)
inst✝⁵ : BorelSpace (G ⧸ Γ)
inst✝⁴ : T2Space (G ⧸ Γ)
inst✝³ : SecondCountableTopology (G ⧸ Γ)
K : PositiveCompacts (G ⧸ Γ)
inst✝² : Subgroup.Normal Γ
inst✝¹ : IsHaarMeasure μ
inst✝ : IsMulRightInvariant μ
h𝓕_finite : ↑↑μ 𝓕 < ⊤
c : ℝ≥0
h : ↑↑μ (𝓕 ∩ ↑(QuotientGroup.mk' Γ) ⁻¹' ↑K) = ↑c
⊢ ↑c • haarMeasure K = c • haarMeasure K
Theorem: MvPolynomial.C_surjective
File: Mathlib/Data/MvPolynomial/Basic.lean

tactic: refine' fun p => ⟨p.toFun 0, Finsupp.ext fun a => _⟩
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ✝ : Type ?u.315261
a a' a₁ a₂ : R✝
e : ℕ
n m : σ✝
s : σ✝ →₀ ℕ
inst✝³ : CommSemiring R✝
inst✝² : CommSemiring S₁
p q : MvPolynomial σ✝ R✝
R : Type u_1
inst✝¹ : CommSemiring R
σ : Type u_2
inst✝ : IsEmpty σ
⊢ Surjective ↑C

tactic: simp only [C_apply, ←single_eq_monomial, (Finsupp.ext isEmptyElim (α := σ) : a = 0),
  single_eq_same]
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ✝ : Type ?u.315261
a✝ a' a₁ a₂ : R✝
e : ℕ
n m : σ✝
s : σ✝ →₀ ℕ
inst✝³ : CommSemiring R✝
inst✝² : CommSemiring S₁
p✝ q : MvPolynomial σ✝ R✝
R : Type u_1
inst✝¹ : CommSemiring R
σ : Type u_2
inst✝ : IsEmpty σ
p : MvPolynomial σ R
a : σ →₀ ℕ
⊢ ↑(↑C (toFun p 0)) a = ↑p a

tactic: rfl
state_before: R✝ : Type u
S₁ : Type v
S₂ : Type w
S₃ : Type x
σ✝ : Type ?u.315261
a✝ a' a₁ a₂ : R✝
e : ℕ
n m : σ✝
s : σ✝ →₀ ℕ
inst✝³ : CommSemiring R✝
inst✝² : CommSemiring S₁
p✝ q : MvPolynomial σ✝ R✝
R : Type u_1
inst✝¹ : CommSemiring R
σ : Type u_2
inst✝ : IsEmpty σ
p : MvPolynomial σ R
a : σ →₀ ℕ
⊢ toFun p 0 = ↑p 0
Theorem: Polynomial.prime_C_iff
File: Mathlib/RingTheory/Polynomial/Basic.lean

tactic: intro hr
state_before: R : Type u
S : Type ?u.257711
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
⊢ Prime r → Prime (↑C r)

tactic: have := hr.1
state_before: R : Type u
S : Type ?u.257711
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
hr : Prime r
⊢ Prime (↑C r)

tactic: rw [← Ideal.span_singleton_prime] at hr⊢
state_before: R : Type u
S : Type ?u.257711
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
hr : Prime r
this : r ≠ 0
⊢ Prime (↑C r)

tactic: rw [← Set.image_singleton, ← Ideal.map_span]
state_before: R : Type u
S : Type ?u.257711
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
hr : Ideal.IsPrime (Ideal.span {r})
this : r ≠ 0
⊢ Ideal.IsPrime (Ideal.span {↑C r})

tactic: apply Ideal.isPrime_map_C_of_isPrime hr
state_before: R : Type u
S : Type ?u.257711
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
hr : Ideal.IsPrime (Ideal.span {r})
this : r ≠ 0
⊢ Ideal.IsPrime (Ideal.map C (Ideal.span {r}))

tactic: intro h
state_before: R : Type u
S : Type ?u.257711
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
hr : Ideal.IsPrime (Ideal.span {r})
this : r ≠ 0
⊢ ↑C r ≠ 0

tactic: apply (this (C_eq_zero.mp h))
state_before: R : Type u
S : Type ?u.257711
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
hr : Ideal.IsPrime (Ideal.span {r})
this : r ≠ 0
h : ↑C r = 0
⊢ False

tactic: assumption
state_before: R : Type u
S : Type ?u.257711
σ : Type v
M : Type w
inst✝³ : CommRing R
inst✝² : CommRing S
inst✝¹ : AddCommGroup M
inst✝ : Module R M
r : R
hr : Prime r
this : r ≠ 0
⊢ r ≠ 0
Theorem: add_idem
File: Mathlib/Algebra/Order/Kleene.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.17357
ι : Type ?u.17360
π : ι → Type ?u.17365
inst✝ : IdemSemiring α
a✝ b c a : α
⊢ a + a = a
Theorem: Complex.log_inv_eq_ite
File: Mathlib/Analysis/SpecialFunctions/Complex/Log.lean

tactic: by_cases hx : x = 0
state_before: x : ℂ
⊢ log x⁻¹ = if arg x = π then -↑(starRingEnd ℂ) (log x) else -log x

tactic: rw [inv_def, log_mul_ofReal, Real.log_inv, ofReal_neg, ← sub_eq_neg_add, log_conj_eq_ite]
state_before: case neg
x : ℂ
hx : ¬x = 0
⊢ log x⁻¹ = if arg x = π then -↑(starRingEnd ℂ) (log x) else -log x

tactic: simp [hx]
state_before: case pos
x : ℂ
hx : x = 0
⊢ log x⁻¹ = if arg x = π then -↑(starRingEnd ℂ) (log x) else -log x

tactic: simp_rw [log, map_add, map_mul, conj_ofReal, conj_I, normSq_eq_abs, Real.log_pow,
  Nat.cast_two, ofReal_mul, ofReal_bit0, ofReal_one, neg_add, mul_neg, two_mul, neg_neg]
state_before: case neg
x : ℂ
hx : ¬x = 0
⊢ (if arg x = π then log x else ↑(starRingEnd ℂ) (log x)) - ↑(Real.log (↑normSq x)) =
    if arg x = π then -↑(starRingEnd ℂ) (log x) else -log x

tactic: norm_num
state_before: case neg
x : ℂ
hx : ¬x = 0
⊢ (if arg x = π then ↑(Real.log (↑abs x)) + ↑(arg x) * I else ↑(Real.log (↑abs x)) + -(↑(arg x) * I)) -
      ↑2 * ↑(Real.log (↑abs x)) =
    if arg x = π then -↑(Real.log (↑abs x)) + ↑(arg x) * I else -↑(Real.log (↑abs x)) + -(↑(arg x) * I)

tactic: rw [two_mul]
state_before: case neg
x : ℂ
hx : ¬x = 0
⊢ (if arg x = π then ↑(Real.log (↑abs x)) + ↑(arg x) * I else ↑(Real.log (↑abs x)) + -(↑(arg x) * I)) -
      2 * ↑(Real.log (↑abs x)) =
    if arg x = π then -↑(Real.log (↑abs x)) + ↑(arg x) * I else -↑(Real.log (↑abs x)) + -(↑(arg x) * I)

tactic: split_ifs
state_before: case neg
x : ℂ
hx : ¬x = 0
⊢ (if arg x = π then ↑(Real.log (↑abs x)) + ↑(arg x) * I else ↑(Real.log (↑abs x)) + -(↑(arg x) * I)) -
      (↑(Real.log (↑abs x)) + ↑(Real.log (↑abs x))) =
    if arg x = π then -↑(Real.log (↑abs x)) + ↑(arg x) * I else -↑(Real.log (↑abs x)) + -(↑(arg x) * I)

tactic: rw [add_sub_right_comm, sub_add_cancel']
state_before: case neg.inl
x : ℂ
hx : ¬x = 0
h✝ : arg x = π
⊢ ↑(Real.log (↑abs x)) + ↑(arg x) * I - (↑(Real.log (↑abs x)) + ↑(Real.log (↑abs x))) =
    -↑(Real.log (↑abs x)) + ↑(arg x) * I

tactic: rw [add_sub_right_comm, sub_add_cancel']
state_before: case neg.inr
x : ℂ
hx : ¬x = 0
h✝ : ¬arg x = π
⊢ ↑(Real.log (↑abs x)) + -(↑(arg x) * I) - (↑(Real.log (↑abs x)) + ↑(Real.log (↑abs x))) =
    -↑(Real.log (↑abs x)) + -(↑(arg x) * I)

tactic: rwa [inv_pos, Complex.normSq_pos]
state_before: case neg.hr
x : ℂ
hx : ¬x = 0
⊢ 0 < (↑normSq x)⁻¹

tactic: rwa [map_ne_zero]
state_before: case neg.hx
x : ℂ
hx : ¬x = 0
⊢ ↑(starRingEnd ℂ) x ≠ 0
Theorem: Equiv.Perm.nontrivial_toCycle
File: Mathlib/GroupTheory/Perm/Cycle/Concrete.lean

tactic: obtain ⟨x, hx, -⟩ := id hf
state_before: α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p : Perm α
x : α
f : Perm α
hf : IsCycle f
⊢ Cycle.Nontrivial (toCycle f hf)

tactic: simp [toCycle_eq_toList f hf x hx, hx, Cycle.nontrivial_coe_nodup_iff (nodup_toList _ _)]
state_before: case intro.intro
α : Type u_1
inst✝¹ : Fintype α
inst✝ : DecidableEq α
p : Perm α
x✝ : α
f : Perm α
hf : IsCycle f
x : α
hx : ↑f x ≠ x
⊢ Cycle.Nontrivial (toCycle f hf)
Theorem: Std.BinomialHeapImp.HeapNode.realSize_toHeap
File: Std/Data/BinomialHeap.lean

tactic: simp [toHeap.go, go, Nat.add_assoc, Nat.add_left_comm]
state_before: α : Type u_1
s✝ : HeapNode α
n : Nat
res : Heap α
a : α
c s : HeapNode α
⊢ Heap.realSize (toHeap.go (node a c s) n res) = realSize (node a c s) + Heap.realSize res
Theorem: EMetric.mem_closedBall'
File: Mathlib/Topology/MetricSpace/EMetricSpace.lean

tactic: rw [edist_comm, mem_closedBall]
state_before: α : Type u
β : Type v
X : Type ?u.187348
inst✝ : PseudoEMetricSpace α
x y z : α
ε ε₁ ε₂ : ℝ≥0∞
s t : Set α
⊢ y ∈ closedBall x ε ↔ edist x y ≤ ε
Theorem: CategoryTheory.Bifunctor.diagonal'
File: Mathlib/CategoryTheory/Products/Bifunctor.lean

tactic: rw [← Functor.map_comp, prod_comp, Category.id_comp, Category.comp_id]
state_before: C : Type u₁
D : Type u₂
E : Type u₃
inst✝² : Category C
inst✝¹ : Category D
inst✝ : Category E
F : C × D ⥤ E
X X' : C
f : X ⟶ X'
Y Y' : D
g : Y ⟶ Y'
⊢ F.map (f, 𝟙 Y) ≫ F.map (𝟙 X', g) = F.map (f, g)
Theorem: ContinuousLinearMap.IsPositive.conj_orthogonalProjection
File: Mathlib/Analysis/InnerProductSpace/Positive.lean

tactic: have := hT.conj_adjoint (U.subtypeL ∘L orthogonalProjection U)
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.262558
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : InnerProductSpace 𝕜 F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
U : Submodule 𝕜 E
T : E →L[𝕜] E
hT : IsPositive T
inst✝ : CompleteSpace { x // x ∈ U }
⊢ IsPositive
    (comp (Submodule.subtypeL U)
      (comp (orthogonalProjection U) (comp T (comp (Submodule.subtypeL U) (orthogonalProjection U)))))

tactic: rwa [(orthogonalProjection_isSelfAdjoint U).adjoint_eq] at this
state_before: 𝕜 : Type u_1
E : Type u_2
F : Type ?u.262558
inst✝⁷ : IsROrC 𝕜
inst✝⁶ : NormedAddCommGroup E
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : InnerProductSpace 𝕜 E
inst✝³ : InnerProductSpace 𝕜 F
inst✝² : CompleteSpace E
inst✝¹ : CompleteSpace F
U : Submodule 𝕜 E
T : E →L[𝕜] E
hT : IsPositive T
inst✝ : CompleteSpace { x // x ∈ U }
this :
  IsPositive
    (comp (comp (Submodule.subtypeL U) (orthogonalProjection U))
      (comp T (↑adjoint (comp (Submodule.subtypeL U) (orthogonalProjection U)))))
⊢ IsPositive
    (comp (Submodule.subtypeL U)
      (comp (orthogonalProjection U) (comp T (comp (Submodule.subtypeL U) (orthogonalProjection U)))))
Theorem: List.reverse_infix
File: Std/Data/List/Lemmas.lean

tactic: refine ⟨fun ⟨s, t, e⟩ => ⟨reverse t, reverse s, ?_⟩, fun ⟨s, t, e⟩ => ⟨reverse t, reverse s, ?_⟩⟩
state_before: α✝ : Type u_1
l₁ l₂ : List α✝
⊢ reverse l₁ <:+: reverse l₂ ↔ l₁ <:+: l₂

tactic: rw [← reverse_reverse l₁, append_assoc, ← reverse_append, ← reverse_append, e,
  reverse_reverse]
state_before: case refine_1
α✝ : Type u_1
l₁ l₂ : List α✝
x✝ : reverse l₁ <:+: reverse l₂
s t : List α✝
e : s ++ reverse l₁ ++ t = reverse l₂
⊢ reverse t ++ l₁ ++ reverse s = l₂

tactic: rw [append_assoc, ← reverse_append, ← reverse_append, e]
state_before: case refine_2
α✝ : Type u_1
l₁ l₂ : List α✝
x✝ : l₁ <:+: l₂
s t : List α✝
e : s ++ l₁ ++ t = l₂
⊢ reverse t ++ reverse l₁ ++ reverse s = reverse l₂
Theorem: Filter.pmap_res
File: Mathlib/Order/Filter/Partial.lean

tactic: ext t
state_before: α : Type u
β : Type v
γ : Type w
l : Filter α
s : Set α
f : α → β
⊢ pmap (PFun.res f s) l = map f (l ⊓ 𝓟 s)

tactic: simp only [PFun.core_res, mem_pmap, mem_map, mem_inf_principal, imp_iff_not_or]
state_before: case a
α : Type u
β : Type v
γ : Type w
l : Filter α
s : Set α
f : α → β
t : Set β
⊢ t ∈ pmap (PFun.res f s) l ↔ t ∈ map f (l ⊓ 𝓟 s)

tactic: rfl
state_before: case a
α : Type u
β : Type v
γ : Type w
l : Filter α
s : Set α
f : α → β
t : Set β
⊢ sᶜ ∪ f ⁻¹' t ∈ l ↔ {x | ¬x ∈ s ∨ x ∈ f ⁻¹' t} ∈ l
Theorem: Real.cos_sub
File: Mathlib/Data/Complex/Exponential.lean

tactic: simp [sub_eq_add_neg, cos_add, sin_neg, cos_neg]
state_before: x y : ℝ
⊢ cos (x - y) = cos x * cos y + sin x * sin y