tasksource/leandojo huggingface dataset:
Theorem: List.get_last
File: src/lean/Init/Data/List/BasicAux.lean

tactic: cases i
state_before: α : Type u_1
a : α
as : List α
i : Fin (length (as ++ [a]))
h : ¬i.val < length as
⊢ get (as ++ [a]) i = a

tactic: rename_i i h'
state_before: case mk
α : Type u_1
a : α
as : List α
val✝ : Nat
isLt✝ : val✝ < length (as ++ [a])
h : ¬{ val := val✝, isLt := isLt✝ }.val < length as
⊢ get (as ++ [a]) { val := val✝, isLt := isLt✝ } = a

tactic: induction as generalizing i with
| nil => cases i with
  | zero => simp [List.get]
  | succ => simp_arith at h'
| cons a as ih =>
  cases i with simp_arith at h
  | succ i => apply ih; simp_arith [h]
state_before: case mk
α : Type u_1
a : α
as : List α
i : Nat
h' : i < length (as ++ [a])
h : ¬{ val := i, isLt := h' }.val < length as
⊢ get (as ++ [a]) { val := i, isLt := h' } = a

tactic: cases i with
| zero => simp [List.get]
| succ => simp_arith at h'
state_before: case mk.nil
α : Type u_1
a : α
i : Nat
h' : i < length ([] ++ [a])
h : ¬{ val := i, isLt := h' }.val < length []
⊢ get ([] ++ [a]) { val := i, isLt := h' } = a

tactic: simp [List.get]
state_before: case mk.nil.zero
α : Type u_1
a : α
h' : Nat.zero < length ([] ++ [a])
h : ¬{ val := Nat.zero, isLt := h' }.val < length []
⊢ get ([] ++ [a]) { val := Nat.zero, isLt := h' } = a

tactic: simp_arith at h'
state_before: case mk.nil.succ
α : Type u_1
a : α
n✝ : Nat
h' : Nat.succ n✝ < length ([] ++ [a])
h : ¬{ val := Nat.succ n✝, isLt := h' }.val < length []
⊢ get ([] ++ [a]) { val := Nat.succ n✝, isLt := h' } = a

tactic: cases i with simp_arith at h
| succ i => apply ih; simp_arith [h]
state_before: case mk.cons
α : Type u_1
a✝ a : α
as : List α
ih :
  ∀ (i : Nat) (h' : i < length (as ++ [a✝])),
    ¬{ val := i, isLt := h' }.val < length as → get (as ++ [a✝]) { val := i, isLt := h' } = a✝
i : Nat
h' : i < length (a :: as ++ [a✝])
h : ¬{ val := i, isLt := h' }.val < length (a :: as)
⊢ get (a :: as ++ [a✝]) { val := i, isLt := h' } = a✝

tactic: apply ih
state_before: case mk.cons.succ
α : Type u_1
a✝ a : α
as : List α
ih :
  ∀ (i : Nat) (h' : i < length (as ++ [a✝])),
    ¬{ val := i, isLt := h' }.val < length as → get (as ++ [a✝]) { val := i, isLt := h' } = a✝
i : Nat
h' : Nat.succ i < length (a :: as ++ [a✝])
h : length as ≤ i
⊢ get (a :: as ++ [a✝]) { val := Nat.succ i, isLt := h' } = a✝

tactic: simp_arith [h]
state_before: case mk.cons.succ.h
α : Type u_1
a✝ a : α
as : List α
ih :
  ∀ (i : Nat) (h' : i < length (as ++ [a✝])),
    ¬{ val := i, isLt := h' }.val < length as → get (as ++ [a✝]) { val := i, isLt := h' } = a✝
i : Nat
h' : Nat.succ i < length (a :: as ++ [a✝])
h : length as ≤ i
⊢ ¬{ val := i, isLt := (_ : Nat.succ i ≤ length (List.append as [a✝])) }.val < length as
Theorem: IsClosedMap.comp
File: Mathlib/Topology/Maps.lean

tactic: intro s hs
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.198255
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
g : β → γ
f : α → β
hg : IsClosedMap g
hf : IsClosedMap f
⊢ IsClosedMap (g ∘ f)

tactic: rw [image_comp]
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.198255
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
g : β → γ
f : α → β
hg : IsClosedMap g
hf : IsClosedMap f
s : Set α
hs : IsClosed s
⊢ IsClosed (g ∘ f '' s)

tactic: exact hg _ (hf _ hs)
state_before: α : Type u_3
β : Type u_1
γ : Type u_2
δ : Type ?u.198255
inst✝² : TopologicalSpace α
inst✝¹ : TopologicalSpace β
inst✝ : TopologicalSpace γ
g : β → γ
f : α → β
hg : IsClosedMap g
hf : IsClosedMap f
s : Set α
hs : IsClosed s
⊢ IsClosed (g '' (f '' s))
Theorem: Submodule.span_singleton_le_iff_mem
File: Mathlib/LinearAlgebra/Span.lean

tactic: rw [span_le, singleton_subset_iff, SetLike.mem_coe]
state_before: R : Type u_1
R₂ : Type ?u.222780
K : Type ?u.222783
M : Type u_2
M₂ : Type ?u.222789
V : Type ?u.222792
S : Type ?u.222795
inst✝⁵ : Semiring R
inst✝⁴ : AddCommMonoid M
inst✝³ : Module R M
x : M
p✝ p' : Submodule R M
inst✝² : Semiring R₂
σ₁₂ : R →+* R₂
inst✝¹ : AddCommMonoid M₂
inst✝ : Module R₂ M₂
s t : Set M
m : M
p : Submodule R M
⊢ span R {m} ≤ p ↔ m ∈ p
Theorem: Lean.Name.beq_iff_eq
File: src/lean/Init/Meta.lean

tactic: show m.beq n ↔ _
state_before: sep : String
escape : Bool
m n : Name
⊢ (m == n) = true ↔ m = n

tactic: induction m generalizing n <;> cases n <;> simp_all [Name.beq, And.comm]
state_before: sep : String
escape : Bool
m n : Name
⊢ Name.beq m n = true ↔ m = n
Theorem: Nat.pair_lt_max_add_one_sq
File: Mathlib/Data/Nat/Pairing.lean

tactic: rw [pair, add_sq, mul_one, two_mul, sq, add_assoc, add_assoc]
state_before: m n : ℕ
⊢ pair m n < (max m n + 1) ^ 2

tactic: cases' (lt_or_le m n) with h h
state_before: m n : ℕ
⊢ (if m < n then n * n + m else m * m + (m + n)) < max m n * max m n + (max m n + max m n + 1 ^ 2)

tactic: rw [if_pos h, max_eq_right h.le, add_lt_add_iff_left, add_assoc]
state_before: case inl
m n : ℕ
h : m < n
⊢ (if m < n then n * n + m else m * m + (m + n)) < max m n * max m n + (max m n + max m n + 1 ^ 2)

case inr
m n : ℕ
h : n ≤ m
⊢ (if m < n then n * n + m else m * m + (m + n)) < max m n * max m n + (max m n + max m n + 1 ^ 2)

tactic: exact h.trans_le (self_le_add_right n _)
state_before: case inl
m n : ℕ
h : m < n
⊢ m < n + (n + 1 ^ 2)

case inr
m n : ℕ
h : n ≤ m
⊢ (if m < n then n * n + m else m * m + (m + n)) < max m n * max m n + (max m n + max m n + 1 ^ 2)

tactic: rw [if_neg h.not_lt, max_eq_left h, add_lt_add_iff_left, add_assoc, add_lt_add_iff_left]
state_before: case inr
m n : ℕ
h : n ≤ m
⊢ (if m < n then n * n + m else m * m + (m + n)) < max m n * max m n + (max m n + max m n + 1 ^ 2)

tactic: exact lt_succ_of_le h
state_before: case inr
m n : ℕ
h : n ≤ m
⊢ n < m + 1 ^ 2
Theorem: Pretrivialization.mk_symm
File: Mathlib/Topology/FiberBundle/Trivialization.lean

tactic: rw [e.symm_apply hb, TotalSpace.mk_cast (e.proj_symm_apply' hb), TotalSpace.eta]
state_before: ι : Type ?u.15747
B : Type u_1
F : Type u_2
E : B → Type u_3
Z : Type ?u.15761
inst✝² : TopologicalSpace B
inst✝¹ : TopologicalSpace F
proj : Z → B
e✝ : Pretrivialization F proj
x : Z
e' : Pretrivialization F TotalSpace.proj
x' : TotalSpace E
b✝ : B
y✝ : E b✝
inst✝ : (x : B) → Zero (E x)
e : Pretrivialization F TotalSpace.proj
b : B
hb : b ∈ e.baseSet
y : F
⊢ totalSpaceMk b (Pretrivialization.symm e b y) = ↑(LocalEquiv.symm e.toLocalEquiv) (b, y)
Theorem: CategoryTheory.coconeOfRepresentable_naturality
File: Mathlib/CategoryTheory/Limits/Presheaf.lean

tactic: ext T f
state_before: C : Type u₁
inst✝¹ : SmallCategory C
ℰ : Type u₂
inst✝ : Category ℰ
A : C ⥤ ℰ
P₁ P₂ : Cᵒᵖ ⥤ Type u₁
α : P₁ ⟶ P₂
j : (Functor.Elements P₁)ᵒᵖ
⊢ (coconeOfRepresentable P₁).ι.app j ≫ α =
    (coconeOfRepresentable P₂).ι.app ((Functor.op (CategoryOfElements.map α)).obj j)

tactic: simpa [coconeOfRepresentable_ι_app] using FunctorToTypes.naturality _ _ α f.op _
state_before: case w.h.h
C : Type u₁
inst✝¹ : SmallCategory C
ℰ : Type u₂
inst✝ : Category ℰ
A : C ⥤ ℰ
P₁ P₂ : Cᵒᵖ ⥤ Type u₁
α : P₁ ⟶ P₂
j : (Functor.Elements P₁)ᵒᵖ
T : Cᵒᵖ
f : ((functorToRepresentables P₁).obj j).obj T
⊢ ((coconeOfRepresentable P₁).ι.app j ≫ α).app T f =
    ((coconeOfRepresentable P₂).ι.app ((Functor.op (CategoryOfElements.map α)).obj j)).app T f
Theorem: Nat.shiftr_eq_div_pow
File: Mathlib/Data/Nat/Size.lean

tactic: rw [div2_val, Nat.div_div_eq_div_mul, Nat.pow_succ]
state_before: m k : ℕ
⊢ div2 (m / 2 ^ k) = m / 2 ^ (k + 1)
Theorem: HomogeneousLocalization.natCast_val
File: Mathlib/RingTheory/GradedAlgebra/HomogeneousLocalization.lean

tactic: induction n <;> simp [Nat.unaryCast, zero_val, one_val, *]
state_before: ι : Type u_2
R : Type u_3
A : Type u_1
inst✝⁵ : AddCommMonoid ι
inst✝⁴ : DecidableEq ι
inst✝³ : CommRing R
inst✝² : CommRing A
inst✝¹ : Algebra R A
𝒜 : ι → Submodule R A
inst✝ : GradedAlgebra 𝒜
x : Submonoid A
n : ℕ
⊢ val (Nat.unaryCast n) = ↑n
Theorem: Nat.cofinite_eq_atTop
File: Mathlib/Order/Filter/Cofinite.lean

tactic: refine' le_antisymm _ atTop_le_cofinite
state_before: ι : Type ?u.6011
α : Type ?u.6014
β : Type ?u.6017
l : Filter α
⊢ cofinite = atTop

tactic: refine' atTop_basis.ge_iff.2 fun N _ => _
state_before: ι : Type ?u.6011
α : Type ?u.6014
β : Type ?u.6017
l : Filter α
⊢ cofinite ≤ atTop

tactic: simpa only [mem_cofinite, compl_Ici] using finite_lt_nat N
state_before: ι : Type ?u.6011
α : Type ?u.6014
β : Type ?u.6017
l : Filter α
N : ℕ
x✝ : True
⊢ Ici N ∈ cofinite
Theorem: MeasureTheory.LocallyIntegrableOn.continuousOn_mul
File: Mathlib/MeasureTheory/Function/LocallyIntegrable.lean

tactic: rw [MeasureTheory.locallyIntegrableOn_iff (Or.inr hs)] at hf⊢
state_before: X : Type u_1
Y : Type ?u.2497686
E : Type ?u.2497689
R : Type u_2
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s✝ : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
inst✝³ : LocallyCompactSpace X
inst✝² : T2Space X
inst✝¹ : NormedRing R
inst✝ : SecondCountableTopologyEither X R
f g : X → R
s : Set X
hf : LocallyIntegrableOn f s
hg : ContinuousOn g s
hs : IsOpen s
⊢ LocallyIntegrableOn (fun x => g x * f x) s

tactic: exact fun k hk_sub hk_c => (hf k hk_sub hk_c).continuousOn_mul (hg.mono hk_sub) hk_c
state_before: X : Type u_1
Y : Type ?u.2497686
E : Type ?u.2497689
R : Type u_2
inst✝⁹ : MeasurableSpace X
inst✝⁸ : TopologicalSpace X
inst✝⁷ : MeasurableSpace Y
inst✝⁶ : TopologicalSpace Y
inst✝⁵ : NormedAddCommGroup E
f✝ : X → E
μ : Measure X
s✝ : Set X
inst✝⁴ : OpensMeasurableSpace X
A K : Set X
inst✝³ : LocallyCompactSpace X
inst✝² : T2Space X
inst✝¹ : NormedRing R
inst✝ : SecondCountableTopologyEither X R
f g : X → R
s : Set X
hf : ∀ (k : Set X), k ⊆ s → IsCompact k → IntegrableOn f k
hg : ContinuousOn g s
hs : IsOpen s
⊢ ∀ (k : Set X), k ⊆ s → IsCompact k → IntegrableOn (fun x => g x * f x) k
Theorem: List.getD_append
File: Mathlib/Data/List/Basic.lean

tactic: rw [getD_eq_get _ _ h', get_append _ h, getD_eq_get]
state_before: ι : Type ?u.503158
α : Type u
β : Type v
γ : Type w
δ : Type x
l₁ l₂ l✝ : List α
x : α
xs : List α
d✝ : α
n✝ : ℕ
l l' : List α
d : α
n : ℕ
h : n < length l
h' : optParam (n < length (l ++ l')) (_ : n < length (l ++ l'))
⊢ getD (l ++ l') n d = getD l n d
Theorem: UV.compress_mem_compression
File: Mathlib/Combinatorics/SetFamily/Compression/UV.lean

tactic: rw [mem_compression]
state_before: α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b : α
ha : a ∈ s
⊢ compress u v a ∈ 𝓒 u v s

tactic: by_cases h : compress u v a ∈ s
state_before: α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b : α
ha : a ∈ s
⊢ compress u v a ∈ s ∧ compress u v (compress u v a) ∈ s ∨
    ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a

tactic: rw [compress_idem]
state_before: case pos
α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b : α
ha : a ∈ s
h : compress u v a ∈ s
⊢ compress u v a ∈ s ∧ compress u v (compress u v a) ∈ s ∨
    ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a

tactic: exact Or.inl ⟨h, h⟩
state_before: case pos
α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b : α
ha : a ∈ s
h : compress u v a ∈ s
⊢ compress u v a ∈ s ∧ compress u v a ∈ s ∨ ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a

tactic: exact Or.inr ⟨h, a, ha, rfl⟩
state_before: case neg
α : Type u_1
inst✝² : GeneralizedBooleanAlgebra α
inst✝¹ : DecidableRel Disjoint
inst✝ : DecidableRel fun x x_1 => x ≤ x_1
s : Finset α
u v a b : α
ha : a ∈ s
h : ¬compress u v a ∈ s
⊢ compress u v a ∈ s ∧ compress u v (compress u v a) ∈ s ∨
    ¬compress u v a ∈ s ∧ ∃ b, b ∈ s ∧ compress u v b = compress u v a
Theorem: PGame.lf_zero_le
File: Mathlib/SetTheory/Game/PGame.lean

tactic: rw [lf_iff_exists_le]
state_before: x : PGame
⊢ x ⧏ 0 ↔ ∃ j, moveRight x j ≤ 0

tactic: simp
state_before: x : PGame
⊢ ((∃ i, x ≤ moveLeft 0 i) ∨ ∃ j, moveRight x j ≤ 0) ↔ ∃ j, moveRight x j ≤ 0
Theorem: Polynomial.hasseDeriv_monomial
File: Mathlib/Data/Polynomial/HasseDeriv.lean

tactic: ext i
state_before: R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
⊢ ↑(hasseDeriv k) (↑(monomial n) r) = ↑(monomial (n - k)) (↑(choose n k) * r)

tactic: simp only [hasseDeriv_coeff, coeff_monomial]
state_before: case a
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
⊢ coeff (↑(hasseDeriv k) (↑(monomial n) r)) i = coeff (↑(monomial (n - k)) (↑(choose n k) * r)) i

tactic: by_cases hnik : n = i + k
state_before: case a
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
⊢ (↑(choose (i + k) k) * if n = i + k then r else 0) = if n - k = i then ↑(choose n k) * r else 0

tactic: rw [if_pos hnik, if_pos, ← hnik]
state_before: case pos
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : n = i + k
⊢ (↑(choose (i + k) k) * if n = i + k then r else 0) = if n - k = i then ↑(choose n k) * r else 0

tactic: apply tsub_eq_of_eq_add_rev
state_before: case pos.hc
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : n = i + k
⊢ n - k = i

tactic: rwa [add_comm]
state_before: case pos.hc.h
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : n = i + k
⊢ n = k + i

tactic: rw [if_neg hnik, MulZeroClass.mul_zero]
state_before: case neg
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : ¬n = i + k
⊢ (↑(choose (i + k) k) * if n = i + k then r else 0) = if n - k = i then ↑(choose n k) * r else 0

tactic: by_cases hkn : k ≤ n
state_before: case neg
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : ¬n = i + k
⊢ 0 = if n - k = i then ↑(choose n k) * r else 0

tactic: rw [← tsub_eq_iff_eq_add_of_le hkn] at hnik
state_before: case pos
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : ¬n = i + k
hkn : k ≤ n
⊢ 0 = if n - k = i then ↑(choose n k) * r else 0

tactic: rw [if_neg hnik]
state_before: case pos
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : ¬n - k = i
hkn : k ≤ n
⊢ 0 = if n - k = i then ↑(choose n k) * r else 0

tactic: push_neg  at hkn
state_before: case neg
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : ¬n = i + k
hkn : ¬k ≤ n
⊢ 0 = if n - k = i then ↑(choose n k) * r else 0

tactic: rw [Nat.choose_eq_zero_of_lt hkn, Nat.cast_zero, MulZeroClass.zero_mul, ite_self]
state_before: case neg
R : Type u_1
inst✝ : Semiring R
k : ℕ
f : R[X]
n : ℕ
r : R
i : ℕ
hnik : ¬n = i + k
hkn : n < k
⊢ 0 = if n - k = i then ↑(choose n k) * r else 0
Theorem: WithTop.coe_lt_iff
File: Mathlib/Order/WithBot.lean

tactic: simp
state_before: α : Type u_1
β : Type ?u.89670
γ : Type ?u.89673
δ : Type ?u.89676
inst✝ : LT α
a b : α
x : WithTop α
⊢ ↑a < x ↔ ∀ (b : WithTop α), x = b → ↑a < b
Theorem: CategoryTheory.obj_ε_inv_app
File: Mathlib/CategoryTheory/Monoidal/End.lean

tactic: rw [← cancel_mono ((F.obj n).map (F.ε.app X)), ← Functor.map_comp]
state_before: C : Type u
inst✝² : Category C
M : Type u_2
inst✝¹ : Category M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
n : M
X : C
⊢ (F.obj n).map ((MonoidalFunctor.εIso F).inv.app X) =
    (LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ M) n).app X ≫ (F.map (λ_ n).hom).app X

tactic: simp
state_before: C : Type u
inst✝² : Category C
M : Type u_2
inst✝¹ : Category M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
n : M
X : C
⊢ (F.obj n).map ((MonoidalFunctor.εIso F).inv.app X ≫ F.ε.app X) =
    ((LaxMonoidalFunctor.μ F.toLaxMonoidalFunctor (𝟙_ M) n).app X ≫ (F.map (λ_ n).hom).app X) ≫
      (F.obj n).map (F.ε.app X)

tactic: rfl
state_before: C : Type u
inst✝² : Category C
M : Type u_2
inst✝¹ : Category M
inst✝ : MonoidalCategory M
F : MonoidalFunctor M (C ⥤ C)
n : M
X : C
⊢ 𝟙 ((F.obj n).obj ((F.obj (𝟙_ M)).obj X)) = 𝟙 ((F.obj (𝟙_ M) ⊗ F.obj n).obj X)
Theorem: MulChar.pow_apply'
File: Mathlib/NumberTheory/LegendreSymbol/MulCharacter.lean

tactic: by_cases ha : IsUnit a
state_before: R : Type u
inst✝¹ : CommMonoid R
R' : Type v
inst✝ : CommMonoidWithZero R'
χ : MulChar R R'
n : ℕ
hn : 0 < n
a : R
⊢ ↑(χ ^ n) a = ↑χ a ^ n

tactic: exact pow_apply_coe χ n ha.unit
state_before: case pos
R : Type u
inst✝¹ : CommMonoid R
R' : Type v
inst✝ : CommMonoidWithZero R'
χ : MulChar R R'
n : ℕ
hn : 0 < n
a : R
ha : IsUnit a
⊢ ↑(χ ^ n) a = ↑χ a ^ n

tactic: rw [map_nonunit (χ ^ n) ha, map_nonunit χ ha, zero_pow hn]
state_before: case neg
R : Type u
inst✝¹ : CommMonoid R
R' : Type v
inst✝ : CommMonoidWithZero R'
χ : MulChar R R'
n : ℕ
hn : 0 < n
a : R
ha : ¬IsUnit a
⊢ ↑(χ ^ n) a = ↑χ a ^ n
Theorem: Nat.add_comm
File: src/lean/Init/Data/Nat/Basic.lean

tactic: have : succ (n + m) = succ (m + n) := by apply congrArg; apply Nat.add_comm
state_before: n m : Nat
⊢ n + (m + 1) = m + 1 + n

tactic: rw [succ_add m n]
state_before: n m : Nat
this : succ (n + m) = succ (m + n)
⊢ n + (m + 1) = m + 1 + n

tactic: apply this
state_before: n m : Nat
this : succ (n + m) = succ (m + n)
⊢ n + (m + 1) = succ (m + n)

tactic: apply congrArg
state_before: n m : Nat
⊢ succ (n + m) = succ (m + n)

tactic: apply Nat.add_comm
state_before: case h
n m : Nat
⊢ n + m = m + n
Theorem: Sylow.normal_of_all_max_subgroups_normal
File: Mathlib/GroupTheory/Sylow.lean

tactic: rcases eq_top_or_exists_le_coatom (↑P : Subgroup G).normalizer with (heq | ⟨K, hK, hNK⟩)
state_before: G : Type u
α : Type v
β : Type w
inst✝³ : Group G
inst✝² : Finite G
hnc : ∀ (H : Subgroup G), IsCoatom H → Normal H
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : Finite (Sylow p G)
P : Sylow p G
⊢ normalizer ↑P = ⊤

tactic: exact heq
state_before: case inl
G : Type u
α : Type v
β : Type w
inst✝³ : Group G
inst✝² : Finite G
hnc : ∀ (H : Subgroup G), IsCoatom H → Normal H
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : Finite (Sylow p G)
P : Sylow p G
heq : normalizer ↑P = ⊤
⊢ normalizer ↑P = ⊤

tactic: haveI := hnc _ hK
state_before: case inr.intro.intro
G : Type u
α : Type v
β : Type w
inst✝³ : Group G
inst✝² : Finite G
hnc : ∀ (H : Subgroup G), IsCoatom H → Normal H
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : Finite (Sylow p G)
P : Sylow p G
K : Subgroup G
hK : IsCoatom K
hNK : normalizer ↑P ≤ K
⊢ normalizer ↑P = ⊤

tactic: have hPK : ↑P ≤ K := le_trans le_normalizer hNK
state_before: case inr.intro.intro
G : Type u
α : Type v
β : Type w
inst✝³ : Group G
inst✝² : Finite G
hnc : ∀ (H : Subgroup G), IsCoatom H → Normal H
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : Finite (Sylow p G)
P : Sylow p G
K : Subgroup G
hK : IsCoatom K
hNK : normalizer ↑P ≤ K
this : Normal K
⊢ normalizer ↑P = ⊤

tactic: refine' (hK.1 _).elim
state_before: case inr.intro.intro
G : Type u
α : Type v
β : Type w
inst✝³ : Group G
inst✝² : Finite G
hnc : ∀ (H : Subgroup G), IsCoatom H → Normal H
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : Finite (Sylow p G)
P : Sylow p G
K : Subgroup G
hK : IsCoatom K
hNK : normalizer ↑P ≤ K
this : Normal K
hPK : ↑P ≤ K
⊢ normalizer ↑P = ⊤

tactic: rw [← sup_of_le_right hNK, P.normalizer_sup_eq_top' hPK]
state_before: case inr.intro.intro
G : Type u
α : Type v
β : Type w
inst✝³ : Group G
inst✝² : Finite G
hnc : ∀ (H : Subgroup G), IsCoatom H → Normal H
p : ℕ
inst✝¹ : Fact (Nat.Prime p)
inst✝ : Finite (Sylow p G)
P : Sylow p G
K : Subgroup G
hK : IsCoatom K
hNK : normalizer ↑P ≤ K
this : Normal K
hPK : ↑P ≤ K
⊢ K = ⊤
Theorem: Subsemigroup.closure_singleton_le_iff_mem
File: Mathlib/GroupTheory/Subsemigroup/Basic.lean

tactic: rw [closure_le, singleton_subset_iff, SetLike.mem_coe]
state_before: M : Type u_1
N : Type ?u.21166
A : Type ?u.21169
inst✝¹ : Mul M
s : Set M
inst✝ : Add A
t : Set A
S : Subsemigroup M
m : M
p : Subsemigroup M
⊢ closure {m} ≤ p ↔ m ∈ p
Theorem: hasFDerivWithinAt_inter'
File: Mathlib/Analysis/Calculus/FDeriv/Basic.lean

tactic: simp [HasFDerivWithinAt, nhdsWithin_restrict'' s h]
state_before: 𝕜 : Type u_2
inst✝⁸ : NontriviallyNormedField 𝕜
E : Type u_1
inst✝⁷ : NormedAddCommGroup E
inst✝⁶ : NormedSpace 𝕜 E
F : Type u_3
inst✝⁵ : NormedAddCommGroup F
inst✝⁴ : NormedSpace 𝕜 F
G : Type ?u.233733
inst✝³ : NormedAddCommGroup G
inst✝² : NormedSpace 𝕜 G
G' : Type ?u.233828
inst✝¹ : NormedAddCommGroup G'
inst✝ : NormedSpace 𝕜 G'
f f₀ f₁ g : E → F
f' f₀' f₁' g' e : E →L[𝕜] F
x : E
s t : Set E
L L₁ L₂ : Filter E
h : t ∈ 𝓝[s] x
⊢ HasFDerivWithinAt f f' (s ∩ t) x ↔ HasFDerivWithinAt f f' s x
Theorem: List.Perm.dropSlice_inter
File: Mathlib/Data/List/Perm.lean

tactic: simp only [dropSlice_eq]
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n m : ℕ
h : xs ~ ys
h' : Nodup ys
⊢ dropSlice n m xs ~ ys ∩ dropSlice n m xs

tactic: have : n ≤ n + m := Nat.le_add_right _ _
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n m : ℕ
h : xs ~ ys
h' : Nodup ys
⊢ take n xs ++ drop (n + m) xs ~ ys ∩ (take n xs ++ drop (n + m) xs)

tactic: have h₂ := h.nodup_iff.2 h'
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n m : ℕ
h : xs ~ ys
h' : Nodup ys
this : n ≤ n + m
⊢ take n xs ++ drop (n + m) xs ~ ys ∩ (take n xs ++ drop (n + m) xs)

tactic: apply Perm.trans _ (Perm.inter_append _).symm
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n m : ℕ
h : xs ~ ys
h' : Nodup ys
this : n ≤ n + m
h₂ : Nodup xs
⊢ take n xs ++ drop (n + m) xs ~ ys ∩ (take n xs ++ drop (n + m) xs)

tactic: . exact Perm.append (Perm.take_inter _ h h') (Perm.drop_inter _ h h')
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n m : ℕ
h : xs ~ ys
h' : Nodup ys
this : n ≤ n + m
h₂ : Nodup xs
⊢ take n xs ++ drop (n + m) xs ~ ys ∩ take n xs ++ ys ∩ drop (n + m) xs

α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n m : ℕ
h : xs ~ ys
h' : Nodup ys
this : n ≤ n + m
h₂ : Nodup xs
⊢ Disjoint (take n xs) (drop (n + m) xs)

tactic: . exact disjoint_take_drop h₂ this
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n m : ℕ
h : xs ~ ys
h' : Nodup ys
this : n ≤ n + m
h₂ : Nodup xs
⊢ Disjoint (take n xs) (drop (n + m) xs)

tactic: exact Perm.append (Perm.take_inter _ h h') (Perm.drop_inter _ h h')
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n m : ℕ
h : xs ~ ys
h' : Nodup ys
this : n ≤ n + m
h₂ : Nodup xs
⊢ take n xs ++ drop (n + m) xs ~ ys ∩ take n xs ++ ys ∩ drop (n + m) xs

tactic: exact disjoint_take_drop h₂ this
state_before: α✝ : Type uu
β : Type vv
l₁ l₂ : List α✝
α : Type u_1
inst✝ : DecidableEq α
xs ys : List α
n m : ℕ
h : xs ~ ys
h' : Nodup ys
this : n ≤ n + m
h₂ : Nodup xs
⊢ Disjoint (take n xs) (drop (n + m) xs)
Theorem: Commute.invOf_right
File: Mathlib/Algebra/Invertible.lean

tactic: simp [mul_assoc]
state_before: α : Type u
inst✝¹ : Monoid α
a b : α
inst✝ : Invertible b
h : Commute a b
⊢ a * ⅟b = ⅟b * (b * a * ⅟b)

tactic: rw [h.eq]
state_before: α : Type u
inst✝¹ : Monoid α
a b : α
inst✝ : Invertible b
h : Commute a b
⊢ ⅟b * (b * a * ⅟b) = ⅟b * (a * b * ⅟b)

tactic: simp [mul_assoc]
state_before: α : Type u
inst✝¹ : Monoid α
a b : α
inst✝ : Invertible b
h : Commute a b
⊢ ⅟b * (a * b * ⅟b) = ⅟b * a
Theorem: UpperSet.map_Ici
File: Mathlib/Order/UpperLower/Basic.lean

tactic: ext
state_before: α : Type u_1
β : Type u_2
γ : Type ?u.111542
ι : Sort ?u.111545
κ : ι → Sort ?u.111550
inst✝¹ : Preorder α
inst✝ : Preorder β
s : UpperSet α
a✝ b : α
f : α ≃o β
a : α
⊢ ↑(map f) (Ici a) = Ici (↑f a)

tactic: simp
state_before: case a.h
α : Type u_1
β : Type u_2
γ : Type ?u.111542
ι : Sort ?u.111545
κ : ι → Sort ?u.111550
inst✝¹ : Preorder α
inst✝ : Preorder β
s : UpperSet α
a✝ b : α
f : α ≃o β
a : α
x✝ : β
⊢ x✝ ∈ ↑(↑(map f) (Ici a)) ↔ x✝ ∈ ↑(Ici (↑f a))